/* ============================================================
   Bright Minds Tuition Portal — Design System
   Clean, Professional, Light Theme
   ============================================================ */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ─── Design Tokens ────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --primary:        #F2762E;
  --primary-light:  #F48B4D;
  --primary-dark:   #DD661F;
  --primary-glow:   rgba(242,118,46,0.12);
  --accent:         #2563EB;
  --accent-glow:    rgba(37,99,235,0.12);
  --gold:           #F2762E;
  --success:        #22C55E;
  --danger:         #EF4444;
  --warning:        #F2762E;

  /* Surfaces */
  --bg:             #FFF4EC;
  --bg-white:       #FFFFFF;
  --bg-subtle:      #F8F9FA;
  --bg-hover:       #FFF4EC;

  /* Text */
  --text-primary:   #222222;
  --text-secondary: #666666;
  --text-muted:     #999999;

  /* Borders */
  --border:         #E5E7EB;
  --border-strong:  #D1D5DB;

  /* Radius */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.09), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);

  /* Transitions */
  --t-fast:   0.15s ease;
  --t-normal: 0.25s ease;
  --t-slow:   0.4s ease;
}

/* ─── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ─── Utility ───────────────────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 5px 14px;
  border-radius: var(--r-full);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.22;
  margin-bottom: 14px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

.text-center { text-align: center; }
.text-center .section-sub { margin: 0 auto; }

/* ─── Card ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-normal), transform var(--t-normal);
}

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

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  border-radius: var(--r-full);
  padding: 12px 26px;
  transition: all var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(242,118,46,0.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(242,118,46,0.4);
  transform: translateY(-1px);
}

/* Google-branded action buttons */
.btn-meet {
  background: #1a73e8;
  color: #fff;
  box-shadow: 0 2px 8px rgba(26,115,232,0.25);
}
.btn-meet:hover {
  background: #1557b0;
  box-shadow: 0 4px 16px rgba(26,115,232,0.35);
  transform: translateY(-1px);
}

.btn-drive {
  background: #34a853;
  color: #fff;
  box-shadow: 0 2px 8px rgba(52,168,83,0.25);
}
.btn-drive:hover {
  background: #1e8e3e;
  box-shadow: 0 4px 16px rgba(52,168,83,0.35);
  transform: translateY(-1px);
}

.btn-classroom {
  background: #4285f4;
  color: #fff;
  box-shadow: 0 2px 8px rgba(66,133,244,0.25);
}
.btn-classroom:hover {
  background: #1967d2;
  box-shadow: 0 4px 16px rgba(66,133,244,0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { opacity: 0.88; }

.btn-sm { padding: 7px 16px; font-size: 0.85rem; }
.btn-lg { padding: 15px 36px; font-size: 1.05rem; }
.btn-icon {
  width: 36px; height: 36px; padding: 0;
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-icon:hover {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ─── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

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

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* ─── Badge ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-full);
  letter-spacing: 0.04em;
}
.badge-primary { background: var(--primary-glow); color: var(--primary); }
.badge-success { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-danger  { background: rgba(239,68,68,0.1);  color: var(--danger); }

/* ─── Toast ─────────────────────────────────────────────────── */
#toast-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  animation: toastIn 0.3s ease forwards;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger);  }
.toast.warning { border-left-color: var(--warning); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(24px); }
}

/* ─── NAVBAR ────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 52px;
  width: auto;
  mix-blend-mode: multiply;
  display: block;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
  border-radius: var(--r-full);
  text-decoration: none;
  transition: all var(--t-fast);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  background: #FFF5F0;
}

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

.nav-search-box {
  position: relative;
  width: 200px;
}

.nav-search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 0.85rem;
}

.nav-search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--r-full);
  font-size: 0.85rem;
  background: #F8FAFC;
  font-family: inherit;
  transition: all var(--t-fast);
}

.nav-search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(242,118,46,0.15);
}

.nav-ctas {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--t-fast);
}

/* ─── HERO ──────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 100px;
  background: radial-gradient(circle at 80% 20%, #FFEFE6 0%, #FFFFFF 60%);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.12;
  color: #0F172A;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-content h1 .highlight {
  color: var(--primary);
  background: none;
  -webkit-text-fill-color: initial;
}

.hero-content p {
  font-size: 1.1rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-visual-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #ffffff;
}

.hero-bg-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-bg-shapes .shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}

.hero-bg-shapes .shape-1 {
  width: 250px;
  height: 250px;
  background: rgba(242,118,46,0.15);
  top: 10%;
  right: 10%;
}

.hero-bg-shapes .shape-2 {
  width: 180px;
  height: 180px;
  background: rgba(37,99,235,0.12);
  bottom: 10%;
  left: 10%;
}

.hero-student-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  z-index: 2;
  position: relative;
  border-radius: var(--r-xl);
}

/* ─── SUBJECTS / FOLDERS ────────────────────────────────────── */
.folders-section { background: var(--bg-white); }

.vault-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.vault-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.breadcrumb-sep { color: var(--text-muted); font-size: 0.8rem; }
.breadcrumb-root { color: var(--primary); cursor: pointer; }
.breadcrumb-root:hover { text-decoration: underline; }
.breadcrumb-current { color: var(--text-primary); }

.vault-search {
  position: relative;
  min-width: 220px;
}
.vault-search input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-size: 0.88rem;
  background: var(--bg-white);
  font-family: inherit;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.vault-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.vault-search i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.vault-body { padding: 24px; }

/* Folder Grid */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.folder-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-normal);
  user-select: none;
}

.folder-card:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.folder-card:active { transform: scale(0.97); }

.folder-icon { font-size: 2.8rem; margin-bottom: 10px; line-height: 1; }

.folder-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  word-break: break-word;
}

.folder-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

/* File List */
.file-list { display: flex; flex-direction: column; gap: 8px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-white);
  transition: all var(--t-fast);
}

.file-row:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
}

.file-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.file-info { flex: 1; min-width: 0; }
.file-name {
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.file-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ─── FOOTER ────────────────────────────────────────────────── */
.footer {
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 60%, #0f2239 100%);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
  margin-top: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 64px;
  align-items: flex-start;
  padding-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.92;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  max-width: 320px;
}

.footer-links {
  display: flex;
  gap: 48px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col h5 {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}

.footer-col a,
.footer-col span {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-col i {
  font-size: 0.8rem;
  opacity: 0.7;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
}


/* ─── AUTH PAGES ────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f0f4ff, #fafbff);
  padding: 24px;
}

.auth-box {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 460px;
  padding: 48px 44px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 32px;
  text-decoration: none;
  color: var(--text-primary);
}

.auth-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.auth-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.auth-link-row {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-link-row a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-link-row a:hover { text-decoration: underline; }

/* ─── DASHBOARD ─────────────────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 12px;
  margin-bottom: 20px;
}

.sidebar-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--t-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--primary-glow);
  color: var(--primary);
}

.nav-item i { width: 18px; text-align: center; }

.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-chip-name { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); }
.user-chip-role { font-size: 0.72rem; color: var(--text-muted); }

.main-content {
  padding: 40px;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 36px;
}

.page-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-sub { font-size: 0.92rem; color: var(--text-secondary); }

/* Tab System */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.tab-btn {
  padding: 9px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  margin-bottom: -1px;
}

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

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.data-table th:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.data-table th:last-child  { border-radius: 0 var(--r-md) var(--r-md) 0; }

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

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }

.table-wrap {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Upload dropzone */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-normal);
  background: var(--bg-subtle);
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--primary);
  background: var(--bg-hover);
}

.dropzone-icon {
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.dropzone h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.dropzone p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.file-selected-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 8px;
  word-break: break-all;
}

/* ─── Subjects Cards (student) ──────────────────────────────── */
.subject-card-list { display: flex; flex-direction: column; gap: 20px; }

.subject-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.subject-card-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(to right, #f8faff, #fff);
}

.subject-card-title { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); }
.subject-card-schedule { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

.subject-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.subject-card-col {
  padding: 20px 24px;
}

.subject-card-col:first-child {
  border-right: 1px solid var(--border);
}

.subject-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ─── Admin Stats Cards ─────────────────────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}

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

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-card-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Enrollment Bar ─────────────────────────────────────────── */
.enroll-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: var(--r-full);
  overflow: hidden;
  min-width: 60px;
  max-width: 120px;
}

.enroll-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--r-full);
  transition: width 0.6s ease;
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.55);
  padding: 40px 0;
  text-align: center;
  font-size: 0.85rem;
}

.footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer a:hover { color: white; }

/* ─── Empty / Loading States ────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state i { font-size: 2.5rem; margin-bottom: 12px; display: block; opacity: 0.4; }
.empty-state h4 { font-size: 1rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state p  { font-size: 0.88rem; }

.loading-dots::after {
  content: '';
  animation: dots 1.4s infinite;
}
@keyframes dots {
  0%,20%  { content: ''; }
  40%     { content: '.'; }
  60%     { content: '..'; }
  80%,100%{ content: '...'; }
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-stats { gap: 20px; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 24px 16px; }
  .subject-card-body { grid-template-columns: 1fr; }
  .subject-card-col:first-child { border-right: none; border-bottom: 1px solid var(--border); }
  .auth-box { padding: 36px 24px; }
}

@media (max-width: 640px) {
  .nav-links, .nav-ctas { display: none; }
  .hamburger { display: flex; }
  .navbar-inner { gap: 16px; }
  .folder-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .vault-toolbar { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero { padding: 56px 0 64px; }
  .hero h1 { font-size: 1.8rem; }
}

/* ─── Mobile Nav Overlay ────────────────────────────────────── */
.mobile-nav-open .nav-links {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 66px;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  z-index: 999;
  gap: 4px;
  box-shadow: var(--shadow-lg);
}

.mobile-nav-open .nav-ctas {
  display: flex;
  position: fixed;
  top: auto;
  bottom: 24px;
  left: 24px;
  right: 24px;
  flex-direction: column;
  z-index: 999;
}

/* ─── Folder Action Cards (Student Dashboard) ───────────────── */
.folder-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  padding: 24px;
}

.folder-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--t-normal);
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.folder-link-card .folder-link-icon {
  font-size: 1.8rem;
  transition: transform var(--t-fast);
}

.folder-link-card:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: var(--primary-dark);
}

.folder-link-card:hover .folder-link-icon {
  transform: scale(1.15);
}

/* ─── Modal System ─────────────────────────────────────────── */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.25s ease;
}

.modal-content {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 480px;
  padding: 32px;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--t-fast);
  line-height: 1;
}

.modal-close:hover {
  color: var(--danger);
}

/* ─── Disabled Folder Card ──────────────────────────────────── */
.folder-link-card.disabled {
  opacity: 0.5;
  background: var(--bg-subtle);
  border-color: var(--border);
  cursor: not-allowed;
  pointer-events: none;
  color: var(--text-muted);
  box-shadow: none;
}

.folder-link-card.disabled .folder-link-icon {
  filter: grayscale(100%);
}

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

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

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual { display: none; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-links {
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .hero { padding: 64px 0 72px; }

  .hero h1 { font-size: 2rem; }

  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; justify-content: center; }

  .footer-links { flex-direction: column; gap: 20px; }

  .footer-inner { gap: 28px; }

  .navbar-inner { padding: 0 16px; }

  .hamburger { display: flex; }
  .nav-links, .nav-ctas { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 76px; left: 0; right: 0; background: white; padding: 12px 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); z-index: 999; }
}
