:root {
  /* Every value below can be changed from Settings → Theme & Appearance; the page
     header re-declares them from the saved settings. These are the defaults. */
  --brand: #0b3d24;       /* primary (dark green) */
  --brand-dark: #062416;  /* deeper shade for gradients */
  --brand-light: #e6efe9;
  --accent: #d4af37;      /* gold */
  --accent-dark: #a8811c;
  --app-bg: #f4f6f5;
  --card-bg: #ffffff;
  --text-color: #212529;
  --font-body: Arial, Helvetica, sans-serif;
  --font-heading: Arial, Helvetica, sans-serif;
  --base-size: 16pt;
  --heading-size: 19pt;
  --table-size: 14.4pt;
  --sb-bg: #ffffff;
  --sb-text: #34423b;
  --sb-icon: #6d7d74;
  --sb-active-bg: #e6efe9;
  --sb-active-text: #062416;
  --sb-title-bg: #e6efe9;
  --sb-title-text: #0b3d24;
  --sb-font: Arial, Helvetica, sans-serif;
  --sb-size: 14.7pt;
  --topbar-h: 74px;       /* header height: room for the institute name, logo and user menu */
  --ribbon-h: 5px;
  --footer-h: 30px;
}

html {
  font-size: var(--base-size);
}

body {
  background: var(--app-bg);
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: 1rem;

}

h1, h2, h3, h4, h5, h6, .card-header, .modal-title {
  font-family: var(--font-heading);
  font-size: var(--heading-size);
  font-weight: 600;
}

small, .small, .form-text {
  font-size: calc(var(--base-size) - 1pt); /* fine print */
}

/* Dense data tables keep a slightly tighter size so wide lists (students,
   fees, etc.) stay usable on screen even with the larger app-wide base. */
.table { font-size: var(--table-size); color: var(--text-color); --bs-table-color: var(--text-color); --bs-table-striped-color: var(--text-color); --bs-table-hover-color: var(--text-color); --bs-table-border-color: var(--bs-border-color); --bs-table-bg: transparent; }

.topbar {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  position: sticky;
  top: 0;
  z-index: 1030;
  min-height: var(--topbar-h);
  padding-top: .4rem;
  padding-bottom: .4rem;
  z-index: 1040;
}

.gold-ribbon {
  height: 5px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent) 25%, #fdf3d0 50%, var(--accent) 75%, var(--accent-dark));
  position: sticky;
  top: var(--topbar-h);
  z-index: 1029;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
  border: 2px solid var(--accent);
}

.navbar-brand { font-size: 1.55rem; }
.navbar-brand span { line-height: 1.25; }



.app-shell {
  display: flex;
  min-height: calc(100vh - var(--topbar-h) - var(--ribbon-h) - var(--footer-h));
}

.app-sidebar {
  width: 252px;
  background: var(--sb-bg);
  border-right: 1px solid rgba(0,0,0,.08);
  font-family: var(--sb-font);
}

.sidebar-title {
  background: var(--sb-title-bg);
  color: var(--sb-title-text);
  font-weight: 700;
  font-size: calc(var(--sb-size) * 1.02);
  padding: 10px 14px;
  border-bottom: 3px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.25;
}
.sidebar-title .sidebar-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: #fff; flex: 0 0 auto; }

@media (min-width: 992px) {
  .app-sidebar { position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h) - var(--ribbon-h)); overflow: hidden; transition: margin-left .2s ease, width .2s ease; }
  /* Desktop sidebar collapse — toggled by the same button used for the mobile offcanvas.
     Sliding it out of view (rather than display:none) keeps the transition smooth. */
  body.sidebar-collapsed .app-sidebar { margin-left: -252px; width: 0; overflow: hidden; border-right: none; }
}

.sidebar-nav { padding: 8px 10px; gap: 2px; }

/* Top-level items and group headers: rounded rows with an icon tile */
.sidebar-nav .nav-link,
.sidebar-group-toggle {
  color: var(--sb-text);
  border-radius: 10px;
  padding: 5px 8px;
  line-height: 1.3;
  font-size: var(--sb-size);
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  width: 100%;
  text-align: left;
  background: none;
  transition: background .15s ease, color .15s ease;
}
.sidebar-nav .nav-link i,
.sidebar-group-toggle > i:first-child {
  font-size: 1rem;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--sb-icon);
  background: color-mix(in srgb, var(--sb-icon) 14%, transparent);
}
.sidebar-nav .nav-link:hover,
.sidebar-group-toggle:hover { background: color-mix(in srgb, var(--sb-active-bg) 65%, transparent); color: var(--sb-active-text); }

/* Active item: tinted row with a gold bar on its left edge */
.sidebar-nav .nav-link.active {
  background: var(--sb-active-bg);
  color: var(--sb-active-text);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar-nav .nav-link.active i { color: var(--sb-active-text); background: color-mix(in srgb, var(--accent) 35%, transparent); }

.sidebar-group-toggle { font-weight: 600; margin-top: 6px; }
.sidebar-group-toggle.active { color: var(--sb-active-text); }
.sidebar-caret { font-size: .75rem; margin-left: auto; opacity: .7; transition: transform .2s ease; }
.sidebar-group-toggle[aria-expanded="true"] .sidebar-caret { transform: rotate(180deg); }

/* Sub-menu: indented under a thin rule, smaller icons */
.sidebar-subnav { margin: 2px 0 6px 22px; padding-left: 8px; border-left: 2px solid color-mix(in srgb, var(--sb-icon) 25%, transparent); }
.sidebar-subnav .nav-link { font-size: calc(var(--sb-size) * .95); padding: 4px 8px; gap: 8px; }
.sidebar-subnav .nav-link i { font-size: .8rem; width: 22px; height: 22px; flex-basis: 22px; border-radius: 6px; }
.sidebar-subnav .nav-link .badge { margin-left: auto; }

.app-main { flex: 1; min-width: 0; }

.stat-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  padding: 18px 20px;
  background: var(--card-bg);
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; color: var(--brand-dark); }
.stat-card .stat-label { font-size: .8rem; color: var(--muted-color); text-transform: uppercase; letter-spacing: .04em; }
.stat-card .bi { font-size: 1.6rem; color: var(--accent); }

/* ---- Colorful clickable KPI cards (Batch 9 dashboard upgrade) ---- */
a.stat-card-kpi {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  border-radius: 14px;
  padding: 18px 20px;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
a.stat-card-kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
a.stat-card-kpi .stat-value { font-size: 1.6rem; font-weight: 700; color: #fff; }
a.stat-card-kpi .stat-label { font-size: .78rem; color: rgba(255,255,255,.85); text-transform: uppercase; letter-spacing: .04em; }
a.stat-card-kpi .bi { font-size: 1.7rem; color: rgba(255,255,255,.85); }
.kpi-green   { background: linear-gradient(135deg, #0f7b4f, #0b3d24); }
.kpi-blue    { background: linear-gradient(135deg, #2b7fd4, #14508a); }
.kpi-purple  { background: linear-gradient(135deg, #8a5fd4, #5b348f); }

.card { border: none; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); background: var(--card-bg); color: var(--text-color); }
.card-header { background: var(--card-bg); border-bottom: 1px solid #eef1ef; border-radius: 14px 14px 0 0 !important; font-weight: 600; }

.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted-color); border-bottom-width: 1px; }

.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand) 60%, var(--accent));
  padding: 20px;
}
.auth-shell {
  width: 100%;
  max-width: 940px;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden;
  display: flex;
  min-height: 560px;
}
.auth-side {
  flex: 0 0 42%;
  background: linear-gradient(160deg, var(--brand-dark), var(--brand) 65%, #0f4f2e);
  color: #fff;
  padding: 34px 32px;
  position: relative;
}
.auth-side-logo { width: 56px; height: 56px; border-radius: 8px; object-fit: contain; border: 2px solid var(--accent); background:#fff; }
.auth-side-brand { font-weight: 700; letter-spacing: .03em; }
.auth-side-illustration { display:flex; justify-content:center; margin: 10px 0; }
.auth-side-illustration svg { width: 100%; max-width: 300px; height: auto; }
.auth-side-heading { font-weight: 700; font-size: 1.35rem; margin-bottom: 8px; }
.auth-side-sub { font-size: .88rem; color: rgba(255,255,255,.8); line-height: 1.5; }
.auth-form-panel {
  flex: 1;
  padding: 40px 40px;
}
.auth-form-panel .auth-mobile-logo { width: 64px; height: 64px; border-radius: 8px; object-fit: contain; border: 2px solid var(--accent); display: block; margin: 0 auto 12px; }
.auth-form-panel .input-group-text { background: var(--brand-light); color: var(--brand); border-color: #dfe6e2; }
.auth-form-panel .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(11,61,36,.12); }
.auth-toggle-pw { cursor: pointer; background: var(--brand-light); color: var(--brand); border-color: #dfe6e2; }
@media (max-width: 767.98px) {
  .auth-shell { border-radius: 14px; min-height: 0; }
  .auth-form-panel { padding: 30px 22px; }
}

/* Login (and the 2FA step): one fixed screen, no scrollbar at any window size. */
body.auth-fixed { padding-bottom: 0; overflow: hidden; height: 100vh; }
body.auth-fixed > .container-fluid { padding: 0 !important; }
body.auth-fixed .app-footer { display: none; }
body.auth-fixed .alert { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2000; max-width: 92vw; margin: 0; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
body.auth-fixed .auth-wrap { height: 100vh; min-height: 0; padding: 12px; box-sizing: border-box; overflow: hidden; }
body.auth-fixed .auth-shell { min-height: 0; max-height: 100%; }
body.auth-fixed .auth-form-panel { padding: 22px 34px; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
body.auth-fixed .auth-form-panel h4 { font-size: 1.15rem; }
body.auth-fixed .auth-form-panel .form-label { margin-bottom: .2rem; font-size: .85rem; }
body.auth-fixed .auth-form-panel .mb-3 { margin-bottom: .65rem !important; }
body.auth-fixed .auth-form-panel hr { margin: .6rem 0; }
body.auth-fixed .auth-side { padding: 22px 26px; }
body.auth-fixed .auth-side-illustration svg { max-height: 26vh; }
@media (max-height: 640px) {
  body.auth-fixed .auth-side-illustration, body.auth-fixed .auth-mobile-logo { display: none !important; }
  body.auth-fixed .auth-form-panel { padding: 14px 24px; }
}
@media (max-height: 520px) {
  body.auth-fixed .auth-side { display: none !important; }
  body.auth-fixed .auth-form-panel .text-muted.small { display: none; }
}

/* Idle-timeout warning bar */
.idle-warn { position: fixed; left: 50%; bottom: 66px; transform: translateX(-50%); z-index: 2000; background: #fff3cd; color: #664d03; border: 1px solid #ffecb5; border-radius: 10px; padding: 10px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: 92vw; font-size: .85rem; }

/* Dashboard daily-figure cards (clickable) */
a.daily-card { display: block; height: 100%; border-radius: 14px; padding: 18px 22px; color: #fff !important; text-decoration: none !important; box-shadow: 0 3px 10px rgba(0,0,0,.14); transition: transform .15s ease, box-shadow .15s ease; }
a.daily-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.2); }
a.daily-card .daily-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; opacity: .9; }
a.daily-card .daily-value { font-size: 1.9rem; font-weight: 700; line-height: 1.2; }
a.daily-card .daily-hint { font-size: .78rem; opacity: .85; }
.daily-expenses { background: linear-gradient(135deg, #e0563f, #a8321c); }
.daily-fees { background: linear-gradient(135deg, #1f9d6a, #0b5d3b); }



.reg-photo-sticky {
  position: sticky;
  top: 76px;
}
@media (max-width: 991.98px) {
  .reg-photo-sticky { position: static; }
}

/* ---- Footer (all pages) — fixed to the viewport bottom ---- */
.app-footer {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  color: #f5f0dc;
  border-top: 3px solid var(--accent);
  position: relative;
  min-height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-footer strong { color: var(--accent); }
.app-footer .footer-text { font-size: 12.5px; }

/* ---- Circular student/staff photo ---- */
.photo-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  background: #fff;
}
.photo-circle-sm {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  background: #fff;
}
.photo-name-caption {
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin-top: 4px;
}

/* ---- Shared print stylesheet for report pages (Batch 3+) ---- */
.print-only { display: none; }
@media print {
  .navbar, .gold-ribbon, .app-sidebar, .app-footer, .no-print, .offcanvas-lg { display: none !important; }
  .app-shell { display: block !important; }
  .app-main { width: 100% !important; margin: 0 !important; }
  .container-fluid { padding: 0 !important; max-width: none !important; }
  .print-only { display: block !important; }
  body { background: #fff !important; }
  .card { border: none !important; box-shadow: none !important; }
  @page { margin: 12mm; }
}
.print-letterhead { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid var(--brand-dark); padding-bottom: 10px; margin-bottom: 14px; }
.print-letterhead img { width: 52px; height: 52px; object-fit: contain; }
.print-letterhead h3 { margin: 0; color: var(--brand-dark); font-size: 1.2rem; }
.print-letterhead .sub { font-size: .78rem; color: #555; }
.report-total-row td { font-weight: 700; border-top: 2px solid #333 !important; }


/* ---------- Mobile / tablet friendliness ---------- */
@media (max-width: 991.98px) {
  :root { --topbar-h: 64px; }
  html { font-size: calc(var(--base-size) * .8125); }
  .navbar-brand { font-size: 1.1rem; }
  .brand-logo { width: 40px; height: 40px; }
}
@media (max-width: 575.98px) {
  :root { --topbar-h: 64px; }
  html { font-size: calc(var(--base-size) * .75); }
  .brand-logo { width: 36px; height: 36px; }
  .app-main { padding: 10px !important; }
  .card-body { padding: .75rem; }
  h1, h2, h3, h4, h5, h6, .card-header, .modal-title { font-size: calc(var(--heading-size) * .8); }
  .btn { padding: .4rem .7rem; }
  /* keep wide tables usable: scroll sideways instead of squashing */
  .table-responsive { -webkit-overflow-scrolling: touch; }
  .modal-dialog { margin: .5rem; }
}

/* ---- Toast messages (push alerts, install, reminders) ---- */
.ips-toast { position: fixed; right: 16px; bottom: 16px; z-index: 2100; max-width: min(420px, 92vw);
  background: #1f2a37; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  font-size: .9rem; opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; pointer-events: none; }
.ips-toast.show { opacity: 1; transform: translateY(0); }

/* ---- Admin/staff dashboard: fits one desktop screen (no page scroll) ---- */
@media (min-width: 992px) {
  body.page-dashboard .app-shell {
    height: calc(100vh - var(--topbar-h) - var(--ribbon-h) - var(--footer-h));
    min-height: 0;
  }
  body.page-dashboard .app-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  body.page-dashboard .app-main > .container-fluid,
  body.page-dashboard .app-main > main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
}
.dash-screen { display: flex; flex-direction: column; min-height: 0; }
.dash-screen .stat-card-kpi { padding: .5rem .85rem; }
.dash-screen .daily-card { padding: .5rem .85rem; }
.dash-fill { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: .25rem; }
.dash-fill > .row { flex: 1; min-height: 0; }
.dash-fill .col-lg-4 { display: flex; flex-direction: column; min-height: 0; }
.dash-fill .card { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.dash-fill .card-body, .dash-fill .card-body.p-0 { flex: 1; min-height: 0; overflow-y: auto; }
@media (max-width: 991.98px) {
  .dash-fill .card { max-height: 320px; }
}
@media (min-width: 992px) {
  body.page-dashboard .app-main > .container-fluid { padding-top: .75rem !important; padding-bottom: .5rem !important; }
}

/* ---- Student registration form: roomy fields, less scrolling ---- */
.reg-form .form-label { font-weight: 600; font-size: .85rem; color: var(--muted-color); margin-bottom: .3rem; }
.reg-form .form-control,
.reg-form .form-select { min-height: 2.6rem; font-size: 1rem; }
.reg-form .form-control-sm { min-height: 2.2rem; font-size: .95rem; }
.reg-form h6 { margin-top: .6rem !important; margin-bottom: .6rem !important; color: var(--brand) !important; }
.reg-form .row > [class*="col-"] { min-width: 0; }
.reg-actions { background: var(--card-bg); }
.reg-photo-sticky { position: sticky; top: 90px; }

/* ---- Certificate design picker (Settings and each certificate) ---- */
.cert-design-card { cursor: pointer; background: var(--card-bg); }
.cert-design-card:hover { border-color: var(--brand) !important; }
.cert-design-card:has(input:checked) { border-color: var(--brand) !important; box-shadow: 0 0 0 2px var(--brand-light); }
.dz-thumb { height: 46px; border-radius: 4px; background: #fffef8; border: 1px solid #d9d4c0; }
.dz-classic { border: 3px double #145a32; }
.dz-royal { background: linear-gradient(#145a32 0 30%, #fffef8 30%); border: 1px solid #145a32; }
.dz-modern { border-left: 12px solid #145a32; }
.dz-elegant { background: linear-gradient(160deg, #fffef8, #dfeae3); border: 1px solid #d4af37; }
.dz-minimal { border: none; border-top: 2px solid #145a32; background: #fff; }

/* ================= ips20: mobile-first, big-tile dashboards ================= */
.ur { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaliq", serif; font-weight: 600; font-size: 1.05em; line-height: 1.7; margin-left: .35em; direction: rtl; unicode-bidi: isolate; }

/* Big icon tiles: the main way to reach things. Each opens a panel or a page. */
.tile-grid, .quick-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.quick-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.big-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 124px; padding: 14px 10px; width: 100%; border: none; border-radius: 18px;
  color: #fff !important; text-decoration: none !important; text-align: center; font: inherit;
  box-shadow: 0 3px 10px rgba(0,0,0,.14); transition: transform .12s ease, box-shadow .12s ease;
}
.big-tile:hover, .big-tile:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.big-tile:active { transform: scale(.97); }
.big-tile .bt-icon { width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; line-height: 1; background: rgba(255,255,255,.2); }
.big-tile .bt-label { font-size: 1.12rem; font-weight: 700; line-height: 1.2; }
.big-tile .bt-label .ur { display: block; font-size: 1.12rem; margin: 2px 0 0; }
.big-tile .bt-sub { font-size: .86rem; opacity: .95; }
.big-tile.sm { min-height: 86px; padding: 10px 6px; border-radius: 14px; gap: 4px; }
.big-tile.sm .bt-icon { width: 42px; height: 42px; font-size: 1.35rem; }
.big-tile.sm .bt-label { font-size: .9rem; }
.big-tile.sm .bt-label .ur { font-size: .95rem; }
.tone-blue   { background: linear-gradient(135deg, #2b7fd4, #14508a); }
.tone-green  { background: linear-gradient(135deg, #0f7b4f, #0b3d24); }
.tone-purple { background: linear-gradient(135deg, #8a5fd4, #5b348f); }
.tone-gold   { background: linear-gradient(135deg, #d9a21b, #9a7414); }
.tone-teal   { background: linear-gradient(135deg, #17a2a2, #0f5c63); }
.tone-red    { background: linear-gradient(135deg, #e0563f, #a8321c); }
.tone-orange { background: linear-gradient(135deg, #f08a24, #b5520e); }
.tone-navy   { background: linear-gradient(135deg, #2d4f8a, #14284b); }
.tone-grey   { background: linear-gradient(135deg, #7b8a84, #4a5a54); }

/* Who-you-are header and money strip */
.home-hero { display: flex; align-items: center; gap: 14px; background: var(--card-bg); border-radius: 18px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 12px; }
.hero-photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); background: #fff; flex-shrink: 0; }
.hero-icon { width: 70px; height: 70px; border-radius: 50%; background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0; }
.hero-hello { font-size: 1.25rem; font-weight: 700; color: var(--brand-dark); }
.hero-hello .ur { font-size: 1.15rem; color: var(--brand); }
.hero-sub { color: var(--muted-color); font-size: .96rem; }
.money-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.money-strip > div { background: var(--card-bg); border-radius: 14px; padding: 10px 6px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ms-label { display: block; font-size: .82rem; color: var(--muted-color); }
.ms-value { display: block; font-weight: 800; font-size: 1.1rem; }
.today-box { background: color-mix(in srgb, var(--accent) 16%, var(--card-bg)); border: 1px solid var(--accent); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
.today-title { font-weight: 700; margin-bottom: 4px; }
.today-row { padding: 2px 0; font-size: 1.02rem; }

/* Panels: one opens at a time, with a big Home button */
.dash-panel { background: var(--card-bg); border-radius: 18px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 14px; }
.panel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-title { margin: 0; font-size: 1.3rem; font-weight: 700; }
.big-back { background: var(--brand); color: #fff; font-size: 1.02rem; font-weight: 600; min-height: 46px; padding: 8px 16px; border-radius: 12px; }
.big-back:hover { background: var(--brand-dark); color: #fff; }
.big-btn { min-height: 54px; font-size: 1.08rem; font-weight: 600; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.big-alert { font-size: 1.05rem; }
.big-figures { display: grid; gap: 10px; margin-bottom: 14px; }
.big-figures > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; background: var(--app-bg); border-radius: 12px; }
.big-figures span { font-size: 1.05rem; }
.big-figures strong { font-size: 1.35rem; }
.list-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px solid rgba(127,127,127,.2); border-radius: 14px; margin-bottom: 10px; }
.list-card.block { display: block; }
.big-list { list-style: none; padding: 0; margin: 0; }
.big-list li { padding: 10px 4px; border-bottom: 1px solid rgba(127,127,127,.18); font-size: 1.05rem; }

/* Phone bottom bar: Home, Notices, Account, Menu — always within thumb reach */
.mobile-dock { position: fixed; bottom: 0; left: 0; right: 0; height: 68px; display: flex; background: var(--card-bg); border-top: 3px solid var(--accent); box-shadow: 0 -2px 10px rgba(0,0,0,.12); z-index: 1035; }
.mobile-dock .dock-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: none; background: none; color: var(--text-color); text-decoration: none; font-size: .8rem; font-weight: 700; line-height: 1.1; }
.mobile-dock .dock-btn i { font-size: 1.45rem; color: var(--brand); }
.mobile-dock .dock-btn .ur { display: block; font-size: .9rem; }

/* Phones: larger type and touch targets */
@media (max-width: 767.98px) {
  html { font-size: calc(var(--base-size) * 1.08); }
  body { padding-bottom: 80px; }
  .app-footer { display: none !important; }
  .container-fluid.py-4 { padding-top: .75rem !important; padding-bottom: .75rem !important; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .form-control, .form-select { min-height: 46px; font-size: 1rem; }
  .table td, .table th { padding: .6rem .5rem; }
  .stat-card-kpi .stat-value { font-size: 1.3rem; }
}
@media (min-width: 768px) {
  .tile-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .quick-row { grid-template-columns: repeat(8, minmax(0,1fr)); }
  .mobile-dock { display: none !important; }
}
@media (min-width: 1200px) {
  .tile-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

/* "A+" button: larger text everywhere, on this device */
html.big-text { font-size: calc(var(--base-size) * 1.25); }
html.big-text .btn { font-size: 1.08rem; }
html.big-text .big-tile .bt-label { font-size: 1.25rem; }
html.big-text .big-figures strong { font-size: 1.6rem; }
