/* =====================================================================
   Modern UI refresh — override layer on top of the Sneat theme.
   Loaded AFTER the theme CSS so these rules win without touching vendor files.
   Safe to remove: delete this file + its two <link> includes to revert.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --mui-primary: #5e5cf0;
  --mui-primary-rgb: 94, 92, 240;
  --mui-radius: 0.85rem;
  --mui-radius-sm: 0.55rem;
  --mui-shadow: 0 2px 6px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);
  --mui-shadow-hover: 0 6px 16px rgba(16, 24, 40, 0.10), 0 12px 32px rgba(16, 24, 40, 0.10);
  --mui-border: #eceef3;
}

/* ---- Typography ------------------------------------------------------ */
body,
.menu,
.btn,
.form-control,
.form-select,
.dropdown-menu,
.card,
table {
  font-family: 'Inter', 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  letter-spacing: -0.01em;
}

body {
  background-color: #f4f5fb;
}

h1, h2, h3, h4, h5, h6, .fw-bold, .fw-semibold {
  letter-spacing: -0.02em;
}

/* ---- Cards ----------------------------------------------------------- */
.card {
  border: 1px solid var(--mui-border);
  border-radius: var(--mui-radius);
  box-shadow: var(--mui-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: var(--mui-shadow-hover);
}
.card-header {
  border-bottom: 1px solid var(--mui-border);
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
}

/* ---- Buttons --------------------------------------------------------- */
.btn {
  border-radius: var(--mui-radius-sm);
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background-color: var(--mui-primary);
  border-color: var(--mui-primary);
  box-shadow: 0 4px 12px rgba(var(--mui-primary-rgb), 0.32);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #4f4de0;
  border-color: #4f4de0;
  box-shadow: 0 6px 18px rgba(var(--mui-primary-rgb), 0.42);
  transform: translateY(-1px);
}
.btn-sm { border-radius: 0.45rem; }

/* ---- Form controls --------------------------------------------------- */
.form-control,
.form-select,
.select2-container--default .select2-selection--single {
  border-radius: var(--mui-radius-sm) !important;
  border-color: #dfe2ea !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--mui-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--mui-primary-rgb), 0.15) !important;
}
.input-group-text { border-radius: var(--mui-radius-sm); }

/* select2 height + focus to match Bootstrap inputs */
.select2-container--default .select2-selection--single {
  height: calc(1.53em + 0.78rem + 2px) !important;
  display: flex;
  align-items: center;
  border: 1px solid #dfe2ea;
}

/* ---- Sidebar --------------------------------------------------------- */
.menu-vertical .menu-item .menu-link {
  border-radius: var(--mui-radius-sm);
  margin: 0.1rem 0.6rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.menu-vertical .menu-item.active > .menu-link {
  background: linear-gradient(72deg, var(--mui-primary) 0%, #7b79f5 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(var(--mui-primary-rgb), 0.35);
}
.menu-vertical .menu-item.active > .menu-link .menu-icon { color: #fff !important; }
.menu-vertical .menu-item:not(.active) > .menu-link:hover {
  background-color: rgba(var(--mui-primary-rgb), 0.08) !important;
}
.app-brand { padding-top: 0.4rem; padding-bottom: 0.4rem; }

/* ---- Navbar ---------------------------------------------------------- */
.layout-navbar .navbar-detached {
  border-radius: var(--mui-radius);
  box-shadow: var(--mui-shadow);
  border: 1px solid var(--mui-border);
}

/* ---- Tables ---------------------------------------------------------- */
.table > :not(caption) > * > * { padding: 0.85rem 1.25rem; }
.table thead th {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #8a90a2;
  background-color: #fafbfe;
  border-bottom: 1px solid var(--mui-border);
}
.table tbody tr { transition: background-color 0.12s ease; }
.table-hover tbody tr:hover { background-color: rgba(var(--mui-primary-rgb), 0.04); }

/* ---- Badges ---------------------------------------------------------- */
.badge { border-radius: 0.5rem; font-weight: 600; letter-spacing: 0.01em; }

/* ---- Dropdowns ------------------------------------------------------- */
.dropdown-menu {
  border-radius: var(--mui-radius-sm);
  border: 1px solid var(--mui-border);
  box-shadow: var(--mui-shadow-hover);
}

/* ---- Scrollbar ------------------------------------------------------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cdd2de; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #b4bacb; }
::-webkit-scrollbar-track { background: transparent; }

/* =====================================================================
   Login / auth page
   ===================================================================== */
.authentication-wrapper.authentication-basic {
  min-height: 100vh;
}
body:has(.authentication-basic) {
  background:
    radial-gradient(1200px 600px at 0% 0%, rgba(var(--mui-primary-rgb), 0.18), transparent 60%),
    radial-gradient(1000px 600px at 100% 100%, rgba(123, 121, 245, 0.20), transparent 55%),
    #f1f2fb;
}
.authentication-basic .card {
  border: none;
  border-radius: 1.15rem;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.14);
  backdrop-filter: blur(4px);
}
.authentication-basic .card-body { padding: 2.25rem 2.25rem 2rem; }

/* =====================================================================
   Student portal — dashboard, sidebar, transcript
   ===================================================================== */

/* Welcome banner */
.portal-hero {
  border-radius: var(--mui-radius);
  background: linear-gradient(100deg, var(--mui-primary) 0%, #7b79f5 55%, #9d8bf7 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.portal-hero::after {
  content: "";
  position: absolute;
  right: -40px; top: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
  border-radius: 50%;
}
.portal-hero .hero-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.6);
}

/* KPI stat cards */
.stat-card .stat-icon {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 1.25rem;
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }

/* Sidebar section headers */
.menu-header {
  padding: 0.85rem 1.5rem 0.35rem;
}
.menu-header .menu-header-text {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a7acbb;
}

/* Academic transcript */
.transcript-sheet { box-shadow: var(--mui-shadow); }
.transcript-gpa {
  font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--mui-primary);
}
.grade-scale td, .grade-scale th { padding: 0.5rem 0.85rem; }

@media print {
  .layout-menu, .layout-navbar, .menu, .content-footer, .d-print-none { display: none !important; }
  .layout-page, .content-wrapper { margin: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}
.authentication-basic .form-password-toggle .input-group-text { background: transparent; }

/* =====================================================================
   Quick access tiles (dashboard shortcuts)
   ===================================================================== */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 0.85rem;
}
.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.15rem 0.5rem;
  border-radius: var(--mui-radius);
  border: 1px solid var(--mui-border);
  background: #fff;
  text-align: center;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.quick-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--mui-shadow-hover);
  border-color: transparent;
}
.quick-tile .quick-ico {
  width: 50px; height: 50px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 15px;
  font-size: 1.5rem;
}
.quick-tile .quick-label {
  font-size: 0.78rem; font-weight: 600; color: #5d6577; line-height: 1.2;
}
.quick-tile:hover .quick-label { color: var(--mui-primary); }

/* =====================================================================
   Survey / Subject evaluation
   ===================================================================== */
.survey-ico {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 13px; font-size: 1.35rem; flex-shrink: 0;
}
.survey-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.survey-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.survey-card:hover { transform: translateY(-3px); box-shadow: var(--mui-shadow-hover); }
.survey-card.is-done { background: linear-gradient(180deg, #f6fdf9 0%, #ffffff 60%); }

/* Friendly rating scale */
.rating-scale { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.rating-scale .btn-check + .btn {
  min-width: 54px; border-radius: var(--mui-radius-sm);
  font-weight: 700; padding-block: 0.55rem;
}
.rating-scale .btn-check:checked + .btn { transform: translateY(-2px); }
.rating-legend { font-size: 0.74rem; color: #98a0b0; }

/* Question blocks inside one card */
.q-block { padding: 1.1rem 0; border-bottom: 1px dashed var(--mui-border); }
.q-block:last-child { border-bottom: 0; }
.q-index {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(var(--mui-primary-rgb), 0.12); color: var(--mui-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}

/* Sticky submit bar */
.survey-submit-bar {
  position: sticky; bottom: 0; z-index: 5;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(6px);
  border-top: 1px solid var(--mui-border);
  padding: 0.85rem 1rem; border-radius: 0 0 var(--mui-radius) var(--mui-radius);
}

/* =====================================================================
   Class / teacher timetable grid
   ===================================================================== */
.tt-wrap { overflow-x: auto; }
table.tt-grid {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 8px;
  table-layout: fixed;
}
table.tt-grid thead th {
  background: linear-gradient(135deg, var(--mui-primary), #7b79f5);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.7rem 0.5rem;
  border-radius: var(--mui-radius-sm);
  text-align: center;
}
table.tt-grid tbody td {
  vertical-align: top;
  background: #f8fafc;
  border: 1px solid var(--mui-border);
  border-radius: var(--mui-radius-sm);
  padding: 8px;
  width: 14.2%;
}
.tt-class {
  --a: #5e5cf0;
  background: #fff;
  border: 1px solid var(--mui-border);
  border-left: 3px solid var(--a);
  border-radius: 10px;
  padding: 0.6rem 0.65rem;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.tt-class:last-child { margin-bottom: 0; }
.tt-class:hover { transform: translateY(-2px); box-shadow: var(--mui-shadow); }
.tt-subject { font-weight: 700; font-size: 0.82rem; color: var(--a); line-height: 1.25; margin-bottom: 0.35rem; }
.tt-time {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.74rem; font-weight: 600; color: #334155;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px; padding: 0.12rem 0.4rem; margin-bottom: 0.4rem;
}
.tt-meta { display: flex; align-items: center; gap: 0.35rem; font-size: 0.74rem; color: #64748b; line-height: 1.4; }
.tt-meta i { font-size: 0.85rem; color: #94a3b8; flex-shrink: 0; }
.tt-empty { text-align: center; color: #b6bcc9; font-size: 0.74rem; padding: 1.2rem 0.3rem; }
.tt-empty i { display: block; font-size: 1.1rem; margin-bottom: 0.25rem; opacity: 0.6; }
.tt-c0 { --a: #5e5cf0; } .tt-c1 { --a: #16a34a; } .tt-c2 { --a: #d97706; } .tt-c3 { --a: #dc2626; }
.tt-c4 { --a: #2563eb; } .tt-c5 { --a: #7c3aed; } .tt-c6 { --a: #0891b2; } .tt-c7 { --a: #db2777; }
