/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
  /* Colors */
  --bg-deep: #060a13;
  --bg-dark: #0c1222;
  --bg-glass: rgba(13, 22, 42, 0.75);
  --bg-glass-card: rgba(18, 30, 58, 0.6);
  --bg-dark-hover: rgba(30, 48, 88, 0.4);
  
  --border-glass: rgba(255, 255, 255, 0.05);
  --border-glass-focus: rgba(6, 182, 212, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent: #06b6d4;          /* Cyan water */
  --accent-rgb: 6, 182, 212;
  --accent-hover: #0891b2;
  
  --success: #10b981;         /* Emerald */
  --warning: #f59e0b;         /* Amber */
  --danger: #ef4444;          /* Ruby */

  /* Shadows */
  --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.15);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-inset: inset 0 2px 4px 0 rgba(255, 255, 255, 0.03);

  /* Member Themes */
  --color-navy: #3b82f6;      /* Blue */
  --color-emerald: #10b981;   /* Emerald */
  --color-amber: #f59e0b;     /* Amber */
  --color-ruby: #ef4444;      /* Ruby */
  --color-indigo: #6366f1;    /* Indigo */
  --color-purple: #a855f7;    /* Purple */
  --color-cyan: #06b6d4;      /* Cyan */
  --color-orange: #f97316;    /* Orange */
  --color-gray: #6b7280;      /* Gray */

  --font-family-header: 'Outfit', sans-serif;
  --font-family-body: 'Plus Jakarta Sans', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   GLOBAL STYLES & RESET
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-family-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  height: 100vh;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-header);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
}

li {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

.hide {
  display: none !important;
}

/* Glassmorphism Utility */
.glassmorphism {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  border-radius: 16px;
}

/* ==========================================================================
   PASSWORD GATE OVERLAY
   ========================================================================== */
.gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #0e1b30 0%, #040810 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.gate-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.gate-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 30px;
  text-align: center;
  animation: modalSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 50px rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.15);
}

.gate-logo {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(6, 182, 212, 0.05) 100%);
  border: 1px solid rgba(6, 182, 212, 0.3);
  margin-bottom: 24px;
  box-shadow: var(--shadow-glow);
}

.gate-logo i {
  font-size: 32px;
  color: var(--accent);
  animation: floatAnchor 4s ease-in-out infinite;
}

.gate-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gate-header p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 30px;
}

.gate-form {
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-container input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(8, 14, 28, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 16px;
  transition: var(--transition-smooth);
}

.password-input-container input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
  background: rgba(12, 21, 41, 0.9);
}

.btn-icon {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.btn-icon:hover {
  color: var(--text-primary);
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
  display: block;
}

.btn-primary {
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-primary:hover {
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-block {
  display: flex;
  width: 100%;
}

.gate-footer {
  margin-top: 30px;
  font-size: 13px;
  color: var(--text-muted);
}

.gate-footer i {
  margin-right: 4px;
}

/* ==========================================================================
   APP MASTER LAYOUT
   ========================================================================== */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar navigation */
.sidebar {
  width: 260px;
  height: calc(100vh - 24px);
  margin: 12px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 24px;
}

.brand-icon {
  font-size: 24px;
  color: var(--accent);
}

.brand-text h2 {
  font-size: 18px;
  line-height: 1.2;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  flex-grow: 1;
}

.sidebar-nav ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-link i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.nav-link:hover, .nav-link.active {
  background: var(--bg-dark-hover);
  color: var(--text-primary);
}

.nav-link.active {
  border-left: 3px solid var(--accent);
  padding-left: 13px;
  box-shadow: inset 5px 0 10px -5px rgba(6, 182, 212, 0.15);
}

.sidebar-footer {
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-session {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-smooth);
  padding: 4px;
}

.btn-text:hover {
  color: var(--danger);
}

/* Main window layout */
.main-content {
  flex-grow: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Headers */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.header-title h1 {
  font-size: 28px;
  font-weight: 700;
}

.header-title p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Status Panel */
.status-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px;
  min-width: 250px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot.pulsing {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulse 2s infinite;
}

.status-details {
  font-size: 12px;
  color: var(--text-secondary);
}

/* General tab sections visibility */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

/* ==========================================================================
   DASHBOARD TAB
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 10px rgba(6, 182, 212, 0.05);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

.bg-navy-light { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.bg-teal-light { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.bg-amber-light { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.bg-purple-light { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.stat-info h3 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.stat-info p {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.stat-subtext {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

/* Dashboard Row */
.dashboard-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.dashboard-col {
  display: flex;
  flex-direction: column;
  min-height: 380px;
  padding: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.card-header h2 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header p {
  font-size: 12px;
  color: var(--text-secondary);
}

.text-accent {
  color: var(--accent);
}

.card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Usage Donut Chart */
.chart-layout {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  flex-wrap: wrap;
  flex-grow: 1;
}

.chart-svg-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  flex-shrink: 0;
}

.donut-chart {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.chart-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
}

#chart-center-val {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.chart-center-text span:last-child {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 8px;
  flex-grow: 1;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-name {
  font-weight: 500;
}

.legend-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-hours {
  color: var(--text-secondary);
}

.legend-pct {
  font-weight: 600;
  min-width: 32px;
  text-align: right;
}

/* Upcoming Bookings List */
.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upcoming-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255,255,255, 0.02);
  transition: var(--transition-smooth);
}

.upcoming-item:hover {
  background: var(--bg-dark-hover);
  border-color: rgba(255, 255, 255, 0.05);
}

.member-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.upcoming-details {
  flex-grow: 1;
}

.upcoming-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.upcoming-name {
  font-weight: 600;
}

.upcoming-duration {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 20px;
  color: var(--text-secondary);
}

.upcoming-date {
  font-size: 12px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.upcoming-notes {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.loading-placeholder {
  color: var(--text-muted);
  text-align: center;
  padding: 30px;
}

/* ==========================================================================
   CALENDAR TAB
   ========================================================================== */
.calendar-wrapper {
  padding: 24px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-dark-hover);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.btn-icon-circle:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.calendar-actions {
  display: flex;
  gap: 10px;
}

.btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(100px, auto);
  gap: 6px;
}

.calendar-day {
  background: rgba(255,255,255, 0.01);
  border: 1px solid rgba(255,255,255, 0.02);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  cursor: pointer;
  min-height: 100px;
}

.calendar-day:hover {
  background: var(--bg-dark-hover);
  border-color: var(--border-glass-focus);
}

.calendar-day.empty {
  opacity: 0.15;
  cursor: default;
}

.calendar-day.empty:hover {
  background: transparent;
  border-color: rgba(255,255,255, 0.02);
}

.calendar-day.today {
  border-color: var(--accent);
  box-shadow: inset 0 0 6px rgba(6, 182, 212, 0.15);
}

.day-number {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  align-self: flex-start;
  color: var(--text-secondary);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.calendar-day.today .day-number {
  background: var(--accent);
  color: white;
}

.day-bookings {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.cal-booking-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.calendar-legend {
  margin-top: 24px;
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.legend-title {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.legend-items {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.legend-member-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.member-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ==========================================================================
   BOOKINGS LOG TAB
   ========================================================================== */
.filter-card {
  padding: 16px 20px;
  margin-bottom: 24px;
}

.filter-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  background: rgba(8, 14, 28, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 8px 12px;
  transition: var(--transition-smooth);
}

.filter-group:focus-within {
  border-color: var(--accent);
}

.search-box {
  flex-grow: 1;
  min-width: 250px;
  gap: 10px;
  color: var(--text-muted);
}

.search-box input {
  background: transparent;
  border: none;
  color: white;
  width: 100%;
}

.filter-group select {
  background: transparent;
  border: none;
  color: white;
  padding-right: 20px;
  cursor: pointer;
}

.bookings-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-glass);
}

.bookings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.bookings-table th {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
}

.bookings-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.bookings-table tbody tr:last-child td {
  border-bottom: none;
}

.bookings-table tbody tr:hover {
  background: rgba(255,255,255, 0.01);
}

.member-badge-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-badge-container span {
  font-weight: 600;
}

.booking-duration-cell {
  font-size: 13px;
  color: var(--text-secondary);
}

.booking-notes-cell {
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
  font-size: 13px;
  color: var(--text-secondary);
}

.text-right { text-align: right; }
.btn-danger-sm {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-danger-sm:hover {
  background: var(--danger);
  color: white;
}

/* ==========================================================================
   MEMBERS TAB
   ========================================================================== */
.members-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.member-card {
  padding: 24px;
  text-align: center;
  position: relative;
  transition: var(--transition-smooth);
}

.member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.btn-delete-member {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  transition: var(--transition-smooth);
  opacity: 0;
}

.member-card:hover .btn-delete-member {
  opacity: 1;
}

.btn-delete-member:hover {
  color: var(--danger);
}

.member-avatar-lg {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  border: 2px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.member-card h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.member-joined {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: block;
}

.member-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
}

.m-stat-box:first-child {
  border-right: 1px solid var(--border-glass);
}

.m-stat-num {
  font-size: 18px;
  font-weight: 700;
  display: block;
}

.m-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   SETTINGS TAB
   ========================================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.settings-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 16px;
}

.settings-card-header i {
  font-size: 24px;
  margin-top: 2px;
}

.settings-card-header h3 {
  font-size: 16px;
}

.settings-card-header p {
  font-size: 12px;
  color: var(--text-secondary);
}

.settings-card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-alert {
  display: flex;
  gap: 12px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.info-alert i {
  color: #3b82f6;
  font-size: 14px;
  margin-top: 2px;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.diagnostics-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 16px;
  font-family: monospace;
  font-size: 12px;
}

.diag-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 6px;
}

.badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.badge.pass { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge.fail { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.diag-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.diag-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.diag-time {
  display: block;
  text-align: right;
  color: var(--text-muted);
  font-size: 10px;
}

.help-guide {
  font-size: 13px;
  color: var(--text-secondary);
}

.help-guide ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-guide ul {
  padding-left: 20px;
  margin-top: 4px;
  color: var(--text-muted);
}

/* ==========================================================================
   MODAL WINDOWS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 13, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay:not(.hide) {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-card input, .modal-card select, .modal-card textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(8, 14, 28, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: white;
  transition: var(--transition-smooth);
}

.modal-card input:focus, .modal-card select:focus, .modal-card textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.2);
  background: rgba(12, 21, 41, 0.9);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.form-checkbox input {
  width: auto;
  cursor: pointer;
}

.error-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--danger);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

/* ==========================================================================
   MEMBER THEME CHIPS / AVATARS
   ========================================================================== */
.theme-navy { background-color: rgba(59, 130, 246, 0.15) !important; color: var(--color-navy) !important; border-color: rgba(59, 130, 246, 0.3) !important; }
.theme-emerald { background-color: rgba(16, 185, 129, 0.15) !important; color: var(--color-emerald) !important; border-color: rgba(16, 185, 129, 0.3) !important; }
.theme-amber { background-color: rgba(245, 158, 11, 0.15) !important; color: var(--color-amber) !important; border-color: rgba(245, 158, 11, 0.3) !important; }
.theme-ruby { background-color: rgba(239, 68, 68, 0.15) !important; color: var(--color-ruby) !important; border-color: rgba(239, 68, 68, 0.3) !important; }
.theme-indigo { background-color: rgba(99, 102, 241, 0.15) !important; color: var(--color-indigo) !important; border-color: rgba(99, 102, 241, 0.3) !important; }
.theme-purple { background-color: rgba(168, 85, 247, 0.15) !important; color: var(--color-purple) !important; border-color: rgba(168, 85, 247, 0.3) !important; }
.theme-cyan { background-color: rgba(6, 182, 212, 0.15) !important; color: var(--color-cyan) !important; border-color: rgba(6, 182, 212, 0.3) !important; }
.theme-orange { background-color: rgba(249, 115, 22, 0.15) !important; color: var(--color-orange) !important; border-color: rgba(249, 115, 22, 0.3) !important; }
.theme-gray { background-color: rgba(107, 114, 128, 0.15) !important; color: var(--color-gray) !important; border-color: rgba(107, 114, 128, 0.3) !important; }

/* Statuses colors */
.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-danger { background-color: var(--danger); }

/* ==========================================================================
   MOBILE & RESPONSIVE LAYOUTS
   ========================================================================== */
.mobile-header {
  display: none;
  width: 100vw;
  height: 60px;
  padding: 0 20px;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  border-radius: 0;
  border-bottom: 1px solid var(--border-glass);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family-header);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
}

.mobile-nav {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100vw;
  z-index: 99;
  border-radius: 0;
  border-bottom: 1px solid var(--border-glass);
  padding: 10px 0;
  animation: slideDown 0.3s ease;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  font-weight: 500;
}

.mobile-nav-link.active {
  background: var(--bg-dark-hover);
  color: var(--accent);
}

.btn-logout {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--danger);
  padding: 14px 24px;
  text-align: left;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .sidebar {
    display: none;
  }
  
  .mobile-header {
    display: flex;
  }
  
  .app-layout {
    flex-direction: column;
    padding-top: 60px;
  }
  
  .main-content {
    padding: 24px 20px;
    height: calc(100vh - 60px);
  }
  
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .calendar-weekdays {
    font-size: 12px;
  }
  
  .day-number {
    font-size: 11px;
  }
  
  .calendar-grid {
    grid-auto-rows: minmax(70px, auto);
  }
  
  .calendar-day {
    min-height: 70px;
    padding: 4px;
  }
  
  .cal-booking-pill {
    padding: 1px 3px;
    font-size: 8px;
  }
}

@media (max-width: 540px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .content-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .status-panel {
    min-width: 100%;
  }
  
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group select, .filter-group input {
    width: 100%;
  }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes floatAnchor {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes modalSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
