/* ================================================================
   CLAW CRM — System UI Design v20
   Lock-screen auth + collapsible icon sidebar + row cards + dashboard
   ================================================================ */

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

:root {
  /* === Accent === */
  --accent:            oklch(55% 0.12 186);
  --accent-hover:      oklch(48% 0.12 186);
  --accent-light:      oklch(92% 0.04 186);
  --accent-border:     oklch(82% 0.06 186);

  /* === Neutrals === */
  --nb:                #1a1a1a;
  --w6:                #555555;
  --w5:                #888888;
  --w3:                #b0b0b0;
  --w1:                #d4d4d4;

  /* === Surfaces === */
  --bg-page:           #e8e8e8;
  --bg-card:           #f0f0f0;
  --bg-white:          #fafafa;
  --bg-hover:          #e2e2e2;

  /* === Semantic Colors === */
  --green:             oklch(54% 0.14 158);
  --green-bg:          oklch(92% 0.05 158);
  --orange:            oklch(58% 0.13 65);
  --orange-bg:         oklch(93% 0.05 70);
  --red:               oklch(48% 0.17 25);
  --red-bg:            oklch(93% 0.04 25);
  --red-border:        oklch(80% 0.08 25);
  --purple:            oklch(50% 0.14 288);
  --purple-bg:         oklch(92% 0.04 288);
  --blue:              oklch(55% 0.12 245);
  --blue-bg:           oklch(92% 0.04 245);

  /* === Dashboard Semantic Colors === */
  --dashboard-primary:   #6366f1;
  --dashboard-primary-light: #a78bfa;
  --dashboard-accent:    #c084fc;
  --dashboard-success:  #16a34a;
  --dashboard-success-bg: #dcfce7;
  --dashboard-warning:  #f59e0b;
  --dashboard-warning-bg: #fffbeb;
  --dashboard-danger:   #dc2626;
  --dashboard-danger-bg: #fee2e2;

  /* === Shadows === */
  --shadow-xs:         0 1px 3px rgba(0,0,0,0.06);
  --shadow-sm:         0 2px 6px rgba(0,0,0,0.08);
  --shadow-md:         0 6px 16px rgba(0,0,0,0.10);
  --shadow-lg:         0 16px 32px rgba(0,0,0,0.12);
  --shadow-xl:         0 24px 56px rgba(0,0,0,0.15);

  /* === Radii === */
  --radius-sm:         6px;
  --radius-md:         10px;
  --radius-lg:         14px;
  --radius-xl:         20px;
  --radius-full:       9999px;

  /* === Sidebar (dark) === */
  --sidebar-bg:        #1c1c1e;
  --sidebar-text:      rgba(255,255,255,0.82);
  --sidebar-muted:     rgba(255,255,255,0.40);
  --sidebar-hover:     rgba(255,255,255,0.08);
  --sidebar-active:    rgba(255,255,255,0.12);
  --sidebar-border:    rgba(255,255,255,0.08);
  --sidebar-accent:    oklch(65% 0.12 186);
}

/* ===== BASE ===== */
body {
  font-family: 'Outfit', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-page);
  color: var(--nb);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}

/* ==========================================
   AUTH — Lock Screen Style
   ========================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 60% 40% at 30% 30%, oklch(55% 0.12 186 / 0.08) 0%, transparent 50%),
              radial-gradient(ellipse 50% 30% at 70% 70%, oklch(50% 0.14 288 / 0.05) 0%, transparent 50%),
              #d8d8d8;
  padding: 20px;
}
.lock-screen {
  text-align: center;
  width: 100%;
  max-width: 380px;
}
.lock-clock { margin-bottom: 48px; }
.lock-time {
  font-size: 72px;
  font-weight: 200;
  color: var(--nb);
  line-height: 1;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}
.lock-date {
  font-size: 15px;
  color: var(--w6);
  margin-top: 6px;
  font-weight: 400;
}
.lock-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.04);
}
.lock-greeting {
  font-size: 16px;
  font-weight: 600;
  color: var(--nb);
  margin-bottom: 32px;
}
.lock-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
}
.lock-tab {
  color: var(--w5);
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s;
  padding: 2px 6px;
}
.lock-tab:hover { color: var(--nb); }
.lock-tab.active { color: var(--accent); font-weight: 700; }
.lock-tab-sep { color: var(--w3); }
.lock-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.lock-input {
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: rgba(250,250,250,0.8);
  color: var(--nb);
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(0,0,0,0.04);
  transition: all 0.2s;
}
.lock-input:focus {
  background: #ffffff;
  box-shadow: var(--shadow-md), 0 0 0 2px var(--accent);
}
.lock-input::placeholder { color: var(--w3); }
.lock-submit {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--nb);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  margin-top: 8px;
}
.lock-submit:hover {
  background: #333;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  transform: scale(1.05);
}
.auth-msg {
  text-align: center; margin-top: 12px; font-size: 12px;
  padding: 8px 16px; border-radius: var(--radius-full);
}
.auth-msg.error { background: var(--red-bg); color: var(--red); }
.auth-msg.info { background: var(--accent-light); color: var(--accent); }

/* ==========================================
   MAIN LAYOUT
   ========================================== */
.app-layout { display: flex; min-height: 100vh; }

/* ===== SIDEBAR — Icon-first collapsible ===== */
.sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0;
  height: 100vh; z-index: 100;
  box-shadow: 1px 0 0 var(--sidebar-border);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-collapsed .sidebar { width: 64px; }
.sidebar-logo {
  padding: 20px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: padding 0.25s;
}
.sidebar-collapsed .sidebar-logo { padding: 20px 12px; justify-content: center; }
.sidebar-logo-icon { font-size: 22px; flex-shrink: 0; }
.sidebar-logo-text {
  font-size: 15px; font-weight: 700; color: #fff;
  letter-spacing: -0.2px;
  white-space: nowrap; overflow: hidden;
  transition: opacity 0.15s;
}
.sidebar-collapsed .sidebar-logo-text { opacity: 0; width: 0; }

.sidebar-nav {
  flex: 1; padding: 8px 8px; overflow-y: auto;
  overflow-x: hidden;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--sidebar-text);
  transition: all 0.15s; border-radius: var(--radius-md);
  margin-bottom: 2px; border: none;
  white-space: nowrap;
}
.sidebar-collapsed .nav-item { justify-content: center; padding: 10px; }
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-accent); font-weight: 600;
}
.nav-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.nav-label {
  transition: opacity 0.15s;
}
.sidebar-collapsed .nav-label { opacity: 0; width: 0; overflow: hidden; }

.sidebar-user {
  padding: 12px;
  border-top: 1px solid var(--sidebar-border);
  text-align: center;
}
.sidebar-collapsed .sidebar-user { padding: 10px 6px; }
.sidebar-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--sidebar-hover); color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px;
  font-size: 15px; font-weight: 700;
}
.sidebar-user-name {
  font-size: 13px; font-weight: 600; color: #fff;
  transition: opacity 0.15s;
}
.sidebar-collapsed .sidebar-user-name { opacity: 0; font-size: 0; }
.sidebar-user-role {
  font-size: 10px; color: var(--sidebar-muted);
  margin: 4px 0 6px;
  transition: opacity 0.15s;
}
.sidebar-collapsed .sidebar-user-role { opacity: 0; font-size: 0; }

.btn-logout, .btn-settings {
  width: 100%; padding: 6px 10px; background: transparent;
  color: var(--sidebar-muted); border: none; border-radius: var(--radius-md);
  cursor: pointer; font-size: 12px; font-family: inherit;
  transition: all 0.15s; text-align: left;
  white-space: nowrap; overflow: hidden;
}
.sidebar-collapsed .btn-logout,
.sidebar-collapsed .btn-settings {
  text-align: center; padding: 6px 4px;
  font-size: 14px;
}
.btn-logout:hover { background: rgba(239,68,68,0.15); color: #ff6b6b; }
.btn-settings:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: 220px; flex: 1; padding: 32px 40px; max-width: 1480px;
  transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-collapsed .main-content { margin-left: 64px; }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.page-header h2 {
  font-size: 22px; font-weight: 800; color: var(--nb); letter-spacing: -0.5px;
}

/* ===== STATS BAR ===== */
/* Unified big number sizes */
.big-num-sm { font-size: 28px; font-weight: 800; line-height: 1.2; letter-spacing: -0.5px; }
.big-num-md { font-size: 32px; font-weight: 800; line-height: 1.2; letter-spacing: -0.8px; }
.big-num-lg { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -0.5px; }
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px;
}
.stat-card {
  background: #fafafa; padding: 20px 22px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid #e4e4e4;
  position: relative; overflow: hidden; cursor: default; transition: all 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--nb); line-height: 1.2; letter-spacing: -0.8px; }
.stat-card .label { font-size: 11px; color: var(--w5); margin-top: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; }

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; align-items: center;
}
.filter-bar input {
  flex: 1; min-width: 200px; padding: 9px 16px;
  border: 1.5px solid #d4d4d4; border-radius: var(--radius-md);
  font-size: 13px; font-family: inherit; outline: none;
  transition: all 0.15s; background: #fafafa; color: var(--nb);
}
.filter-bar input:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px oklch(55% 0.12 186 / 0.10);
}
.filter-btn {
  padding: 6px 16px; border: 1px solid #d8d8d8; border-radius: var(--radius-full);
  background: #fafafa; cursor: pointer; font-size: 12px;
  font-weight: 500; color: var(--w6); transition: all 0.15s;
  white-space: nowrap; font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.filter-btn:hover { background: #f0f0f0; color: var(--nb); border-color: #c0c0c0; }
.filter-btn.active {
  background: var(--nb); color: #fff; border-color: var(--nb); font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.filter-group-label {
  font-size: 10px; color: var(--w5); font-weight: 600;
  letter-spacing: 0.3px; padding: 0 4px; text-transform: uppercase;
}
.filter-divider { width: 1px; height: 16px; background: #d4d4d4; margin: 0 6px; }

/* ===== STUDENT LIST (one per row) ===== */
.student-list {
  display: flex; flex-direction: column; gap: 2px;
  background: #fafafa; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid #e4e4e4;
  overflow: hidden;
}
.student-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px; cursor: pointer;
  transition: all 0.12s;
  border-bottom: 1px solid #f0f0f0;
  min-height: 56px;
}
.student-row:last-child { border-bottom: none; }
.student-row:hover { background: #f5f5f5; }

.row-name {
  display: flex; align-items: center; gap: 8px;
  min-width: 140px; max-width: 200px; flex-shrink: 0;
}
.row-name-text {
  font-size: 15px; font-weight: 700; color: var(--nb);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-name-text.strikethrough { text-decoration: line-through; color: var(--w5); }

.new-badge {
  background: var(--red); color: #fff; font-size: 9px; font-weight: 800;
  padding: 2px 7px; border-radius: var(--radius-full);
  letter-spacing: 0.5px; animation: pulse-new 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-new { 0%,100%{opacity:1} 50%{opacity:0.5} }

.row-meta {
  flex: 1; display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: var(--w5);
  overflow: hidden; min-width: 0;
}
.row-meta span {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-progress { display: flex; align-items: center; gap: 6px; }
.row-progress-bar {
  width: 60px; height: 4px; background: #e0e0e0;
  border-radius: 2px; overflow: hidden;
}
.row-progress-fill {
  height: 100%; border-radius: 2px; background: var(--accent);
  transition: width 0.5s;
}

.row-right {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0; margin-left: auto;
}
.row-date { font-size: 11px; color: var(--w3); white-space: nowrap; }

/* Card color variants for rows */
.student-row.card-overdue {
  background: oklch(97% 0.025 25);
  border-left: 3px solid var(--red);
}
.student-row.card-overdue:hover { background: oklch(95% 0.03 25); }
.student-row.card-overdue .row-name-text { color: oklch(35% 0.15 25); }
.student-row.card-invalid,
.student-row.card-refunded { opacity: 0.55; }
.student-row.card-closed .row-name-text { text-decoration: line-through; color: var(--w5); }

.card-overdue-mark {
  font-size: 9px; background: var(--red); color: #fff;
  padding: 1px 7px; border-radius: var(--radius-full);
  font-weight: 700; letter-spacing: 0.2px;
  animation: overduePulse 1.8s ease-in-out infinite;
  white-space: nowrap; flex-shrink: 0;
}
.card-timeurgent-mark {
  font-size: 9px; background: var(--amber, #d97706); color: #fff;
  padding: 1px 7px; border-radius: var(--radius-full);
  font-weight: 700; letter-spacing: 0.2px;
  animation: overduePulse 1.8s ease-in-out infinite;
  white-space: nowrap; flex-shrink: 0;
}
.card-closed-mark {
  font-size: 10px; color: var(--w5); white-space: nowrap; flex-shrink: 0;
}
@keyframes overduePulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* Status badges */
.status-badge {
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
  white-space: nowrap;
}
.status-active { background: var(--accent-light); color: var(--accent); }
.status-done { background: var(--green-bg); color: var(--green); }
.status-admitted { background: var(--purple-bg); color: var(--purple); }
.status-pending { background: var(--orange-bg); color: oklch(50% 0.13 65); }
.status-invalid { background: #ebebeb; color: var(--w5); }
.status-refunded { background: var(--red-bg); color: var(--red); }

.offer-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.offer-tag {
  background: oklch(92% 0.04 158); color: oklch(45% 0.13 158);
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 9px; font-weight: 700; letter-spacing: 0.2px; white-space: nowrap;
}

/* Transfer & Close buttons in row */
.card-transfer-btn {
  background: var(--nb); color: #fff; border: none;
  border-radius: var(--radius-md); padding: 4px 10px; font-size: 10px;
  cursor: pointer; font-weight: 500; font-family: inherit; transition: all 0.15s;
  white-space: nowrap;
}
.card-transfer-btn:hover { background: #333; }
.card-close-btn {
  padding: 4px 10px; border: 1px solid #d4d4d4; border-radius: var(--radius-full);
  background: #fafafa; color: var(--w6); cursor: pointer;
  font-size: 10px; font-weight: 500; transition: all 0.15s; font-family: inherit;
  white-space: nowrap;
}
.card-close-btn:hover { background: var(--nb); color: #fff; border-color: var(--nb); }

/* ===== BUTTONS ===== */
.btn-add {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px;
  background: var(--nb); color: #fff; border: none; border-radius: var(--radius-md);
  cursor: pointer; font-size: 14px; font-weight: 600;
  transition: all 0.2s; font-family: inherit;
}
.btn-add:hover { background: #333; box-shadow: 0 4px 16px rgba(0,0,0,0.25); transform: translateY(-1px); }
.btn-add-student {
  display: inline-flex; align-items: center; gap: 4px; padding: 9px 20px;
  background: var(--nb); color: #fff; border: none; border-radius: var(--radius-md);
  cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all 0.2s; white-space: nowrap; font-family: inherit;
}
.btn-add-student:hover { background: #333; box-shadow: 0 4px 14px rgba(0,0,0,0.22); }
.btn-header-simple {
  display: inline-flex; align-items: center; gap: 4px; padding: 7px 16px;
  background: #fafafa; color: var(--w6);
  border: 1px solid #d4d4d4; border-radius: var(--radius-md);
  cursor: pointer; font-size: 12px; font-weight: 500;
  transition: all 0.15s; font-family: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.btn-header-simple:hover { background: #f0f0f0; border-color: #c0c0c0; color: var(--nb); }

/* ===== STUDENT DETAIL ===== */
.detail-header {
  display: flex; align-items: center; gap: 18px;
  background: #fafafa; padding: 20px 28px;
  border-radius: var(--radius-lg); margin-bottom: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid #e4e4e4;
}
.back-btn {
  padding: 7px 16px; background: #fafafa;
  border: 1px solid #d4d4d4; border-radius: var(--radius-md);
  cursor: pointer; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 5px; color: var(--w6);
  transition: all 0.15s; font-family: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.back-btn:hover { background: #f0f0f0; border-color: #c0c0c0; color: var(--nb); }
.detail-name { font-size: 20px; font-weight: 800; color: var(--nb); letter-spacing: -0.4px; }

.detail-tabs {
  display: flex; gap: 0; background: #e2e2e2; padding: 4px;
  border-radius: var(--radius-md); margin-bottom: 20px; border: none;
}
.detail-tab {
  flex: 1; text-align: center; padding: 9px 18px; border-radius: 7px;
  cursor: pointer; font-size: 13px; font-weight: 500; color: var(--w6);
  transition: all 0.15s; font-family: inherit;
}
.detail-tab.active { background: #fafafa; color: var(--nb); font-weight: 700; box-shadow: var(--shadow-sm); }
.detail-tab:hover:not(.active) { color: var(--nb); }

.section-card {
  background: #fafafa; border-radius: var(--radius-lg);
  padding: 20px 24px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm); border: 1px solid #e4e4e4;
}
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title {
  font-size: 14px; font-weight: 700; color: var(--nb);
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: 0.3px;
}

.btn-sm {
  padding: 6px 14px; border-radius: var(--radius-md); border: none;
  cursor: pointer; font-size: 12px; font-weight: 500;
  transition: all 0.15s; font-family: inherit;
}
.btn-edit { background: #ebebeb; color: var(--w6); border: 1px solid #d8d8d8; }
.btn-edit:hover { background: #e0e0e0; color: var(--nb); }
.btn-save { background: var(--nb); color: #fff; }
.btn-save:hover { background: #333; }
.btn-cancel { background: #fafafa; color: var(--w6); border: 1px solid #d4d4d4; }
.btn-cancel:hover { background: #f0f0f0; }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: oklch(88% 0.05 25); }
.btn-add-sm { background: var(--nb); color: #fff; }
.btn-add-sm:hover { background: #333; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field-group { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 11px; color: var(--w5); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.field-value { font-size: 14px; color: var(--nb); }
.field-input, .field-select {
  padding: 9px 14px; border: 1.5px solid #d4d4d4;
  border-radius: var(--radius-md); font-size: 13px; font-family: inherit;
  outline: none; transition: all 0.15s; background: #fafafa; color: var(--nb);
}
.field-input:focus, .field-select:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px oklch(55% 0.12 186 / 0.10);
}

.edu-block { background: #ebebeb; border-radius: var(--radius-lg); padding: 20px; margin-bottom: 14px; border: 1px solid #e0e0e0; }
.edu-block-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.edu-type-badge { background: var(--nb); color: #fff; padding: 4px 14px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; }

.file-upload-area {
  border: 2px dashed #d0d0d0; border-radius: var(--radius-md);
  padding: 20px; text-align: center; cursor: pointer;
  transition: all 0.15s; margin-top: 10px; background: #f4f4f4;
}
.file-upload-area:hover { border-color: var(--accent); background: var(--accent-light); }
.file-upload-area input { display: none; }
.file-upload-label { font-size: 12px; color: var(--w5); cursor: pointer; }
.file-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.file-chip {
  display: flex; align-items: center; gap: 6px;
  background: #e8e8e8; border-radius: var(--radius-sm);
  padding: 5px 12px; font-size: 12px; color: var(--w6); border: 1px solid #d8d8d8;
}
.file-chip a { color: var(--accent); text-decoration: none; }
.file-chip .del { cursor: pointer; color: var(--red); margin-left: 4px; font-size: 10px; }

.exam-item { background: #ebebeb; border-radius: var(--radius-lg); padding: 18px; margin-bottom: 12px; border: 1px solid #e0e0e0; }
.exam-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

/* ===== UNIVERSITY ===== */
.country-group { margin-bottom: 14px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid #e4e4e4; }
.country-header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: #fafafa; color: var(--nb); cursor: pointer; border: none; }
.country-flag { font-size: 18px; }
.country-name-text { font-size: 14px; font-weight: 700; }
.country-count { font-size: 12px; color: var(--w5); margin-left: auto; }
.country-collapse-icon { transition: transform 0.2s; color: var(--w5); font-size: 12px; }
.country-collapsed .country-collapse-icon { transform: rotate(-90deg); }
.country-body { padding: 16px; background: #ebebeb; }

.uni-block { background: #fafafa; border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 8px; box-shadow: var(--shadow-xs); border: 1px solid #e4e4e4; }
.uni-header { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.uni-name { font-size: 14px; font-weight: 600; color: var(--nb); flex: 1; min-width: 0; }
.uni-progress-wrap { width: 120px; }
.uni-progress-bar { height: 4px; background: #e0e0e0; border-radius: 3px; overflow: hidden; }
.uni-progress-fill { height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.5s; }
.uni-progress-pct { font-size: 11px; color: var(--w5); text-align: right; margin-top: 2px; }
.uni-collapse-icon { font-size: 12px; transition: transform 0.2s; color: var(--w5); }
.uni-collapsed .uni-collapse-icon { transform: rotate(-90deg); }
.uni-body { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e4e4e4; }

.program-block { background: #fafafa; border-radius: var(--radius-md); padding: 16px; margin-bottom: 8px; box-shadow: var(--shadow-xs); border: 1px solid #e4e4e4; }
.program-header { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.program-name { font-size: 13px; font-weight: 600; color: var(--nb); flex: 1; background: #ebebeb; padding: 6px 14px; border-radius: 20px; display: inline-flex; align-items: center; max-width: fit-content; border: 1px solid #dcdcdc; }
.program-progress-wrap { width: 100px; }
.program-progress-bar { height: 4px; background: #e0e0e0; border-radius: 2px; overflow: hidden; }
.program-progress-fill { height: 100%; border-radius: 2px; background: var(--purple); transition: width 0.5s; }
.program-progress-pct { font-size: 10px; color: var(--w5); text-align: right; }
.program-collapse-icon { font-size: 11px; transition: transform 0.2s; color: var(--w5); }
.program-collapsed .program-collapse-icon { transform: rotate(-90deg); }
.program-body { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #d8d8d8; }

.deadline-normal { color: var(--w5); font-size: 12px; }
.offer-badge { display: inline-block; background: var(--green-bg); color: var(--green); font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full); margin-left: 6px; text-transform: uppercase; letter-spacing: 0.2px; }
.deadline-warning { color: var(--orange); font-size: 12px; font-weight: 600; background: var(--orange-bg); padding: 3px 10px; border-radius: var(--radius-sm); }
.deadline-danger { color: var(--red); font-size: 12px; font-weight: 600; background: var(--red-bg); padding: 3px 10px; border-radius: var(--radius-sm); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }

.mat-status { padding: 3px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; border: none; font-family: inherit; }
.mat-notstarted { background: #ebebeb; color: var(--w6); }
.mat-inprogress { background: var(--purple-bg); color: var(--purple); }
.mat-reviewing { background: var(--orange-bg); color: oklch(50% 0.13 65); }
.mat-done { background: var(--green-bg); color: var(--green); }
.mat-problem { background: var(--red-bg); color: var(--red); }

.offer-section { background: var(--accent-light); border: 1.5px solid var(--accent-border); border-radius: var(--radius-md); padding: 18px; margin-top: 12px; }

.timeline-item {
  border-left: 3px solid #d8d8d8;
  background: #fafafa; border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px; margin-bottom: 8px; transition: all 0.2s;
  border: 1px solid #e4e4e4; border-left-width: 3px;
}
.timeline-item.urgent { border-left-color: var(--red); background: var(--red-bg); border-color: oklch(85% 0.07 25); border-left-color: var(--red); }
.timeline-item.warning-soon { border-left-color: var(--orange); background: var(--orange-bg); }
.timeline-item.done { border-left-color: var(--green); background: oklch(95% 0.03 158); }
.tl-header { display: flex; align-items: center; gap: 12px; }
.tl-check { width: 22px; height: 22px; border: 2px solid #d0d0d0; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; }
.tl-check.checked { background: var(--green); border-color: var(--green); color: #fff; }
.tl-content { flex: 1; }
.tl-title { font-size: 13px; font-weight: 500; color: var(--nb); }
.tl-dates { font-size: 11px; color: var(--w5); margin-top: 2px; }
.tl-urgent-badge { font-size: 11px; font-weight: 600; color: var(--red); }

.comm-item { background: #fafafa; border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 8px; box-shadow: var(--shadow-xs); border: 1px solid #e4e4e4; }
.comm-header { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.comm-method { padding: 3px 10px; border-radius: var(--radius-full); font-size: 10px; background: #e8e8e8; color: var(--w6); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.comm-date { font-size: 12px; color: var(--w5); }

/* ===== ADMIN ===== */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.admin-stat { background: #fafafa; border-radius: var(--radius-md); padding: 20px 24px; box-shadow: var(--shadow-sm); border: 1px solid #e4e4e4; transition: all 0.2s; }
.admin-stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.admin-stat .num { font-size: 32px; font-weight: 800; color: var(--nb); line-height: 1.2; letter-spacing: -0.8px; }
.admin-stat .label { font-size: 11px; color: var(--w5); margin-top: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; }

.table-wrap { background: #fafafa; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid #e4e4e4; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #ebebeb; color: var(--w6); padding: 12px 18px; text-align: left; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; border-bottom: 1px solid #e0e0e0; }
.data-table td { padding: 13px 18px; border-bottom: 1px solid #f0f0f0; font-size: 13px; color: var(--nb); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: #f8fafc; }
.data-table tr:hover td { background: #eef2ff; }

/* Channel card grid */
.channel-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 16px;
}
.channel-card {
  background: #fafafa;
  border: 1px solid #e4e4e4;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.channel-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.channel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.channel-card-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--nb);
}
.channel-star {
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  transition: all 0.15s;
}
.channel-star:hover { opacity: 0.8; }
.channel-star.star-0 { background: #f1f5f9; color: #94a3b8; }
.channel-star.star-1 { background: #fef2f2; color: #ef4444; }
.channel-star.star-2 { background: #fffbeb; color: #f59e0b; }
.channel-star.star-3 { background: #fefce8; color: #eab308; }
.channel-star.star-4 { background: #f0fdf4; color: #22c55e; }
.channel-star.star-5 { background: #eff6ff; color: #3b82f6; }
.channel-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.channel-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  background: #f4f4f4;
  border-radius: 6px;
}
.stat-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--nb);
}
.stat-label {
  font-size: 9px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}
.channel-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
/* Channel detail modal */
.channel-stat-card {
  background: #f4f4f4;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  gap: 4px;
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.stat-big {
  font-size: 20px;
  font-weight: 700;
  color: var(--nb);
}
.star-option {
  padding: 6px 12px;
  border: 1px solid #e4e4e4;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
  background: #fafafa;
}
.star-option:hover { border-color: #f59e0b; }
.star-option.active {
  border-color: #f59e0b;
  background: #fffbeb;
  font-weight: 600;
}
.channel-student-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}
.channel-student-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f4f4f4;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  gap: 12px;
}
.channel-student-row:hover { background: #ebebeb; }

/* Consulting stats page */
.stats-market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
  padding: 8px 0;
}
.stats-market-card {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  padding: 20px 24px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}
.stats-market-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-1px); }
.stats-market-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}
.stats-market-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.stats-market-name {
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
}
.stats-market-body { display: flex; flex-direction: column; gap: 10px; }
.stats-market-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
}
.stats-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  background: #f8fafc;
  border-radius: 10px;
  transition: background 0.15s;
}
.stats-metric:hover { background: #f1f5f9; }
.stats-metric-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}
.stats-metric-label {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
  text-align: center;
  font-weight: 500;
}
.stats-star-section {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* === Modern Department Summary Card === */
.stats-dept-hero {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}
.stats-dept-hero::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--dashboard-primary) 0%, var(--dashboard-primary-light) 50%, var(--dashboard-accent) 100%);
  border-radius: 4px 0 0 4px;
}
.stats-dept-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.stats-dept-hero-main-num {
  font-size: 40px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
  letter-spacing: -0.5px;
}
.stats-dept-hero-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  margin-left: 8px;
}
.stats-dept-hero-trend.up { background: #dcfce7; color: #16a34a; }
.stats-dept-hero-trend.down { background: #fee2e2; color: #dc2626; }
.stats-dept-hero-trend.neutral { background: #f1f5f9; color: #64748b; }
.stats-dept-hero-sub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.stats-dept-hero-sub-item {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}
.stats-dept-hero-sub-num {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.stats-dept-hero-sub-label {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
}

.user-status-active { color: var(--green); font-weight: 600; }
.user-status-disabled { color: var(--red); font-weight: 600; }
.user-status-pending { color: var(--orange); font-weight: 600; }

.btn-approve { background: var(--green); color: #fff; padding: 5px 14px; border-radius: var(--radius-md); border: none; cursor: pointer; font-size: 12px; font-weight: 500; font-family: inherit; transition: all 0.15s; }
.btn-approve:hover { opacity: 0.88; }
.btn-disable { background: var(--red); color: #fff; padding: 5px 14px; border-radius: var(--radius-md); border: none; cursor: pointer; font-size: 12px; font-weight: 500; font-family: inherit; }
.btn-enable { background: var(--green); color: #fff; padding: 5px 14px; border-radius: var(--radius-md); border: none; cursor: pointer; font-size: 12px; font-weight: 500; font-family: inherit; }
.btn-delete { background: #fafafa; color: var(--red); padding: 5px 14px; border-radius: var(--radius-md); border: 1px solid var(--red-border); cursor: pointer; font-size: 12px; font-weight: 500; font-family: inherit; transition: all 0.15s; }
.btn-delete:hover { background: var(--red-bg); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(6px);
}
.modal-box {
  background: #fafafa; border-radius: var(--radius-xl); padding: 32px 36px;
  width: 100%; max-width: 640px; max-height: 82vh; overflow-y: auto;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,0.06);
}
.modal-content {
  background: #fafafa; border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,0.06);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title { font-size: 17px; font-weight: 700; color: var(--nb); letter-spacing: -0.3px; }
.modal-close { width: 32px; height: 32px; border: none; background: #ebebeb; border-radius: var(--radius-md); cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; color: var(--w6); transition: all 0.15s; }
.modal-close:hover { background: #e0e0e0; color: var(--nb); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 28px; }

.confirm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(6px); }
.confirm-box { background: #fafafa; border-radius: var(--radius-xl); padding: 40px 36px; width: 100%; max-width: 420px; box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,0.06); text-align: center; }
.confirm-box .confirm-icon { font-size: 48px; margin-bottom: 18px; }
.confirm-box .confirm-title { font-size: 18px; font-weight: 700; color: var(--nb); margin-bottom: 8px; }
.confirm-box .confirm-desc { font-size: 14px; color: var(--w6); margin-bottom: 30px; line-height: 1.6; }
.confirm-box .confirm-actions { display: flex; gap: 12px; justify-content: center; }
.confirm-box .btn-confirm-cancel { padding: 10px 28px; border-radius: var(--radius-md); border: 1px solid #d4d4d4; background: #fafafa; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--w6); font-family: inherit; transition: all 0.15s; }
.confirm-box .btn-confirm-cancel:hover { background: #f0f0f0; }
.confirm-box .btn-confirm-danger { padding: 10px 28px; border-radius: var(--radius-md); border: none; background: var(--red); color: #fff; cursor: pointer; font-size: 14px; font-weight: 600; font-family: inherit; transition: all 0.15s; }
.confirm-box .btn-confirm-danger:hover { opacity: 0.88; }

/* Autocomplete */
.autocomplete-wrap { position: relative; }
.autocomplete-list { position: absolute; top: 100%; left: 0; right: 0; background: #fafafa; border: 1px solid #d4d4d4; border-radius: var(--radius-md); max-height: 240px; overflow-y: auto; z-index: 10; box-shadow: var(--shadow-md); margin-top: 6px; }
.autocomplete-item { padding: 11px 16px; font-size: 13px; cursor: pointer; transition: background 0.1s; color: var(--nb); }
.autocomplete-item:hover, .autocomplete-item.active { background: #ebebeb; color: var(--nb); }
.hidden { display: none; }

/* ===== AUTH FORMS (registration) ===== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; color: var(--w6); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #d8d8d8;
  border-radius: var(--radius-md);
  font-size: 14px; font-family: inherit;
  transition: all 0.2s; outline: none; background: #fafafa;
  color: var(--nb);
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(55% 0.12 186 / 0.12);
  background: #fff;
}
.btn-primary {
  width: 100%; padding: 12px;
  background: var(--nb); color: #fff; border: none;
  border-radius: var(--radius-md); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.btn-primary:hover { background: #333; box-shadow: 0 6px 20px rgba(0,0,0,0.25); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }

.reg-type-select { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.reg-type-card { background: #fafafa; border-radius: var(--radius-lg); padding: 28px 22px; text-align: center; cursor: pointer; transition: all 0.2s; box-shadow: var(--shadow-sm); border: 1px solid #e4e4e4; }
.reg-type-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #c0c0c0; }
.reg-type-card.selected { box-shadow: 0 0 0 2px var(--nb), var(--shadow-md); background: #fafafa; }
.reg-type-card .icon { font-size: 40px; margin-bottom: 12px; }
.reg-type-card .title { font-size: 15px; font-weight: 700; color: var(--nb); }
.reg-type-card .desc { font-size: 12px; color: var(--w5); margin-top: 4px; }
.reg-back-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--w5); cursor: pointer; font-size: 13px; margin-bottom: 22px; transition: color 0.15s; }
.reg-back-btn:hover { color: var(--nb); }
.invite-section { background: oklch(95% 0.04 75); border: 1px solid oklch(87% 0.08 75); border-radius: var(--radius-md); padding: 16px; margin-bottom: 20px; }
.invite-section label { font-size: 12px; color: oklch(48% 0.12 65); font-weight: 600; display: block; margin-bottom: 6px; }
.invite-section input { width: 100%; padding: 9px 14px; border: 1.5px solid #d4d4d4; border-radius: var(--radius-md); font-size: 13px; outline: none; font-family: 'SF Mono', 'Consolas', monospace; letter-spacing: 1px; text-transform: uppercase; background: #fafafa; }
.invite-section input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px oklch(58% 0.13 65 / 0.12); }

.consultant-card { background: #fafafa; border-radius: var(--radius-md); padding: 18px 22px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; transition: all 0.15s; box-shadow: var(--shadow-xs); border: 1px solid #e4e4e4; }
.consultant-card:hover { box-shadow: var(--shadow-sm); border-color: #d0d0d0; }
.consultant-info { display: flex; align-items: center; gap: 16px; }
.consultant-avatar { width: 40px; height: 40px; border-radius: var(--radius-md); background: #e8e8e8; color: var(--w6); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.consultant-name { font-size: 14px; font-weight: 600; color: var(--nb); }
.consultant-meta { font-size: 12px; color: var(--w5); margin-top: 2px; }
.consultant-actions { display: flex; gap: 6px; align-items: center; }
.btn-pill { padding: 5px 14px; border-radius: var(--radius-full); border: 1px solid #d4d4d4; background: #fafafa; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--w6); font-family: inherit; transition: all 0.15s; }
.btn-pill:hover { border-color: #b8b8b8; background: #f0f0f0; color: var(--nb); }
.btn-pill.danger { color: var(--red); border-color: var(--red-border); background: var(--red-bg); }
.btn-pill.danger:hover { background: oklch(89% 0.05 25); }
.btn-pill.enable { color: var(--green); background: var(--green-bg); border-color: oklch(82% 0.08 158); }
.btn-pill.enable:hover { background: oklch(88% 0.06 158); }

.invite-code { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 13px; font-weight: 600; background: #ebebeb; padding: 3px 10px; border-radius: var(--radius-sm); letter-spacing: 1px; border: 1px solid #dcdcdc; }
.invite-status-pending { color: var(--orange); font-weight: 600; font-size: 12px; }
.invite-status-used { color: var(--green); font-weight: 600; font-size: 12px; }
.invite-status-expired { color: var(--w5); font-weight: 600; font-size: 12px; }
.invite-status-revoked { color: var(--red); font-weight: 600; font-size: 12px; }

.section-divider { border-top: 1px solid #e0e0e0; margin: 32px 0 20px; padding-top: 24px; }
.section-divider .section-subtitle { font-size: 10px; color: var(--w5); font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.8px; }

.consultant-filter { display: flex; align-items: center; gap: 6px; }
.consultant-filter select { padding: 6px 14px; border: 1px solid #d4d4d4; border-radius: var(--radius-full); font-size: 12px; font-weight: 500; color: var(--w6); background: #fafafa; outline: none; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.consultant-filter select:focus { border-color: var(--accent); }

.company-list-card { background: #fafafa; border-radius: var(--radius-md); padding: 18px 22px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s; box-shadow: var(--shadow-xs); border: 1px solid #e4e4e4; }
.company-list-card:hover { box-shadow: var(--shadow-sm); border-color: #d0d0d0; }
.company-list-info { display: flex; align-items: center; gap: 16px; }
.company-icon { width: 44px; height: 44px; border-radius: var(--radius-md); background: #e8e8e8; color: var(--w6); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.company-name { font-size: 15px; font-weight: 700; color: var(--nb); }
.company-stats { font-size: 12px; color: var(--w5); margin-top: 3px; }
.company-actions { display: flex; gap: 6px; }
.company-list-card .expand-arrow { transition: transform 0.2s; font-size: 12px; color: var(--w5); margin-left: 8px; }
.company-list-card.expanded .expand-arrow { transform: rotate(180deg); }
.company-consultants { background: #ebebeb; border-top: 1px solid #e0e0e0; margin: 14px -22px -18px; padding: 14px 22px; border-radius: 0 0 var(--radius-md) var(--radius-md); display: none; }
.company-list-card.expanded .company-consultants { display: block; }
.consultant-sub-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e4e4e4; }
.consultant-sub-row:last-child { border-bottom: none; }
.consultant-sub-info { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.consultant-sub-avatar { width: 28px; height: 28px; border-radius: 50%; background: #e0e0e0; color: var(--w6); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.consultant-sub-name { font-weight: 600; color: var(--nb); }
.consultant-sub-meta { font-size: 11px; color: var(--w5); }
.consultant-sub-status { font-size: 10px; padding: 2px 8px; border-radius: var(--radius-full); font-weight: 600; text-transform: uppercase; letter-spacing: 0.2px; }
.consultant-sub-status.active { background: var(--green-bg); color: var(--green); }
.consultant-sub-status.disabled { background: var(--red-bg); color: var(--red); }

/* ===== TOAST ===== */
#toast-container { position: fixed; top: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: var(--radius-md); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); pointer-events: auto; animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); max-width: 400px; backdrop-filter: blur(8px); }
.toast-info { background: rgba(250,250,250,0.95); color: var(--accent); border: 1px solid var(--accent-border); }
.toast-success { background: rgba(250,250,250,0.95); color: var(--green); border: 1px solid oklch(80% 0.08 158); }
.toast-warn { background: rgba(250,250,250,0.95); color: oklch(48% 0.12 65); border: 1px solid oklch(86% 0.08 75); }
.toast-error { background: rgba(250,250,250,0.95); color: var(--red); border: 1px solid var(--red-border); }
@keyframes toastSlideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

.loading-overlay { position: fixed; inset: 0; background: rgba(232,232,232,0.85); z-index: 9998; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; backdrop-filter: blur(6px); }
.loading-overlay.hidden { display: none; }
.loading-spinner { width: 40px; height: 40px; border: 3px solid #d8d8d8; border-top-color: var(--nb); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: var(--w6); font-weight: 500; }
.loading { display: flex; align-items: center; justify-content: center; min-height: 200px; color: var(--w5); font-size: 14px; }

/* ===== RATING STARS (keep for student detail) ===== */
.rating-stars { display: flex; gap: 2px; }
.rating-star { font-size: 20px; cursor: pointer; color: #d4d4d4; transition: color 0.15s; }
.rating-star.filled { color: oklch(70% 0.14 75); }
.rating-star.invalid-star { color: var(--red); }
.star-rating { font-size: 13px; margin-left: 4px; display: inline-block; }

/* ===== SETTINGS ===== */
.settings-pw-row { display: flex; align-items: center; gap: 8px; background: #e8e8e8; border: 1px solid #d4d4d4; border-radius: var(--radius-md); padding: 12px 16px; margin-top: 6px; }
.settings-pw-text { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 15px; letter-spacing: 2px; flex: 1; }
.settings-eye-btn { background: none; border: none; cursor: pointer; font-size: 18px; padding: 4px 6px; border-radius: 4px; transition: background 0.15s; }
.settings-eye-btn:hover { background: #d8d8d8; }

/* ================================================================
   MOBILE RESPONSIVE (max-width: 768px)
   ================================================================ */
@media (max-width: 768px) {
  .hamburger-btn {
    display: flex; align-items: center; justify-content: center;
    position: fixed; top: 12px; left: 12px; z-index: 200;
    width: 42px; height: 42px; background: #fafafa;
    border-radius: var(--radius-md); font-size: 20px; cursor: pointer;
    box-shadow: var(--shadow-sm); color: var(--w6); border: 1px solid #e4e4e4;
  }
  .sidebar-open .hamburger-btn { color: var(--nb); background: #f0f0f0; }

  .sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 149; background: rgba(0,0,0,0.45); backdrop-filter: blur(4px); }
  .sidebar-open .sidebar-overlay { display: block; }

  .sidebar { width: 270px; transform: translateX(-100%); transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); z-index: 150; box-shadow: none; }
  .sidebar-open .sidebar { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,0.25); }
  .sidebar-collapsed .sidebar { width: 270px; }
  .sidebar-collapsed .sidebar-logo-text { opacity: 1; width: auto; }
  .sidebar-collapsed .nav-label { opacity: 1; width: auto; overflow: visible; }
  .sidebar-collapsed .sidebar-user-name { opacity: 1; font-size: 13px; }
  .sidebar-collapsed .sidebar-user-role { opacity: 1; font-size: 10px; }

  .main-content { margin-left: 0 !important; padding: 18px 16px; max-width: 100%; }
  .sidebar-collapsed .main-content { margin-left: 0 !important; }

  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-left: 52px; }
  .page-header h2 { font-size: 20px; }

  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 16px 18px; }
  .stat-card .num { font-size: 22px; }

  .filter-bar { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .filter-bar input { min-width: 150px; flex: 0 0 auto; }
  .filter-btn { flex-shrink: 0; font-size: 11px; padding: 5px 12px; }

  .student-list { border-radius: var(--radius-md); }
  .student-row { padding: 12px 16px; flex-wrap: wrap; gap: 6px; }
  .row-name { min-width: 100px; max-width: 140px; }
  .row-meta { flex-basis: 100%; gap: 8px; font-size: 11px; }
  .row-right { margin-left: 0; }

  .detail-header { flex-wrap: wrap; gap: 12px; padding: 16px 18px; }
  .detail-name { font-size: 18px; }
  .detail-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .detail-tab { flex-shrink: 0; white-space: nowrap; font-size: 12px; padding: 8px 14px; }
  .section-card { padding: 18px 14px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }

  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box { max-width: 100%; width: 100%; max-height: 90vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 24px 18px; }
  .modal-actions { flex-direction: column; gap: 8px; }
  .modal-actions button { width: 100%; }

  .confirm-box { margin: 20px; max-width: 100%; padding: 30px 22px; }
  .confirm-box .confirm-actions { flex-direction: column; }
  .confirm-box .btn-confirm-cancel, .confirm-box .btn-confirm-danger { width: 100%; }

  .auth-page { padding: 20px 14px; align-items: flex-start; padding-top: 60px; }
  .lock-time { font-size: 56px; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 600px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .reg-type-select { grid-template-columns: 1fr; }

  .consultant-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .consultant-actions { width: 100%; flex-wrap: wrap; }

  .uni-block { padding: 14px 12px; }
  .program-name { font-size: 12px; padding: 5px 12px; border-radius: 16px; max-width: 100%; white-space: normal; word-break: keep-all; overflow-wrap: break-word; }

  #toast-container { top: 12px; right: 12px; left: 12px; }
  .toast { max-width: 100%; }

  button, .btn-sm, .btn-pill, .nav-item, .detail-tab, .filter-btn { min-height: 42px; display: inline-flex; align-items: center; }
  .back-btn { min-height: 42px; }
  .card-close-btn, .card-transfer-btn { min-height: 38px; }

  .filter-divider { display: none; }
  .consultant-filter { margin-left: 52px; }
  .lock-screen { max-width: 100%; padding: 0 10px; }
}