/* =====================================================================
   CBHE Delhi — Records & Printing  ·  UI theme v2.4
   Fonts are bundled (assets/fonts) so the look is the same offline.
   ===================================================================== */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-display: swap; src: url('../fonts/inter-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-weight: 400; font-display: swap; src: url('../fonts/bodoni-moda-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-weight: 500; font-display: swap; src: url('../fonts/bodoni-moda-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-weight: 600; font-display: swap; src: url('../fonts/bodoni-moda-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-weight: 700 900; font-display: swap; src: url('../fonts/bodoni-moda-latin-700-normal.woff2') format('woff2'); }

:root {
  --navy: #0F2E69;
  --navy-2: #1A4596;
  --navy-dark: #0A1F49;
  --gold: #C9971C;
  --gold-2: #E8B93A;
  --gold-light: #FBF3DF;
  --bg: #F2F4F8;
  --surface: #FFFFFF;
  --line: #E3E8F0;
  --line-2: #EEF1F6;
  --ink: #18212F;
  --ink-2: #344054;
  --muted: #667085;
  --success: #12805C;
  --success-bg: #E6F5EE;
  --warn: #B45309;
  --warn-bg: #FEF3E2;
  --danger: #C4352B;
  --danger-bg: #FDECEA;
  --info: #1D5FC2;
  --info-bg: #E8F0FD;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 4px 14px rgba(15, 46, 105, .06);
  --shadow-lg: 0 10px 30px rgba(15, 46, 105, .14);
  --font: 'Inter', 'Segoe UI', 'Nirmala UI', system-ui, -apple-system, sans-serif;
  /* document type colours */
  --c-marksheet: #1D5FC2;
  --c-certificate: #B7811A;
  --c-ccm: #6941C6;
  --c-admit: #0E7C86;
  --c-migration: #12805C;
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; line-height: 1.5;
}
h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
a { color: var(--navy-2); }
::selection { background: #cfdcf6; }
.text-muted { color: var(--muted) !important; }

/* ---------------------------------------------------------------- Shell */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 268px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; color: #DDE5F5;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(232, 185, 58, .10) 0%, rgba(232, 185, 58, 0) 55%),
    linear-gradient(180deg, #11316F 0%, #0A1F49 100%);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 18px; }
.sidebar-brand .brand-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--navy-dark);
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 4px 12px rgba(201, 151, 28, .35);
}
.sidebar-brand .brand-text { line-height: 1.2; }
.sidebar-brand .brand-text strong { display: block; font-size: 15px; color: #fff; letter-spacing: .01em; }
.sidebar-brand .brand-text span { font-size: 11.5px; color: #9FB3DA; }

.sidebar-nav { padding: 6px 12px 14px; flex: 1; }
.sidebar-nav .nav-section-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: #7F95C4; padding: 18px 10px 6px;
}
.sidebar-nav a, .sidebar-group-toggle {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin: 2px 0;
  color: #D2DCF0; text-decoration: none; font-size: 13.8px; font-weight: 500;
  border-radius: 10px; white-space: nowrap; position: relative;
  transition: background .15s ease, color .15s ease;
}
.sidebar-nav a i, .sidebar-group-toggle i.grp-icon { width: 18px; text-align: center; font-size: 14px; color: #9DB0D8; transition: color .15s; }
.sidebar-nav a:hover, .sidebar-group-toggle:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-nav a:hover i, .sidebar-group-toggle:hover i.grp-icon { color: #fff; }
.sidebar-nav a.active {
  background: linear-gradient(90deg, rgba(232,185,58,.20), rgba(255,255,255,.06)); color: #fff; font-weight: 600;
}
.sidebar-nav a.active i { color: var(--gold-2); }
.sidebar-nav a.active::before, .sidebar-group-toggle.has-active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold-2);
}
.sidebar-nav a .badge-count {
  margin-left: auto; background: #F04438; color: #fff; font-size: 11px; font-weight: 700;
  min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 20px;
}
.sidebar-group-toggle .chev { margin-left: auto; font-size: 10px; opacity: .6; transition: transform .2s ease; }
.sidebar-group-toggle[aria-expanded="true"] .chev, .sidebar-group-toggle.has-active .chev { transform: rotate(180deg); }
.sidebar-group-toggle.has-active { color: #fff; font-weight: 600; background: rgba(255,255,255,.05); }
.sidebar-group-toggle.has-active i.grp-icon { color: var(--gold-2); }
.sidebar-subnav { margin: 2px 0 6px 21px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.12); }
.sidebar-subnav a { padding: 7px 10px; font-size: 13px; color: #B9C7E4; font-weight: 500; }
.sidebar-subnav a.active { background: rgba(255,255,255,.10); color: #fff; font-weight: 600; }
.sidebar-subnav a.active::before { left: -11px; top: 7px; bottom: 7px; width: 3px; }
.sidebar-subnav a .subnav-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .45; flex-shrink: 0; }
.sidebar-subnav a.active .subnav-dot { background: var(--gold-2); opacity: 1; }
.sidebar-footer { padding: 14px 20px; font-size: 11.5px; color: #7F95C4; border-top: 1px solid rgba(255,255,255,.08); }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: 12px 28px; background: rgba(255,255,255,.88); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .search-box { flex: 1; max-width: 460px; position: relative; }
.topbar .search-box input {
  width: 100%; height: 40px; border: 1px solid var(--line); background: #F6F8FB; border-radius: 10px;
  padding: 0 14px 0 38px; font-size: 13.8px; font-family: var(--font); color: var(--ink); transition: .15s;
}
.topbar .search-box input:focus { outline: none; background: #fff; border-color: #9DB5E6; box-shadow: 0 0 0 4px rgba(29,95,194,.10); }
.topbar .search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #98A2B3; font-size: 13px; }
.topbar .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.topbar .bell {
  position: relative; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); font-size: 17px; border: 1px solid var(--line); background: #fff;
}
.topbar .bell:hover { color: var(--navy); border-color: #C7D3EA; }
.topbar .bell .dot {
  position: absolute; top: -6px; right: -7px; background: #F04438; color: #fff; font-size: 10.5px; font-weight: 700;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.topbar .profile { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 4px 8px 4px 4px; border-radius: 12px; }
.topbar .profile:hover { background: #F2F4F8; }
.topbar .profile::after { color: #98A2B3; }
.topbar .profile .avatar {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: #fff; font-weight: 700; font-size: 14px;
}
.topbar .profile .meta { line-height: 1.2; font-size: 12px; }
.topbar .profile .meta strong { display: block; font-size: 13.5px; color: var(--ink); }
.topbar .profile .meta span { color: var(--muted); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; font-size: 14px; }
.dropdown-item { border-radius: 8px; padding: 8px 12px; display: flex; gap: 10px; align-items: center; }
.dropdown-item i { width: 16px; color: var(--muted); }

.content { padding: 26px 28px 40px; flex: 1; max-width: 1480px; width: 100%; }

/* ---------------------------------------------------------- Page head */
.page-head { margin-bottom: 20px; }
.page-head h4, .content > div > h4, .content h4.mb-1, .content h4.mb-0 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.page-head h4 { margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }
.content h4 > i:first-child { color: var(--navy-2); margin-right: 4px; }

/* -------------------------------------------------------------- Cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.card-header {
  background: #fff; color: var(--ink); font-weight: 700; font-size: 14.5px;
  border-bottom: 1px solid var(--line-2); padding: 14px 18px; border-radius: var(--radius) var(--radius) 0 0 !important;
  position: relative;
}
.card-header::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.card-header i { color: var(--navy-2); }
.card-body { padding: 18px; }
.card-footer { background: #FAFBFD; border-top: 1px solid var(--line-2); }

/* ------------------------------------------------------------ Buttons */
.btn { border-radius: 10px; font-weight: 600; font-size: 14px; padding: .5rem 1rem; letter-spacing: .005em; transition: all .15s ease; }
.btn-sm { border-radius: 8px; font-size: 12.8px; padding: .32rem .7rem; }
.btn-lg { border-radius: 12px; font-size: 15px; padding: .68rem 1.25rem; }
.btn i { margin-right: 2px; }
.btn-primary { background: linear-gradient(180deg, var(--navy-2), var(--navy)); border: 1px solid var(--navy); box-shadow: 0 1px 2px rgba(15,46,105,.2), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover, .btn-primary:focus { background: var(--navy); border-color: var(--navy-dark); box-shadow: 0 6px 16px rgba(15,46,105,.25); }
.btn-success { background: linear-gradient(180deg, #179468, var(--success)); border: 1px solid #0F6E4F; box-shadow: 0 1px 2px rgba(18,128,92,.2), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-success:hover { background: #0F6E4F; border-color: #0B5A40; box-shadow: 0 6px 16px rgba(18,128,92,.25); }
.btn-warning { background: #F5B12E; border-color: #E9A11A; color: #3A2604; }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); border: 1px solid #B5861A; color: #2A1E02; }
.btn-gold:hover { color: #2A1E02; box-shadow: 0 6px 16px rgba(201,151,28,.3); }
.btn-outline-primary { color: var(--navy-2); border-color: #B9C9EA; background: #fff; }
.btn-outline-primary:hover { background: #EEF3FC; color: var(--navy); border-color: var(--navy-2); }
.btn-outline-secondary { color: var(--ink-2); border-color: #D0D5DD; background: #fff; }
.btn-outline-secondary:hover { background: #F2F4F7; color: var(--ink); border-color: #98A2B3; }
.btn-outline-success { color: var(--success); border-color: #A6D9C3; background: #fff; }
.btn-outline-success:hover { background: var(--success-bg); color: #0B5A40; border-color: var(--success); }
.btn-outline-danger { color: var(--danger); border-color: #F2B8B2; background: #fff; }
.btn-outline-danger:hover { background: var(--danger-bg); color: #9B2219; border-color: var(--danger); }
.btn-outline-warning { color: var(--warn); border-color: #F5CF96; background: #fff; }
.btn-outline-warning:hover { background: var(--warn-bg); color: #8A3F06; border-color: var(--warn); }

/* -------------------------------------------------------------- Forms */
.form-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.form-control, .form-select {
  border-radius: 10px; border: 1px solid #D0D5DD; font-size: 14px; padding: .55rem .8rem; color: var(--ink);
  box-shadow: var(--shadow-sm); font-family: var(--font); transition: border-color .15s, box-shadow .15s;
}
.form-control-sm, .form-select-sm { border-radius: 8px; font-size: 13px; padding: .3rem .6rem; }
.form-control-lg { border-radius: 12px; font-size: 15px; }
.form-control:focus, .form-select:focus { border-color: #84A6E4; box-shadow: 0 0 0 4px rgba(29,95,194,.12); }
.form-control[readonly], .form-control:disabled, .form-select:disabled { background: #F5F7FA; color: var(--ink-2); box-shadow: none; }
.form-text { color: var(--muted); font-size: 12px; }
.form-check-input { width: 1.1em; height: 1.1em; border-color: #B8C0CC; }
.form-check-input:checked { background-color: var(--navy-2); border-color: var(--navy-2); }
.input-group > .btn { box-shadow: none; }
.text-uppercase-input { text-transform: uppercase; }

/* ------------------------------------------------------------- Tables */
.table { --bs-table-hover-bg: #F6F9FE; margin-bottom: 0; font-size: 14px; }
.table > :not(caption) > * > * { padding: .7rem .85rem; border-bottom-color: var(--line-2); }
.table-sm > :not(caption) > * > * { padding: .45rem .6rem; }
.table thead th, table.table thead th {
  background: #F7F9FC; color: #4B5565; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--line) !important; white-space: nowrap;
}
.table-bordered > :not(caption) > * > * { border-color: var(--line); }
.card > .table-responsive:first-child .table thead th:first-child { border-top-left-radius: var(--radius); }
.card > .table-responsive:first-child .table thead th:last-child { border-top-right-radius: var(--radius); }
.table-warning { --bs-table-bg: #FFF8EC; }
.table-danger { --bs-table-bg: #FDF0EE; }

/* -------------------------------------------------- Badges / alerts */
.badge { font-weight: 600; font-size: 11.5px; padding: .38em .7em; border-radius: 20px; letter-spacing: .01em; }
.badge.bg-success { background: var(--success-bg) !important; color: var(--success) !important; box-shadow: inset 0 0 0 1px #B4E2CD; }
.badge.bg-info { background: var(--info-bg) !important; color: var(--info) !important; box-shadow: inset 0 0 0 1px #C4D7F6; }
.badge.bg-warning { background: var(--warn-bg) !important; color: var(--warn) !important; box-shadow: inset 0 0 0 1px #F8D9A8; }
.badge.bg-danger { background: var(--danger-bg) !important; color: var(--danger) !important; box-shadow: inset 0 0 0 1px #F5C3BD; }
.badge.bg-secondary { background: #F0F2F5 !important; color: #475467 !important; box-shadow: inset 0 0 0 1px #DCE0E6; }
.badge.bg-light { background: #F8FAFC !important; }
.badge-count.badge, .type-tab .badge { box-shadow: none; }
.alert { border-radius: 12px; border: 1px solid transparent; font-size: 14px; padding: .85rem 1rem; }
.alert-success { background: var(--success-bg); border-color: #B4E2CD; color: #0B5A40; }
.alert-danger { background: var(--danger-bg); border-color: #F5C3BD; color: #8E2118; }
.alert-warning { background: var(--warn-bg); border-color: #F8D9A8; color: #7A3A05; }
.alert-info { background: var(--info-bg); border-color: #C4D7F6; color: #173F80; }
.alert-light { background: #fff; border-color: var(--line); }

/* -------------------------------------------------------------- Hero */
.hero {
  position: relative; overflow: hidden; border-radius: 18px; padding: 26px 28px; margin-bottom: 22px; color: #fff;
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(232,185,58,.28) 0%, rgba(232,185,58,0) 50%),
    linear-gradient(120deg, #133A82 0%, #0F2E69 55%, #0A1F49 100%);
  box-shadow: 0 12px 30px rgba(15,46,105,.22);
}
.hero::after {
  content: ''; position: absolute; right: -60px; bottom: -90px; width: 280px; height: 280px; border-radius: 50%;
  border: 40px solid rgba(255,255,255,.04);
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .eyebrow { font-size: 11px; letter-spacing: .14em; font-weight: 700; color: var(--gold-2); text-transform: uppercase; margin-bottom: 6px; }
.hero h2 { color: #fff; font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.hero p { color: #C7D3EE; margin: 0; font-size: 14.5px; }
.hero-date { text-align: right; color: #C7D3EE; font-size: 12.5px; }
.hero-date strong { display: block; color: #fff; font-size: 16px; }
.flow-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; }
.flow-chips span { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); padding: 4px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 600; color: #fff; }
.flow-chips i { color: var(--gold-2); font-size: 11px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; position: relative; z-index: 1; }
.hero-stat {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); transition: .15s;
}
a.hero-stat:hover { background: rgba(255,255,255,.14); color: #fff; transform: translateY(-1px); }
.hero-stat .hs-icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.hero-stat .hs-num { font-size: 24px; font-weight: 800; line-height: 1.1; }
.hero-stat .hs-label { font-size: 12.5px; color: #C7D3EE; }
.hs-blue { background: rgba(96,152,255,.22); color: #B9D1FF; }
.hs-amber { background: rgba(245,177,46,.22); color: #FFD88A; }
.hs-green { background: rgba(52,199,140,.22); color: #9CEBC9; }
.hs-violet { background: rgba(160,130,255,.22); color: #D3C6FF; }

/* -------------------------------------------------- Format sections */
.fmt-section { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.fmt-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fs-years {
  font-size: 15px; font-weight: 800; color: var(--navy); background: linear-gradient(180deg, #F3F6FC, #E8EEF9);
  border: 1px solid #D7E0F1; padding: 5px 14px; border-radius: 10px; letter-spacing: -.01em;
}
.fs-sub { color: var(--muted); font-size: 13.5px; }
.fmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 12px; }
.fmt-tile {
  --c: var(--navy-2);
  position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; overflow: hidden;
}
.fmt-tile::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--c); opacity: .85; }
.fmt-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 35%, #fff); color: var(--ink); }
.fmt-tile .ft-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: var(--c); background: color-mix(in srgb, var(--c) 11%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 18%, #fff);
}
.fmt-tile .ft-body { flex: 1; min-width: 0; display: block; padding-right: 14px; }
.fmt-tile .ft-title { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; }
.fmt-tile .ft-meta { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.fmt-tile .ft-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.fmt-tile .ft-arrow { position: absolute; right: 14px; top: 16px; color: #C0C8D6; font-size: 13px; transition: .15s; }
.fmt-tile:hover .ft-arrow { color: var(--c); transform: translateX(3px); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: #F2F4F7; color: #475467; }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.blue { background: var(--info-bg); color: var(--info); }
.chip.green { background: var(--success-bg); color: var(--success); }
.chip.red { background: var(--danger-bg); color: var(--danger); }
.t-line { font-size: 12px; margin-top: 4px; font-weight: 600; }
.t-warn { color: var(--warn); } .t-blue { color: var(--info); }

/* ---------------------------------------------------- Format page */
.fmt-head {
  --c: var(--navy-2);
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 18px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--c) 7%, #fff) 0%, #fff 60%);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.fmt-head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.fmt-head h4 { font-size: 22px; }
.fmt-icon {
  width: 58px; height: 58px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c)); box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 30%, transparent);
}
.fmt-crumb { font-size: 12px; font-weight: 700; color: var(--c); text-transform: uppercase; letter-spacing: .08em; }

.type-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #fff; border: 1px solid var(--line); padding: 6px; border-radius: 14px; box-shadow: var(--shadow-sm); }
.type-tab {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; color: var(--ink-2);
  text-decoration: none; font-weight: 600; font-size: 13.8px; transition: .15s; border: 0;
}
.type-tab small { color: var(--muted); font-weight: 500; font-size: 11px; }
.type-tab:hover { background: #F2F5FA; color: var(--navy); }
.type-tab.active { background: var(--navy); color: #fff; box-shadow: 0 4px 10px rgba(15,46,105,.22); }
.type-tab.active small { color: #CBD6EE; }
.type-tab .badge { font-size: 11px; }
.type-tab.active .badge.bg-secondary { background: rgba(255,255,255,.2) !important; color: #fff !important; }
.type-tabs form .form-control { height: 38px; }

.print-bar {
  position: sticky; top: 66px; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.print-bar .vr { opacity: .15; }
.dup-box { display: flex; gap: 6px; align-items: center; background: #FFF7F6; border: 1px dashed #F2B8B2; padding: 4px 6px; border-radius: 12px; }
.dup-box input { width: 150px; }
#selCount { display: inline-flex; min-width: 28px; justify-content: center; background: var(--navy); color: #fff; border-radius: 8px; padding: 1px 8px; }

/* ------------------------------------------------- Misc / upload */
.sticky-actions {
  position: sticky; bottom: 0; z-index: 20; padding: 12px 16px; margin: 0 -4px; border-radius: 14px 14px 0 0;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border: 1px solid var(--line); border-bottom: 0;
  box-shadow: 0 -6px 18px rgba(15,46,105,.08);
}
.step-no { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; background: var(--navy); color: #fff; align-items: center; justify-content: center; font-size: 13px; margin-right: 8px; }
.result-box { background: #F7F9FC; border: 1px solid var(--line); border-radius: 12px; padding: 10px 18px; font-size: 13px; color: var(--muted); min-width: 130px; }
.result-box b { display: block; font-size: 24px; color: var(--ink); }
.result-box.ok b { color: var(--success); } .result-box.bad b { color: var(--danger); }
.doc-actions .btn { font-size: 13px; }
details > summary { cursor: pointer; color: var(--navy-2); font-weight: 600; }
.pagination .page-link { border-radius: 8px !important; margin: 0 2px; border-color: var(--line); color: var(--ink-2); }
.pagination .active > .page-link { background: var(--navy); border-color: var(--navy); }

/* ------------------------------------------------ Template designer */
.designer-canvas { position: relative; background: #fff no-repeat; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); margin: 6px auto; font-family: 'Times New Roman', serif; user-select: none; }
.designer-canvas .dz { position: absolute; color: #0b2a8a; background: rgba(40,110,255,.10); outline: 1px dashed rgba(40,110,255,.75); white-space: nowrap; overflow: hidden; cursor: move; line-height: 1.15; }
.designer-canvas .dz.off { color: #888; background: rgba(0,0,0,.04); outline-color: #bbb; opacity: .55; }
.designer-canvas .dz.sel { outline: 2px solid #e8590c; background: rgba(232,89,12,.14); z-index: 5; }
.designer-canvas .dz.photo { display: flex; align-items: center; justify-content: center; border: 1px solid #0b2a8a; font-size: 10px !important; }
.designer-table input[type=number] { width: 58px; padding: 1px 3px; font-size: 12px; border: 1px solid #ced4da; border-radius: 4px; }
.designer-table select { font-size: 12px; padding: 1px; }
.designer-table td { padding: 2px 4px !important; }
.designer-table tr { cursor: pointer; }

/* ------------------------------------------------------------ Login */
.login-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background:
    radial-gradient(70% 60% at 85% 10%, rgba(232,185,58,.22) 0%, rgba(232,185,58,0) 60%),
    radial-gradient(60% 60% at 10% 90%, rgba(80,130,230,.25) 0%, rgba(80,130,230,0) 60%),
    linear-gradient(135deg, #133A82, #0A1F49);
}
.login-card { width: 400px; max-width: 100%; border-radius: 20px; overflow: hidden; border: 0; box-shadow: 0 30px 60px rgba(5,15,40,.45) !important; }
.login-card .card-body { padding: 34px !important; }
.login-card-accent { height: 5px; background: linear-gradient(90deg, var(--gold-2), var(--gold), var(--navy-2)); }
.login-badge {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--navy-dark); font-size: 26px;
  box-shadow: 0 10px 22px rgba(201,151,28,.35);
}
.login-card h5 { font-size: 21px; font-weight: 800; }
.login-card .form-control { height: 46px; }
.login-card .btn { height: 46px; font-size: 15px; }


/* ===================================================== v3: Data Manager (old-software style) */
.dm-topbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 12px 16px; margin-bottom: 14px; border-radius: 14px;
  background: linear-gradient(180deg, #2B3A55, #1F2B42); color: #C9D3E6; box-shadow: var(--shadow);
}
.dm-topbar label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #9FB0CF; }
.dm-topbar .form-select, .dm-topbar .form-control { min-width: 128px; background-color: #fff; border: 0; height: 34px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.dm-topbar .form-select:disabled { background-color: #C9D1DE; color: #6B7586; }
.dm-brand { font-size: 16px; font-weight: 800; color: #fff; margin-right: 10px; align-self: center; display: flex; gap: 8px; align-items: center; }
.dm-brand i { color: var(--gold-2); }
.dm-clear { align-self: center; background: rgba(232,185,58,.18); color: #FFE2A0; border: 1px solid rgba(232,185,58,.35); padding: 5px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.dm-clear:hover { color: #fff; }
.dm-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dm-big {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 14px; border-radius: 14px; text-decoration: none; min-width: 210px;
  background: #fff; border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow-sm); transition: .15s;
}
.dm-big > i { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.dm-big span { font-weight: 700; font-size: 15px; line-height: 1.2; }
.dm-big small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.dm-big:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); color: var(--ink); }
.dm-big.add > i { background: var(--navy); color: #fff; }
.dm-big.edit > i { background: var(--info-bg); color: var(--info); }
.dm-big.xl > i { background: var(--success-bg); color: var(--success); }
.dm-big.active { border-color: #B9C9EA; box-shadow: 0 0 0 3px rgba(29,95,194,.10); }
.dm-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.dm-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); background: #FAFBFD; }
.dm-search { display: flex; gap: 6px; align-items: center; }
.dm-search .lbl { font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.dm-search .form-select { width: 158px; } .dm-search .form-control { width: 190px; }
.dm-print { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; background: #fff; border: 1px solid var(--line); padding: 5px 8px; border-radius: 12px; }
.dm-print .form-control { width: 140px; }
.dm-check { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; cursor: pointer; margin: 0; }
.dm-check input { width: 16px; height: 16px; accent-color: var(--navy-2); }
.dm-tabs { display: flex; gap: 4px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.dm-tabs a { padding: 6px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.dm-tabs a b { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: #EEF1F6; font-size: 11.5px; text-align: center; }
.dm-tabs a b.warn { background: var(--warn-bg); color: var(--warn); }
.dm-tabs a.on { background: var(--navy); color: #fff; } .dm-tabs a.on b { background: rgba(255,255,255,.2); color: #fff; }
.dm-tabs a:hover:not(.on) { background: #F2F5FA; }
.dm-approve { display: flex; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line-2); background: #FBFCFE; flex-wrap: wrap; }
.dm-grid-wrap { overflow: auto; max-height: calc(100vh - 300px); min-height: 260px; }
.dm-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.dm-grid thead th {
  position: sticky; top: 0; z-index: 2; background: #E9EEF7; color: #34405A; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  padding: 8px 9px; border-bottom: 1px solid #D5DDEB; border-right: 1px solid #DCE3EF; white-space: nowrap; text-align: left;
}
.dm-grid td { padding: 6px 9px; border-bottom: 1px solid #E4E9F2; border-right: 1px solid #EDF0F6; white-space: nowrap; vertical-align: middle; cursor: pointer; }
.dm-grid tbody tr:nth-child(odd) td { background: #EAF4FB; }      /* light blue / peach rows like the old software */
.dm-grid tbody tr:nth-child(even) td { background: #FDF1E7; }
.dm-grid tbody tr:hover td { background: #DCEBFB; }
.dm-grid tbody tr.sel td { background: #1D5FC2 !important; color: #fff; }
.dm-grid tbody tr.sel .badge, .dm-grid tbody tr.sel .chip { box-shadow: none; }
.dm-grid tbody tr.sel .ico { color: #fff; }
.dm-grid .c { text-align: center; width: 36px; }
.dm-grid .b { font-weight: 700; }
.dm-grid .cb { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.dm-grid tr.sel .cb { color: #fff; }
.dm-grid .nm { font-weight: 600; }
.dm-grid .ph { color: var(--success); font-size: 11px; }
.dm-grid .subj { font-size: 12px; color: #3D4A63; }
.dm-grid tr.sel .subj { color: #E6EEFF; }
.dm-grid .rm { font-size: 11px; color: var(--warn); white-space: normal; max-width: 180px; }
.dm-grid .empty { text-align: center; padding: 50px; color: var(--muted); background: #fff !important; cursor: default; }
.dm-grid .ico { color: var(--navy-2); padding: 2px 5px; }
.dm-grid input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--navy-2); }
.nowrap { white-space: nowrap; }

/* ===================================================== v3: entry form */
.entry-card .card-body { padding: 20px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-item { margin: 0; cursor: pointer; }
.seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.seg-item span { display: inline-block; padding: 8px 18px; border-radius: 10px; border: 1px solid #D0D5DD; background: #fff; font-weight: 600; font-size: 14px; color: var(--ink-2); transition: .12s; }
.seg-item input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 4px 10px rgba(15,46,105,.2); }
.seg-item input:focus-visible + span { box-shadow: 0 0 0 4px rgba(29,95,194,.2); }
.photo-box {
  width: 100%; max-width: 190px; aspect-ratio: 35 / 45; border-radius: 12px; border: 2px dashed #C8D1E0; background: #F7F9FC;
  display: flex; align-items: center; justify-content: center; overflow: hidden; color: #98A2B3; text-align: center; font-size: 13px;
}
.photo-box i { font-size: 38px; margin-bottom: 4px; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.cbhe-input { color: var(--navy); letter-spacing: .03em; }
.era-hint { background: #F4F7FC; border: 1px solid #DCE5F3; border-radius: 10px; padding: 8px 12px; font-size: 13px; color: #33415C; }
.era-hint i { color: var(--navy-2); margin-right: 4px; }
.subj-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.subj-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; border: 1px solid #D0D5DD; background: #fff; cursor: pointer; font-weight: 600; font-size: 13.5px; margin: 0; user-select: none; transition: .12s; }
.subj-chip small { font-size: 10.5px; color: var(--muted); font-weight: 700; background: #F2F4F7; padding: 1px 6px; border-radius: 6px; }
.subj-chip input { width: 16px; height: 16px; accent-color: var(--navy-2); }
.subj-chip.opt { border-style: dashed; }
.subj-chip.on { background: #EEF3FC; border-color: var(--navy-2); color: var(--navy); }
.totals-bar { display: flex; gap: 12px; flex-wrap: wrap; background: linear-gradient(180deg, #F7F9FC, #EEF2F8); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.totals-bar > div { display: flex; flex-direction: column; min-width: 120px; }
.totals-bar > div.grow { flex: 1; }
.totals-bar span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.totals-bar b { font-size: 20px; color: var(--navy); }
.totals-bar small { color: var(--muted); font-weight: 600; }
.totals-bar .grow b { font-size: 15px; padding-top: 4px; }

/* ===================================================== v3: settings */
.next-no { display: flex; flex-direction: column; align-items: center; padding: 18px; border-radius: 14px; background: linear-gradient(135deg, #133A82, #0A1F49); color: #C7D3EE; }
.next-no span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.next-no b { font-size: 40px; color: #fff; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.opt-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 40px 14px 46px; border: 1px solid #D0D5DD; border-radius: 12px; cursor: pointer; margin: 0; }
.opt-card input { position: absolute; left: 16px; top: 18px; accent-color: var(--navy-2); width: 17px; height: 17px; }
.opt-card i { position: absolute; right: 14px; top: 14px; font-size: 18px; color: #B7C2D6; }
.opt-card small { color: var(--muted); }
.opt-card:has(input:checked), .opt-card.on { border-color: var(--navy-2); background: #F3F7FE; box-shadow: 0 0 0 3px rgba(29,95,194,.1); }
.help-list li { margin-bottom: 5px; }
@media (max-width: 700px) { .opt-cards { grid-template-columns: 1fr; } .dm-print { margin-left: 0; } }

.launcher { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.launcher label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.launcher .form-select, .launcher .form-control { min-width: 140px; height: 46px; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.launch-title { display: flex; gap: 12px; align-items: center; margin-right: 8px; align-self: center; }
.launch-title > i { width: 48px; height: 48px; border-radius: 14px; background: var(--navy); color: var(--gold-2); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.launch-title b { display: block; font-size: 18px; } .launch-title small { color: var(--muted); }
.launch-btns { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.section-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 6px 2px 10px; }
/* document-type colour (must come after .fmt-tile / .fmt-head defaults) */
.doc-marksheet { --c: var(--c-marksheet); }
.doc-certificate { --c: var(--c-certificate); }
.doc-certificate_cum_marksheet { --c: var(--c-ccm); }
.doc-admit_card { --c: var(--c-admit); }
.doc-migration_certificate { --c: var(--c-migration); }

/* ------------------------------------------------------- Responsive */
@media (max-width: 1100px) { .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -280px; transition: left .2s ease; z-index: 1000; }
  .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  .content { padding: 18px 16px 30px; }
  .topbar { padding: 10px 16px; }
  .topbar .profile .meta { display: none; }
}
@media (max-width: 576px) {
  .hero { padding: 20px; } .hero h2 { font-size: 21px; } .hero-date { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .fmt-section { padding: 14px; }
}
@media print { .sidebar, .topbar, .no-print { display: none !important; } body { background: #fff; } }

/* ===================================================== v3.1: old-software style shell (top menu, no sidebar) */
.app-shell { display: block; }
.main-wrap { min-height: 100vh; }
.appbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 0 18px; min-height: 58px;
  background: linear-gradient(180deg, #34425C, #26324A); color: #E3E9F5; box-shadow: 0 2px 8px rgba(10,20,40,.25);
}
.app-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; white-space: nowrap; }
.app-brand .brand-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1B2742; }
.app-brand b { display: block; font-size: 15px; line-height: 1.1; } .app-brand small { font-size: 11px; color: #A9B6CF; }
.app-brand:hover { color: #fff; }
.appnav { display: flex; align-items: stretch; gap: 0; flex: 1; flex-wrap: nowrap; min-width: 0; }
.appnav > a, .appnav .dropdown > a { display: flex; align-items: center; gap: 6px; padding: 0 9px; height: 58px; color: #D3DCEC; text-decoration: none; font-size: 13px; font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.appnav > a i, .appnav .dropdown > a i { color: #96A6C6; }
.appnav > a:hover, .appnav .dropdown > a:hover { background: rgba(255,255,255,.06); color: #fff; }
.appnav > a.active, .appnav .dropdown > a.active { color: #fff; border-bottom-color: var(--gold-2); background: rgba(255,255,255,.08); }
.appnav > a.active i { color: var(--gold-2); }
.appnav .badge-count { background: #F04438; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }
.appbar .search-box { position: relative; width: 230px; }
.appbar .search-box input { width: 100%; height: 36px; border: 0; border-radius: 8px; padding: 0 10px 0 32px; font-size: 13px; background: rgba(255,255,255,.12); color: #fff; }
.appbar .search-box input::placeholder { color: #A9B6CF; }
.appbar .search-box input:focus { outline: none; background: #fff; color: var(--ink); }
.appbar .search-box i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #A9B6CF; font-size: 12px; }
.appbar .profile { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.appbar .profile .avatar { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.appbar .profile .meta { line-height: 1.15; font-size: 12px; } .appbar .profile .meta strong { display: block; font-size: 13px; color: #fff; } .appbar .profile .meta span { color: #A9B6CF; }
.appbar-toggle { color: #fff; border: 1px solid rgba(255,255,255,.3); }
.content { max-width: none; padding: 18px 22px 40px; }
@media (max-width: 1500px) { .appbar .profile .meta, .app-brand small { display: none; } .appbar .search-box { width: 170px; } }
@media (max-width: 1340px) { .appbar .search-box { display: none; } .appnav > a i, .appnav .dropdown > a i { display: none; } }
@media (max-width: 991px) {
  .appbar { flex-wrap: wrap; padding: 8px 14px; }
  .appnav { display: none; flex-basis: 100%; flex-direction: column; } .appnav.open { display: flex; }
  .appnav > a, .appnav .dropdown > a { height: 42px; }
}

/* selection bar — like the old software's top bar */
.selbar-wrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 10px 14px; margin: 0 0 14px; border-radius: 12px;
  background: linear-gradient(180deg, #5B6880, #4A566D); box-shadow: var(--shadow); }
.selbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; flex: 1; }
.sel-search { margin-left: auto; }
.sel-search label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; color: #DCE3F0; text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.sel-search-box { position: relative; display: block; }
.sel-search-box i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #8A94A6; font-size: 12px; }
.sel-search-box input { width: 240px; height: 34px; padding-left: 30px; border: 0; font-size: 13.5px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.selbar label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; color: #DCE3F0; text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.selbar label.off { opacity: .45; }
.selbar .form-select, .selbar .form-control { min-width: 130px; height: 34px; border: 0; font-size: 13.5px; font-weight: 600; box-shadow: none; }
.selbar .form-select:disabled { background-color: #BCC4D2; color: #5D6778; }
.selbar label.tpl .form-select { min-width: 270px; }
.app-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.app-title h4 { margin: 0; font-size: 19px; } .app-title h4 i { color: var(--navy-2); }

/* home = old "Data Manager App" screen */
.dm-home { display: grid; grid-template-columns: 340px 1fr; gap: 22px; background: linear-gradient(135deg, #E6F0F7 0%, #F6F9FC 60%); border: 1px solid var(--line); border-radius: 16px; padding: 22px; min-height: 540px; }
@media (max-width: 1000px) { .dm-home { grid-template-columns: 1fr; } }
.dm-app-title { font-size: 30px; font-weight: 800; color: #1C2433; margin: 0 0 22px; letter-spacing: -.02em; }
.old-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 18px; margin-bottom: 14px; border-radius: 8px; text-decoration: none;
  background: linear-gradient(180deg, #2E3A50, #1F2939); color: #fff; font: 700 16px var(--font); letter-spacing: .01em;
  box-shadow: 0 3px 0 #0F1522, 0 6px 14px rgba(15,21,34,.25); transition: transform .08s; }
.old-btn i { width: 22px; color: var(--gold-2); }
.old-btn:hover { color: #fff; transform: translateY(-1px); }
.old-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #0F1522; }
.old-btn.light { background: linear-gradient(180deg, #fff, #EEF2F7); color: var(--ink); box-shadow: 0 3px 0 #C5CEDC, 0 6px 14px rgba(15,21,34,.08); border: 1px solid #D5DCE7; }
.old-btn.light i { color: var(--success); }
.sel-note { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; margin: 6px 0 14px; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-stats a { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.mini-stats b { display: block; font-size: 22px; color: var(--navy); } .mini-stats b.warn { color: var(--warn); }
.mini-stats span { font-size: 12px; color: var(--muted); }
.yg-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.yg-head { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--line-2); } .yg-head i { color: var(--navy-2); }
.yg-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.yg-table th { background: #F2F5FA; padding: 9px 14px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: #4B5565; text-align: left; }
.yg-table td { padding: 12px 14px; border-top: 1px solid var(--line-2); vertical-align: top; }
.yg-table td small { display: block; color: var(--muted); font-size: 12px; }
.yg-link { --c: var(--navy-2); display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 6px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; background: #fff; }
.yg-link i { color: var(--c); width: 16px; } .yg-link small { margin-left: auto; color: var(--muted); font-weight: 600; }
.yg-link:hover { border-color: var(--c); background: #F7F9FD; color: var(--ink); }
.yg-foot { padding: 10px 16px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line-2); background: #FAFBFD; }
.yg-link.doc-marksheet { --c: var(--c-marksheet); } .yg-link.doc-certificate { --c: var(--c-certificate); } .yg-link.doc-certificate_cum_marksheet { --c: var(--c-ccm); }
.yg-link.doc-admit_card { --c: var(--c-admit); } .yg-link.doc-migration_certificate { --c: var(--c-migration); }

/* Day - Month - Year date box */
.dmy { display: flex; align-items: center; gap: 4px; }
.dmy span { color: var(--muted); font-weight: 700; }
.dmy .dmy-d, .dmy .dmy-m { width: 56px; text-align: center; padding-left: .4rem; padding-right: .4rem; }
.dmy .dmy-y { width: 82px; text-align: center; padding-left: .4rem; padding-right: .4rem; }
.dmy-sm .dmy-d, .dmy-sm .dmy-m { width: 48px; } .dmy-sm .dmy-y { width: 66px; }

/* subjects with marks beside them */
.subj-grid thead th { background: #EEF2F8; }
.subj-grid tbody tr td { background: #fff; }
.subj-grid tbody tr:not(.on) td { background: #FAFBFD; color: #8A94A6; }
.subj-grid tbody tr:not(.on) .form-control, .subj-grid tbody tr:not(.on) .form-select { background-color: #F3F5F8; border-color: #E2E6EC; color: #8A94A6; }
.subj-grid tbody tr.on td { background: #F2F7FF; }
.subj-grid tbody tr.on td:first-child { box-shadow: inset 3px 0 0 var(--navy-2); }
.subj-grid tbody tr.bad td { background: #FDECEA !important; }
.subj-grid td.c { text-align: center; }
.subj-grid .s-on { width: 18px; height: 18px; cursor: pointer; }
.code-chip { display: inline-block; font-size: 11px; font-weight: 700; color: #475467; background: #EEF1F6; padding: 2px 7px; border-radius: 6px; }
.auto-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--success); background: var(--success-bg); padding: 1px 7px; border-radius: 10px; cursor: pointer; margin-left: 4px; }
.auto-tag.off { color: #8A94A6; background: #F0F2F5; text-transform: none; letter-spacing: 0; }
.appbar-search-btn { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.appbar-search-btn:hover { background: rgba(255,255,255,.2); color: #fff; }
@media (max-width: 1340px) { .appbar-search-btn span { display: none; } }

/* Add New Entry — choose the kind of entry */
.entry-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.et-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 6px; }
.et-tab { --c: var(--navy-2); display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); border: 1px solid transparent; }
.et-tab i { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.et-tab span { font-weight: 700; font-size: 14px; line-height: 1.15; } .et-tab small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.et-tab:hover { background: #F5F7FB; color: var(--ink); }
.et-tab.active { background: var(--c); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 35%, transparent); }
.et-tab.active i { background: rgba(255,255,255,.2); color: #fff; } .et-tab.active small { color: rgba(255,255,255,.8); }
.et-marks { --c: var(--c-marksheet); } .et-admit { --c: var(--c-admit); } .et-migration { --c: var(--c-migration); }
.entry-choose { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .entry-choose { grid-template-columns: 1fr; } }
.ec-card { --c: var(--navy-2); position: relative; display: flex; flex-direction: column; gap: 4px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: .15s; border-top: 5px solid var(--c); }
.ec-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); border-color: color-mix(in srgb, var(--c) 40%, #fff); border-top-color: var(--c); }
.ec-icon { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; background: var(--c); margin-bottom: 8px; }
.ec-card > b { font-size: 19px; } .ec-sub { color: var(--muted); font-size: 13.5px; }
.ec-card ul { margin: 12px 0 16px; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.ec-go { margin-top: auto; font-weight: 700; color: var(--c); }
.ec-marks { --c: var(--c-marksheet); } .ec-admit { --c: var(--c-admit); } .ec-migration { --c: var(--c-migration); }

/* ===================================================== Login */
.lg-body { min-height: 100vh; margin: 0; background: #071634; color: #fff; overflow-x: hidden; }
.lg-bg { position: fixed; inset: 0; overflow: hidden; z-index: 0;
  background: radial-gradient(1200px 700px at 15% 20%, #18408F 0%, rgba(24,64,143,0) 60%),
              radial-gradient(900px 600px at 90% 85%, #0F5E73 0%, rgba(15,94,115,0) 60%),
              linear-gradient(135deg, #0A1E4A 0%, #071634 55%, #050F26 100%); }
.lg-grid { position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%); }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 14s ease-in-out infinite; }
.o1 { width: 420px; height: 420px; background: #E8B93A; top: -120px; right: 18%; opacity: .28; }
.o2 { width: 360px; height: 360px; background: #2F6BEA; bottom: -120px; left: -80px; animation-delay: -5s; }
.o3 { width: 260px; height: 260px; background: #13A38A; top: 45%; right: -60px; opacity: .35; animation-delay: -9s; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -25px); } }
.lg-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 60px; max-width: 1180px; margin: 0 auto; padding: 40px 32px; }
.lg-seal { width: 74px; height: 74px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 32px; color: #10224A;
  background: linear-gradient(135deg, #FFD978, #E8B93A 45%, #B9861A); box-shadow: 0 18px 40px rgba(232,185,58,.35), inset 0 1px 0 rgba(255,255,255,.6); margin-bottom: 26px; }
.lg-kicker { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: #E8B93A; margin-bottom: 12px; }
.lg-brand h1 { font-size: 58px; line-height: 1.02; font-weight: 800; letter-spacing: -.03em; color: #fff; margin: 0 0 18px; }
.lg-brand h1 span { display: block; background: linear-gradient(90deg, #FFFFFF, #9DBBFF 60%, #7FE0CF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-lead { font-size: 17px; line-height: 1.6; color: #B9C7E6; max-width: 520px; margin-bottom: 30px; }
.lg-feats { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; max-width: 520px; }
.lg-feats li { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(4px); }
.lg-feats i { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(232,185,58,.15); color: #FFD27A; font-size: 16px; }
.lg-feats span { font-size: 13.5px; color: #A9B8D8; line-height: 1.35; } .lg-feats b { display: block; color: #fff; font-size: 15px; }
.lg-years { display: flex; gap: 8px; flex-wrap: wrap; }
.lg-years span { font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,.18); color: #D6E0F5; }
.lg-card { position: relative; padding: 38px 36px 30px; border-radius: 26px; background: rgba(255,255,255,.96); color: var(--ink);
  box-shadow: 0 40px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.4); }
.lg-card::before { content: ''; position: absolute; left: 30px; right: 30px; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, #E8B93A, #2F6BEA, #13A38A); }
.lg-card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 26px; }
.lg-badge { width: 52px; height: 52px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; background: linear-gradient(135deg, #1D4FB0, #0F2E69); box-shadow: 0 10px 22px rgba(15,46,105,.35); }
.lg-card h2 { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -.02em; } .lg-card-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.lg-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 7px; }
.lg-field { position: relative; margin-bottom: 18px; }
.lg-field > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #98A2B3; font-size: 15px; transition: color .15s; }
.lg-field input { width: 100%; height: 54px; border-radius: 14px; border: 1.5px solid #D9DFE9; background: #F7F9FC; padding: 0 48px 0 46px; font-size: 15.5px; color: var(--ink); font-family: var(--font); transition: .15s; }
.lg-field input:focus { outline: none; border-color: #2F6BEA; background: #fff; box-shadow: 0 0 0 5px rgba(47,107,234,.13); }
.lg-field:focus-within > i { color: #2F6BEA; }
.lg-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; color: #98A2B3; border-radius: 10px; }
.lg-eye:hover { background: #EEF2F8; color: var(--ink); }
.lg-btn { width: 100%; height: 56px; margin-top: 6px; border: 0; border-radius: 14px; font-size: 16.5px; font-weight: 700; color: #fff; letter-spacing: .01em;
  background: linear-gradient(135deg, #2F6BEA 0%, #1A45A0 55%, #0F2E69 100%); box-shadow: 0 14px 28px rgba(31,79,180,.4); transition: transform .12s, box-shadow .12s; }
.lg-btn i { margin-left: 8px; transition: transform .15s; }
.lg-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(31,79,180,.5); } .lg-btn:hover i { transform: translateX(4px); }
.lg-btn:active { transform: translateY(0); }
.lg-error { display: flex; gap: 8px; align-items: center; padding: 11px 14px; margin-bottom: 18px; border-radius: 12px; background: var(--danger-bg); color: #9B2219; font-size: 14px; font-weight: 600; border: 1px solid #F5C3BD; }
.lg-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); text-align: center; font-size: 12.5px; color: var(--muted); }
@media (max-width: 960px) { .lg-wrap { grid-template-columns: 1fr; gap: 30px; max-width: 520px; } .lg-brand h1 { font-size: 40px; } .lg-feats, .lg-years { display: none; } .lg-lead { margin-bottom: 0; } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }
@media (max-height: 760px) and (min-width: 961px) {
  .lg-wrap { padding: 20px 32px; }
  .lg-seal { width: 58px; height: 58px; font-size: 25px; border-radius: 18px; margin-bottom: 16px; }
  .lg-brand h1 { font-size: 46px; margin-bottom: 12px; }
  .lg-lead { font-size: 15.5px; margin-bottom: 18px; }
  .lg-feats { gap: 9px; margin-bottom: 16px; } .lg-feats li { padding: 8px 14px; } .lg-feats i { width: 34px; height: 34px; }
  .lg-card { padding: 30px 32px 24px; }
}

/* ===================================================== board logo */
.brand-logo { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--gold-2), 0 4px 12px rgba(0,0,0,.3); overflow: hidden; }
.brand-logo img { width: 92%; height: 92%; object-fit: contain; }
.dm-app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.dm-app-head img { width: 64px; height: 64px; border-radius: 50%; background: #fff; padding: 3px; box-shadow: 0 0 0 2px var(--gold-2), 0 6px 16px rgba(15,46,105,.2); }
.dm-app-head small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-2); }
.dm-app-head .dm-app-title { margin: 0; }
.lg-logo-row { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.lg-logo { position: relative; width: 104px; height: 104px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(232,185,58,.9), 0 0 0 10px rgba(232,185,58,.18), 0 20px 50px rgba(0,0,0,.45), 0 0 60px rgba(232,185,58,.35); }
.lg-logo img { width: 90%; height: 90%; object-fit: contain; }
.lg-logo::after { content: ''; position: absolute; inset: -16px; border-radius: 50%; border: 1px dashed rgba(232,185,58,.45); animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lg-org b { display: block; font-size: 20px; color: #fff; line-height: 1.2; letter-spacing: -.01em; }
.lg-org span { display: block; font-size: 13px; color: #E8B93A; font-weight: 600; margin-top: 4px; letter-spacing: .02em; }
.lg-badge img { width: 86%; height: 86%; object-fit: contain; }
.lg-badge:has(img) { background: #fff; border-radius: 50%; box-shadow: 0 0 0 2px #E8B93A, 0 10px 22px rgba(15,46,105,.25); }
@media (max-height: 760px) and (min-width: 961px) { .lg-logo { width: 82px; height: 82px; } .lg-logo-row { margin-bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .lg-logo::after { animation: none; } }
.logo-preview { width: 96px; height: 96px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--gold-2), var(--shadow); }
.logo-preview img { width: 90%; height: 90%; object-fit: contain; }
.dm-app-head .dm-app-title { font-size: 25px; }

/* back button + edit page side panel */
.page-back { margin: -6px 0 10px; }
.btn-back { background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; border-radius: 9px; padding: 4px 12px; box-shadow: var(--shadow-sm); }
.btn-back:hover { background: #EEF3FC; color: var(--navy); border-color: #B9C9EA; }
.side-stack { position: sticky; top: 74px; display: grid; gap: 12px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.side-head { display: flex; align-items: center; gap: 8px; padding: 11px 14px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--line-2); background: #FAFBFD; }
.side-head i { color: var(--navy-2); } .side-head .badge { margin-left: auto; }
.side-admit .side-head i { color: var(--c-admit); } .side-mig .side-head i { color: var(--c-migration); }
.side-body { padding: 12px 14px; }
.side-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 13.5px; }
.side-row span { color: var(--muted); }
@media (max-width: 1199px) { .side-stack { position: static; } }

/* Data Manager: all papers of one student in one place */
.dm-grid td.docs { min-width: 250px; }
.docbs { display: flex; flex-wrap: wrap; gap: 4px; }
.docb { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 6px; white-space: nowrap; text-decoration: none; border: 1px solid transparent; }
.docb.ok { background: #e6f4ea; color: #146c2e; border-color: #b7dfc2; }
.docb.ok:hover { background: #146c2e; color: #fff; }
.docb.make { background: #fff; color: #1d4ed8; border: 1px dashed #93b4f5; }
.docb.make:hover { background: #1d4ed8; color: #fff; border-style: solid; }
.docb.wait { background: #fff6e0; color: #8a5a00; border-color: #f0d58a; }
.docb.off { background: #f1f3f6; color: #8a94a6; }
.th-hint { font-weight: 400; font-size: 10px; opacity: .7; text-transform: none; }

/* Subjects table: grouped Compulsory / Optional / Other */
.subj-grid tbody tr.grp-row td { background: #fff !important; padding: 14px 8px 6px; border-bottom: 2px solid #E3E8F0; box-shadow: none !important; }
.subj-grid tbody tr.grp-row:first-child td { padding-top: 4px; }
.subj-grid tbody tr.grp-row span { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.subj-grid .more-btn { margin-left: 10px; font-size: 12px; font-weight: 600; color: #1d4ed8; background: #EEF4FF; border: 1px solid #C9DAFB; border-radius: 999px; padding: 2px 12px; cursor: pointer; }
.subj-grid .more-btn:hover { background: #1d4ed8; color: #fff; }
.subj-grid tbody td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
.subj-grid tbody tr:not(.on):not(.grp-row) td { background: #fff; color: #667085; }
.subj-grid tbody tr:not(.grp-row):hover td { background: #F7FAFF; }
.subj-grid tbody tr.on td { background: #EEF5FF; color: #101828; }
.subj-grid tbody tr.on b { color: var(--navy); }
.subj-grid .subj-total { background: #F4F6FA !important; text-align: center; }
.subj-grid .form-control-sm, .subj-grid .form-select-sm { border-radius: 8px; }
.subj-grid .subj-type { min-width: 132px; padding-right: 28px; }

/* Subject Master: 10th / 12th tabs */
.subj-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.subj-tabs > a:not(.pill) { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--navy); font-weight: 700; text-decoration: none; }
.subj-tabs > a:not(.pill) b { background: #EEF2F8; border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.subj-tabs > a.on:not(.pill) { background: var(--navy); color: #fff; border-color: var(--navy); }
.subj-tabs > a.on:not(.pill) b { background: rgba(255,255,255,.2); color: #fff; }
.subj-tabs .sep { width: 1px; height: 28px; background: var(--line); margin: 0 6px; }
.subj-tabs .lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.subj-tabs .pill { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #344054; font-weight: 600; font-size: 13px; text-decoration: none; }
.subj-tabs .pill.on { background: #E8B93A; border-color: #E8B93A; color: #1F2939; }
.subj-master tr.off td { color: #98A2B3; }
.subj-master tr.editing td { background: #FFF8E1; }
.type-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.type-tag.t-compulsory { background: #E6F4EA; color: #146C2E; }
.type-tag.t-optional { background: #EEF4FF; color: #1D4ED8; }
.type-tag.t-additional { background: #F2F4F7; color: #475467; }
.font-sample { border: 1px dashed var(--line); border-radius: 10px; padding: 14px 18px; font-size: 20px; background: #FBFCFE; }

/* Home: "What do you want to do?" */
.task-strip { margin: 0 0 16px; }
.task-strip-head { display: flex; justify-content: space-between; align-items: baseline; margin: 2px 2px 10px; font-size: 17px; color: var(--navy); }
.task-strip-head a { font-size: 14px; font-weight: 600; text-decoration: none; }
.task-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.task-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s, border-color .12s; }
.task-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #C9D6EE; color: var(--ink); }
.task-tile i { font-size: 22px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px; color: #fff; }
.task-tile b { font-size: 16px; }
.task-tile small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.task-tile.t1 i { background: #1A4596; } .task-tile.t2 i { background: #146C2E; } .task-tile.t3 i { background: #0E7490; }
.task-tile.t4 i { background: #7C3AED; } .task-tile.t5 i { background: #B45309; } .task-tile.t6 i { background: #BE123C; }
/* Help page */
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.help-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.help-card .help-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.help-card h5 { margin: 0; font-size: 17px; font-weight: 700; color: var(--navy); }
.help-ic { width: 40px; height: 40px; border-radius: 12px; background: #EEF4FF; color: #1D4ED8; display: grid; place-items: center; font-size: 18px; flex: none; }
.help-card ol { padding-left: 20px; margin: 0 0 12px; font-size: 14px; line-height: 1.5; flex: 1; }
.help-card ol li { margin-bottom: 4px; }
.help-card .btn { align-self: flex-start; }
.help-colors { margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.appnav .nav-help { margin-right: 8px; }
@media (max-width: 1280px) and (min-width: 992px) { .appnav a > i { display: none; } .appnav a { padding-left: 9px !important; padding-right: 9px !important; } }
/* the student just saved */
.dm-grid tbody tr.just-saved td { background: #FFF3C4 !important; box-shadow: inset 0 2px 0 #E8B93A, inset 0 -2px 0 #E8B93A; }
.dm-grid tbody tr.just-saved td:first-child { box-shadow: inset 4px 0 0 #E8B93A, inset 0 2px 0 #E8B93A, inset 0 -2px 0 #E8B93A; }

/* ---------- Dashboard (home.php) ---------- */
.dash-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px 22px; border-radius: 18px; margin-bottom: 16px;
  background: linear-gradient(120deg, #13203A 0%, #1E3560 60%, #27467A 100%); color: #fff; box-shadow: var(--shadow); }
.dash-hero > img { width: 64px; height: 64px; border-radius: 50%; background: #fff; padding: 3px; flex: none; }
.dash-hero-t { flex: 1 1 260px; min-width: 0; }
.dash-hero-t small { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; color: #F2C94C; font-weight: 700; }
.dash-hero-t h2 { margin: 2px 0 4px; font-size: 24px; font-weight: 800; color: #fff; }
.dash-hero-t span { font-size: 13.5px; color: #C9D5EA; }
.dash-search { flex: 1 1 420px; max-width: 560px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 12px 14px; }
.dash-search label { font-weight: 700; margin-bottom: 6px; display: block; }
.dash-search .small { color: #C9D5EA; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.dash-stats a { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); }
.dash-stats a i { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #EEF4FF; color: #1D4ED8; font-size: 18px; }
.dash-stats a b { font-size: 26px; line-height: 1.1; color: var(--navy); }
.dash-stats a span { font-size: 13px; color: var(--muted); }
.dash-stats a span em { font-style: normal; color: #8A6D1E; }
.dash-stats a.hot { border-color: #F2C94C; background: #FFFBEB; } .dash-stats a.hot i { background: #FDEFC3; color: #A16207; }
.dash-stats a:hover { border-color: var(--navy-2); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-side { display: flex; flex-direction: column; gap: 14px; }
.dash-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.dash-box h6 { font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.dash-steps { padding-left: 20px; margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.dash-steps li { margin-bottom: 6px; } .dash-steps span { color: var(--muted); font-size: 12.5px; }
.dash-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dash-links a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 13.5px; font-weight: 600; }
.dash-links a i { color: var(--navy-2); width: 16px; } .dash-links a:hover { border-color: var(--navy-2); background: #F7F9FD; }
.yg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (max-width: 700px) { .yg-two, .dash-links { grid-template-columns: 1fr; } }
/* ---------- Help page sections ---------- */
.help-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; font-size: 14.5px; }
.help-flow > div { display: flex; align-items: center; gap: 8px; }
.help-flow span { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.help-flow > i { color: #9AA6B8; }
.help-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.help-nav a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--navy); font-weight: 600; font-size: 13.5px; }
.help-nav a:hover { border-color: var(--navy-2); }
.help-sec { margin: 22px 2px 10px; font-weight: 800; color: var(--navy); scroll-margin-top: 80px; }
.help-sec i { color: var(--gold-2); margin-right: 4px; }

/* ---------- Dashboard: students year by year ---------- */
.yr-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.yr-body { padding: 4px 14px 12px; }
.yr-dec { border-bottom: 1px solid var(--line-2); } .yr-dec:last-child { border-bottom: 0; }
.yr-dec summary { cursor: pointer; padding: 10px 2px; color: var(--navy); list-style: revert; }
.yr-dec summary span { color: var(--muted); font-size: 13px; margin-left: 8px; }
.yr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; padding: 0 0 12px; }
.yr-tile { display: grid; grid-template-columns: 1fr; gap: 5px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #FBFCFE; }
.yr-y { text-align: center; font-weight: 800; color: var(--navy); text-decoration: none; font-size: 16px; line-height: 1.1; }
.yr-y small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.yr-n { display: flex; align-items: baseline; gap: 6px; border-radius: 7px; padding: 4px 9px; font-size: 13px; text-decoration: none; }
.yr-n span { font-weight: 800; min-width: 34px; } .yr-n b { font-size: 15px; } .yr-n em { font-style: normal; font-size: 12px; opacity: .8; }
.yr-n.z { opacity: .4; }
.k10 { background: #E8F0FE; color: #1D4ED8; } .k12 { background: #FDF0E1; color: #A1520A; }
.yr-k { padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.yr-y:hover, .yr-n:hover { outline: 2px solid var(--navy-2); }
/* ---------- Bulk photos ---------- */
.ph-pick { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.ph-bar { display: inline-block; width: 70px; height: 7px; border-radius: 4px; background: #EEF1F6; margin-right: 6px; vertical-align: middle; overflow: hidden; }
.ph-bar span { display: block; height: 100%; background: #22A06B; }
.only-bad .ph-done, .only-bad .ph-skip { display: none; }

.ph-guide { border-color: #CFE0F7; background: #F8FBFF; }
.ph-step { display: flex; gap: 10px; margin-bottom: 12px; font-size: 14px; line-height: 1.45; }
.ph-step > span { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ph-tree { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.5; margin: 0; }

.dash-grid-side { grid-template-columns: 1fr; } .dash-grid-side .dash-side { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .dash-grid-side .dash-side { grid-template-columns: 1fr; } }
.dash-grid-side .dash-links { grid-template-columns: repeat(3, 1fr); }

.yr-table thead th { background: #F2F5FA; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: #4B5565; }
.yr-table .yr-n { display: inline-block; min-width: 54px; text-align: center; }
.yr-table tfoot td { background: #FAFBFD; border-top: 2px solid var(--line); }
