:root {
  --ksrtc-green: #1d5b34;
  --ksrtc-green-dark: #164226;
  --ksrtc-orange: #e8491d;
  --ksrtc-orange-dark: #c93a13;
  --sidebar-width: 260px;
}

html {
  font-size: 104%;
}

/* Self-hosted (no external CDN dependency) so Malayalam text renders
   consistently in the corporation's chosen font even offline. Sourced from
   SMC's fonts (smc.org.in/fonts), SIL OFL 1.1 — see assets/fonts/SMC-FONTS-LICENSE.txt. */
@font-face {
  font-family: "Rachana";
  src: url("../assets/fonts/Rachana-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rachana";
  src: url("../assets/fonts/Rachana-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Meera";
  src: url("../assets/fonts/Meera.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: "Public Sans", "Rachana", "Meera", "Noto Sans Malayalam", sans-serif;
  background-color: #f7f6f2;
}

/* register.html: inputs/textareas that accept English & Malayalam Unicode.
   Also applied to read-only displays of that same content (RTI Application
   preview/view screens, the Quill editor below) so it renders with the same
   fonts it was typed in. On those read-only displays specifically (a plain
   dl/dd, not an input — the Bootstrap grid column it sits in can't shrink
   below its content's own width by default), a long RTI application broke
   the whole page layout: a run of text with nowhere CSS considered a valid
   line-break point (see sanitizeRtiHtml()'s own comment in utils/rti.js
   for the two ways that happens) forced the column, and with it the whole
   page, wider than the viewport — a horizontal scrollbar, with the actual
   text cut off mid-line rather than wrapped. overflow-wrap:anywhere allows
   a break at literally any character as a last resort once normal
   word-break points run out, so nothing can force this again regardless of
   content; word-break is the older/wider-supported equivalent, kept as a
   fallback for browsers without overflow-wrap's "anywhere" keyword. */
.lang-any {
  font-family: "Public Sans", "Rachana", "Meera", "Noto Sans Malayalam", sans-serif;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Same fix, wider net: view-application.jsx / download-application.jsx /
   apply-rti.jsx's Preview / payment-receipt.jsx all show applicant-typed
   free text (Address, Subject, First Appeal's Grounds for Appeal/Appeal
   Details, etc.) in this same dt/dd "details" pattern — not just the RTI
   application body .lang-any covers above. Any of those fields can just
   as easily hold a long unbroken run of text with no space for the column
   to wrap at, and break the layout the exact same way (this dl.row
   pattern is used nowhere else in the app — see the grep that found only
   these 4 files — so this is safe to apply generically rather than
   listing every field one at a time). */
dl.row dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* dashboard.html and the EN/ML toggle: explicit Malayalam-tagged content —
   Rachana first, Meera as its sans-serif fallback, per KSRTC's font choice. */
[lang="ml"], .lang-ml {
  font-family: "Rachana", "Meera", "Noto Sans Malayalam", "Public Sans", sans-serif;
}

/* Malayalam placeholders run noticeably wider than their English source text
   at the same font-size (denser conjuncts/matras), so a single-line input
   can clip them even when the translated string is kept short. Shrinking
   just the placeholder (never the typed value) buys back some headroom. */
html[lang="ml"] .form-control::placeholder {
  font-size: 0.9em;
}

/* Blinking highlight for action buttons that need attention (track-application) */
@keyframes btn-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.btn-blink {
  animation: btn-blink 1.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .btn-blink {
    animation: none;
  }
}

/* "Back to ..." links across pages (identified by the arrow-left icon) */
a.text-decoration-none:has(> i.bi-arrow-left) {
  color: var(--ksrtc-green);
}
a.text-decoration-none:has(> i.bi-arrow-left):hover {
  color: var(--ksrtc-green-dark);
}

/* Login <-> Register cross-links (register.jsx "Login", login.jsx
   "Register Now"/"Forgot Password?") — brand green instead of
   Bootstrap's default link blue. */
.text-ksrtc-green {
  color: var(--ksrtc-green);
}
.text-ksrtc-green:hover {
  color: var(--ksrtc-green-dark);
}

/* Edge/IE auto-inject their own show/hide icon (::-ms-reveal) plus a
   clear-field "x" (::-ms-clear) on every type="password"/type="text"
   input. PasswordField (components/password-field.jsx) already supplies
   its own eye-icon toggle button, so Edge's native one just sits on top
   of it — two eye icons stacked in the same input-group, both doing the
   same thing (see register.jsx's Confirm Password field). Not needed on
   Chrome/Firefox, which have no such native control to begin with. */
input::-ms-reveal,
input::-ms-clear {
  display: none;
}

/* Track Application listing's Resume Draft (btn-outline-primary) and View
   (btn-outline-secondary) — see track-application.jsx's ActionButtons.
   Left un-recolored so Draft keeps its normal blue text/border and View
   its normal grey text/border, exactly as before; only the hover/focus
   fill is swapped from Bootstrap's own blue/grey to the app's green
   (matching the hover treatment used everywhere else in the app), instead
   of leaving these two as the only buttons in the app that don't hover
   green. Marked with this class rather than a bare
   ".page-track-application .btn-outline-primary"/"-secondary" selector so
   First Appeal (also outline-primary) and Print (also outline-secondary)
   are left on Bootstrap's default hover, since only Draft/View were asked
   for. */
.track-action-hover-green:hover,
.track-action-hover-green:focus {
  background: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
  color: #fff;
}

/* Every grey (outline-secondary) action button inside a data table — RTI
   Replies, First Appeal, View Application's tabs, Payments — hovers to the
   same brand green as Track Application's buttons above, instead of
   Bootstrap's default grey fill. */
.content-area .table .btn-outline-secondary:hover,
.content-area .table .btn-outline-secondary:focus-visible {
  background: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
  color: #fff;
}

/* Track Application listing's Actions column — Bootstrap's .btn doesn't set
   white-space:nowrap on its own, so "Preview & Print" (the longest label
   here) was wrapping onto two lines whenever the flex row (View + Preview &
   Print, wrapping under .d-flex.flex-wrap in ActionButtons) got squeezed
   narrower than that text needs — nearly doubling the row's height. Forcing
   nowrap keeps every action button a single line — but that alone widened
   the whole table past a typical (100% zoom) viewport, with .table-
   responsive's horizontal scroll then hiding the Actions column off the
   right edge instead of the old 2-line wrap. Shrinking the buttons
   themselves (below even .btn-sm's own padding/font-size) buys back most of
   that width, so nowrap no longer needs to widen the table at all in the
   common case. */
.page-track-application .btn {
  white-space: nowrap;
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
}
/* Subject column — truncated to one line with an ellipsis instead of
   wrapping, same reasoning as the Actions column above: a long subject
   wrapping to 2-3 lines was inflating every row's height well past what the
   other columns need. title= on the same element restores the full text as
   a native hover tooltip, so nothing is actually lost, just not shown
   inline. 12rem (not the wider width first tried) leaves enough room
   for the Actions column's own now-unwrapped buttons to still fit without
   pushing the table past a typical viewport width. */
.page-track-application .subject-cell {
  display: block;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Green-outline button — text/border green by default (unlike
   .track-action-hover-green above, which only recolors the hover state and
   leaves Bootstrap's own default color alone), filling to green
   background/white text on hover — same fill as everywhere else, just
   green from the start instead of only on hover. Used by
   download-application.jsx's own Download/Print button. Not Bootstrap's
   built-in .btn-outline-success: that's a different, non-brand green, and
   would clash with --ksrtc-green used everywhere else on the same page. */
.btn-outline-ksrtc-green {
  color: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
}
.btn-outline-ksrtc-green:hover,
.btn-outline-ksrtc-green:focus {
  background: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
  color: #fff;
}

/* Status badge — white text on the app's brand green, for the 'Submitted'
   status specifically (utils/rti.js's statusBadge map). Not Bootstrap's
   .text-bg-success (used by 'Replied' in that same map): reusing the same
   green for both would make Submitted and Replied indistinguishable at a
   glance, and this uses the brand green rather than Bootstrap's slightly
   different one anyway, for consistency with the rest of the app's KSRTC
   green (buttons, .track-action-hover-green above, etc.). Shared by every
   page that renders a status badge off that map — track-application's
   listing, view-application's header + Current Status field,
   download-application's same two — since it's all one central mapping. */
.badge-ksrtc-green {
  background-color: var(--ksrtc-green);
  color: #fff;
}

/* Header status badge (view-application.jsx / download-application.jsx)
   sits next to a .btn-sm action button in the same flex row — Bootstrap's
   .badge is shorter than a .btn-sm by default (smaller font-size/padding,
   no border), so side-by-side the two look mismatched in height. Matching
   padding/font-size by hand (an earlier attempt) still left a gap, since a
   .btn-sm's height also depends on its 1px border and Bootstrap's own
   line-height math — easy to get slightly wrong by guessing. Stretching
   both to the row's own height instead (badge and button both flex
   children of a .align-items-stretch row — see the two .jsx files) is
   exact by construction: whichever of the two is naturally taller decides
   the row height, and the other one is stretched to match it exactly, no
   pixel math to get right or keep in sync as either one's own styling
   changes. This just re-centers the badge's text within that taller box. */
.header-status-badge {
  display: flex;
  align-items: center;
}

/* Every secondary/link-style button on Login/Register — the password
   eye icon (PasswordField), "Resend OTP", "Back to Login", and the
   State/District "Retry" links — green instead of Bootstrap's default
   grey/blue, so no hover state on these two pages is left un-themed.
   Forgot Password (untouched) keeps Bootstrap's defaults. */
.page-login .btn-outline-secondary,
.page-register .btn-outline-secondary {
  color: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
}
.page-login .btn-outline-secondary:hover,
.page-login .btn-outline-secondary:focus,
.page-register .btn-outline-secondary:hover,
.page-register .btn-outline-secondary:focus {
  background: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
  color: #fff;
}
/* Bootstrap's .is-invalid/.is-valid icon (a background-image plus extra
   right padding to make room for it) is dropped from text inputs
   everywhere in this app — the red border plus the invalid-feedback text
   below the field already say "invalid"; the icon was redundant and,
   crammed into single-digit OTP boxes (otp-input.jsx), swallowed the
   whole box and hid the digit. (.form-select is left alone: its
   background-image also draws the dropdown caret, so clearing it here
   would remove that too.) */
.form-control.is-invalid,
.form-control.is-valid {
  background-image: none;
  padding-right: 0.75rem;
}

.page-login .btn-link,
.page-register .btn-link {
  color: var(--ksrtc-green);
}
.page-login .btn-link:hover, .page-login .btn-link:focus,
.page-register .btn-link:hover, .page-register .btn-link:focus {
  color: var(--ksrtc-green-dark);
}

/* ===== Top identity strip ===== */
.identity-strip {
  background: var(--ksrtc-green-dark);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.3rem 0;
}
.identity-strip a { color: #d9ecdf; text-decoration: none; }
.identity-strip a:hover { color: #fff; }

/* ===== Header ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
}
.site-header .brand-title {
  font-weight: 700;
  color: var(--ksrtc-green);
  font-size: 1.15rem;
  line-height: 1.1;
  margin: 0;
}
.site-header .brand-subtitle {
  font-size: 0.72rem;
  color: #666;
}
.lang-toggle .btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  color: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
  /* Locked to the same 32px the header avatar circle uses (header.jsx) so
     the two sit on the same top/bottom edges in the header row instead of
     the pill's line-height-driven height leaving it a couple pixels off
     from the avatar's fixed size. display:flex centers EN/ML within that
     fixed height regardless of line-height, rather than relying on it. */
  height: 32px;
  display: flex;
  align-items: center;
}
.lang-toggle .btn.active {
  background: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
  color: #fff;
}

/* Read-only / auto-populated fields (My Profile's Full Name & Mobile,
   Apply RTI's Mobile Number, Register's District before a State is picked)
   get a light-green tint instead of Bootstrap's default grey, so they read
   as "provided"/"not yet available" rather than plain unavailable. Also
   covers the static "+91" prefix next to every mobile number field
   (register.jsx, my-profile.jsx, apply-rti.jsx) — it's never editable, so
   it gets the same treatment as a disabled field. */
.form-control:disabled,
.form-select:disabled,
.input-group-text {
  background-color: #eaf3ee;
}

/* ===== Payment Receipt (payment-receipt.jsx) =====
   Printing/"Save as PDF" via window.print() renders only the receipt card —
   everything else on the page (header, sidebar, footer, the print button
   itself) is hidden so the printed output is a clean, standalone receipt.
   `body:has(.receipt-printable)` scopes the "hide everything" rule to only
   pages that actually have that card — a bare `body *` would hide the
   entire page on every OTHER window.print() call in the app too (e.g.
   track-application.jsx, which still just prints the listing page as-is —
   it has no printable wrapper of its own). view-application.jsx's Download
   view has its own equivalent wrapper (.application-printable, just below)
   for exactly this reason. */
@media print {
  body:has(.receipt-printable) * { visibility: hidden; }
  .receipt-printable, .receipt-printable * { visibility: visible; }
  .receipt-printable {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  }
  .no-print {
    display: none !important;
  }
}

/* ===== Official Receipt popup (components/official-receipt-modal.jsx) =====
   A formal, bordered form-style layout (solid black rules, bold left-hand
   labels) matching the reference KSRTC letterhead receipt design — plain
   HTML tables rather than Bootstrap's .table (its border is a light grey
   hairline, not the solid black ruled-form look a payment receipt like
   this is expected to have). Printing/"Save as PDF" is handled by the
   .official-receipt-printable rule further down, not .receipt-printable
   just above — see that rule's own comment for why. */
.official-receipt-table {
  width: 100%;
  border-collapse: collapse;
}
.official-receipt-table th,
.official-receipt-table td {
  border: 1px solid #000;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  text-align: left;
  vertical-align: top;
}
.official-receipt-table th {
  font-weight: 700;
  width: 25%;
  white-space: nowrap;
}
/* official-receipt-modal.jsx's print-only duplicate (.official-receipt-
   printable, a direct child of AppLayout's .content-area, sibling to both
   modals and the apply-rti page behind them — see that file) uses the
   .application-printable technique (a few sections up), not
   .receipt-printable's (visibility:hidden-everything + position:absolute
   the target) — that trick did not print reliably here even once the
   printed copy was moved outside the modal, so rather than keep patching
   it, this is the one print technique in the app confirmed to actually
   work live (download-application.jsx). No visibility/position tricks:
   just plain document flow, with every unwanted sibling explicitly
   display:none'd —
     - the four AppLayout chrome pieces (outside .content-area entirely),
     - any .modal-backdrop Bootstrap has appended to <body>,
     - every OTHER direct child of .content-area — both modals
       (this component's own, and PaymentConfirmModal's) plus whichever
       apply-rti "view" screen is currently showing behind them — found
       via :not(:has(...)) since content-area holds several siblings here,
       unlike download-application.jsx where the printable div is the
       page's only content and nothing extra needed excluding. */
@media print {
  body:has(.official-receipt-printable) .identity-strip,
  body:has(.official-receipt-printable) .site-header,
  body:has(.official-receipt-printable) .sidebar,
  body:has(.official-receipt-printable) .site-footer,
  body:has(.official-receipt-printable) .modal-backdrop,
  body:has(.official-receipt-printable) .content-area > *:not(.official-receipt-printable):not(:has(.official-receipt-printable)) {
    display: none !important;
  }
}

/* ===== RTI Reply print (components/rti-reply-print.jsx / -modal.jsx) =====
   Letterhead-style layout matching the reference KSRTC RTI reply print
   template — Times New Roman, centered header block with logo/org name,
   ruled divider, right-aligned meta row, indented From/To address blocks,
   right-aligned closing/signature. On-screen sizing here is deliberately
   plain (no forced A4 mm dimensions) since this also renders inside a
   Bootstrap modal for viewing; the print-only duplicate below is what
   actually needs to look like a formal A4 letter, handled by the @page
   rule + hide-everything-else technique, same idea as
   .official-receipt-printable just above. */
.rti-reply-print {
  font-family: "Times New Roman", Times, serif;
  color: #111;
  /* Explicit, not relying solely on .modal-body's own default padding for
     the on-screen view's left/right breathing room — content (the meta
     row especially, "No.: .../Date: ..." at justify-content:space-between)
     was reading as flush against the modal's edges. */
  padding: 0 0.5rem;
}
.rti-reply-print .top-title {
  text-align: center;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.rti-reply-print .top-title img {
  /* display:block + margin:auto centers it explicitly, rather than relying
     on .top-title's own text-align:center to center the image as inline
     content — the logo was sitting flush left instead of centered above
     the org name/office/info text. */
  display: block;
  height: 56px;
  margin: 0 auto 0.25rem;
}
.rti-reply-print .top-title .org {
  font-weight: 700;
  font-size: 1.05rem;
}
.rti-reply-print .top-title .office {
  font-size: 0.9rem;
  font-weight: 700;
}
.rti-reply-print .top-title .info {
  font-size: 0.85rem;
  font-weight: 700;
}
.rti-reply-print .rule {
  border-top: 1px solid #222;
  margin: 0.6rem 0 0.75rem;
}
.rti-reply-print .meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.rti-reply-print .address {
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 0.9rem;
}
.rti-reply-print .address .label {
  font-weight: 700;
}
.rti-reply-print .address .indent {
  margin-left: 1.5rem;
}
.rti-reply-print .subject {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0.5rem 0 0.4rem;
}
.rti-reply-print .subject .label {
  font-weight: 700;
}
.rti-reply-print .body {
  font-size: 0.85rem;
  line-height: 1.65;
  text-align: justify;
}
.rti-reply-print .body p {
  margin: 0 0 0.7rem;
}
/* "Reply:" on its own line, content starting below it — previously a flex
   row with .reply-content sitting beside the label, so content.content's
   first line (whatever the officer's CKEditor produced — often its own
   From:/To: block, per the reference template) rendered squeezed onto the
   same line as "Reply:" instead of clearly starting fresh underneath it. */
.rti-reply-print .reply-block {
  margin: 0 0 0.7rem;
}
.rti-reply-print .reply-block > b {
  display: block;
  margin-bottom: 0.35em;
}
/* The reply's own content (rti-reply-print.jsx's .reply-content) is
   whatever HTML the officer's CKEditor produced — same admin flow whose
   reply-editor is pre-seeded with a full-size <h1>{{ $template }}</h1>
   title (see resources/views/admin/rti_replies/create.blade.php). Left at
   browser-default heading sizes, that renders far larger than the rest of
   this letter and breaks the layout. Resetting every heading level down to
   match the letter's own body/label sizes keeps whatever content the
   officer wrote, just sized to fit a formal letter rather than a web page. */
.rti-reply-print .reply-content h1,
.rti-reply-print .reply-content h2,
.rti-reply-print .reply-content h3,
.rti-reply-print .reply-content h4,
.rti-reply-print .reply-content h5,
.rti-reply-print .reply-content h6 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 0.4rem;
}
.rti-reply-print .reply-content p {
  margin: 0 0 0.5rem;
}
.rti-reply-print .reply-content > *:first-child {
  margin-top: 0;
}
.rti-reply-print .reply-content > *:last-child {
  margin-bottom: 0;
}
/* Attachments block after the reply content — label on its own line (same
   as "Reply:" above), then one file link per line, in the usual link blue
   on screen so they read as clickable. On paper they print in the letter's
   own black (see the print rule below). */
.rti-reply-print .attachment {
  margin: 0 0 0.7rem;
}
.rti-reply-print .attachment > b {
  display: block;
  margin-bottom: 0.35em;
}
.rti-reply-print .attachment a {
  color: var(--bs-link-color, #0d6efd);
  text-decoration: underline;
}
@media print {
  .rti-reply-print .attachment a {
    color: inherit;
  }
}
/* Print-only duplicate (.rti-reply-printable) — same hide-the-chrome
   technique as .official-receipt-printable above, not the .receipt-
   printable visibility/position trick (confirmed unreliable for a
   modal-originated printable — see that block's own comment for why). */
@media print {
  body:has(.rti-reply-printable) .identity-strip,
  body:has(.rti-reply-printable) .site-header,
  body:has(.rti-reply-printable) .sidebar,
  body:has(.rti-reply-printable) .site-footer,
  body:has(.rti-reply-printable) .modal-backdrop,
  body:has(.rti-reply-printable) .content-area > *:not(.rti-reply-printable):not(:has(.rti-reply-printable)) {
    display: none !important;
  }
  /* Tighter than the 15mm/18mm this had on screen — the browser's own
     print header/footer (URL, title, date, page number — a checkbox in the
     print dialog, not something this CSS can turn off) already reserves a
     real chunk of vertical space on top of this padding. A short reply's
     signature block was landing alone on an otherwise near-empty page 2
     purely because that combination left too little room, not because the
     block itself is unusually tall. Reclaiming space here first, before
     resorting to shrinking type/line-height, keeps the letter's own visual
     rhythm intact. */
  .rti-reply-printable {
    padding: 10mm 16mm;
  }
  /* A long reply is fine spanning onto a 2nd page — what's not fine (seen
     in testing) is one of these logical groups getting cut mid-block, e.g.
     an attachment image splitting across the page break with its caption
     stranded alone at the top of a mostly-empty page 2. break-inside:avoid
     on each group pushes the WHOLE group onto the next page together
     instead of slicing through it — same technique as .page-card's own
     print rule above, just scoped to this letter's own sections rather
     than a whole card. */
  .rti-reply-printable .top-title,
  .rti-reply-printable .meta,
  .rti-reply-printable .address,
  .rti-reply-printable .subject,
  .rti-reply-printable .reply-block,
  .rti-reply-printable .attachment {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  /* Trims each section's own bottom margin a bit further, print-only —
     the on-screen modal view (same classes, no @media print) keeps its
     more generous, easier-to-read spacing; only the printed/PDF output
     tightens up, to buy back the room the browser's own header/footer
     band takes without shrinking any type. */
  .rti-reply-printable .top-title {
    margin-bottom: 0.3rem;
  }
  .rti-reply-printable .rule {
    margin: 0.4rem 0 0.5rem;
  }
  .rti-reply-printable .meta {
    margin-bottom: 0.6rem;
  }
  .rti-reply-printable .address {
    margin-bottom: 0.6rem;
  }
  .rti-reply-printable .subject {
    margin: 0.3rem 0 0.3rem;
  }
  .rti-reply-printable .body p {
    margin-bottom: 0.5rem;
  }
  .rti-reply-printable .reply-block {
    margin-bottom: 0.5rem;
  }
}

/* ===== RTI Application print (components/application-print.jsx /
   -modal.jsx) =====
   Portal-card layout matching the reference "RTI Application" print
   template — navy-blue accents, a bordered summary strip (App No./
   Submitted On/Status), numbered section headers, and bordered Field/
   Details tables (distinct look from rti-reply-print.jsx's formal serif
   letterhead — this is a portal-generated document, not a signed letter). */
.application-print {
  font-size: 0.85rem;
  color: #1c2b3a;
  /* Same explicit left/right breathing room as rti-reply-print's own fix —
     not relying solely on .modal-body's default padding. */
  padding: 0 0.5rem;
}
/* Centered stack (logo, then title+icon), same treatment as rti-reply-
   print.jsx's own .top-title — this used to be a 3-column row (logo left,
   title centered via flex:1, icon pinned right), which left the logo
   sitting off to the side instead of centered like the reply letterhead's
   own logo. */
.application-print .ap-header {
  text-align: center;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #1f4e8c;
  margin-bottom: 0.75rem;
}
.application-print .ap-logo {
  display: block;
  height: 44px;
  margin: 0 auto 0.5rem;
}
.application-print .ap-portal-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1f4e8c;
}
.application-print .ap-portal-icon {
  font-size: 1.2rem;
  color: #1f4e8c;
  margin-left: 0.4rem;
  vertical-align: -0.1rem;
}
.application-print .ap-title {
  text-align: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1f4e8c;
  letter-spacing: 0.02em;
  margin: 0.5rem 0 1rem;
}
.application-print .ap-summary {
  display: flex;
  border: 1px solid #cdd7e6;
  border-radius: 0.4rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.application-print .ap-summary > div {
  flex: 1;
  padding: 0.5rem 0.9rem;
  border-right: 1px solid #cdd7e6;
}
.application-print .ap-summary > div:last-child {
  border-right: none;
}
.application-print .ap-summary-label {
  font-size: 0.72rem;
  color: #5a6b85;
  margin-bottom: 0.2rem;
}
.application-print .ap-summary-value {
  font-weight: 700;
}
.application-print .ap-section {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f4e8c;
  margin: 1rem 0 0.5rem;
}
.application-print .ap-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #cdd7e6;
  font-size: 0.83rem;
}
.application-print .ap-table th,
.application-print .ap-table td {
  border: 1px solid #cdd7e6;
  padding: 0.45rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.application-print .ap-table thead th {
  background: #eaf1fb;
  color: #1f4e8c;
  font-weight: 700;
}
/* The single-row Receiving Office table has no <thead> — its lone <th> is
   the label column, styled the same as a Field cell would be. */
.application-print .ap-table tbody th {
  background: #f5f8fc;
  font-weight: 600;
  width: 35%;
  white-space: nowrap;
}
.application-print .ap-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-top: 1px solid #cdd7e6;
  padding-top: 0.6rem;
  margin-top: 1rem;
  font-size: 0.72rem;
  color: #5a6b85;
}
.application-print .ap-footer-note {
  display: flex;
  gap: 0.4rem;
}
.application-print .ap-footer-meta {
  text-align: right;
  white-space: nowrap;
}
/* Print-only duplicate (.application-print-printable) — same hide-the-
   chrome technique as .official-receipt-printable/.rti-reply-printable
   above. */
@media print {
  body:has(.application-print-printable) .identity-strip,
  body:has(.application-print-printable) .site-header,
  body:has(.application-print-printable) .sidebar,
  body:has(.application-print-printable) .site-footer,
  body:has(.application-print-printable) .modal-backdrop,
  body:has(.application-print-printable) .content-area > *:not(.application-print-printable):not(:has(.application-print-printable)) {
    display: none !important;
  }
  .application-print-printable {
    padding: 10mm 16mm;
  }
  /* Same reasoning as rti-reply-printable's own print rules — keep each
     table/section together rather than letting it split awkwardly across
     a page boundary; a genuinely long RTI Application answer can still
     span pages, it just won't fracture mid-row. */
  .application-print-printable .ap-header,
  .application-print-printable .ap-summary,
  .application-print-printable .ap-table tbody tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* First Appeal print (components/appeal-print.jsx / -modal.jsx) — reuses
   the .application-print look above; only its print-only duplicate
   (.appeal-print-printable) needs its own hide-the-chrome rules, same
   technique as .application-print-printable. */
@media print {
  body:has(.appeal-print-printable) .identity-strip,
  body:has(.appeal-print-printable) .site-header,
  body:has(.appeal-print-printable) .sidebar,
  body:has(.appeal-print-printable) .site-footer,
  body:has(.appeal-print-printable) .modal-backdrop,
  body:has(.appeal-print-printable) .content-area > *:not(.appeal-print-printable):not(:has(.appeal-print-printable)) {
    display: none !important;
  }
  .appeal-print-printable {
    padding: 10mm 16mm;
  }
  .appeal-print-printable .ap-header,
  .appeal-print-printable .ap-summary,
  .appeal-print-printable .ap-table tbody tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ===== Application Download view (download-application.jsx) =====
   window.print() (the Print/"Download as PDF" button) should render only
   .application-printable's contents — the app number/status header plus
   Office/Applicant/RTI Details — with AppLayout's chrome (identity strip,
   header, sidebar, footer) and the button itself (.no-print) left out.
   Deliberately NOT the .receipt-printable "hide everything, then re-show
   just this element" trick above: that combination (visibility:hidden on
   every element under body, undone via .application-printable * matching
   several NESTED .page-cards several levels deep, then position:absolute
   floating the whole thing to the page origin) produced a blank print
   preview here — position:absolute pulls the content out of flow entirely,
   and depends on nothing upstream collapsing its containing block, which
   is exactly the kind of thing multiple nested cards (vs. .receipt-
   printable's single flat card) can go wrong in. Hiding the chrome by name
   instead and leaving .application-printable's own content in normal
   document flow sidesteps all of that — nothing needs repositioning. */
@media print {
  body:has(.application-printable) .identity-strip,
  body:has(.application-printable) .site-header,
  body:has(.application-printable) .sidebar,
  body:has(.application-printable) .site-footer {
    display: none !important;
  }
}

/* A .page-card that doesn't fit in the remaining space on a print page
   gets cut mid-box by default — its border/shadow/rounded corners just
   continue onto the next page, leaving a mostly-empty card at the bottom
   of one page and the rest of its content stranded at the top of the
   next (seen on download-application.jsx's RTI Details card, tall enough
   with a long RTI application/reply text to overflow one page). Keeping
   each card as one unbroken block instead — pushed whole onto the next
   page rather than split — avoids that; not scoped to .application-
   printable specifically since any printed .page-card (receipt included)
   can suffer the same split. */
@media print {
  .page-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ===== Malayalam virtual keyboard (malayalam-keyboard.jsx) =====
   A single CSS grid (not per-category flex-wrap) so every row lines up in
   clean columns regardless of how long each character group is — flat,
   lightly-bordered keycaps rather than a raised 3D bump. */
.malayalam-keyboard {
  border: 1px dashed #ced4da;
  border-radius: 10px;
  background: #fff;
  padding: 1rem;
}

.mk-title {
  font-family: "Rachana", "Meera", "Noto Sans Malayalam", sans-serif;
  font-weight: 700;
  color: var(--ksrtc-green);
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.key-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.4rem, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.malayalam-key {
  font-family: "Rachana", "Meera", "Noto Sans Malayalam", sans-serif;
  font-size: 1rem;
  height: 2.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 0 0.3rem;
  color: #212529;
  cursor: pointer;
}
.malayalam-key:hover {
  background: #eaf3ee;
  border-color: var(--ksrtc-green);
  color: var(--ksrtc-green);
}
.malayalam-key:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* Backspace is the last cell of the grid — a distinct light-grey key
   rather than plain white, so it reads as a different kind of key. */
.mk-backspace {
  background: #e9ecef;
}
.mk-backspace:hover {
  background: #eaf3ee;
}

/* Space spans the full width below the grid, tinted with the same light
   green used for disabled/read-only fields elsewhere in the app. */
.mk-space {
  width: 100%;
  height: 2.3rem;
  background: #eaf3ee;
  border: 1px solid var(--ksrtc-green);
  border-radius: 8px;
  color: var(--ksrtc-green);
  font-weight: 600;
}
.mk-space:hover {
  background: #ddeee3;
}
.mk-space:active {
  transform: translateY(1px);
}

/* ===== RTI Application rich text editor (apply-rti.jsx, react-quill-new) =====
   Restyled to read as a Bootstrap form-control (border/radius/focus ring)
   rather than Quill's default look, so it sits visually consistent with
   the rest of the form. */
.rti-quill {
  /* Anchors .manglish-suggestions below, which is positioned absolutely
     against this wrapper rather than the viewport. */
  position: relative;
}
.rti-quill .ql-toolbar.ql-snow {
  border: 1px solid #ced4da;
  border-bottom: none;
  border-radius: 0.375rem 0.375rem 0 0;
  background: #f7f6f2;
}
.rti-quill .ql-container.ql-snow {
  border: 1px solid #ced4da;
  border-radius: 0 0 0.375rem 0.375rem;
  font-size: 1rem;
  /* Quill's own stylesheet sets an explicit font-family on .ql-container
     (Helvetica/Arial/sans-serif, no Malayalam coverage) — an explicit rule,
     so it wins over the .lang-any stack on the wrapper div even though that
     wrapper is meant to cover this. Re-declared here so Malayalam typed
     inside the editor still renders in Rachana/Meera, not the OS default. */
  font-family: "Public Sans", "Rachana", "Meera", "Noto Sans Malayalam", sans-serif;
}
.rti-quill .ql-editor {
  min-height: 8rem;
}
.rti-quill.is-invalid .ql-toolbar.ql-snow,
.rti-quill.is-invalid .ql-container.ql-snow {
  border-color: #dc3545;
}
.rti-quill:focus-within .ql-toolbar.ql-snow,
.rti-quill:focus-within .ql-container.ql-snow {
  border-color: var(--ksrtc-green);
  box-shadow: none;
}

/* Font picker (toolbar's [{ font: RTI_FONT_OPTIONS }] control, apply-rti.jsx)
   — only makes sense for the Malayalam text manglish mode produces, so it's
   always in the DOM but hidden until .manglish-active is toggled onto the
   wrapper. Quill renders each dropdown item's visible text via a ::before
   {content} rule keyed off [data-value] (see quill.snow.css's own
   serif/monospace entries) — without one of these per value, the item is
   just blank, so both need an explicit rule even though the value text and
   the label text happen to match here. Each is also given its own
   font-family so the option previews in the face it names, same as Quill's
   built-in Serif/Monospace entries do. */
.rti-quill .ql-toolbar .ql-picker.ql-font {
  display: none;
}
.rti-quill.manglish-active .ql-toolbar .ql-picker.ql-font {
  display: inline-block;
}
.rti-quill .ql-picker.ql-font .ql-picker-label[data-value="Rachana"]::before,
.rti-quill .ql-picker.ql-font .ql-picker-item[data-value="Rachana"]::before {
  content: "Rachana";
}
.rti-quill .ql-picker.ql-font .ql-picker-label[data-value="Meera"]::before,
.rti-quill .ql-picker.ql-font .ql-picker-item[data-value="Meera"]::before {
  content: "Meera";
}
.rti-quill .ql-picker.ql-font .ql-picker-item[data-value="Rachana"] {
  font-family: "Rachana", "Noto Sans Malayalam", sans-serif;
}
.rti-quill .ql-picker.ql-font .ql-picker-item[data-value="Meera"] {
  font-family: "Meera", "Noto Sans Malayalam", sans-serif;
}

/* Manglish suggestions dropdown (apply-rti.jsx) — appears right under the
   word manglish auto-convert just replaced, offering the other candidate
   readings Google's transliteration returned so the applicant can swap the
   auto-inserted top guess for the correct word. Positioned absolutely
   against .rti-quill (position: relative above) using coordinates computed
   from Quill's own getBounds(). */
.manglish-suggestions {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 22rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--ksrtc-green);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.manglish-suggestion {
  font-family: "Rachana", "Meera", "Noto Sans Malayalam", sans-serif;
  font-size: 1rem;
  padding: 0.25rem 0.6rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #212529;
  cursor: pointer;
}
.manglish-suggestion:hover {
  background: #eaf3ee;
  border-color: var(--ksrtc-green);
  color: var(--ksrtc-green);
}
/* The candidate currently sitting in the editor (auto-inserted top guess),
   so the applicant can tell at a glance what they'd be keeping vs. changing. */
.manglish-suggestion.active {
  background: #eaf3ee;
  border-color: var(--ksrtc-green);
  color: var(--ksrtc-green);
  font-weight: 600;
}

/* Printing (view-application.jsx / window.print()) shows the submitted
   text itself, not the editing chrome around it. */
@media print {
  .ql-toolbar {
    display: none !important;
  }
}

/* Bootstrap centers .btn label text via line-height/padding tuned for a
   standard system font — this app's custom webfont stack ("Public Sans"
   first, see body's font-family above) has different vertical metrics, so
   that math falls short and label text sits visibly high in every button
   app-wide (Preview/Save as Draft/Cancel, Login, etc.) instead of
   centered. Flexing the button's own content directly sidesteps the
   font-metric mismatch entirely, and also fixes the equivalent
   icon+text vertical misalignment on buttons/links that have both
   (e.g. "← Back to Dashboard").
   That flex fix alone still left labels reading as slightly high, though:
   Bootstrap's default line-height (1.5) reserves descender space below the
   baseline that plain flex centering can't see — it centers the line BOX,
   not the glyph ink inside it, so a line-height much taller than the text
   itself still visually skews the letters upward within that box. Verified
   in Chrome DevTools against the live Login button: at line-height 1.5 the
   rendered "Login" sits well above center; dropping it to 1 (tightest
   legible box, no wasted reserved descender space) brings it in line with
   center across every font-size this app uses .btn at. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ===== Primary action button =====
   Color differs by page (login/register/profile use brand green,
   dashboard and the applicant-facing service pages use the accent
   orange), so the color is scoped per page instead of a single global
   rule that would fight itself across pages. */
.btn-ksrtc {
  color: #fff;
}
.page-login .btn-ksrtc,
.page-register .btn-ksrtc,
.page-profile .btn-ksrtc {
  background: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
}
.page-login .btn-ksrtc:hover, .page-login .btn-ksrtc:focus,
.page-register .btn-ksrtc:hover, .page-register .btn-ksrtc:focus,
.page-profile .btn-ksrtc:hover, .page-profile .btn-ksrtc:focus {
  background: var(--ksrtc-green-dark);
  border-color: var(--ksrtc-green-dark);
  color: #fff;
}
.page-dashboard .btn-ksrtc,
.page-apply-rti .btn-ksrtc, .page-track-application .btn-ksrtc, .page-view-application .btn-ksrtc,
.page-first-appeal .btn-ksrtc, .page-rti-replies .btn-ksrtc, .page-payments .btn-ksrtc,
.page-user-manual .btn-ksrtc {
  background: var(--ksrtc-orange);
  border-color: var(--ksrtc-orange);
}
.page-dashboard .btn-ksrtc:hover, .page-dashboard .btn-ksrtc:focus,
.page-apply-rti .btn-ksrtc:hover, .page-apply-rti .btn-ksrtc:focus,
.page-track-application .btn-ksrtc:hover, .page-track-application .btn-ksrtc:focus,
.page-view-application .btn-ksrtc:hover, .page-view-application .btn-ksrtc:focus,
.page-first-appeal .btn-ksrtc:hover, .page-first-appeal .btn-ksrtc:focus,
.page-rti-replies .btn-ksrtc:hover, .page-rti-replies .btn-ksrtc:focus,
.page-payments .btn-ksrtc:hover, .page-payments .btn-ksrtc:focus,
.page-user-manual .btn-ksrtc:hover, .page-user-manual .btn-ksrtc:focus {
  background: var(--ksrtc-orange-dark);
  border-color: var(--ksrtc-orange-dark);
  color: #fff;
}
.btn-ksrtc-outline {
  border: 2px solid var(--ksrtc-green);
  color: var(--ksrtc-green);
  background: transparent;
}
.btn-ksrtc-outline:hover {
  background: var(--ksrtc-green);
  color: #fff;
}

/* Solid-green variant of .btn-ksrtc for buttons that should always be
   brand-green regardless of which page-scoped color (orange/green) the
   plain .btn-ksrtc class would otherwise resolve to on that page — e.g.
   Apply RTI's Preview button, which sits next to other .btn-ksrtc buttons
   on the same page that are meant to stay orange. */
.btn-ksrtc-green {
  background: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
  color: #fff;
}
.btn-ksrtc-green:hover, .btn-ksrtc-green:focus {
  background: var(--ksrtc-green-dark);
  border-color: var(--ksrtc-green-dark);
  color: #fff;
}

/* ===== Form control focus & checked states =====
   Bootstrap's defaults are blue; overridden globally to the KSRTC brand
   green so radio/checkbox selections and the focus outline match the rest
   of the app. Border only, no glow/shadow ring. */
.form-check-input:checked {
  background-color: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
}
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--ksrtc-green);
  box-shadow: none;
}
/* Login/Register fields and dropdowns keep the green border at rest too,
   not just on focus — everywhere else in the app still shows Bootstrap's
   default grey border until focused. */
.page-login .form-control, .page-login .form-select,
.page-register .form-control, .page-register .form-select {
  border-color: var(--ksrtc-green);
}

/* ===== Custom dropdown (components/custom-select.jsx) =====
   Not a native <select>/<option> — see that component's own comment for
   why (a Chromium bug makes a styled native <option> render at several
   times normal height; plain <div>/<li> elements aren't subject to it).
   .custom-select-trigger reuses .form-select for an identical closed-state
   look (border, padding, font, the same caret background-image) — that
   class doesn't care whether it's on a <select> or a <button>. The
   dropdown-menu-style popup below it and its hover/selected colors are
   plain CSS on ordinary elements, so — unlike the native version — every
   part of this can safely be app green without breaking anything. */
.custom-select {
  position: relative;
}
.custom-select-trigger {
  width: 100%;
  text-align: left;
  background-color: #fff;
}
.custom-select-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  /* No `right: 0` (that stretched this edge-to-edge with the trigger,
     same width as the field itself) and no min-width — width: max-content
     sizes the popup to its longest option's own text instead, same as a
     native <select>'s popup normally does. max-width caps it from ever
     overflowing past the trigger's right edge for a long label. */
  width: max-content;
  max-width: 100%;
  z-index: 1000;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  max-height: 15rem;
  overflow-y: auto;
}
.custom-select-option {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
/* Hover: light green preview (same shade as .action-btn.c-green's own
   hover elsewhere in the app, for consistency) with dark green text for
   contrast on the lighter background. Selected (.active, whether or not
   it's also currently hovered): the stronger brand green with white
   text — kept visually distinct from a plain hover so "this is the
   current value" doesn't look identical to "you're just pointing at
   this". */
.custom-select-option:hover,
.custom-select-option:focus {
  background-color: #9ed6b3;
  color: var(--ksrtc-green-dark);
  outline: none;
}
.custom-select-option.active {
  background-color: var(--ksrtc-green);
  color: #fff;
  outline: none;
}

/* ===== Outline-green toggle buttons =====
   Manglish/Malayalam Keyboard toggles (apply-rti.jsx) and the header's
   EN/ML language toggle. Green border, white background, black text at
   rest; fills solid green with white text on hover/focus, and stays that
   way via .active while toggled on/currently selected. */
.btn-ksrtc-toggle {
  border: 1px solid var(--ksrtc-green);
  background: #fff;
  color: #000;
}
.btn-ksrtc-toggle:hover,
.btn-ksrtc-toggle:focus,
.btn-ksrtc-toggle.active {
  background: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
  color: #fff;
}

/* Header profile avatar circle — green fill + white initials on hover,
   overriding the inline color/border-color it's given by default. */
.header-avatar:hover {
  background-color: var(--ksrtc-green) !important;
  color: #fff !important;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ksrtc-green-dark);
  color: #e7efe9;
  font-size: 0.85rem;
}
.site-footer h6 {
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.site-footer a { color: #cfe3d6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .social-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; margin-right: 0.4rem;
}
.site-footer .bottom-bar {
  background: #0f2c19;
  font-size: 0.78rem;
  padding: 0.6rem 0;
}

/* ===== Auth card =====
   Shared box styling; max-width differs by page (login is a narrower
   sign-in form, register has more fields), so it's scoped per page. */
.auth-card {
  margin: 2.5rem auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.10);
  padding: 2rem 1.75rem;
}
.page-login .auth-card { max-width: 420px; }
.page-register .auth-card { max-width: 520px; }
@media (max-width: 480px) {
  .auth-card { box-shadow: none; border: 1px solid #e6e6e6; margin: 1rem; padding: 1.5rem 1.25rem; }
}

/* ===== Login page (pages/login.jsx's LoginShell) =====
   Full-page photo background with the shared identity strip + header on
   top (header made transparent here), an intro panel beside the card, and
   the shared site footer. Everything is scoped to .login-page. The white gradient
   on the left keeps the intro text readable over the photo. */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #17382b;
}

/* Background photo (components/login-shell.jsx — login, register, forgot
   password): on .login-hero (everything above the footer), or with
   fixedPhoto (register) on .login-page--fixed::before, a window-sized
   layer. Same sizing either way, so the photo looks the same on all three
   at any screen size or browser zoom.
   The WHOLE photo always shows: it's scaled to the area's width and sits
   at the bottom of it, never cropped at the sides (so the lake and the
   bus are both visible at any screen width). Any space above it is filled
   with a sky gradient matching the photo's own top edge (pale blue on the
   left to deeper blue on the right), so there's no visible join. On a
   wide, short area the photo's top (sky) is what gets trimmed instead. */
.login-hero,
.login-page--fixed::before {
  --photo-sky: linear-gradient(90deg, #b8d7ee 0%, #6fb5e6 50%, #4ca7e5 100%);
  /* White fade on the left (keeps the login intro text readable); the
     same on all three pages so they look identical. Narrow screens get an
     even wash instead — see the max-width: 1050px block below. */
  --photo-overlay: linear-gradient(90deg, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.6) 38%, rgba(255,255,255,0) 65%);
  background-image: var(--photo-overlay), var(--login-bg), var(--photo-sky);
  background-size: 100% 100%, 100% auto, 100% 100%;
  background-position: 0 0, center bottom, 0 0;
  background-repeat: no-repeat;
}
.login-hero {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
/* Header over the photo — login, register and forgot password alike:
   transparent, scrolls with the page instead of sticking over it. */
.login-page .identity-strip { padding: 0.55rem 0; font-size: 13px; }
.login-page .site-header.sticky-top {
  position: relative;
  background: transparent;
  border-bottom: 0;
}
.login-page .site-header > div { padding: 1.1rem 2rem !important; }
.login-page .site-header .brand-title { font-size: 22px; color: #075b3a; }
.login-page .site-header .brand-subtitle { font-size: 13px; color: #4f6a5d; }
.login-page .site-header img { width: 54px !important; height: 54px !important; }
.login-page .lang-toggle { background: #fff; border-radius: 8px; }

.login-main {
  flex: 1 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 80px;
  padding: 48px 4%;
}

/* Intro panel */
.login-intro { max-width: 530px; padding-right: 90px; }
.login-intro-line { width: 52px; height: 5px; border-radius: 8px; background: #58a97d; margin-bottom: 28px; }
.login-intro h2 {
  font-size: 43px;
  line-height: 1.08;
  font-weight: 700;
  color: #075b3a;
  margin: 0 0 20px;
  white-space: pre-line;
}
.login-intro > p { color: #4f6a5d; line-height: 1.7; font-size: 16px; margin: 0 0 30px; }
.login-feature { display: flex; align-items: center; gap: 16px; margin: 22px 0; }
.login-feature-icon {
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #e2f2e9; color: #12633f; font-size: 20px;
}
.login-feature strong { display: block; color: #12633f; font-size: 15px; margin-bottom: 4px; }
.login-feature span { color: #5d7469; font-size: 13px; }

/* Card */
.login-card {
  background: rgba(255,255,255,0.97);
  border-radius: 26px;
  width: 450px;
  flex: 0 0 auto;
  padding: 34px;
  box-shadow: 0 25px 70px rgba(0,42,25,0.25);
}
.login-title { text-align: center; font-size: 29px; font-weight: 700; color: #075b3a; margin: 0 0 8px; }
.login-sub { text-align: center; color: #6c8177; font-size: 14px; line-height: 1.6; margin: 0 0 30px; }

.login-group { margin-bottom: 20px; }
.login-group > label { display: block; font-size: 13px; font-weight: 700; color: #203d31; margin-bottom: 8px; }
.login-field { position: relative; }
.login-field-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: #12633f; z-index: 6; pointer-events: none;
}
.login-field .form-control {
  height: 43px;
  border: 1.5px solid #c7d8cf;
  border-radius: 10px !important;
  padding: 0 48px;
  font-size: 14px;
}
.login-field .form-control:focus { border-color: #12633f; box-shadow: 0 0 0 4px rgba(18,99,63,0.09); }
.login-field .form-control.is-invalid { border-color: #dc3545; background-position: right 44px center; }
/* PasswordField's own eye button, moved inside the input on the right. */
.login-field .input-group { position: relative; }
.login-field .input-group > .btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: #12633f; z-index: 6;
}
.login-field .input-group > .btn:hover,
.login-field .input-group > .btn:focus { background: transparent; color: #075b3a; }

.login-submit {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #12633f;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.login-submit:hover, .login-submit:focus, .login-submit:disabled { background: #075b3a; color: #fff; }
.login-forgot {
  display: block; text-align: center; margin-top: 25px;
  color: #12633f; font-size: 14px; font-weight: 600; text-decoration: none;
}
.login-forgot:hover { color: #075b3a; }
.login-register {
  text-align: center;
  border-top: 1px solid #e3ebe7;
  margin-top: 25px; padding-top: 22px;
  color: #687d73; font-size: 14px;
}
.login-register a { color: #12633f; font-weight: 700; text-decoration: none; }

/* The shared site footer (components/footer.jsx) — no top margin here so
   the photo runs straight down to it. */
.login-page .site-footer { margin-top: 0 !important; }
/* welcome.blade.php still has Laravel's default empty spacer
   (<div class="h-14.5 hidden lg:block">, 60px) after #root — it would
   leave a blank strip below the footer on these pages. */
body:has(.login-page) #root ~ .h-14\.5 { display: none; }

@media (max-width: 1280px) {
  .login-card { width: 400px; }
}
/* Tablet and phone: stack the card first and the intro below it, both
   centered; lighter overlay over the whole photo since text no longer
   sits only on the left. */
@media (max-width: 1050px) {
  .login-hero,
  .login-page--fixed::before {
    --photo-overlay: linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.7));
  }
  .login-main { flex-direction: column; align-items: center; gap: 35px; padding: 35px 5%; }
  .login-intro { order: 1; padding-right: 0; margin: 0 auto; }
  .login-card { width: min(510px, 100%); margin: 0 auto; }
}
@media (max-width: 650px) {
  .login-page .identity-strip { font-size: 11px; }
  .login-page .site-header > div { padding: 0.75rem 1rem !important; }
  .login-page .site-header .brand-title { font-size: 17px; }
  .login-page .site-header img { width: 44px !important; height: 44px !important; }
  .login-main { padding: 25px 16px; }
  .login-intro { padding: 10px 9px; }
  .login-intro h2 { font-size: 32px; }
  .login-card { padding: 32px 24px; }
}
/* Short screens (e.g. a laptop with 125–150% Windows display scaling):
   tighter vertical spacing so the whole login form fits on screen with
   less scrolling. Sizes from the design are kept on taller screens. */
@media (min-width: 1051px) and (max-height: 820px) {
  .login-page .identity-strip { padding: 0.35rem 0; }
  .login-page .site-header > div { padding: 0.6rem 2rem !important; }
  .login-page .site-header img { width: 46px !important; height: 46px !important; }
  .login-main { padding: 20px 4%; align-items: center; }
  .login-intro-line { margin-bottom: 18px; }
  .login-intro h2 { font-size: 36px; margin-bottom: 14px; }
  .login-intro > p { font-size: 15px; margin-bottom: 18px; }
  .login-feature { margin: 14px 0; }
  .login-card { padding: 24px 30px; }
  .login-title { font-size: 25px; margin-bottom: 4px; }
  .login-sub { margin-bottom: 16px; }
  .login-group { margin-bottom: 12px; }
  .login-group > label { margin-bottom: 5px; }
  .login-field .form-control { height: 40px; }
  .login-forgot { margin-top: 14px; }
  .login-register { margin-top: 14px; padding-top: 12px; }
}
/* ===== LoginShell variants (register / forgot password) =====
   The whole photo shows in the area above the footer: at least as tall as
   the photo's own proportions, so a short card (forgot password) doesn't
   leave only a thin strip of it. */
.login-hero { min-height: calc(100vw * 749 / 1600); }
/* fixedPhoto (register): the form is far taller than the photo, so the
   photo is a window-sized layer that stays put while the form scrolls over
   it — the area above the footer itself stays clear. */
.login-page--fixed .login-hero { background: none; min-height: 0; }
/* Intro stays at the top beside the tall form (the short-screen rule
   would otherwise centre it halfway down the form), with the same gap
   below the header as the login page's content has. */
.login-page--fixed .login-main { align-items: flex-start !important; padding-top: 48px; }
/* Side-by-side layout only: start the intro text a little lower than the
   card, about where the login page's own intro sits. */
@media (min-width: 1051px) {
  .login-page--fixed .login-intro { margin-top: 64px; }
}
.login-page--fixed::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
}
/* wideCard (register): room for its two-column field rows. */
.login-card--wide { width: 520px; }
@media (max-width: 1280px) {
  .login-card--wide { width: 470px; }
}
@media (max-width: 1050px) {
  .login-card--wide { width: min(560px, 100%); }
}
/* Register's reCAPTCHA (the div right after its CAPTCHA label) — shrunk
   on small phones like the login page's own (.login-captcha below). */
@media (max-width: 400px) {
  .login-card #captcha > label + div { transform: scale(0.88); transform-origin: 0 0; height: 69px; }
}

/* The reCAPTCHA is a fixed 304px — shrink it where the card is narrower. */
@media (max-width: 400px) {
  .login-card { padding: 28px 16px; }
  .login-captcha { transform: scale(0.88); transform-origin: 0 0; height: 69px; }
}

/* ===== register.html: password policy checklist ===== */
.policy-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
}
.policy-list li {
  color: #999;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.1rem 0;
}
.policy-list li.ok { color: var(--ksrtc-green); }
.policy-list li i { font-size: 0.85rem; }

/* ===== register.html: multi-step view switching ===== */
.view { display: none; }
.view.active { display: block; }

.pending-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #eaf3ee;
  color: var(--ksrtc-green);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
}

/* ==== My profile ==== */
.page-profile .btn-ksrtc {
  background: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
}
/* ===== dashboard.html: sidebar navigation ===== */
.sidebar {
  width: var(--sidebar-width);
  background: #fff;
  border-right: 1px solid #e6e6e6;
  min-height: calc(100vh - 132px);
}
.sidebar .nav-link, .offcanvas-body .nav-link {
  color: #333;
  font-size: 0.92rem;
  padding: 0.65rem 1.1rem;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 0;
  white-space: nowrap;
}
.sidebar .nav-link i, .offcanvas-body .nav-link i { font-size: 1.05rem; color: #6b6b6b; }
.sidebar .nav-link:hover, .offcanvas-body .nav-link:hover {
  background: #d6ecdf;
  color: var(--ksrtc-green);
}
.sidebar .nav-link.active, .offcanvas-body .nav-link.active {
  background: #eaf3ee;
  color: var(--ksrtc-green);
  border-left-color: var(--ksrtc-orange);
  font-weight: 600;
}
.sidebar .nav-link.active i, .offcanvas-body .nav-link.active i { color: var(--ksrtc-green); }
.sidebar .nav-section-label, .offcanvas-body .nav-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #999;
  padding: 0.9rem 1.1rem 0.35rem;
}

.content-area {
  flex: 1;
  min-width: 0;
  padding: 1.75rem;
}

.page-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 1.5rem;
}

/* view-application.html: keep the tab row on one line; scroll instead of
   wrapping when it doesn't fit (e.g. at larger font sizes). */
#appTabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}
#appTabs .nav-link {
  white-space: nowrap;
  color: #555;
}
#appTabs .nav-link:hover,
#appTabs .nav-link:focus {
  color: var(--ksrtc-green);
}
#appTabs .nav-link.active {
  color: var(--ksrtc-green);
  font-weight: 600;
  background: #eaf3ee;
  border-color: #eaf3ee #eaf3ee var(--ksrtc-green);
  border-bottom: 2px solid var(--ksrtc-green);
}

.ksrtc-timeline {
  list-style: none; margin: 0; padding: 0;
  border-left: 3px solid var(--ksrtc-orange);
}
.ksrtc-timeline li {
  position: relative;
  padding: 0.15rem 0 1.25rem 1.5rem;
}
.ksrtc-timeline li::before {
  content: "";
  position: absolute; left: -9px; top: 0.3rem;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--ksrtc-green);
  border: 2px solid #fff;
}

/* ===== dashboard.html: stat cards ===== */
.clock-card {
  background: #f2f7f4;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  text-align: center;
  height: 100%;
}
.clock-card .value { font-size: 1.6rem; font-weight: 700; color: var(--ksrtc-green); line-height: 1.2; }
.clock-card .label { font-size: 0.75rem; color: #666; margin-top: 0.2rem; }

/* Alternating stat-card colors so each figure reads distinctly at a glance */
.clock-card.c-green { background: #e3f0e8; }
.clock-card.c-green .value { color: #2d6a4f; }
.clock-card.c-gold { background: #faf1d9; }
.clock-card.c-gold .value { color: #b7791f; }
.clock-card.c-gray { background: #e7e9f2; }
.clock-card.c-gray .value { color: #3e4c78; }
.clock-card.c-orange { background: #fbe3d7; }
.clock-card.c-orange .value { color: #c1441f; }
.clock-card.c-rose { background: #fbe2ea; }
.clock-card.c-rose .value { color: #9c2c54; }
.clock-card.c-teal { background: #dceef0; }
.clock-card.c-teal .value { color: #1d6b74; }
.clock-card.c-purple { background: #e7e1f5; }
.clock-card.c-purple .value { color: #5b3a9c; }

/* ===== dashboard.html: quick actions ===== */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  background: #fff;
  color: #333;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}
.action-btn i { font-size: 1.4rem; color: var(--ksrtc-green); }
.action-btn:hover {
  border-color: var(--ksrtc-green);
  background: #f2f7f4;
  color: var(--ksrtc-green);
}
/* Alternating quick-action colors: green and white only */
.action-btn.c-green { background: #b7e2c7; border-color: #8fd1a8; }
.action-btn.c-green i { color: var(--ksrtc-green-dark); }
.action-btn.c-green:hover { background: #9ed6b3; border-color: var(--ksrtc-green); color: var(--ksrtc-green-dark); }

.action-btn.c-white { background: #fff; border-color: #e6e6e6; }
.action-btn.c-white i { color: var(--ksrtc-green); }
.action-btn.c-white:hover { background: #f2f7f4; border-color: var(--ksrtc-green); color: var(--ksrtc-green); }

/* ===== Table pagination (replies, appeal, payments, etc.) ===== */
.pagination .page-link {
  color: var(--ksrtc-green);
}
.pagination .page-link:hover {
  color: var(--ksrtc-green-dark);
  background: #f2f7f4;
}
.pagination .page-item.active .page-link {
  background: var(--ksrtc-green);
  border-color: var(--ksrtc-green);
  color: #fff;
}
.pagination .page-item.disabled .page-link {
  color: #adb5bd;
}

/* ===== Table header + green/white row striping (applies to every data table) ===== */
.content-area .table thead.table-light th {
  background-color: #3f8f61;
  color: #fff;
  border-color: var(--ksrtc-green-dark);
  text-align: center;
  vertical-align: middle;
}
.content-area .table tbody tr:nth-child(odd) > td {
  background-color: #fff;
}
.content-area .table tbody tr:nth-child(even) > td {
  background-color: #f2f7f4;
}
.content-area .table tbody tr > td {
  transition: background-color 0.15s ease;
}
.content-area .table tbody tr:hover > td {
  background-color: #d6ecdf;
}

/* ===== Entrance + hover animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-card {
  animation: fadeInUp 0.4s ease both;
}

.clock-card {
  animation: fadeInUp 0.4s ease both;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.clock-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.row.g-3 > *:nth-child(1) .clock-card { animation-delay: 0.02s; }
.row.g-3 > *:nth-child(2) .clock-card { animation-delay: 0.08s; }
.row.g-3 > *:nth-child(3) .clock-card { animation-delay: 0.14s; }
.row.g-3 > *:nth-child(4) .clock-card { animation-delay: 0.20s; }
.row.g-3 > *:nth-child(5) .clock-card { animation-delay: 0.26s; }
.row.g-3 > *:nth-child(6) .clock-card { animation-delay: 0.32s; }
.row.g-3 > *:nth-child(7) .clock-card { animation-delay: 0.38s; }

.action-btn {
  animation: fadeInUp 0.4s ease both;
  transition: all 0.15s ease, transform 0.18s ease;
}
.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.action-grid > .action-btn:nth-child(1) { animation-delay: 0.02s; }
.action-grid > .action-btn:nth-child(2) { animation-delay: 0.08s; }
.action-grid > .action-btn:nth-child(3) { animation-delay: 0.14s; }
.action-grid > .action-btn:nth-child(4) { animation-delay: 0.20s; }

@media (prefers-reduced-motion: reduce) {
  .page-card, .clock-card, .action-btn {
    animation: none;
  }
  .clock-card, .action-btn, .content-area .table tbody tr > td {
    transition: none;
  }
}

@media (max-width: 767.98px) {
  .content-area { padding: 1rem; }
}
