/* ==========================================================================
   TVTC Official Design System & Glassmorphic Dashboard
   المؤسسة العامة للتدريب التقني والمهني
   الهوية البصرية الرسمية (https://tvtc.gov.sa/)
   - تصميم مخصص 100% للهاتف مطابق للصورة
   - تصميم زجاجي عصري فاخر لأجهزة الكمبيوتر (Desktop Glassmorphism)
   - خالٍ تماماً من الإيموجي (رموز SVG وأيقونات احترافية فقط)
   ========================================================================== */

:root {
  /* TVTC Brand Palette */
  --tvtc-teal: #008b8c;
  --tvtc-teal-dark: #005f61;
  --tvtc-teal-darker: #004345;
  --tvtc-teal-light: #e6f6f6;
  --tvtc-teal-glow: rgba(0, 139, 140, 0.16);
  --tvtc-teal-border: rgba(0, 139, 140, 0.22);
  
  --tvtc-gold: #c69214;
  --tvtc-gold-light: #fff8e8;
  --tvtc-gold-border: rgba(198, 146, 20, 0.28);
  --tvtc-gold-dark: #9e730a;
  
  --primary: var(--tvtc-teal);
  --primary-dark: var(--tvtc-teal-dark);
  --primary-light: var(--tvtc-teal-light);
  --primary-glow: var(--tvtc-teal-glow);
  --primary-border: var(--tvtc-teal-border);
  
  --bg: #f2f7f7;
  --bg-gradient: radial-gradient(circle at 95% 5%, rgba(0, 139, 140, 0.07), transparent 35%),
                radial-gradient(circle at 5% 90%, rgba(198, 146, 20, 0.05), transparent 30%),
                #f2f7f7;
                
  --surface: #ffffff;
  --surface-alt: #f7faf9;
  --border: #e1ebea;
  --border-light: #ecf3f2;
  
  --ink: #162627;
  --ink-secondary: #354a4b;
  --muted: #6e8384;
  --light-muted: #9bb0b1;
  
  /* Status Colors */
  --ok: #16a34a;
  --ok-soft: #ecfdf5;
  --ok-border: #a7f3d0;
  
  --busy: #ef4444;
  --busy-soft: #fef2f2;
  --busy-border: #fecaca;
  
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --warn-border: #fde68a;
  
  --gray-pill: #94a3b8;
  --gray-slot: #cbd5e1;
  
  /* Glassmorphism Variables (Desktop & Cards) */
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-bg-subtle: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(0, 139, 140, 0.16);
  --glass-blur: blur(18px);
  --glass-shadow: 0 10px 32px rgba(0, 60, 62, 0.06);
  --glass-shadow-lg: 0 18px 45px rgba(0, 60, 62, 0.10);
  
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 60, 62, 0.04);
  --shadow-md: 0 6px 20px rgba(0, 60, 62, 0.06);
  --shadow-dock: 0 -8px 30px rgba(0, 60, 62, 0.08);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-gradient);
  color: var(--ink);
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
}

/* Base Glass Card */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}

.glass-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--glass-shadow-lg);
}

/* ==========================================================================
   DESKTOP VS MOBILE LAYOUT SWITCHING
   ========================================================================== */

/* By default, hide desktop sidebar and desktop topbar on mobile */
.desktop-sidebar { display: none; }
.desktop-topbar { display: none; }
.desktop-only { display: none !important; }

/* Mobile container wrapper */
.mobile-view-wrap {
  width: min(500px, 100%);
  margin: 0 auto;
  padding: 16px 16px 110px;
  position: relative;
}

/* Desktop Styles */
@media (min-width: 769px) {
  .mobile-only { display: none !important; }
  .desktop-only { display: block !important; }
  
  .app-layout {
    display: flex;
    min-height: 100vh;
  }
  
  /* Desktop Sticky Glass Sidebar */
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 275px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--glass-border);
    box-shadow: 4px 0 35px rgba(0, 60, 62, 0.05);
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px 20px;
    flex-shrink: 0;
    z-index: 100;
  }
  
  .desktop-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
  }
  
  .desktop-brand::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 50px;
    height: 2px;
    background: var(--tvtc-gold);
    border-radius: 2px;
  }
  
  .desktop-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--tvtc-teal), var(--tvtc-teal-dark));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 22px;
    box-shadow: 0 6px 18px rgba(0, 139, 140, 0.28);
    flex-shrink: 0;
  }
  
  .desktop-brand-text h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.3;
  }
  
  .desktop-brand-text p {
    margin: 3px 0 0;
    font-size: 11px;
    color: var(--tvtc-teal-dark);
    font-weight: 600;
  }
  
  .desktop-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
  }
  
  .desktop-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink-secondary);
    text-decoration: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: right;
  }
  
  .desktop-nav-item i {
    font-size: 18px;
    width: 22px;
    text-align: center;
    color: var(--tvtc-teal);
    transition: transform 0.2s ease;
  }
  
  .desktop-nav-item:hover {
    background: var(--tvtc-teal-light);
    color: var(--tvtc-teal-darker);
    border-color: var(--tvtc-teal-border);
  }
  
  .desktop-nav-item:hover i {
    transform: translateX(-2px);
  }
  
  .desktop-nav-item.active {
    background: linear-gradient(135deg, var(--tvtc-teal), var(--tvtc-teal-dark));
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 139, 140, 0.25);
  }
  
  .desktop-nav-item.active i {
    color: #ffffff;
  }
  
  .desktop-user-footer {
    padding-top: 16px;
    margin-top: 10px;
    border-top: 1px solid var(--border-light);
  }
  
  .desktop-user-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 14px;
  }
  
  .desktop-user-box .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tvtc-teal-light);
    color: var(--tvtc-teal);
    display: grid;
    place-items: center;
    font-size: 16px;
    flex-shrink: 0;
  }
  
  /* Desktop Main Area */
  .desktop-main {
    flex: 1;
    min-width: 0;
    padding: 24px 36px 60px;
  }
  
  .desktop-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 14px 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
  }
  
  .desktop-topbar-title h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
  }
  
  .desktop-topbar-title span {
    font-size: 12px;
    color: var(--muted);
  }
  
  .desktop-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .mobile-view-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }
}

/* ==========================================================================
   MOBILE HEADER & WELCOME CARD
   ========================================================================== */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 4px 2px;
}

.top-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.menu-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
}

.top-title-group {
  display: flex;
  flex-direction: column;
}

.top-subtitle {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.2;
}

.top-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin: 2px 0 0;
  line-height: 1.2;
}

.user-profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 14px 6px 8px;
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-meta-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.user-meta-role {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

/* Welcome Card */
.welcome-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.welcome-card-content {
  flex: 1;
  min-width: 0;
}

.welcome-heading {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 4px;
}

.welcome-date {
  font-size: 13px;
  color: var(--ink-secondary);
  font-weight: 600;
  margin: 0 0 2px;
}

.welcome-semester {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.welcome-building-thumb {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.welcome-calendar-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* ==========================================================================
   STATS GRID (2x2 on Mobile, 4-col Glass Row on Desktop)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 769px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
  }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 106px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 769px) {
  .stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 20px;
    box-shadow: var(--glass-shadow);
  }
}

.stat-card:hover {
  border-color: var(--primary-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 16px;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  margin-top: 8px;
  text-align: center;
}

/* ==========================================================================
   OCCUPANCY & VACANT ROOMS
   ========================================================================== */
.occupancy-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 769px) {
  .occupancy-row {
    gap: 18px;
    margin-bottom: 22px;
  }
}

.occupancy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 769px) {
  .occupancy-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
    padding: 22px;
  }
}

.occupancy-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
  text-align: center;
}

/* Donut Chart */
.donut-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 8px 0;
}

.donut-circle {
  --pct: 0%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: conic-gradient(var(--busy) 0% var(--pct), var(--ok) var(--pct) 100%);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}

.donut-circle::before {
  content: "";
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--surface);
  position: absolute;
}

@media (min-width: 769px) {
  .donut-circle::before {
    background: #ffffff;
  }
}

.donut-val {
  position: relative;
  z-index: 2;
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

.occupancy-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-secondary);
}

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

.legend-dot.busy { background: var(--busy); }
.legend-dot.free { background: var(--ok); }
.legend-dot.total { background: var(--gray-pill); }

.occupancy-total-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.vacant-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}

.vacant-icon {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 4px;
}

.vacant-number {
  font-size: 42px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.vacant-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 14px;
}

.btn-vacant-link {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary);
  background: var(--surface);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-vacant-link:hover {
  background: var(--primary);
  color: #fff;
}

/* ==========================================================================
   LIVE TIME & CURRENT PERIOD BAR
   ========================================================================== */
.live-period-bar {
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 769px) {
  .live-period-bar {
    border-radius: var(--radius-xl);
    padding: 16px 22px;
    margin-bottom: 22px;
  }
}

.live-time-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-time-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.15);
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.live-time-text {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.live-period-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-period-info {
  text-align: left;
}

.live-period-label {
  font-size: 12px;
  color: var(--ink-secondary);
  font-weight: 700;
}

.live-period-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ok);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
}

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-wrap h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.section-badge-count {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok-border);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.section-link-all {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.section-link-all:hover {
  text-decoration: underline;
}

/* ==========================================================================
   LECTURE CARDS
   ========================================================================== */
.lecture-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  position: relative;
  transition: all 0.2s ease;
}

@media (min-width: 769px) {
  .lecture-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
  }
}

.lecture-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.lecture-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.lecture-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.lecture-details {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.lecture-time-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
  direction: ltr;
  display: inline-block;
  margin-bottom: 3px;
}

.lecture-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lecture-trainer {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 2px;
}

.lecture-room {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.lecture-chevron {
  color: var(--light-muted);
  font-size: 16px;
}

/* Progress bar inside current lecture */
.lecture-progress-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.lecture-progress-bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--border-light);
  overflow: hidden;
  margin-bottom: 6px;
}

.lecture-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary), #14b8a6);
  width: 45%;
  transition: width 0.3s ease;
}

.lecture-remaining-text {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
}

/* ==========================================================================
   ROOMS SCREEN (rooms.php)
   ========================================================================== */
.rooms-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.back-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 16px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.back-circle-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.rooms-title-group h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.rooms-title-group p {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
}

/* Segmented Tabs Control */
.segmented-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #eaefee;
  padding: 4px;
  border-radius: 16px;
  margin-bottom: 16px;
}

@media (min-width: 769px) {
  .segmented-tabs {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    padding: 6px;
    border-radius: 18px;
    margin-bottom: 22px;
  }
}

.segment-btn {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 6px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.segment-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 139, 140, 0.25);
}

/* Horizontal Available Rooms Slider (Carousel on desktop & mobile) */
.available-slider-container {
  position: relative;
  margin-bottom: 16px;
}

.available-scroll-wrap {
  overflow-x: auto;
  padding: 4px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.available-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.available-scroll-inner {
  display: flex;
  gap: 12px;
  width: max-content;
  transition: all 0.25s ease;
}

/* Expanded Grid Mode when clicking 'عرض الكل' */
.available-scroll-wrap.grid-mode {
  overflow: visible;
}

.available-scroll-wrap.grid-mode .available-scroll-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  width: 100%;
  gap: 12px;
}

.available-scroll-wrap.grid-mode .avail-room-card {
  width: auto;
  min-width: 0;
}

.slider-arrow {
  display: none;
  position: absolute;
  top: calc(50% - 5px);
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}

.slider-arrow:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(11, 107, 101, 0.25);
  transform: translateY(-50%) scale(1.08);
}

.slider-arrow.prev { right: -14px; }
.slider-arrow.next { left: -14px; }

@media (min-width: 769px) {
  .slider-arrow {
    display: flex;
  }
}

.avail-room-card {
  width: 145px;
  min-width: 145px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.avail-room-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (min-width: 769px) {
  .avail-room-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }
}

.avail-room-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 17px;
  margin-bottom: 4px;
}

.avail-room-number {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.avail-room-type {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  margin-top: -2px;
}

.avail-room-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ok);
}

.avail-room-time {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

/* Filter Chips Bar */
.rooms-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 12px;
}
.rooms-filter-bar::-webkit-scrollbar { display: none; }

.rooms-filter-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.rooms-filter-chip:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.rooms-filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Training Hours Notice Banner */
.training-notice-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(3, 105, 161, 0.08);
  border: 1px solid rgba(3, 105, 161, 0.22);
  color: #0369a1;
  padding: 11px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}

/* Occupancy Matrix Table (خريطة إشغال القاعات) */
.matrix-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

@media (min-width: 769px) {
  .matrix-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
    padding: 24px;
    margin-bottom: 22px;
  }
}

.matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.matrix-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.matrix-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px;
  margin-bottom: 12px;
  table-layout: fixed;
}

.matrix-table th {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  padding: 8px 2px;
}

.matrix-table th:first-child,
.matrix-room-cell {
  width: 110px;
  text-align: right;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  padding-right: 6px;
}

.matrix-slot-block {
  height: 26px;
  border-radius: 6px;
  display: block;
  transition: transform 0.15s ease, opacity 0.15s ease;
  cursor: pointer;
}

.matrix-slot-block:hover {
  transform: scale(1.04);
  opacity: 0.92;
}

.matrix-slot-block.busy {
  background: #ef4444;
}

.matrix-slot-block.free {
  background: #10b981;
}

.matrix-slot-block.unavailable {
  background: var(--gray-slot);
}

.matrix-legend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 16px;
}

.matrix-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.matrix-legend-box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.matrix-legend-box.busy { background: #ef4444; }
.matrix-legend-box.free { background: #10b981; }
.matrix-legend-box.unavailable { background: var(--gray-slot); }

.btn-matrix-action {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  border: 0;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.btn-matrix-action:hover {
  background: var(--primary-dark);
}

/* Quick Tips Card */
.tips-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

@media (min-width: 769px) {
  .tips-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }
}

.tips-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tips-list {
  margin: 0;
  padding-right: 18px;
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.8;
}

/* ==========================================================================
   FLOATING BOTTOM NAVIGATION DOCK (Mobile Only)
   ========================================================================== */
.floating-bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, calc(100% - 24px));
  height: 70px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 139, 140, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow-dock);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 10px;
  z-index: 1000;
}

@media (min-width: 769px) {
  .floating-bottom-nav {
    display: none !important;
  }
}

.nav-dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: #788a8a;
  background: transparent;
  border: 0;
  padding: 6px 14px;
  border-radius: 18px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
  min-width: 58px;
}

.nav-dock-item i,
.nav-dock-item svg {
  font-size: 19px;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.nav-dock-item:hover {
  color: var(--primary);
}

.nav-dock-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}

.nav-dock-item.active i,
.nav-dock-item.active svg {
  transform: translateY(-1px);
}

/* ==========================================================================
   MORE BOTTOM SHEET DRAWER
   ========================================================================== */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 35, 36, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.bottom-sheet-overlay.open {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet-drawer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: min(520px, 100%);
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 20px 20px 36px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1200;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  overflow-y: auto;
}

.bottom-sheet-overlay.open .bottom-sheet-drawer {
  transform: translate(-50%, 0);
}

.sheet-handle {
  width: 44px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: #d1dcda;
  margin: 0 auto 16px;
}

.sheet-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 16px;
  text-align: center;
}

.sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sheet-item:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.sheet-item i {
  font-size: 17px;
  color: var(--primary);
}

.sheet-item.danger {
  color: var(--busy);
}

.sheet-item.danger i {
  color: var(--busy);
}

.sheet-item.danger:hover {
  background: var(--busy-soft);
  border-color: var(--busy-border);
}

/* Empty State */
.empty-state {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
