:root {
  --primary: #8B4D09;          /* Earthy Terracotta */
  --primary-hover: #723E07;
  --primary-light: #FDF6EE;
  --secondary: #495916;        /* Sage / Olive Green */
  --secondary-hover: #3B4811;
  --secondary-light: #F1F4E9;
  --accent-gold: #C5A059;      /* Warm Gold Accent */
  --accent-gold-light: #FAF5EB;
  --bg-main: #FBF8F4;          /* Warm Cream Canvas */
  --bg-card: #FFFFFF;
  --bg-sidebar: #22252A;       /* Deep Charcoal Sidebar */
  --text-main: #23272A;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E8DFD5;
  --border-light: #F0EAE1;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --success: #16A34A;
  --success-light: #DCFCE7;
  --warning: #D97706;
  --warning-light: #FEF3C7;
  --info: #2563EB;
  --info-light: #DBEAFE;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ========================================================
   APP LAYOUT: SIDEBAR + MAIN CONTENT
   ======================================================== */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.app-sidebar {
  width: 285px;
  background-color: var(--bg-sidebar);
  color: #E5E7EB;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
  z-index: 20;
  transition: width 0.2s ease;
}

.sidebar-header {
  padding: 16px 14px 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  position: relative;
}

/* STUDIO LOGO EMBLEM CONTAINER (LEFT PANEL) */
.sidebar-logo-5cm-box {
  width: 120px;
  height: 120px;
  max-width: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
  background: radial-gradient(circle at center, rgba(197, 160, 89, 0.16) 0%, rgba(20, 24, 33, 0.9) 100%);
  border: 1px solid rgba(197, 160, 89, 0.45);
  border-radius: 16px;
  padding: 8px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  box-sizing: border-box;
}

.sidebar-logo-5cm-box:hover {
  border-color: var(--accent-gold);
  background: radial-gradient(circle at center, rgba(197, 160, 89, 0.26) 0%, rgba(20, 24, 33, 0.98) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(197, 160, 89, 0.35);
}

.sidebar-logo-5cm-box:hover .sidebar-logo-hover-tag {
  opacity: 1;
}

.sidebar-logo-5cm-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.sidebar-logo-hover-tag {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.85);
  color: #FBBF24;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.sidebar-mobile-close-btn {
  display: none;
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFFFFF;
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s;
  z-index: 10;
}

.sidebar-mobile-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.studio-brand-logo {
  max-width: 44px;
  max-height: 38px;
  width: auto;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}

.studio-brand-titles {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
  overflow: hidden;
}

.studio-brand-title {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.4px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  margin: 0;
}

.studio-brand-sub {
  font-size: 0.68rem;
  color: var(--accent-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  margin-top: 4px;
  max-width: 100%;
  opacity: 0.95;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8C94A0;
  padding: 12px 12px 4px 12px;
  font-weight: 700;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: #CBD5E1;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: #FFFFFF;
}

.nav-link.active {
  background-color: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(139, 77, 9, 0.4);
}

.nav-link.nav-link-hidden,
.nav-link[style*="display: none"] {
  display: none !important;
}

.nav-section-title.nav-section-hidden,
.nav-section-title[style*="display: none"] {
  display: none !important;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.storage-status-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.06);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.storage-status-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(52, 211, 153, 0.4);
  color: #F8FAFC;
}

.storage-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  display: inline-block;
  box-shadow: 0 0 8px #10B981;
  transition: transform 0.3s ease;
}

.storage-status-dot.pulse-live {
  box-shadow: 0 0 6px #10B981;
}

@keyframes liveSyncPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* ========================================================
   MAIN CONTENT WRAPPER & TOP BAR
   ======================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-main);
  overflow: hidden;
}

.top-bar {
  height: 68px;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 10;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-heading-group h1 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.page-heading-group p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-badge-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-main);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.role-badge-button.admin {
  background-color: #FEF3C7;
  border-color: #FCD34D;
  color: #92400E;
}

.role-badge-button.staff {
  background-color: #E0E7FF;
  border-color: #C7D2FE;
  color: #3730A3;
}

.autosave-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--secondary);
  background-color: var(--secondary-light);
  border: 1px solid rgba(73, 89, 22, 0.2);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--secondary);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* Main Content Body */
.content-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* ========================================================
   COMMON UI COMPONENTS (BUTTONS, CARDS, BADGES)
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(139, 77, 9, 0.25);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #FFFFFF;
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  box-shadow: 0 4px 10px rgba(73, 89, 22, 0.25);
}

.btn-outline {
  background-color: #FFFFFF;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-main);
  border-color: #D1C7BB;
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #FFFFFF;
}

.btn-gold:hover {
  background-color: #B28D44;
}

.btn-danger {
  background-color: var(--danger);
  color: #FFFFFF;
}

.btn-danger:hover {
  background-color: #B91C1C;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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

.card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Metric / Stat Card */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary);
}

.stat-card.olive::before { background-color: var(--secondary); }
.stat-card.gold::before { background-color: var(--accent-gold); }
.stat-card.blue::before { background-color: var(--info); }
.stat-card.green::before { background-color: var(--success); }

.stat-content h3 {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}

.stat-card.olive .stat-icon { background-color: var(--secondary-light); color: var(--secondary); }
.stat-card.gold .stat-icon { background-color: var(--accent-gold-light); color: var(--accent-gold); }
.stat-card.blue .stat-icon { background-color: var(--info-light); color: var(--info); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-terracotta { background: var(--primary-light); color: var(--primary); }
.badge-olive { background: var(--secondary-light); color: var(--secondary); }

/* ========================================================
   DATA TABLES
   ======================================================== */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #FFFFFF;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
}

.data-table th {
  background-color: #F8F5F0;
  color: var(--text-main);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

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

.data-table tr:hover td {
  background-color: #FAF7F2;
}

/* Avatar */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--border);
  border: 1px solid var(--border);
  display: inline-block;
  flex-shrink: 0;
}

/* Filter / Search Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input-group {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.search-input-group input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
  background: #FFFFFF;
}

.search-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 77, 9, 0.15);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* ========================================================
   TIMETABLE & SCHEDULE VIEW
   ======================================================== */
.timetable-filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.hall-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.hall-pill.active {
  background: var(--secondary);
  color: #FFFFFF;
  border-color: var(--secondary);
}

.timetable-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.day-column {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.day-column-header {
  padding: 10px;
  text-align: center;
  background: #F8F5F0;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-main);
}

.day-column-header.today {
  background: var(--primary);
  color: #FFFFFF;
}

.day-column-body {
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 480px;
  background: #FCFAF7;
}

.class-card {
  padding: 10px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.78rem;
}

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

.class-card.yoga { border-left-color: var(--secondary); }
.class-card.dance { border-left-color: var(--primary); }
.class-card.aerial { border-left-color: var(--accent-gold); }
.class-card.meditation { border-left-color: var(--info); }

.class-time {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.class-title {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.class-instructor {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.class-hall {
  display: inline-block;
  font-size: 0.68rem;
  color: var(--secondary);
  background: var(--secondary-light);
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

/* ========================================================
   BACKUP & STORAGE CENTER SPECIFIC
   ======================================================== */
.backup-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.backup-action-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.backup-action-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.backup-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.backup-action-card.olive .backup-icon-wrapper {
  background: var(--secondary-light);
  color: var(--secondary);
}

.backup-action-card.gold .backup-icon-wrapper {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
}

.backup-action-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.backup-action-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.snapshot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #FDFBFA;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
}

.snapshot-info {
  display: flex;
  flex-direction: column;
}

.snapshot-date {
  font-weight: 600;
  color: var(--text-main);
}

.snapshot-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ========================================================
   MODALS
   ======================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-dialog {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalEnter 0.2s ease-out;
}

.modal-dialog.lg {
  max-width: 820px;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAF7F2;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: #FAF7F2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
  font-family: var(--font-sans);
  background: #FFFFFF;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 77, 9, 0.15);
}

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

/* ========================================================
   PRINT STYLING (FOR OFFICIAL INVOICES & ID CARDS)
   ======================================================== */
.printable-invoice-container,
.printable-card-container {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  .printable-invoice-container,
  .printable-invoice-container * {
    visibility: visible;
  }
  .printable-invoice-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: block !important;
    background: #FFFFFF;
    color: #000000;
    padding: 30px;
  }
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #23272A;
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s ease-out;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }

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

/* ========================================================
   PAGINATION & HIGH-CAPACITY TABLE CONTROLS
   ======================================================== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #FAF7F2;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
}

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

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-size-selector {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  background: #FFFFFF;
  outline: none;
}

.backend-sync-banner {
  background: #EFFDF5;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: #065F46;
}

.backend-sync-offline {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #92400E;
}

/* ========================================================
   MASTER SET UP, TRIALS & QUESTIONNAIRE STYLES
   ======================================================== */
.setup-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.setup-tab-btn {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.setup-tab-btn:hover {
  color: var(--primary);
}

.setup-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.trial-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.trial-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 4px solid var(--accent-gold);
}

.trial-card.converted {
  border-top-color: var(--success);
}

.questionnaire-box {
  background: #FCFAF7;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

.question-row {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.question-text {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.star-rating-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.star-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #FFFFFF;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
}

.star-btn.selected {
  background: var(--accent-gold);
  color: #FFFFFF;
  border-color: var(--accent-gold);
}

.trainer-lock-banner {
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  color: #3730A3;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Role-Based Permissions Grid */
.permissions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #FAF8F5;
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-top: 6px;
}

.permission-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.permission-checkbox-item:hover {
  background: rgba(139, 77, 9, 0.05);
}

.permission-checkbox-item input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--primary);
}

/* Interactive Question Builder */
.builder-question-row {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.builder-question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* SMTP Settings Card */
.smtp-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.toggle-switch-group {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FAF8F5;
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.toggle-switch-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ========================================================
   LOGIN PORTAL PAGE (DEDICATED FULL-SCREEN)
   ======================================================== */
.login-portal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: radial-gradient(circle at 50% 25%, #FAF7F2 0%, #EDE6DC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.login-portal-card {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 20px 45px -12px rgba(44, 24, 16, 0.18), 0 0 0 1px rgba(139, 77, 9, 0.1);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}

.login-brand-header {
  text-align: center;
  margin-bottom: 22px;
}

.login-emblem-box {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-gold) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  border: 2px solid var(--accent-gold);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-emblem-box:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.login-motto-banner {
  background: rgba(0, 0, 0, 0.025);
  border-left: 3px solid var(--accent-gold);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.45;
  text-align: center;
}

.login-brand-logo {
  max-width: 190px;
  max-height: 85px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto 14px auto;
  display: block;
  border-radius: 0;
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}

.login-brand-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin: 0 0 4px 0;
}

.login-brand-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 10px 0;
}

.login-badge-pill {
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 20px;
  background: rgba(197, 160, 89, 0.15);
  color: var(--secondary);
  border: 1px solid rgba(197, 160, 89, 0.35);
}

.login-error-alert {
  padding: 10px 14px;
  border-radius: 6px;
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 14px;
}



.login-footer-notes {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 0.72rem;
  text-align: center;
  color: var(--text-muted);
}

/* Granular RBAC Permissions Controls */
.rbac-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.rbac-table th {
  background: #FAF7F2;
  padding: 8px 12px;
  text-align: left;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.rbac-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.rbac-table tr:last-child td {
  border-bottom: none;
}
.rbac-select {
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: #FFFFFF;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
}
.rbac-select[data-level="edit"], .rbac-select option[value="edit"] {
  color: #15803D;
}
.rbac-select[data-level="view"], .rbac-select option[value="view"] {
  color: #0369A1;
}
.rbac-select[data-level="hidden"], .rbac-select option[value="hidden"] {
  color: #B91C1C;
}

.setup-submasters-box {
  background: #FAF7F2;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
}

/* ========================================================
   WORKLOAD & COST EFFICIENCY ANALYTICS STYLES
   ======================================================== */
.analytics-section {
  margin-bottom: 24px;
}

.analytics-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.analytics-period-pills {
  display: flex;
  background: #EFE9E0;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}

.analytics-period-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.analytics-period-btn:hover {
  color: var(--text-main);
}

.analytics-period-btn.active {
  background: #FFFFFF;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.kpi-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-stat-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}

.kpi-stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kpi-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.kpi-stat-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.efficiency-table-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.badge-eff-high {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.badge-eff-mid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.badge-eff-low {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FECACA;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.telegram-broadcast-banner {
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  border: 1px solid #BAE6FD;
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.telegram-banner-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #0369A1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.telegram-banner-sub {
  font-size: 0.8rem;
  color: #0C4A6E;
  margin-top: 2px;
}

.trainer-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.trainer-analytic-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tac-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tac-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.tac-role {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.tac-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #FDFBF8;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px;
}

.tac-stat-cell {
  display: flex;
  flex-direction: column;
}

.tac-stat-cell .lbl {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tac-stat-cell .val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.badge-eff-neutral {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bulk-upload-dropzone {
  border: 2px dashed #B45309;
  border-radius: 10px;
  background: #FAF7F2;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bulk-upload-dropzone:hover {
  background: #F5EFE6;
  border-color: #8B4D09;
}

.preview-upload-table {
  width: 100%;
  font-size: 0.78rem;
  border-collapse: collapse;
  margin-top: 10px;
}

.preview-upload-table th, .preview-upload-table td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
}

.preview-upload-table th {
  background: #FAF7F2;
  font-weight: 700;
}

/* ========================================================
   MASTER STUDIO TIMETABLE: NO-SCROLL MATRIX (05:00 - 22:00)
   ======================================================== */
.timetable-viewport-container {
  height: calc(100vh - 210px);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: auto;
  position: relative;
}

.tt-matrix-header-row {
  display: grid;
  grid-template-columns: 80px repeat(7, minmax(140px, 1fr));
  min-width: 1060px;
  background: #FAF7F2;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.tt-time-corner {
  padding: 8px 6px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  background: #FAF7F2;
  position: sticky;
  left: 0;
  z-index: 35;
}

.tt-day-header-cell {
  padding: 8px 6px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  border-right: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.tt-day-header-cell:last-child {
  border-right: none;
}

.tt-day-header-cell.today {
  background: var(--primary);
  color: #FFFFFF;
}

/* UNIFIED ROW-BY-ROW MATRIX GRID: GUARANTEES 100% HORIZONTAL ROW-LINE ALIGNMENT */
.tt-unified-matrix-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, minmax(140px, 1fr));
  min-width: 1060px;
  background: #FFFFFF;
}

.tt-row-time-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #FDFBF7;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-family: monospace;
  padding: 6px 4px;
  position: sticky;
  left: 0;
  z-index: 25;
  user-select: none;
  min-height: 60px;
}

.tt-row-day-cell {
  border-right: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-start;
  min-height: 60px;
  min-width: 0; /* CRITICAL: Prevents any grid overflow/blowout */
  background: #FFFFFF;
  overflow: hidden;
  position: relative;
}

.tt-row-day-cell:last-child {
  border-right: none;
}

.tt-row-day-cell.today-col {
  background: rgba(139, 77, 9, 0.02);
}

.tt-batch-block {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 1px 0;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
  background: #FAF7F2;
  padding: 4px 6px;
  font-size: 0.7rem;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  overflow: hidden;
  min-width: 0;
}

.tt-batch-block:hover {
  transform: translateY(-1px);
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.tt-batch-block.yoga {
  border-left-color: #8B4D09;
  background: #FAF2EB;
}

.tt-batch-block.dance {
  border-left-color: #495916;
  background: #F2F5EB;
}

.tt-batch-block.aerial {
  border-left-color: #7C3AED;
  background: #F5F3FF;
}

.tt-batch-block.zumba {
  border-left-color: #EA580C;
  background: #FFF7ED;
}

.tt-batch-block.meditation {
  border-left-color: #0284C7;
  background: #F0F9FF;
}

.tt-block-time {
  font-weight: 700;
  font-size: 0.65rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 2px;
}

.tt-block-title {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--text-main);
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.25;
  margin-bottom: 3px;
}

.tt-block-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.64rem;
  color: var(--text-muted);
  gap: 4px;
  flex-wrap: wrap;
}

/* Hall Badges for Instant Visual Studio Identification */
.tt-hall-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.tt-hall-dance {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.tt-hall-yoga {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.tt-hall-combined {
  background: #F3E8FF;
  color: #6B21A8;
  border: 1px solid #D8B4FE;
}

/* UNOCCUPIED FLOOR OPPORTUNITY WINDOW (EARLY MORNING, MIDDAY, NIGHT 9PM-6AM) */
.tt-opp-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px dashed rgba(197, 160, 89, 0.6);
  border-radius: 4px;
  background: rgba(254, 243, 199, 0.28);
  color: #8B4D09;
  font-size: 0.62rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  min-height: 26px;
  width: 100%;
  box-sizing: border-box;
}

.tt-opp-slot:hover {
  background: #FEF3C7;
  border-color: #D97706;
  color: #B45309;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(217, 119, 6, 0.15);
}

/* MEMBER DIRECTORY: BATCH TAGS WITH WEEKDAYS & TIMINGS */
.member-batch-tag {
  background: #FAF7F2;
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  padding: 3px 6px;
  margin-bottom: 3px;
  font-size: 0.75rem;
  line-height: 1.25;
}

.member-batch-tag:last-child {
  margin-bottom: 0;
}

.badge-sched-surplus {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  font-weight: 700;
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
}

.badge-sched-deficit {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  font-weight: 700;
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
}

.badge-sched-match {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  font-weight: 700;
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
}

/* INTERACTIVE TIMETABLE HOVER TOOLTIP */
#timetableHoverTooltip {
  position: fixed;
  z-index: 9999;
  width: 280px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  padding: 12px;
  pointer-events: none;
  display: none;
  font-size: 0.8rem;
  animation: fadeIn 0.15s ease-out;
}

/* ========================================================
   STUDENTS DIRECTORY: SORTABLE HEADERS & PLAN HOURS HEALTH
   ======================================================== */
.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.sortable-th:hover {
  background: #F3EFE8 !important;
}

.sort-icon {
  display: inline-block;
  font-size: 0.7rem;
  margin-left: 4px;
  color: var(--text-muted);
}

.sort-icon.active {
  color: var(--primary);
  font-weight: bold;
}

.badge-deficit {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
  font-weight: 700;
}

.badge-on-track {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  font-weight: 600;
}

.badge-completed {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FCD34D;
  font-weight: 700;
}

.hours-progress-bar {
  width: 100%;
  height: 5px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.hours-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}

/* CLIENT KPI CARDS */
.student-kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.student-kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s;
}

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

.student-kpi-card.active-filter {
  border-color: var(--primary);
  background: #FAF7F2;
}

/* ========================================================
   MULTI-SELECT BOXES (BATCHES & DISCIPLINE TAGGING)
   ======================================================== */
.multi-select-box {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #FAFAFA;
  max-height: 150px;
  overflow-y: auto;
  padding: 6px;
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.1s;
}

.multi-select-option:hover {
  background: #F3E8D8;
}

.multi-select-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
  min-height: 24px;
}

.multi-select-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FAF7F2;
  border: 1px solid #E5D5C0;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.74rem;
  color: var(--text-main);
  font-weight: 600;
}

.multi-select-chip-remove {
  cursor: pointer;
  color: #B91C1C;
  font-weight: bold;
  margin-left: 2px;
}

/* ========================================================
   BATCHES GROUPED LIST & COLLAPSIBLE ACCORDIONS
   ======================================================== */
.batch-group-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.batch-group-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.batch-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #FAF7F2;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.batch-group-header:hover {
  background: #F3EFE8;
}

.batch-group-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-group-chevron {
  transition: transform 0.2s ease;
  display: inline-block;
  font-size: 0.75rem;
  color: var(--primary);
}

.batch-group-chevron.open {
  transform: rotate(90deg);
}

.batch-group-body {
  border-top: 1px solid var(--border);
}

.batch-group-body.hidden {
  display: none;
}

/* ========================================================
   TRIAL MANAGEMENT: LIST VIEW & STATUS COLUMN
   ======================================================== */
.badge-trial-inquiry {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.badge-trial-scheduled {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.badge-trial-attended {
  background: #F3E8FF;
  color: #7C3AED;
  border: 1px solid #DDD6FE;
}

.badge-trial-converted {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  font-weight: 700;
}

.badge-trial-noshow {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

/* ========================================================
   THIRD-PARTY STUDIO FLOOR ISSUANCE & TIMETABLE RENTAL BLOCK
   ======================================================== */
.tt-rental-block {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 1px 0;
  border-radius: 6px;
  border: 1px solid #D8B4FE;
  border-left: 4px solid #9333EA;
  background: linear-gradient(135deg, #FAF5FF 0%, #F3E8FF 100%);
  padding: 4px 6px;
  font-size: 0.68rem;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(147, 51, 234, 0.12);
  min-width: 0;
  overflow: hidden;
}

.tt-rental-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(147, 51, 234, 0.25);
  border-color: #A855F7;
}

.tt-rental-block .tt-block-title {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.badge-rental-confirmed {
  background: #F3E8FF;
  color: #7E22CE;
  border: 1px solid #D8B4FE;
  font-weight: 700;
}

.badge-rental-pending {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FCD34D;
  font-weight: 700;
}

/* ========================================================
   STUDENT DIRECTORY: 24-HOUR RECENT EDIT HIGHLIGHT BADGE
   ======================================================== */
.badge-recent-edit {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #10B981;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
  white-space: nowrap;
}

.badge-older-edit {
  color: var(--text-muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.pulse-recent {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
}

/* ========================================================
   ATTENDANCE ROLL-CALL: STREAMLINED 1-CLICK TOGGLES
   ======================================================== */
.roll-call-header-card {
  background: #FAF7F2;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.att-status-group {
  display: inline-flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #F3F4F6;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.att-btn {
  border: none;
  background: transparent;
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.att-btn:not(:last-child) {
  border-right: 1px solid var(--border);
}

.att-btn.active-present {
  background: #16A34A;
  color: #FFFFFF;
  font-weight: 700;
}

.att-btn.active-absent {
  background: #DC2626;
  color: #FFFFFF;
  font-weight: 700;
}

.att-btn.active-rescheduled {
  background: #D97706;
  color: #FFFFFF;
  font-weight: 700;
}

.att-btn:hover:not(.active-present):not(.active-absent):not(.active-rescheduled) {
  background: #E5E7EB;
  color: var(--text-main);
}

.badge-compensatory {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #93C5FD;
  font-weight: 600;
}

.badge-dropin {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FCD34D;
  font-weight: 600;
}

.att-btn.btn-unmark {
  color: #6B7280;
  font-size: 0.72rem;
}
.att-btn.btn-unmark:hover {
  background: #FEE2E2;
  color: #DC2626;
}

/* ========================================================
   TRIAL MANAGEMENT: 4 DIRECT STATUS DROPDOWNS
   ======================================================== */
.trial-status-select {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.15s ease;
  min-width: 130px;
}

.trial-status-select.stage-inquiry {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #BFDBFE;
}

.trial-status-select.stage-scheduled {
  background: #FEF3C7;
  color: #B45309;
  border-color: #FDE68A;
}

.trial-status-select.stage-attended {
  background: #F3E8FF;
  color: #7C3AED;
  border-color: #DDD6FE;
}

.trial-status-select.stage-converted {
  background: #ECFDF5;
  color: #047857;
  border-color: #A7F3D0;
}

/* ========================================================
   FEE ADJUSTMENT BADGES (EXAMS / OUT OF STATION)
   ======================================================== */
.badge-fee-adj {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}

/* ========================================================
   TIMETABLE FLOOR EFFICIENCY & FINANCIAL INTELLIGENCE CARD
   ======================================================== */
.tt-efficiency-card {
  background: linear-gradient(135deg, #FAF7F2 0%, #FFFFFF 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.tt-eff-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.3fr;
  gap: 16px;
  align-items: center;
}

.tt-eff-progress {
  height: 8px;
  background: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 5px;
}

.tt-eff-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ========================================================
   STUDENT MONTHLY EVALUATION TIMELINE & AUDIT BADGES
   ======================================================== */
.eval-month-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  position: relative;
}

.eval-month-card.month-completed {
  border-left: 4px solid #10B981;
}

.eval-month-card.month-pending {
  border-left: 4px solid #D1D5DB;
  background: #F9FAFB;
}

.eval-del-log-table td {
  font-size: 0.78rem;
}

/* ========================================================
   LEAVE MANAGEMENT PORTAL STYLES (SOHAM UAE LABOUR LAW)
   ======================================================== */
.leave-policy-banner {
  background: linear-gradient(135deg, rgba(139, 77, 9, 0.08) 0%, rgba(197, 160, 89, 0.12) 100%);
  border: 1.5px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.leave-policy-banner-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.leave-policy-banner-text {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.45;
}
.leave-policy-banner-text strong {
  color: var(--primary);
  font-weight: 700;
}

.leave-balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.leave-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.leave-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.leave-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.leave-card-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin: 8px 0;
}
.leave-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.leave-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px;
  overflow-x: auto;
}
.leave-tab {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  white-space: nowrap;
}
.leave-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.live-balance-preview-box {
  background: #FAF7F2;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}
.live-balance-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  text-align: center;
}
.live-balance-preview-item {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px;
}
.live-balance-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}
.live-balance-number {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.logo-4cm-box {
  width: 110px;
  height: 110px;
  border: 1.5px solid var(--accent-gold);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FAF7F2;
  overflow: hidden;
  margin: 12px 0;
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.2);
}
.logo-4cm-preview {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.app-global-footer {
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 1600px;
  margin: 0 auto;
}
.footer-brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.footer-title {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--primary);
  letter-spacing: 0.5px;
}
.footer-location {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.footer-center-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-toggle-btn {
  display: none;
  background: #FAF7F2;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--primary);
  margin-right: 10px;
  transition: all 0.2s ease;
}

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

/* SIDEBAR BACKDROP FOR MOBILE */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(17, 24, 39, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* MOBILE BOTTOM NAVIGATION BAR (SMARTPHONES) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
  z-index: 900;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  box-sizing: border-box;
}

.mobile-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  text-decoration: none;
  color: #6B7280;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 3px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav-item.active,
.mobile-bottom-nav-item:hover {
  color: var(--primary);
}

.mobile-bottom-nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .mobile-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .app-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    height: 100vh;
    width: 285px;
    max-width: 85vw;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  }
  .app-sidebar.mobile-open {
    left: 0;
  }
  .app-sidebar.mobile-open .sidebar-mobile-close-btn {
    display: flex;
  }
  .main-wrapper {
    width: 100% !important;
    margin-left: 0 !important;
    overflow-x: hidden;
  }
  .live-balance-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .footer-brand-block {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }
  .content-area {
    padding: 14px 12px 76px 12px !important;
  }
  .app-global-footer {
    margin-bottom: 60px !important;
  }
  .top-bar {
    padding: 0 12px;
    height: 56px;
  }
  .page-heading-group h1 {
    font-size: 1.05rem;
  }
  .page-heading-group p {
    display: none;
  }
  .top-bar-actions .autosave-pill {
    display: none;
  }
  .top-bar-actions .btn:not(.role-badge-button) {
    display: none;
  }
  .role-badge-button {
    padding: 4px 8px;
    font-size: 0.74rem;
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .stat-card {
    padding: 12px 10px;
  }
  .stat-value {
    font-size: 1.3rem;
  }
  .stat-sub {
    font-size: 0.68rem;
  }
  .backend-sync-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.78rem;
    padding: 10px 12px;
  }
  .backend-sync-banner > div:last-child {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }
  .modal-card {
    width: 96vw !important;
    max-width: 96vw !important;
    margin: 8px auto !important;
    padding: 16px 14px !important;
    border-radius: 12px !important;
    max-height: 92vh !important;
  }
  .table-container {
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
  }
  .data-table th, .data-table td {
    padding: 8px 8px;
    font-size: 0.75rem;
  }
  /* Prevent iOS zoom on inputs */
  input[type="text"], input[type="password"], input[type="email"], input[type="number"], select, textarea {
    font-size: 16px !important;
  }
}

/* Printable Settlement Statements */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    overflow: visible !important;
    height: auto !important;
  }
  .app-sidebar, .top-bar, .app-global-footer, .btn, .modal-backdrop, .toast-container, .mobile-toggle-btn {
    display: none !important;
  }
  .main-wrapper, .content-area {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow: visible !important;
  }
  .print-only-voucher {
    display: block !important;
    border: 1px solid #000 !important;
    padding: 24px !important;
    background: #FFF !important;
  }
}

/* ======================================================================
   CRITICAL BLINKING RED LOW-ENROLLMENT ALERT & TRAINER ATTENDANCE MATRIX
   ====================================================================== */

@keyframes pulse-blink-red {
  0%, 100% { opacity: 1; }
}

@keyframes blink-badge-glow {
  0%, 100% { opacity: 1; transform: none; }
}

.urgent-low-enrollment-banner {
  border: 1.5px solid #EF4444 !important;
  border-radius: 12px;
  padding: 18px 24px;
  margin-bottom: 24px;
  background: #FEF2F2;
  transition: all 0.3s ease;
}

.urgent-blink-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.low-enrollment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 14px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}

.low-enroll-card {
  background: #FFFFFF;
  border: 1.5px solid #FCA5A5;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

.low-enroll-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(220, 38, 38, 0.16);
  border-color: #DC2626;
}

/* Trainer Attendance Matrix Styles */
.trainer-matrix-container {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.trainer-matrix-table-wrap {
  width: 100%;
  overflow-x: auto;
  max-height: 720px;
  position: relative;
}

.trainer-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.trainer-matrix-table th,
.trainer-matrix-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  text-align: left;
  vertical-align: middle;
}

.trainer-matrix-table th {
  background: #FAF7F2;
  color: var(--text-main);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.trainer-matrix-table th.sticky-col,
.trainer-matrix-table td.sticky-col {
  position: sticky;
  left: 0;
  z-index: 9;
  background: #FAF7F2;
  font-weight: 600;
  border-right: 2px solid var(--border);
}

.trainer-matrix-table th.sticky-col {
  z-index: 11;
}

.matrix-today-row td {
  background-color: #FFFBEB !important;
}

.matrix-today-row td.sticky-col {
  background-color: #FEF3C7 !important;
  border-left: 4px solid #D97706;
}

.matrix-weekend-cell {
  background-color: #FBFBFB;
}

.matrix-cell-clickable {
  cursor: pointer;
  border-radius: 6px;
  padding: 6px 8px;
  transition: all 0.15s ease;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.matrix-cell-clickable:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.matrix-badge-present {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.matrix-badge-absent {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FCA5A5;
}

.matrix-badge-leave {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FCD34D;
}

.matrix-badge-weekoff {
  background: #F3F4F6;
  color: #6B7280;
  border: 1px solid #E5E7EB;
}

.matrix-badge-halfday {
  background: #F3E8FF;
  color: #7E22CE;
  border: 1px solid #D8B4FE;
}

.matrix-badge-comp {
  background: #DBEAFE;
  color: #1D4ED8;
  border: 1px solid #93C5FD;
}

/* 50-Widget Investor & Granular Suite Styles */
.widget-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.widget-section-title {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.18rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget-section-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.widget-50-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.widget-card-50 {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.widget-card-50:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}

.widget-number-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: #F3F4F6;
  color: #4B5563;
  letter-spacing: 0.03em;
}

.widget-meaning-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
}

.executive-guide-btn {
  background: linear-gradient(135deg, #8B4D09 0%, #495916 100%);
  color: #FFFFFF !important;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 10px rgba(139, 77, 9, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.executive-guide-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(139, 77, 9, 0.35);
  filter: brightness(1.1);
}

/* ======================================================================
   LIVE REAL-TIME STREAMING & HR ANALYTICS HEATMAPS & RBAC 50 WIDGETS
   ====================================================================== */

.live-stream-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
}

@keyframes numberHighlight {
  0%, 100% { background-color: transparent; transform: none; }
}

.live-updated-flash {
  display: inline-block;
  border-radius: 6px;
}

/* HR Analytics Heatmap & Visual Widget Styles */
.heatmap-container {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.heatmap-day-cell {
  background: #F9FAFB;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.8rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.heatmap-day-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.heatmap-day-header {
  font-weight: 700;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.heatmap-val-high {
  background: #FEE2E2 !important;
  border-color: #FCA5A5 !important;
  color: #991B1B !important;
  font-weight: 700;
}

.heatmap-val-med {
  background: #FEF3C7 !important;
  border-color: #FCD34D !important;
  color: #92400E !important;
  font-weight: 600;
}

.heatmap-val-low {
  background: #F0FDF4 !important;
  border-color: #BBF7D0 !important;
  color: #166534 !important;
}

.rbac-widgets-toggle-box {
  background: #FAF7F2;
  border: 1px solid #E8DFD5;
  border-radius: 8px;
  padding: 14px;
  margin-top: 16px;
}

.rbac-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding: 8px;
  margin-top: 10px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}

.rbac-widget-item {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #FCFAF7;
  transition: background 0.15s;
}

.rbac-widget-item:hover {
  background: #F8F4EE;
  border-color: var(--accent-gold);
}

/* ========================================================
   COMMUNICATIONS & TEMPLATES STUDIO STYLES
   ======================================================== */
.comm-subtabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.comm-subtab-btn {
  background: transparent;
  border: none;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.comm-subtab-btn:hover {
  color: var(--primary);
  background: rgba(139, 77, 9, 0.05);
  border-radius: 6px 6px 0 0;
}

.comm-subtab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.template-editor-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .template-editor-grid {
    grid-template-columns: 1fr;
  }
}

.template-card-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.token-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 14px 0;
  padding: 10px;
  background: #FDFBF7;
  border: 1px dashed #D6C7B2;
  border-radius: 8px;
}

.token-chip-btn {
  background: #FFFFFF;
  border: 1px solid #D6C7B2;
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-family: monospace;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.token-chip-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.email-preview-container {
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.email-preview-header {
  background: #E5E7EB;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #D1D5DB;
}

.email-preview-meta {
  padding: 12px 18px;
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
  font-size: 0.82rem;
  color: #4B5563;
  line-height: 1.6;
}

.email-preview-body {
  padding: 20px;
  min-height: 380px;
  max-height: 540px;
  overflow-y: auto;
  background: #FFFFFF;
}

.email-preview-body.mobile-mode {
  max-width: 380px;
  margin: 16px auto;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 16px;
}

.telegram-bubble-container {
  background: #E5ECF3;
  border-radius: 12px;
  padding: 20px;
  max-width: 540px;
  margin: 0 auto;
  border: 1px solid #C4D2DF;
}

.telegram-msg-bubble {
  background: #FFFFFF;
  border-radius: 12px 12px 12px 2px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  color: #1F2937;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  position: relative;
}

.telegram-meta-stamp {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #9CA3AF;
  margin-top: 8px;
}

/* 1-Click Message Action Buttons */
.channel-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-channel-whatsapp {
  background: #25D366;
  color: #FFFFFF;
  border: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-channel-whatsapp:hover {
  background: #1DA851;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
}

.btn-channel-telegram {
  background: #0088CC;
  color: #FFFFFF;
  border: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-channel-telegram:hover {
  background: #0077B5;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.35);
}

.btn-channel-copy {
  background: #4B5563;
  color: #FFFFFF;
  border: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-channel-copy:hover {
  background: #374151;
  color: #FFFFFF;
}

