:root {
  --tfd-sidebar-width: 280px;
  --tfd-primary: #0f172a;
  --tfd-primary-soft: #1e293b;
  --tfd-accent: #2563eb;
  --tfd-bg: #f8fafc;
  --tfd-card-shadow: 0 10px 30px rgba(15,23,42,.06);
}
* { box-sizing: border-box; }
body { background: var(--tfd-bg); color: #0f172a; }
a { text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(37,99,235,.35) !important; outline-offset: 2px; }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#f8fafc,#e2e8f0); }
.auth-card { max-width: 420px; width: 100%; }
.app-shell { min-height: 100dvh; }
.sidebar { width: var(--tfd-sidebar-width); height: 100dvh; background: var(--tfd-primary); color: #fff; position: fixed; left: 0; top: 0; z-index: 1040; display: flex; flex-direction: column; box-shadow: 0 20px 40px rgba(15,23,42,.22); }
.sidebar-header { padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.brand-title { font-weight: 700; font-size: 1.05rem; }
.brand-subtitle { font-size: .78rem; color: #94a3b8; }
.sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .75rem; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #475569 transparent; }
.sidebar-scroll::-webkit-scrollbar { width: 7px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: #475569; border-radius: 999px; }
.sidebar-footer { flex-shrink: 0; padding: .85rem 1rem; border-top: 1px solid rgba(255,255,255,.08); background: rgba(15,23,42,.96); }
.sidebar a { color: #cbd5e1; text-decoration: none; display: flex; align-items: center; gap: .65rem; padding: .72rem .9rem; border-radius: .75rem; margin-bottom: .18rem; font-weight: 500; }
.sidebar a:hover, .sidebar a.active { background: var(--tfd-primary-soft); color: #fff; }
.sidebar a .badge { margin-left: auto; }
.sidebar-section-label { color: #64748b; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: .9rem .9rem .35rem; }
.sidebar-user { display: flex; gap: .7rem; align-items: center; margin-bottom: .75rem; }
.sidebar-avatar { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #1d4ed8; color: #fff; font-weight: 700; flex: 0 0 38px; }
.sidebar-logout { justify-content: center; background: rgba(239,68,68,.12); color: #fecaca !important; }
.sidebar-logout:hover { background: rgba(239,68,68,.22) !important; color: #fff !important; }
.main-content { margin-left: var(--tfd-sidebar-width); padding: 1.5rem; min-height: 100dvh; }
.sidebar-backdrop { display: none; }
.navbar-mobile { display: none; }
.page-header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.page-header .breadcrumb { font-size: .86rem; margin-bottom: .45rem; }
.card { border-radius: 1rem; }
.btn { border-radius: .7rem; }
.form-control, .form-select { border-radius: .7rem; }
.form-control-lg, .form-select-lg { min-height: 3.1rem; }
.stat-card { border: 0; border-radius: 1.1rem; box-shadow: var(--tfd-card-shadow); }
.table-card { border: 0; border-radius: 1rem; overflow: hidden; box-shadow: var(--tfd-card-shadow); }
.status-pill { font-size: .78rem; padding: .35rem .6rem; border-radius: 999px; text-transform: capitalize; }
.empty-state { text-align: center; padding: 3rem 1rem; color: #64748b; }
.assignment-card { border: 0; border-radius: 1.1rem; box-shadow: var(--tfd-card-shadow); height: 100%; }
.assignment-card .badge { font-weight: 600; }
.info-tile { border: 1px solid #e2e8f0; border-radius: .9rem; background: #fff; padding: .85rem; }
.proof-box { border: 1px dashed #94a3b8; border-radius: 1rem; padding: 1rem; background: #fff; }
.proof-preview-img { max-width: 180px; max-height: 120px; object-fit: cover; border-radius: .8rem; border: 1px solid #e2e8f0; }
.mobile-sticky-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); padding: .75rem; box-shadow: 0 -.5rem 1rem rgba(15,23,42,.08); z-index: 10; }
.progress-summary-bar { height: .65rem; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.progress-summary-bar > span { display: block; height: 100%; background: var(--tfd-accent); }
.filter-card { border: 0; border-radius: 1rem; box-shadow: var(--tfd-card-shadow); }
@media (max-width: 991.98px) {
  .navbar-mobile { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease-in-out; }
  .sidebar.show { transform: translateX(0); }
  body.sidebar-open { overflow: hidden; }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 1035; }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .main-content { margin-left: 0; padding: 1rem; }
  .page-header { display: block; }
  .page-header .btn { width: 100%; margin-top: .75rem; }
  .responsive-card-table thead { display: none; }
  .responsive-card-table tr { display: block; margin-bottom: 1rem; border: 1px solid #e2e8f0; border-radius: .75rem; background: #fff; overflow: hidden; }
  .responsive-card-table td { display: flex; justify-content: space-between; gap: 1rem; border: 0; border-bottom: 1px solid #f1f5f9; padding: .8rem .9rem; }
  .responsive-card-table td:last-child { border-bottom: 0; }
  .responsive-card-table td::before { content: attr(data-label); font-weight: 600; color: #475569; }
  .mobile-sticky-actions { margin-left: -1rem; margin-right: -1rem; }
  .mobile-sticky-actions .btn { flex: 1 1 0; }
}

/* TFD Urdu / Islamic UI polish */
:root {
  --tfd-primary: #065f46;
  --tfd-primary-dark: #064e3b;
  --tfd-navy: #0f172a;
  --tfd-gold: #d97706;
  --tfd-cream: #faf7ef;
  --tfd-border: #e2e8f0;
}

body {
  background: linear-gradient(180deg, var(--tfd-cream), #f8fafc 220px);
}

.sidebar {
  background: linear-gradient(180deg, var(--tfd-navy), var(--tfd-primary-dark));
}

.sidebar a.active,
.sidebar a:hover {
  background: rgba(6, 95, 70, .95);
  border-inline-start: 3px solid var(--tfd-gold);
}

.card {
  border-radius: 1rem;
}

.assignment-form .card {
  border: 1px solid rgba(6, 95, 70, .08) !important;
}

.assignment-form h2 i,
.page-header h1 {
  color: var(--tfd-primary);
}

.task-row {
  background: rgba(250, 247, 239, .55);
  border-color: rgba(6, 95, 70, .18) !important;
}

.task-row:hover {
  background: rgba(250, 247, 239, .9);
}

.sticky-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: rgba(248, 250, 252, .94);
  border-top: 1px solid var(--tfd-border);
  padding: 1rem;
  margin: 0 -0.25rem;
  backdrop-filter: blur(8px);
}

.badge.text-bg-success {
  background-color: var(--tfd-primary) !important;
}

.btn-primary {
  --bs-btn-bg: var(--tfd-primary);
  --bs-btn-border-color: var(--tfd-primary);
  --bs-btn-hover-bg: var(--tfd-primary-dark);
  --bs-btn-hover-border-color: var(--tfd-primary-dark);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(6, 95, 70, .65);
  box-shadow: 0 0 0 .2rem rgba(6, 95, 70, .12);
}

[dir="rtl"] .form-check {
  padding-right: 1.8em;
  padding-left: 0;
}

[dir="rtl"] .form-check .form-check-input {
  float: right;
  margin-right: -1.8em;
  margin-left: 0;
}

/* Reporting UI upgrade */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(226,232,240,.8);
  border-radius: 1.1rem;
  padding: .85rem 1rem;
  box-shadow: 0 14px 30px rgba(15,23,42,.06);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 1rem;
  z-index: 50;
}
.topbar-left,.topbar-right { display:flex; align-items:center; gap:.85rem; }
.topbar-title { font-weight: 800; color: var(--tfd-primary, #065f46); line-height:1.1; }
.topbar-subtitle { color:#64748b; font-size:.82rem; }
.topbar-icon-btn { width: 42px; height:42px; display:inline-flex; align-items:center; justify-content:center; border:1px solid #e2e8f0; border-radius: 999px; color:#0f172a; background:#fff; text-decoration:none; }
.topbar-icon-btn:hover { color: var(--tfd-primary, #065f46); border-color: rgba(6,95,70,.35); }
.profile-chip { display:flex; align-items:center; gap:.65rem; border:1px solid #e2e8f0; background:#fff; border-radius: 999px; padding:.38rem .75rem .38rem .38rem; }
.profile-avatar { width:36px; height:36px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; background:linear-gradient(135deg,var(--tfd-primary,#065f46),var(--tfd-navy,#0f172a)); color:#fff; font-weight:800; }
.profile-name { font-weight:700; line-height:1.1; }
.profile-role { font-size:.76rem; color:#64748b; }
.report-hero { border-radius:1.4rem; padding:1.5rem; color:#fff; background: radial-gradient(circle at 90% 10%, rgba(217,119,6,.35), transparent 26%), linear-gradient(135deg, #064e3b 0%, #0f172a 100%); box-shadow:0 22px 44px rgba(6,78,59,.20); overflow:hidden; position:relative; }
.report-hero:after { content:""; position:absolute; inset:0; background-image: linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.05) 25%, transparent 25%); background-size: 28px 28px; opacity:.18; pointer-events:none; }
.report-hero-content { position:relative; z-index:1; max-width: 900px; }
.report-hero h1 { font-size: clamp(1.6rem, 3vw, 2.55rem); font-weight: 850; margin:.25rem 0 .35rem; }
.report-hero p { color:rgba(255,255,255,.84); margin:0; max-width: 760px; }
.hero-eyebrow { display:inline-flex; align-items:center; gap:.35rem; text-transform:uppercase; letter-spacing:.08em; font-size:.75rem; color:#fde68a; font-weight:700; }
.report-stat-card,.report-mini-stat { background:#fff; border:1px solid #e2e8f0; border-radius:1.1rem; padding:1rem; box-shadow:0 12px 26px rgba(15,23,42,.055); }
.report-stat-icon,.report-mini-icon { width:42px; height:42px; display:inline-flex; align-items:center; justify-content:center; border-radius:.9rem; margin-bottom:.8rem; font-size:1.1rem; }
.report-stat-label { color:#64748b; font-weight:700; font-size:.82rem; text-transform:uppercase; letter-spacing:.04em; }
.report-stat-value { font-size:1.85rem; font-weight:850; color:#0f172a; line-height:1.1; }
.report-stat-meta { color:#64748b; font-size:.78rem; margin-top:.2rem; }
.report-filter-panel { border-radius:1.15rem; }
.report-action-card { background:#fff; border:1px solid #e2e8f0; border-radius:1.15rem; padding:1rem; height:100%; display:flex; flex-direction:column; box-shadow:0 12px 26px rgba(15,23,42,.045); }
.report-type-card { display:flex; gap:.85rem; margin-bottom:1rem; align-items:flex-start; }
.report-type-icon { width:46px; height:46px; border-radius:1rem; display:inline-flex; align-items:center; justify-content:center; flex:0 0 46px; font-size:1.2rem; }
.report-type-card h3 { font-size:1.05rem; margin:0 0 .25rem; font-weight:800; color:#0f172a; }
.report-type-card p { margin:0; color:#64748b; font-size:.88rem; line-height:1.35; }
.report-profile-card { display:flex; align-items:center; gap:1rem; background:#fff; border:1px solid #e2e8f0; border-radius:1.25rem; padding:1.1rem; box-shadow:0 12px 26px rgba(15,23,42,.055); }
.report-profile-avatar { width:62px; height:62px; border-radius:1.1rem; display:inline-flex; align-items:center; justify-content:center; background:linear-gradient(135deg,var(--tfd-primary,#065f46),var(--tfd-navy,#0f172a)); color:#fff; font-size:1.6rem; flex:0 0 62px; }
.report-profile-card h2 { margin:0 0 .35rem; font-weight:850; color:#0f172a; }
.report-profile-meta { display:flex; flex-wrap:wrap; gap:.45rem .9rem; color:#64748b; font-size:.9rem; }
.report-rank-box { min-width:92px; text-align:center; border-left:1px solid #e2e8f0; padding-left:1rem; }
.report-rank-box span { color:#64748b; font-size:.8rem; text-transform:uppercase; letter-spacing:.06em; display:block; }
.report-rank-box strong { font-size:2rem; line-height:1; color:var(--tfd-primary,#065f46); }
.status-count-card { border:1px solid #e2e8f0; background:#fff; border-radius:.95rem; padding:.85rem; display:flex; align-items:center; justify-content:space-between; gap:.75rem; box-shadow:0 10px 20px rgba(15,23,42,.04); }
.status-count-card span { color:#64748b; font-size:.84rem; }
.status-count-card strong { color:#0f172a; font-size:1.25rem; }
.report-progress { height:.55rem; border-radius:999px; min-width:110px; display:inline-flex; width:110px; vertical-align:middle; margin-right:.35rem; }
.report-progress .progress-bar,.report-progress-lg .progress-bar { background:linear-gradient(90deg,var(--tfd-primary,#065f46),#16a34a); }
.report-progress-lg { height:.8rem; border-radius:999px; }
.report-big-percent { font-size:3.2rem; font-weight:900; color:var(--tfd-primary,#065f46); line-height:1; }
.report-type-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.85rem 0; border-bottom:1px solid #f1f5f9; }
.report-type-row:last-child { border-bottom:0; }
.report-type-row span { color:#64748b; font-weight:700; }
.report-type-row strong { font-size:1.2rem; color:#0f172a; }
.teacher-report-tile { display:flex; align-items:center; gap:.75rem; padding:.85rem; border:1px solid #e2e8f0; border-radius:1rem; text-decoration:none; color:#0f172a; background:#fff; transition:.18s ease; }
.teacher-report-tile:hover { border-color:rgba(6,95,70,.35); box-shadow:0 10px 22px rgba(15,23,42,.06); transform:translateY(-1px); }
.teacher-report-tile span { width:42px; height:42px; border-radius:.9rem; display:inline-flex; align-items:center; justify-content:center; background:rgba(6,95,70,.1); color:var(--tfd-primary,#065f46); }
.teacher-report-tile small { display:block; color:#64748b; }
.table-card .card-header strong { color:#0f172a; }
@media (max-width: 991.98px) {
  .topbar { top:.5rem; border-radius:1rem; }
  .report-profile-card { align-items:flex-start; }
  .report-rank-box { border-left:0; padding-left:0; }
}
@media (max-width: 575.98px) {
  .topbar-right { gap:.45rem; }
  .report-hero { padding:1.15rem; }
  .report-profile-card { display:block; }
  .report-profile-avatar { margin-bottom:.75rem; }
  .report-rank-box { text-align:left; margin-top:.85rem; }
}

/* Dashboard final polish */
.dashboard-shell { margin-top: .75rem; }
.dashboard-hero-v2 {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .8fr);
  gap: 1.25rem;
  padding: 1.75rem;
  background:
    radial-gradient(circle at 88% 18%, rgba(217,119,6,.32), transparent 22%),
    linear-gradient(135deg, #065f46 0%, #0b5b6d 45%, #0f172a 100%);
  border-radius: 1.5rem;
  color: #fff;
  box-shadow: 0 20px 48px rgba(15,23,42,.16);
  overflow: hidden;
}
.dashboard-hero-v2::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.04) 25%, transparent 25%);
  background-size: 32px 32px;
  opacity: .18;
  pointer-events: none;
}
.dashboard-hero-copy, .dashboard-hero-side { position: relative; z-index: 1; }
.dashboard-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .82rem;
  font-weight: 800;
  color: #fde68a;
}
.dashboard-hero-v2 h1 {
  margin: 0 0 .5rem;
  color: #fff !important;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
}
.dashboard-hero-v2 p {
  margin: 0;
  max-width: 720px;
  color: rgba(255,255,255,.88);
  font-size: 1.08rem;
}
.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 1.35rem;
}
.dashboard-hero-actions .btn { border-radius: .95rem; font-weight: 700; padding: .85rem 1.2rem; }
.dashboard-hero-actions .btn-outline-light { border-width: 2px; }
.hero-focus-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 1.25rem;
  padding: 1.1rem;
  backdrop-filter: blur(8px);
  min-height: 100%;
}
.hero-focus-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  margin-bottom: 1rem;
}
.focus-badge {
  display: inline-flex;
  align-items: center;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  font-size: .8rem;
  font-weight: 700;
}
.hero-focus-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.hero-focus-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  background: rgba(255,255,255,.08); border-radius: .9rem; padding: .8rem .9rem;
}
.hero-focus-list strong { font-size: 1.4rem; line-height: 1; color: #fff; }
.hero-focus-list span { color: rgba(255,255,255,.85); font-size: .9rem; text-align: right; }
.metric-card {
  height: 100%;
  display: flex;
  gap: .95rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.15rem;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(15,23,42,.05);
}
.metric-card__icon {
  width: 52px; height: 52px; border-radius: 1rem; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex: 0 0 52px;
}
.metric-card__label { color: #475569; font-size: .86rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.metric-card__value { color: #0f172a; font-size: 2rem; font-weight: 900; line-height: 1.1; margin-top: .15rem; }
.metric-card__meta { color: #64748b; font-size: .86rem; margin-top: .25rem; }
.metric-card--success .metric-card__icon { background: rgba(22,163,74,.12); color: #15803d; }
.metric-card--primary .metric-card__icon { background: rgba(29,78,216,.10); color: #1d4ed8; }
.metric-card--danger .metric-card__icon { background: rgba(220,38,38,.10); color: #dc2626; }
.metric-card--gold .metric-card__icon { background: rgba(217,119,6,.12); color: #d97706; }
.metric-card--info .metric-card__icon { background: rgba(8,145,178,.11); color: #0891b2; }
.mini-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}
.mini-stat-card {
  display: flex; align-items: center; gap: .8rem;
  background: rgba(255,255,255,.88);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: .85rem .9rem;
}
.mini-stat-card__icon {
  width: 40px; height: 40px; border-radius: .85rem; display: inline-flex; align-items: center; justify-content: center;
  background: #f1f5f9; color: #065f46; font-size: 1rem; flex: 0 0 40px;
}
.mini-stat-card__label { color: #64748b; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.mini-stat-card__value { color: #0f172a; font-size: 1.02rem; font-weight: 800; line-height: 1.25; margin-top: .1rem; }
.dashboard-card {
  border: 1px solid #e2e8f0;
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15,23,42,.05);
}
.dashboard-card__header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.1rem; background: #fff; border-bottom: 1px solid #eef2f7;
}
.dashboard-card__header h2 { margin: 0; font-size: 1.45rem; font-weight: 800; color: #0f172a; }
.dashboard-card__header p { margin: .25rem 0 0; color: #64748b; }
.dashboard-card__body { padding: 1rem 1.1rem; background: #fff; }
.chart-body { height: 330px; }
.dashboard-table th {
  color: #64748b; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  border-top: 0; padding: .95rem 1rem; background: #f8fafc;
}
.dashboard-table td { padding: .95rem 1rem; vertical-align: middle; }
.dashboard-empty-state {
  min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .55rem; text-align: center; color: #64748b;
}
.dashboard-empty-state i { font-size: 1.6rem; color: #94a3b8; }
@media (max-width: 1399.98px) {
  .mini-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .dashboard-hero-v2 { grid-template-columns: 1fr; padding: 1.25rem; }
  .chart-body { height: 280px; }
}
@media (max-width: 767.98px) {
  .dashboard-hero-actions { flex-direction: column; }
  .dashboard-hero-actions .btn { width: 100%; }
  .mini-stats-grid { grid-template-columns: 1fr; }
  .dashboard-card__header { flex-direction: column; align-items: stretch; }
  .metric-card__value { font-size: 1.7rem; }
}

/* Dashboard professional refresh */
.dashboard-pro.page-section { margin-top: .25rem; }
.dashboard-pro-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, .95fr);
  gap: 1.25rem;
  align-items: stretch;
  padding: 1.6rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(16,185,129,.22), transparent 34%),
    linear-gradient(135deg, #065f46 0%, #0b7285 52%, #0f172a 100%);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .14);
  overflow: hidden;
}
.dashboard-pro-hero::before {
  content: '';
  position: absolute;
  inset: auto -100px -100px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  filter: blur(6px);
}
.dashboard-pro-hero__main,
.dashboard-pro-hero__side { position: relative; z-index: 1; }
.dashboard-pro-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .8rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fef3c7;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dashboard-pro-hero h1 {
  margin: 0 0 .55rem;
  color: #ffffff;
  font-size: clamp(2.3rem, 4.1vw, 4.2rem);
  line-height: .98;
  font-weight: 900;
  letter-spacing: -.03em;
}
.dashboard-pro-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255,255,255,.86);
  font-size: 1.06rem;
  line-height: 1.65;
}
.dashboard-pro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 1.4rem;
}
.dashboard-pro-actions .btn {
  min-height: 58px;
  border-radius: 16px;
  padding: .85rem 1.3rem;
  font-weight: 800;
  box-shadow: none;
}
.hero-side-card {
  height: 100%;
  min-height: 100%;
  padding: 1.15rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.08));
  backdrop-filter: blur(10px);
  color: #ffffff;
}
.hero-side-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: rgba(255,255,255,.95);
  font-size: .92rem;
  font-weight: 800;
}
.hero-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .7rem;
}
.hero-highlight-item {
  padding: .85rem .8rem;
  border-radius: 18px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.08);
}
.hero-highlight-item span {
  display: block;
  color: rgba(255,255,255,.75);
  font-size: .78rem;
  margin-bottom: .4rem;
}
.hero-highlight-item strong {
  display: block;
  color: #ffffff;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 900;
}
.hero-top-student-card {
  margin-top: .9rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: rgba(15,23,42,.24);
  border: 1px solid rgba(255,255,255,.08);
}
.hero-top-student-card__label {
  color: #fde68a;
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hero-top-student-card__name {
  margin-top: .35rem;
  color: #ffffff;
  font-size: 1.18rem;
  line-height: 1.3;
  font-weight: 900;
}
.hero-top-student-card__meta {
  margin-top: .3rem;
  color: rgba(255,255,255,.72);
  font-size: .86rem;
}

.pro-metric-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  height: 100%;
  min-height: 138px;
  padding: 1.15rem 1.15rem 1.05rem;
  border-radius: 22px;
  border: 1px solid #dbe4ef;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}
.pro-metric-card__icon {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 1.4rem;
}
.pro-metric-card__content { min-width: 0; }
.pro-metric-card__label {
  color: #475569;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pro-metric-card__value {
  margin-top: .18rem;
  color: #0f172a;
  font-size: 2.05rem;
  line-height: 1.05;
  font-weight: 900;
}
.pro-metric-card__meta {
  margin-top: .3rem;
  color: #64748b;
  font-size: .9rem;
}
.pro-metric-card--success .pro-metric-card__icon { color: #15803d; background: rgba(22,163,74,.12); }
.pro-metric-card--primary .pro-metric-card__icon { color: #2563eb; background: rgba(37,99,235,.10); }
.pro-metric-card--warning .pro-metric-card__icon { color: #d97706; background: rgba(245,158,11,.14); }
.pro-metric-card--danger .pro-metric-card__icon { color: #dc2626; background: rgba(239,68,68,.12); }

.dashboard-overview-card {
  padding: 1.2rem;
  border: 1px solid #dbe4ef;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
}
.dashboard-card__header--no-border {
  padding: 0 0 .9rem;
  border-bottom: 0;
}
.overview-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .9rem;
}
.overview-stat-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 92px;
  padding: .95rem 1rem;
  border: 1px solid #e7edf5;
  border-radius: 18px;
  background: #f8fbfd;
}
.overview-stat-item__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #0f766e;
  background: rgba(15,118,110,.08);
  font-size: 1.15rem;
}
.overview-stat-item__body span {
  display: block;
  color: #64748b;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
}
.overview-stat-item__body strong {
  display: block;
  margin-top: .22rem;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.2;
}

.dashboard-card {
  border: 1px solid #dbe4ef;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
  overflow: hidden;
}
.dashboard-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.2rem 1rem;
  border-bottom: 1px solid #e9eff6;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}
.dashboard-card__header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -.02em;
}
.dashboard-card__header p {
  margin: .25rem 0 0;
  color: #64748b;
}
.dashboard-card__body { padding: 1.1rem 1.2rem; }
.chart-body {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dashboard-table thead th {
  padding: .9rem 1rem;
  color: #64748b;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom-width: 1px;
}
.dashboard-table tbody td {
  padding: 1rem;
  color: #0f172a;
  vertical-align: middle;
}
.dashboard-table tbody tr:hover { background: #f8fbfd; }
.dashboard-empty-state {
  display: flex;
  min-height: 170px;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: #64748b;
  font-weight: 600;
  text-align: center;
}
.dashboard-empty-state i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eef2f7;
  color: #0f766e;
}

@media (max-width: 1400px) {
  .overview-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1199.98px) {
  .dashboard-pro-hero { grid-template-columns: 1fr; }
  .chart-body { min-height: 290px; }
}
@media (max-width: 991.98px) {
  .hero-highlight-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .dashboard-pro-hero { padding: 1.15rem; border-radius: 22px; }
  .dashboard-pro-hero h1 { font-size: 2.3rem; }
  .dashboard-pro-actions { flex-direction: column; }
  .dashboard-pro-actions .btn { width: 100%; justify-content: center; }
  .hero-highlight-grid,
  .overview-stat-grid { grid-template-columns: 1fr; }
  .pro-metric-card { min-height: 126px; }
  .dashboard-card__header { flex-direction: column; }
  .chart-body { min-height: 260px; }
}

/* Premium full-system UI polish */
body.tfd-premium-ui {
  background:
    radial-gradient(circle at 20% 0%, rgba(6,95,70,.08), transparent 26rem),
    linear-gradient(180deg, #f8fafc 0%, #eef4f1 100%);
  color: #0f172a;
}
body.tfd-premium-ui .main-content {
  background: transparent;
}
body.tfd-premium-ui .main-content-inner {
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}
body.tfd-premium-ui .sidebar {
  background:
    radial-gradient(circle at top left, rgba(16,185,129,.18), transparent 12rem),
    linear-gradient(180deg, #081424 0%, #0a2f35 52%, #064e3b 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: 18px 0 48px rgba(2, 6, 23, .16);
}
body.tfd-premium-ui .sidebar-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem 1.15rem;
}
body.tfd-premium-ui .brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 15px;
  color: #fde68a;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
}
body.tfd-premium-ui .brand-title {
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: -.02em;
}
body.tfd-premium-ui .brand-subtitle {
  margin-top: .08rem;
  color: rgba(203,213,225,.78);
}
body.tfd-premium-ui .sidebar-section-label {
  margin-top: .65rem;
  color: rgba(148,163,184,.75);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}
body.tfd-premium-ui .sidebar a {
  border: 1px solid transparent;
  color: rgba(226,232,240,.86);
  font-weight: 750;
  transition: background .16s ease, color .16s ease, transform .16s ease, border-color .16s ease;
}
body.tfd-premium-ui .sidebar a:hover,
body.tfd-premium-ui .sidebar a.active {
  transform: translateX(2px);
  color: #fff;
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.08);
  box-shadow: inset 3px 0 0 #f59e0b;
}
body.tfd-premium-ui .sidebar-footer {
  background: rgba(2,6,23,.34);
  border-top: 1px solid rgba(255,255,255,.07);
}
body.tfd-premium-ui .sidebar-user {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 18px;
  padding: .75rem;
}
body.tfd-premium-ui .sidebar-avatar,
body.tfd-premium-ui .profile-avatar {
  background: linear-gradient(135deg, #0f766e, #0f172a);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15,118,110,.22);
}
body.tfd-premium-ui .sidebar-logout {
  margin-top: .8rem;
  color: #fecaca !important;
  background: rgba(127,29,29,.22) !important;
  border-color: rgba(248,113,113,.1) !important;
  justify-content: center;
}
body.tfd-premium-ui .premium-topbar {
  max-width: 1540px;
  margin: 0 auto 1.25rem;
  border: 1px solid rgba(203,213,225,.9);
  border-radius: 24px;
  padding: .85rem 1rem;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .055);
  backdrop-filter: blur(14px);
}
body.tfd-premium-ui .topbar-menu-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
}
body.tfd-premium-ui .topbar-title {
  color: #065f46;
  font-size: 1.02rem;
  font-weight: 900;
}
body.tfd-premium-ui .topbar-subtitle {
  color: #64748b;
  font-size: .82rem;
}
body.tfd-premium-ui .topbar-icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
body.tfd-premium-ui .premium-profile-chip {
  border-radius: 18px;
  padding: .45rem .8rem .45rem .45rem;
}
body.tfd-premium-ui .card,
body.tfd-premium-ui .filter-card,
body.tfd-premium-ui .table-card {
  border-color: #dbe4ef;
  box-shadow: 0 12px 28px rgba(15,23,42,.045);
}
body.tfd-premium-ui .btn {
  font-weight: 750;
}
body.tfd-premium-ui .btn-primary {
  --bs-btn-bg: #0f766e;
  --bs-btn-border-color: #0f766e;
  --bs-btn-hover-bg: #0f5f59;
  --bs-btn-hover-border-color: #0f5f59;
}
@media (max-width: 991.98px) {
  body.tfd-premium-ui .main-content-inner { padding: 0 .9rem 1.5rem; }
  body.tfd-premium-ui .premium-topbar { margin: .75rem .75rem 1rem; }
}
