/* =============================================
   HubAcademic — Main Stylesheet
   Paleta: Azul-marinho profundo + Dourado + Branco
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --navy:        #0a1628;
  --navy-mid:    #1a3a6b;
  --navy-light:  #2563eb;
  --gold:        #f59e0b;
  --gold-light:  #fcd34d;
  --white:       #ffffff;
  --off-white:   #f8fafc;
  --gray-50:     #f1f5f9;
  --gray-100:    #e2e8f0;
  --gray-300:    #94a3b8;
  --gray-500:    #64748b;
  --gray-700:    #334155;
  --text:        #1e293b;
  --success:     #10b981;
  --danger:      #ef4444;
  --warning:     #f59e0b;
  --info:        #3b82f6;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 20px rgba(10,22,40,0.10);
  --shadow-lg:   0 10px 40px rgba(10,22,40,0.18);
  --transition:  all 0.25s cubic-bezier(0.4,0,0.2,1);
  --font-display:'Playfair Display', Georgia, serif;
  --font-body:   'DM Sans', system-ui, sans-serif;
  --header-h:    70px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--off-white);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); color: var(--navy); line-height: 1.3; }
h1 { font-size: 2.2rem; } h2 { font-size: 1.7rem; } h3 { font-size: 1.3rem; }
a { color: var(--navy-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }
p { margin-bottom: 0.8rem; }
strong { font-weight: 600; }

/* ── Header ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(245,158,11,0.3);
}

.header-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.header-brand img { height: 44px; width: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(245,158,11,0.6); }
.header-brand span {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
}
.header-brand span em { color: var(--gold); font-style: normal; }

.header-nav { display: flex; align-items: center; gap: 6px; }
.header-nav a, .header-nav button {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,0.85);
  background: transparent;
  border: none; cursor: pointer; font-family: var(--font-body);
  transition: var(--transition);
  text-decoration: none;
}
.header-nav a:hover, .header-nav button:hover {
  background: rgba(255,255,255,0.12);
  color: var(--gold-light);
}
.header-nav a.active {
  background: rgba(245,158,11,0.2);
  color: var(--gold-light);
}
.header-nav .btn-logout {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
}
.header-nav .btn-logout:hover { background: rgba(239,68,68,0.3); color: #fff; }

.header-user {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 5px;
  border-radius: 30px;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  transition: var(--transition);
  border: none; font-family: var(--font-body);
  color: var(--white);
  text-decoration: none;
}
.header-user:hover { background: rgba(255,255,255,0.15); color: var(--gold-light); }
.header-user img {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(245,158,11,0.5);
}
.header-user .user-name { font-size: 13px; font-weight: 500; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.header-divider { width: 1px; height: 24px; background: rgba(255,255,255,0.15); margin: 0 4px; }

/* ── Page Hero / Banner ── */
.page-hero {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 50%, #0f2a4a 100%);
  padding: 60px 0 40px;
  margin-top: var(--header-h);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(245,158,11,0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(37,99,235,0.12) 0%, transparent 50%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); font-size: 2rem; margin-bottom: 6px; }
.page-hero p { color: rgba(255,255,255,0.65); font-size: 0.95rem; }
.page-hero .breadcrumb { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; font-size: 12.5px; color: rgba(255,255,255,0.5); }
.page-hero .breadcrumb a { color: var(--gold-light); }
.page-hero .breadcrumb span::before { content: '/'; margin-right: 6px; }

/* ── Layout ── */
.content-wrap { padding: 32px 0 60px; flex: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}
.card-header h3 { margin: 0; font-size: 1.05rem; }
.card-body { padding: 24px; }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--gray-100); background: var(--gray-50);
}

/* ── Stat Cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
  border-left: 4px solid var(--navy-light);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card .stat-icon {
  width: 50px; height: 50px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  flex-shrink: 0;
}
.stat-card .stat-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-card .stat-label { font-size: 12.5px; color: var(--gray-500); margin-top: 4px; }
.stat-card.gold { border-left-color: var(--gold); }
.stat-card.gold .stat-icon { background: linear-gradient(135deg, #d97706, var(--gold)); }
.stat-card.green { border-left-color: var(--success); }
.stat-card.green .stat-icon { background: linear-gradient(135deg, #059669, var(--success)); }
.stat-card.red { border-left-color: var(--danger); }
.stat-card.red .stat-icon { background: linear-gradient(135deg, #dc2626, var(--danger)); }

/* ── Grid ── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-form-sidebar { grid-template-columns: 3fr 2fr; }

/* Layout 3 colunas: form expandido + 2 cards fixos à direita */
.class-form-layout {
  display: grid;
  grid-template-columns: 1fr 280px 280px;
  gap: 20px;
  align-items: start;
}
.class-form-main  { min-width: 0; }
.class-form-side  { min-width: 0; }
@media (max-width: 1100px) {
  .class-form-layout { grid-template-columns: 1fr 260px; }
  .class-form-side:last-child { grid-column: 2; }
}
@media (max-width: 700px) {
  .class-form-layout { grid-template-columns: 1fr; }
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.45);
  text-align: center;
  padding: 18px;
  font-size: 12.5px;
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
}

@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; font-family: var(--font-body);
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--navy-mid), var(--navy-light)); color: var(--white); }
.btn-primary:hover { background: linear-gradient(135deg, var(--navy-light), #3b82f6); color: var(--white); transform: translateY(-1px); }
.btn-gold { background: linear-gradient(135deg, #d97706, var(--gold)); color: var(--white); }
.btn-gold:hover { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--navy); }
.btn-outline { background: transparent; color: var(--navy-mid); border: 1.5px solid var(--navy-mid); }
.btn-outline:hover { background: var(--navy-mid); color: var(--white); }
.btn-danger { background: linear-gradient(135deg, #dc2626, var(--danger)); color: var(--white); }
.btn-danger:hover { opacity: 0.88; }
.btn-success { background: linear-gradient(135deg, #059669, var(--success)); color: var(--white); }
.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-icon { padding: 7px; width: 34px; height: 34px; justify-content: center; }
.btn-block { width: 100%; justify-content: center; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; letter-spacing: 0.3px; }
.form-label span.req { color: var(--danger); margin-left: 3px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--gray-100);
  border-radius: 8px;
  font-size: 14px; font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--navy-light); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.form-control::placeholder { color: var(--gray-300); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-section { background: var(--gray-50); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; border: 1px solid var(--gray-100); }
.form-section-title { font-size: 0.85rem; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--gray-100); }

/* ── Alerts ── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: 8px;
  font-size: 14px; margin-bottom: 18px;
}
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #ecfdf5; color: #065f46; border-left: 4px solid var(--success); }
.alert-error   { background: #fef2f2; color: #991b1b; border-left: 4px solid var(--danger); }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 4px solid var(--warning); }
.alert-info    { background: #eff6ff; color: #1e40af; border-left: 4px solid var(--info); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.table {
  width: 100%; border-collapse: collapse;
  background: var(--white); font-size: 14px;
}
.table th {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: rgba(255,255,255,0.9); font-weight: 600; font-size: 12.5px;
  padding: 13px 16px; text-align: left; white-space: nowrap; letter-spacing: 0.3px;
}
.table th:first-child { border-radius: var(--radius-lg) 0 0 0; }
.table th:last-child  { border-radius: 0 var(--radius-lg) 0 0; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-50); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8fafc; }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-empty { text-align: center; padding: 40px; color: var(--gray-500); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.3px;
}
.badge-navy    { background: rgba(26,58,107,0.12); color: var(--navy-mid); }
.badge-gold    { background: var(--gold); color: #fff; font-weight: 700; }
.badge-success { background: rgba(16,185,129,0.12); color: #065f46; }
.badge-danger  { background: rgba(239,68,68,0.12); color: #991b1b; }
.badge-gray    { background: var(--gray-100); color: var(--gray-700); }

/* ── Avatar ── */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-sm  { width: 32px; height: 32px; }
.avatar-md  { width: 48px; height: 48px; }
.avatar-lg  { width: 80px; height: 80px; }
.avatar-xl  { width: 120px; height: 120px; }

/* ── Sidebar layout ── */
.page-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.45);
  text-align: center;
  padding: 18px;
  font-size: 12.5px;
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
}

@media (max-width: 900px) { .page-layout { grid-template-columns: 1fr; } }

.sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky; top: calc(var(--header-h) + 20px);
}
.sidebar-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 18px 16px;
}
.sidebar-header h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px; margin: 0; }
.sidebar-nav { padding: 10px 0; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; font-size: 13.5px; font-weight: 500;
  color: var(--gray-700); transition: var(--transition);
}
.sidebar-nav a:hover { background: var(--gray-50); color: var(--navy-mid); padding-left: 24px; }
.sidebar-nav a.active { background: rgba(26,58,107,0.08); color: var(--navy-mid); font-weight: 600; border-right: 3px solid var(--navy-mid); }
.sidebar-nav .nav-icon { width: 20px; text-align: center; font-size: 15px; }
.sidebar-divider { height: 1px; background: var(--gray-100); margin: 8px 0; }

/* ── Material item ── */
.material-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-100);
  margin-bottom: 10px;
  background: var(--white);
  transition: var(--transition);
}
.material-item:hover { border-color: var(--navy-light); background: #f8fafc; }
.material-icon { font-size: 26px; flex-shrink: 0; }
.material-info { flex: 1; min-width: 0; }
.material-info .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.material-info .meta { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.material-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── QR Code area ── */
.qr-wrap { text-align: center; padding: 20px; }
.qr-wrap img { max-width: 200px; border-radius: 8px; border: 4px solid var(--gray-100); }
.qr-wrap p { font-size: 12px; color: var(--gray-500); margin-top: 10px; }

/* ── Rating Stars (Evaluation) ── */
.rating-group { margin-bottom: 16px; }
.rating-label { font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 8px; }
.rating-label span.req { color: var(--danger); }
.stars { display: flex; gap: 6px; flex-wrap: wrap; }
.stars input[type=radio] { display: none; }
.stars label {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  border: 1.5px solid var(--gray-100);
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: var(--transition); color: var(--gray-500);
  background: var(--white);
}
.stars label:hover, .stars input[type=radio]:checked + label {
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  color: var(--white); border-color: var(--navy-light);
}

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 50%, #0f2a4a 100%);
  padding: 20px;
  position: relative; overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 25% 75%, rgba(245,158,11,0.1) 0%, transparent 50%),
                    radial-gradient(circle at 75% 25%, rgba(37,99,235,0.15) 0%, transparent 50%);
}
.login-box {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  width: 100%; max-width: 440px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
  position: relative; z-index: 1;
}
.login-box-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 32px;
  text-align: center;
}
.login-box-header img { height: 70px; width: 70px; border-radius: 50%; border: 3px solid rgba(245,158,11,0.6); margin-bottom: 14px; }
.login-box-header h1 { font-family: var(--font-display); color: var(--white); font-size: 1.6rem; margin: 0; letter-spacing: 1px; }
.login-box-header p { color: rgba(255,255,255,0.6); font-size: 12.5px; margin-top: 4px; }
.login-box-body { padding: 30px 32px; }
.login-tabs { display: flex; gap: 0; margin-bottom: 24px; border: 1.5px solid var(--gray-100); border-radius: 8px; overflow: hidden; }
.login-tab {
  flex: 1; padding: 9px; text-align: center; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--transition); border: none; background: transparent; font-family: var(--font-body);
  color: var(--gray-500);
}
.login-tab.active { background: var(--navy-mid); color: var(--white); }

/* ── Pagination ── */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  font-size: 13px; font-weight: 500; transition: var(--transition);
  border: 1.5px solid var(--gray-100); background: var(--white); color: var(--gray-700);
}
.pagination a:hover { border-color: var(--navy-light); color: var(--navy-light); }
.pagination .active { background: var(--navy-mid); color: var(--white); border-color: var(--navy-mid); }

/* ── Toast ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 10px; min-width: 260px; max-width: 380px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease-out;
}
.toast-success { background: #064e3b; color: #ecfdf5; }
.toast-error   { background: #7f1d1d; color: #fef2f2; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Progress Bar ── */
.progress { background: var(--gray-100); border-radius: 20px; height: 8px; overflow: hidden; }
.progress-bar {
  height: 100%; border-radius: 20px;
  background: linear-gradient(90deg, var(--navy-mid), var(--navy-light));
  transition: width 0.5s ease;
}

/* ── Modal ── */
.modal-backdrop {
  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(2px);
}
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  max-width: 540px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: modalIn 0.2s ease-out;
}
@keyframes modalIn { from { transform: scale(0.95) translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}
.modal-header h3 { margin: 0; font-size: 1.05rem; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--gray-500); line-height: 1; padding: 4px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--gray-100); display: flex; gap: 10px; justify-content: flex-end;
}

/* ── Utility ── */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-small { font-size: 12.5px; }
.fw-600 { font-weight: 600; }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy-mid); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.divider { height: 1px; background: var(--gray-100); margin: 20px 0; }
.empty-state { text-align: center; padding: 50px 20px; }
.empty-state .icon { font-size: 48px; margin-bottom: 14px; }
.empty-state p { color: var(--gray-500); }

/* ── Course/Class cards ── */
.course-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden; transition: var(--transition);
  display: flex; flex-direction: column;
}
.course-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.course-card-banner {
  height: 6px;
  background: linear-gradient(90deg, var(--navy-mid) 0%, var(--navy-light) 100%);
}
.course-card-body { padding: 18px; flex: 1; }
.course-card-footer { padding: 12px 18px; border-top: 1px solid var(--gray-50); background: var(--gray-50); display: flex; justify-content: space-between; align-items: center;
}
.course-code { display: inline-flex; padding: 2px 8px; background: rgba(26,58,107,0.1); color: var(--navy-mid); border-radius: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: 1px; margin-bottom: 6px; }
.course-card h4 { font-size: 1rem; margin: 4px 0 8px; line-height: 1.3; }

/* ── Lesson card ── */
.lesson-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px;
  border-left: 4px solid var(--navy-light);
  transition: var(--transition);
}
.lesson-card:hover { box-shadow: var(--shadow-lg); border-left-color: var(--gold); }
.lesson-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.lesson-card h4 { font-size: 1.05rem; margin: 0; }
.lesson-date { font-size: 12px; color: var(--gray-500); display: flex; align-items: center; gap: 5px; }

/* ── Evaluation form ── */
.eval-section { margin-bottom: 28px; }
.eval-section h3 { font-size: 1rem; color: var(--navy); padding-bottom: 8px; border-bottom: 2px solid var(--gold); margin-bottom: 16px; }

/* ── Student view ── */
.student-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white); padding: 28px; border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.student-header h2 { color: var(--white); margin: 0 0 4px; }
.student-header p { color: rgba(255,255,255,0.65); margin: 0; font-size: 13.5px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .header-brand span { display: none; }
  .site-header { padding: 0 16px; }
  .header-nav a span, .header-nav button span { display: none; }
  .header-nav a, .header-nav button { padding: 7px 10px; }
  .page-hero { padding: 40px 0 28px; }
  .page-hero h1 { font-size: 1.5rem; }
  h1 { font-size: 1.7rem; } h2 { font-size: 1.4rem; }
}

/* ── Student Access Page ── */
.student-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    color: var(--navy);
    margin: 36px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-100);
}
.student-lesson-card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(10,22,40,.07);
    overflow: hidden;
}
.student-lesson-header {
    padding: 16px 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    user-select: none;
}
.student-lesson-header:hover { background: #f8fafc; }
.lesson-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.lesson-date-badge {
    background: linear-gradient(135deg, var(--navy), var(--navy-mid));
    color: #fff;
    border-radius: 10px;
    padding: 8px 14px;
    text-align: center;
    min-width: 56px;
    flex-shrink: 0;
}
.lesson-date-badge .day  { font-size: 1.2rem; font-weight: 700; line-height: 1; }
.lesson-date-badge .month { font-size: .68rem; text-transform: uppercase; opacity: .85; }
.student-lesson-info strong { display: block; color: #1e293b; font-size: .95rem; }
.student-lesson-info span   { font-size: .82rem; color: #64748b; }
.lesson-toggle { color: #94a3b8; font-size: 1rem; transition: transform .2s; flex-shrink: 0; }
.student-lesson-card.open .lesson-toggle { transform: rotate(180deg); }
.student-lesson-body {
    padding: 0 22px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s;
}
.student-lesson-card.open .student-lesson-body {
    max-height: 2000px;
    padding: 4px 22px 22px;
}
.student-lesson-summary {
    background: #f8fafc;
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    font-size: .88rem;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 14px;
}
.student-materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.student-material-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    background: #f8fafc;
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    text-decoration: none;
    color: #1e293b;
    font-size: .85rem;
    transition: all .18s;
}
.student-material-item:hover { background: #eff6ff; border-color: var(--navy); color: var(--navy); }
.student-material-item .mat-icon { font-size: 1.3rem; }
.student-material-item .mat-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-eval-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, var(--gold), #d97706);
    color: #fff;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    margin-top: 10px;
    transition: opacity .2s;
}
.student-eval-btn:hover { opacity: .88; }
.student-general-materials {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(10,22,40,.07);
}
@media (max-width: 600px) {
    .student-materials-grid { grid-template-columns: 1fr; }
}
