/* Components used by the feature modules in js/, plus dark-mode fixes and
   the mobile layout. Colour tokens live in index.html (:root). */

body { background: var(--paper); color: var(--ink); }
input, textarea, select { color: var(--ink); }
.field textarea, .modal-body textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px;
  background: var(--paper); min-height: 90px; resize: vertical;
}
.modal-body input[type="text"], .modal-body input[type="email"], .modal-body input[type="password"],
.modal-body input[type="number"], .modal-body input[type="date"], .modal-body input[type="time"],
.modal-body input[type="datetime-local"], .modal-body input[type="url"], .modal-body input[type="tel"],
.filter-bar input[type="search"], .filter-bar input[type="date"], .inline-input {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13.5px; background: var(--paper);
}
.modal-body input:not([type="checkbox"]):not([type="file"]) { width: 100%; }
.modal-body .field { margin-bottom: 14px; }
.modal-body .field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.modal.form-modal.wide { max-width: 680px; }
.modal { max-height: calc(100vh - 40px); overflow-y: auto; }
.form-error { background: var(--danger-bg); color: var(--danger); font-size: 12.5px; font-weight: 600; padding: 9px 12px; border-radius: 8px; margin-bottom: 10px; }
.secret-box { background: var(--paper-2); border: 1px dashed var(--line); border-radius: 8px; padding: 14px; font-size: 18px; text-align: center; margin-bottom: 14px; user-select: all; }
.btn.danger { color: var(--danger); background: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn { color: var(--ink); }
.btn.primary { color: var(--paper); }
.link-btn { background: none; border: none; padding: 0; margin-top: 14px; font-size: 12.5px; font-weight: 600; color: var(--slate); text-decoration: underline; display: block; }
.link-btn:hover { color: var(--ink); }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar { gap: 12px; flex-wrap: wrap; }
.muted { color: var(--slate); }
.small { font-size: 12px; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; font-size: 13.5px; margin-bottom: 14px; }
.kv dt { color: var(--slate); }
.kv dd { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.notice { padding: 4px 0; margin-bottom: 18px; }
.notice h4 { margin: 0 0 4px; font-size: 15px; font-family: 'Fraunces', serif; }
.notice p { margin: 0 0 6px; font-size: 13.5px; white-space: pre-wrap; }
.notice .meta { font-size: 11.5px; color: var(--slate); }

/* landing header actions */
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.header-link { background: none; border: 1px solid var(--line); color: var(--ink); padding: 9px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.header-link:hover { background: var(--paper-2); }
.role-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* standalone small views (track application, reset password) */
.view.active.center-view { display: flex; }
.center-view { min-height: 100vh; align-items: center; justify-content: center; padding: 20px; }

/* tables */
.table-card { padding: 6px 12px 10px; }
.table-scroll { overflow-x: auto; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12px; color: var(--slate); padding-top: 10px; }
.pager:empty { display: none; }
.table-search { min-width: 240px; flex: 1; max-width: 360px; }
.inline-input { width: 80px; padding: 6px 8px; }

/* timetable grid (API-driven) */
.tt-grid .tt-cell .subj { font-weight: 600; }
.tt-grid .tt-cell .room, .tt-grid .tt-cell .who { color: var(--slate); font-size: 10.5px; }
.tt-grid .tt-cell.editable { cursor: pointer; }
.tt-grid .tt-cell.editable:hover { background: var(--paper-2); }
.tt-grid .tt-cell.today { box-shadow: inset 0 0 0 2px var(--gold); }
.tt-scroll { overflow-x: auto; }
.tt-scroll .tt-grid { min-width: 620px; }

/* charts — single-series, see js/core.js */
.chart-wrap { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-ref { stroke: var(--slate); stroke-width: 1; }
.chart-axis { fill: var(--slate); font-size: 11px; font-family: 'Inter', sans-serif; }
.chart-label { fill: var(--ink-2); font-size: 12px; font-family: 'Inter', sans-serif; }
.chart-value { fill: var(--ink); font-size: 11.5px; font-weight: 600; font-family: 'Inter', sans-serif; }
.chart-bar { fill: var(--series-1); }
.chart-hit:hover .chart-bar { opacity: .85; }
.chart-line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--series-1); opacity: .1; stroke: none; }
.chart-dot { fill: var(--series-1); stroke: var(--card); stroke-width: 2; }
.chart-cross { stroke: var(--slate); stroke-width: 1; }
.chart-tip {
  position: absolute; pointer-events: none; background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; font-size: 12px; box-shadow: 0 8px 24px -12px rgba(0,0,0,.35);
  opacity: 0; transition: opacity .1s; white-space: nowrap; z-index: 5;
}
.chart-tip.show { opacity: 1; }

/* mobile menu button (hidden on desktop) */
.menu-toggle { display: none; margin-left: auto; background: none; border: none; padding: 8px; width: 40px; height: 40px; }
.menu-toggle span { display: block; height: 2px; background: var(--sidebar-fg); margin: 5px 0; border-radius: 2px; }
.theme-toggle.logout-link { display: block; margin-top: 8px; }

/* ---------- phones & small tablets ---------- */
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; padding: 12px 16px; position: sticky; top: 0; z-index: 30; }
  .sidebar .brand { padding: 0; border-bottom: none; margin-bottom: 0; display: flex; align-items: center; }
  .menu-toggle { display: block; }
  .sidebar .nav-item, .sidebar .sidebar-footer { display: none; }
  .sidebar.open .nav-item { display: flex; }
  .sidebar.open .sidebar-footer { display: block; }
  .sidebar.open { max-height: 100vh; overflow-y: auto; }
  .sidebar.open .brand { margin-bottom: 10px; }
  .main { padding: 20px 16px; max-width: 100%; }
  .topbar h1 { font-size: 22px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 16px; overflow-x: auto; }
  .grid-2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .landing-header { padding: 16px; flex-wrap: wrap; gap: 12px; }
  .apply-wrap { padding: 22px 16px; }
  .attn-row { flex-wrap: wrap; gap: 8px; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
  .table-search { min-width: 0; max-width: none; width: 100%; }
  .filter-bar select { min-width: 0; flex: 1; }
}
@media (max-width: 420px) {
  .stat-row { grid-template-columns: 1fr; }
}

@media print {
  .sidebar, .topbar-actions, .toast, .menu-toggle { display: none !important; }
  .main { padding: 0; }
}

/* sidebar section headings (Super Admin) */
.nav-group { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #93a0bb; padding: 14px 12px 4px; }
@media (max-width: 860px) { .sidebar .nav-group { display: none; } .sidebar.open .nav-group { display: block; } }

/* ---------- notification bell ---------- */
.bell-btn { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.bell-count { background: var(--danger); color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; }
.menu-toggle.has-unread { position: relative; }
.menu-toggle.has-unread::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.notif.unread { background: var(--pick); }
/* A page opened with View only: no add, edit, save or delete controls (the server refuses changes too). */
.view-only-note { margin: -6px 0 14px; font-size: 13px; color: var(--slate); }
.panel.view-only .topbar-actions, .panel.view-only .btn.primary, .panel.view-only .btn.danger,
.panel.view-only [data-del], .panel.view-only [data-edit], .panel.view-only [data-remove], .panel.view-only [data-new],
.panel.view-only [data-add], .panel.view-only [data-save] { display: none !important; }
/* every other button in the page changes something: hidden (only showing, printing and exporting stay) */
.panel.view-only .panel-body button:not([data-tab]):not([data-open]):not([data-view]):not([data-print]):not([data-pdf]):not([data-csv]):not([data-report]):not([data-transcript]):not([data-slip]):not([data-sec]):not([data-m]):not([data-s]):not([data-who]):not([data-file]):not([data-topic]):not([data-p]) { display: none !important; }
.panel.view-only .filter-bar .btn, .panel.view-only .pager .btn { display: inline-flex !important; }
.panel.view-only .filter-bar button, .panel.view-only .pager button, .panel.view-only .tabs button { display: inline-flex !important; }
.panel.view-only .panel-body table select, .panel.view-only .panel-body table input, .panel.view-only .panel-body table textarea { pointer-events: none; opacity: .65; }
/* Roles & permissions: one row per area */
.perm-table { width: 100%; border-collapse: collapse; margin: 4px 0 8px; table-layout: fixed; min-width: 560px; }
.perm-table th:nth-child(2), .perm-table th:nth-child(3), .perm-table th:nth-child(4) { width: 96px; }
.perm-table th:nth-child(5) { width: 170px; }
.perm-table th { text-align: center; font-size: 12px; font-weight: 600; color: var(--slate); padding: 6px 8px; white-space: nowrap; }
.perm-table th:first-child { text-align: left; }
.perm-table td { padding: 8px; border-top: 1px solid var(--line); text-align: center; vertical-align: middle; }
.perm-table td:first-child { text-align: left; }
.perm-table td.na { color: var(--line-dark); }
.perm-table label { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; font-size: 13px; }
.perm-table input { width: auto; }
@media (max-width: 640px) { .perm-table th, .perm-table td { padding: 6px 4px; } .perm-table td:first-child { font-size: 13px; } }
.notif p { margin: 4px 0; font-size: 13px; white-space: pre-wrap; }

/* ---------- calendar ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { font-size: 11px; font-weight: 600; color: var(--slate); text-align: center; padding: 4px 0; }
.cal-cell { min-height: 78px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal-cell.blank { border: none; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal-cell.holiday { background: var(--danger-bg); }
.cal-day { font-size: 11px; font-weight: 600; color: var(--slate); }
.cal-item { font-size: 10.5px; line-height: 1.3; padding: 1px 4px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item.holiday { color: var(--danger); font-weight: 600; }
.cal-item.event { background: var(--success-bg); color: var(--success); }
.cal-item.exam { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 600px) { .cal-cell { min-height: 46px; } .cal-item { font-size: 0; width: 6px; height: 6px; padding: 0; border-radius: 50%; background: currentColor; } }

/* ---------- ID card ---------- */
.id-card { max-width: 440px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.id-head { display: flex; align-items: center; gap: 10px; background: var(--sidebar-bg); color: var(--sidebar-fg); padding: 12px 16px; }
.id-head .crest { width: 34px; height: 34px; border-radius: 8px; background: var(--gold); color: #0e2a5e; display: grid; place-items: center; font-weight: 700; }
.id-head b { display: block; font-size: 14px; } .id-head span { font-size: 11px; opacity: .8; }
.id-main { display: grid; grid-template-columns: 96px 1fr; gap: 12px 14px; padding: 16px; }
.id-photo { width: 96px; height: 120px; border-radius: 8px; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; font-size: 11px; color: var(--slate); text-align: center; }
.id-photo img { width: 100%; height: 100%; object-fit: cover; }
.id-main dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12.5px; }
.id-main dt { color: var(--slate); } .id-main dd { margin: 0; }
.id-qr { grid-column: 1 / -1; justify-self: center; width: 130px; background: #fff; padding: 6px; border-radius: 6px; }
.id-qr svg, .qr-box svg, .totp-qr svg { width: 100%; height: auto; display: block; }
.verify-ok { background: var(--success-bg); color: var(--success); font-weight: 700; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
@media print {
  body.printing-id .view:not(.active), body.printing-id .panel:not(.active) { display: none !important; }
  body.printing-id .main > .panel.active > :not(.panel-body), body.printing-id .panel-body > :not(.id-card) { display: none !important; }
  body.printing-id .id-card { border: 1px solid #999; }
}

/* ---------- feedback, syllabus, import, QR ---------- */
.rating { display: flex; gap: 6px; flex-wrap: wrap; }
.rating label { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-weight: 600; cursor: pointer; }
.rating input { margin: 0; }
.progress { display: inline-block; width: 120px; height: 8px; background: var(--paper-2); border-radius: 999px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.progress span { display: block; height: 100%; background: var(--series-1, #2a6fdb); border-radius: 999px; }
.progress-cell { white-space: nowrap; }
.topic-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.topic-row span.small { margin-left: auto; }
tr.row-error td { background: var(--danger-bg); }
.qr-live { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 24px; align-items: start; }
.qr-box { background: #fff; padding: 12px; border-radius: 12px; min-height: 200px; display: grid; place-items: center; color: #333; }
.qr-side .stat-value { font-size: 48px; }
@media (max-width: 860px) { .qr-live { grid-template-columns: 1fr; } }
.totp-qr { width: 180px; margin: 0 auto 10px; background: #fff; padding: 8px; border-radius: 8px; }
.totp-qr:empty { display: none; }

/* ---------- language picker ---------- */
.lang-select { font: inherit; font-size: 12px; border-radius: 6px; padding: 4px 6px; }
.lang-sidebar { display: block; margin-top: 8px; background: transparent; color: var(--sidebar-fg); border: 1px solid rgba(255,255,255,.25); }
.lang-sidebar option { color: #0e2a5e; }
.lang-header { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px; }


/* ---------- fixed left menu + top-right profile ---------- */
@media (min-width: 861px) {
  .shell { align-items: flex-start; }
  .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; }
}
.appbar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: -12px 0 18px; }
.appbar-actions { display: flex; align-items: center; gap: 8px; }
.bell-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); margin: 0; padding: 0; }
.bell-btn:hover { background: var(--paper-2); }
.bell-btn .bell-count { position: absolute; top: -4px; right: -4px; }
.profile { position: relative; }
.profile-btn { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; color: var(--ink); }
.profile-btn:hover { background: var(--paper-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--sidebar-bg); color: var(--gold-light); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.profile-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.profile-name { font-size: 13px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-role { font-size: 11px; color: var(--slate); }
.caret { font-size: 11px; color: var(--slate); }
.profile .profile-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 230px; margin: 0;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: 0 16px 40px -18px rgba(0,0,0,.35); }
.profile.open .profile-menu { display: block; }
.profile-menu .role-pill { color: var(--ink); background: var(--paper-2); }
.profile-menu .logout-link, .profile-menu .theme-toggle.logout-link { display: block; width: 100%; text-align: left; color: var(--ink); font-size: 13px; padding: 8px 10px; margin: 2px 0 0; border-radius: 8px; }
.profile-menu .logout-link:hover { background: var(--paper-2); color: var(--ink); }
.profile-menu .lang-sidebar { color: var(--ink); border-color: var(--line); background: var(--paper); width: 100%; margin-top: 6px; }
.profile-menu .lang-sidebar option { color: var(--ink); }
.profile-menu > div[id$="-name"] { padding: 0 2px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
@media (max-width: 860px) {
  .appbar { margin: 0 0 14px; }
  .profile-text { display: none; }
  .profile-btn { padding: 4px 8px 4px 4px; }
}
@media print { .appbar { display: none !important; } }

/* "Powered by CampusPan" — the software's name under the college's */
.powered-by { text-align: center; font-size: 12px; color: var(--muted, #64748b); margin: 18px 0 8px; letter-spacing: .2px; }
.powered-by b { color: var(--primary, #0b3d91); font-weight: 700; }
/* copyable code (Admin → Admission on your website) */
.snippet { display: flex; gap: 8px; align-items: flex-start; }
.snippet pre { flex: 1; min-width: 0; margin: 0; padding: 10px 12px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; font: 12.5px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow: auto; }

/* ---------- sign-in page: one screen, no scrolling ---------- */
#landing.active { min-height: 0; height: calc(100vh - var(--banner-h, 0px)); height: calc(100dvh - var(--banner-h, 0px)); overflow: hidden; }
.lp { height: 100%; display: grid; grid-template-columns: minmax(300px, 1fr) minmax(360px, 1fr); }
.lp-side { position: relative; overflow: hidden; background: #0b3d91; color: #fff; padding: clamp(20px, 4.5vh, 44px) clamp(24px, 4vw, 56px); display: flex; flex-direction: column; gap: clamp(12px, 3vh, 28px); min-height: 0; }
.lp-side > * { position: relative; }
.lp-college { display: flex; align-items: center; gap: 14px; }
.lp-college .crest, .lp-college .crest.has-logo { width: 52px !important; height: 52px !important; font-size: 18px !important; background: #fff !important; color: #0b3d91 !important; border-radius: 14px !important; flex-shrink: 0; }
.lp-college .brand-name b { color: #fff; font-size: 20px; }
.lp-copy { margin: auto 0; max-width: 480px; }
.lp-copy h1 { color: #fff; font-size: clamp(26px, min(3.4vw, 5.5vh), 44px); line-height: 1.1; margin: 0 0 12px; letter-spacing: -.02em; }
.lp-copy p { color: rgba(255, 255, 255, .86); font-size: 16px; margin: 0 0 18px; }
.lp-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.lp-points li { position: relative; padding-left: 28px; color: rgba(255, 255, 255, .92); font-size: 14.5px; }
.lp-points li::before { content: ''; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px no-repeat; }
.lp-powered { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--slate); padding: 7px 13px; border-radius: 10px; font-size: 12px; text-decoration: none; flex-shrink: 0; }
.lp-powered .cp-logo { height: 20px; }
.lp-pw-sep { width: 1px; align-self: stretch; background: var(--line); }
.dfz-logo { height: 20px; width: auto; display: inline-block; vertical-align: middle; }
.powered-by .dfz-logo { height: 18px; }
.lp-main { background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(14px, 3vh, 32px) 24px; gap: 12px; min-height: 0; }
.lp-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 3.6vh, 32px) 32px; }
.lp-card h2 { margin: 0 0 4px; font-size: 26px; }
.lp-card .hint { color: var(--slate); font-size: 13.5px; margin: 0 0 clamp(12px, 2.4vh, 20px); }
.lp-card .field { margin-bottom: clamp(10px, 1.8vh, 16px); }
.lp-card select { width: 100%; }
.lp-card .submit-btn { width: 100%; margin-top: 2px; }
.lp-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.lp-links .link-btn { margin: 0; }
.lp-pass { position: relative; }
.lp-pass input { padding-right: 64px; }
.lp-pass button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--accent); font: 600 12px inherit; font-family: inherit; cursor: pointer; padding: 6px 8px; }
.lp-lock { background: var(--warn-bg); color: var(--warn); font-size: 12.5px; font-weight: 600; padding: 9px 12px; border-radius: 8px; margin: -4px 0 14px; }
.lp-error { display: none; background: var(--danger-bg); color: var(--danger); font-size: 12.5px; font-weight: 600; padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; }
.lp-foot { color: var(--slate); font-size: 13px; margin: 0; text-align: center; }
/* Short screens: drop the extras before anything scrolls. */
@media (max-height: 680px) { .lp-points { display: none; } .lp-copy p { margin: 0; } }
@media (max-height: 560px) { .lp-foot, .lp-card .hint { display: none; } }
/* Phones: a slim college bar on top, the form below — still one screen. */
@media (max-width: 860px) {
  .lp { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .lp-side { padding: 16px 20px; gap: 10px; }
  .lp-college .crest, .lp-college .crest.has-logo { width: 40px !important; height: 40px !important; font-size: 15px !important; border-radius: 11px !important; }
  .lp-college .brand-name b { font-size: 17px; }
  .lp-copy { margin: 0; } .lp-copy h1 { font-size: 21px; margin: 0; } .lp-copy p, .lp-points, .lp-powered { display: none; }
  .lp-main { justify-content: flex-start; padding: 16px; }
  .lp-card { padding: 20px 18px; border-radius: 14px; }
  .lp-card h2 { font-size: 22px; }
}
@media (max-width: 860px) and (max-height: 700px) { .lp-copy, .lp-card .hint { display: none; } }
/* the CampusPan logo where the software is named */
.cp-logo { display: block; height: 18px; width: auto; }
.brand-name .cp-mini { display: block; margin-top: 4px; }
.lp-by { display: flex; align-items: center; justify-content: center; gap: 8px; }
.lp-by .cp-logo { height: 18px; }
@media (max-width: 860px) { .sidebar:not(.open) .cp-mini { --cp-campus: #ffffff; --cp-pan: #8FC1A4; } }
/* The logo's text keeps its own case and spacing (the old label was set in capitals). */
.cp-mini, .cp-mini * { text-transform: none !important; letter-spacing: normal !important; }

/* Schools: a parent sees whose portal is open and switches between their children */
.parent-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 14px; }
.parent-bar-child { display: inline-flex; align-items: center; gap: 8px; }
.parent-bar select { width: auto; min-width: 160px; }

/* ---------- sign-in page: school and college look different (both in the CampusPan blues) ---------- */
.lp-kind { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(255, 255, 255, .16); margin-bottom: 16px; }
.lp-kind svg { width: 18px; height: 18px; }
.lp-card-mark { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent, #0b3d91); background: var(--accent-soft, #e8efff); padding: 5px 11px 5px 7px; border-radius: 999px; margin-bottom: 12px; }
.lp-card-mark svg { width: 16px; height: 16px; }
/* College: deep navy, a faint grid and mortarboards — formal. */
.cp-college .lp-side { background-color: #0b3d91; background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M30 44l30-15 30 15-30 15z M42 50.5v13c0 4 8 8 18 8s18-4 18-8v-13' fill='none' stroke='white' stroke-opacity='.07' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"),
  linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 120px 120px, 32px 32px, 32px 32px; }
/* (no coloured strip on top of the sign-in card) */
/* School: a brighter sky blue — clean: one smooth gradient with a soft light from the top corner, no pattern. */
.cp-school .lp-side { background-color: #1663d6; background-image:
  radial-gradient(900px 520px at 100% 0%, rgba(255, 255, 255, .16), transparent 62%),
  linear-gradient(160deg, #1f78f0 0%, #1257c4 100%); }
.cp-school .lp-side .lp-copy h1 { letter-spacing: -.015em; }
.cp-school .lp-side .lp-copy p { max-width: 440px; }
.cp-school .lp-points { gap: 12px; }
.cp-school .lp-kind { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .24); }
.cp-school .lp-kind svg { color: #ffd666; }
.cp-school .lp-card { border-radius: 22px; }
.cp-school .lp-card .submit-btn { border-radius: 999px; }
.cp-school .lp-card-mark { background: #fff4cc; color: #0e2a5e; }
@media (max-width: 860px) { .lp-kind { margin-bottom: 0; } }
/* With a campus photo (College settings → Campus photo): the photo behind the left side, darkened so the words stay readable. */
.cp-college .lp-side.has-photo, .cp-school .lp-side.has-photo, .lp-side.has-photo {
  background-color: #0b2a6b;
  background-image: linear-gradient(160deg, rgba(10, 30, 75, .86) 0%, rgba(14, 50, 120, .72) 55%, rgba(18, 70, 170, .62) 100%), var(--lp-photo);
  background-size: cover; background-position: center; background-repeat: no-repeat; }
.lp-side.has-photo::before, .lp-side.has-photo::after { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
