/*
 * GovConnect citizen UI - shared design tokens and components.
 *
 * Direction A "Civic navy" (approved 2026-09-21, see
 * data/govconnect-web-ui-redesign/report.md in firstmate): the landing page's
 * identity (gov navy, gold primary action, coat of arms) executed with the
 * calm register the rebuilt my-appointments page established (one neutral
 * ramp, 1px hairlines, tinted status pills, no decorative animation).
 *
 * Token forks resolved here, deliberately:
 *   - navy trio = booking.css's #003B5C / #005580 / #002940 (index.html's
 *     divergent #0a5278 / #002840 lose);
 *   - the gold gradient's second stop #FF9800 becomes a named token;
 *   - ONE neutral ramp (my-appointments' quiet grays) instead of the three
 *     coexisting ramps (Material in booking.css, Tailwind in index.html,
 *     flat-UI in appointment-feedback).
 *
 * Loaded site-wide after booking.css via hooks.web_include_css. Everything is
 * namespaced gc- so legacy page styles keep working while pages migrate.
 */

:root {
    --gc-navy: #003B5C;
    --gc-navy-light: #005580;
    --gc-navy-dark: #002940;
    --gc-gold: #FFB81C;
    --gc-gold-deep: #FF9800;
    --gc-flag-red: #C8102E;

    --gc-ink: #171717;
    --gc-ink-2: #383838;
    --gc-body: #525252;
    --gc-muted: #737373;
    --gc-faint: #8C8C8C;
    --gc-hairline: #E3E3E3;
    --gc-hairline-2: #F0F0F0;
    --gc-surface: #FFFFFF;
    --gc-canvas: #FAFAFA;
    --gc-tint: #F8F8F8;

    --gc-success: #16794C;
    --gc-success-bg: #E4F5E9;
    --gc-danger: #B52A2A;
    --gc-danger-strong: #8A2A2A;
    --gc-danger-bg: #FDECEC;
    --gc-danger-border: #E3C6C6;
    --gc-warn: #8A5A18;
    --gc-warn-bg: #FBF0DC;
    --gc-info: #17415C;
    --gc-info-bg: #EAF3F8;
    --gc-info-border: #BBD9EE;

    --gc-radius: 8px;
    --gc-radius-lg: 12px;
    --gc-shadow-sm: 0 1px 2px rgba(0, 0, 0, .03);
    --gc-shadow-lg: 0 10px 30px rgba(0, 0, 0, .12);
}

/* ---------------------------------------------------------------- buttons */

.gc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--gc-radius);
    border: 1px solid transparent;
    padding: 11px 18px;
    min-height: 44px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .14s ease, border-color .14s ease, color .14s ease,
        transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

/* A restrained press affordance on the solid buttons the citizen taps most: a 1px
   lift and a soft shadow on hover, settling on press. Transform/shadow only, so
   nothing reflows. Disabled buttons stay put. */
.gc-btn:hover,
.gc-btn:focus {
    text-decoration: none;
}

.gc-btn:not([disabled]):not([aria-disabled="true"]):hover {
    transform: translateY(-1px);
    box-shadow: var(--gc-shadow-sm);
}

.gc-btn:not([disabled]):not([aria-disabled="true"]):active {
    transform: translateY(0);
    box-shadow: none;
}

.gc-btn svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.gc-btn-primary {
    background: linear-gradient(135deg, var(--gc-gold) 0%, var(--gc-gold-deep) 100%);
    color: var(--gc-navy-dark);
}

.gc-btn-primary:hover,
.gc-btn-primary:focus {
    filter: brightness(1.04);
    color: var(--gc-navy-dark);
}

.gc-btn-navy {
    background: var(--gc-navy);
    color: #fff;
}

.gc-btn-navy:hover,
.gc-btn-navy:focus {
    background: var(--gc-navy-light);
    color: #fff;
}

.gc-btn-outline {
    background: var(--gc-surface);
    color: var(--gc-ink-2);
    border-color: var(--gc-hairline);
}

.gc-btn-outline:hover,
.gc-btn-outline:focus {
    color: var(--gc-ink);
    border-color: #C9C9C9;
}

.gc-btn-danger {
    background: var(--gc-danger);
    color: #fff;
}

.gc-btn-danger:hover,
.gc-btn-danger:focus {
    background: var(--gc-danger-strong);
    color: #fff;
}

.gc-btn-quiet {
    background: none;
    border: none;
    padding: 0;
    min-height: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--gc-body);
    border-bottom: 1px solid var(--gc-hairline);
    border-radius: 0;
    cursor: pointer;
}

.gc-btn-quiet:hover,
.gc-btn-quiet:focus {
    color: var(--gc-ink);
}

.gc-btn-quiet.gc-danger {
    color: var(--gc-danger);
}

.gc-btn-quiet.gc-danger:hover {
    color: var(--gc-danger-strong);
}

.gc-btn[disabled],
.gc-btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    filter: none;
}

/* ------------------------------------------------------------------ cards */

.gc-card {
    background: var(--gc-surface);
    border: 1px solid var(--gc-hairline);
    border-radius: var(--gc-radius);
    box-shadow: var(--gc-shadow-sm);
    padding: 20px;
}

/* ----------------------------------------------------------- status pills */

.gc-pill {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 500;
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}

.gc-pill.gc-ok {
    background: var(--gc-success-bg);
    color: var(--gc-success);
}

.gc-pill.gc-done {
    background: #F3F3F3;
    color: var(--gc-body);
}

.gc-pill.gc-cxl {
    background: var(--gc-danger-bg);
    color: #BD3E3E;
}

.gc-pill.gc-warn {
    background: var(--gc-warn-bg);
    color: var(--gc-warn);
}

/* ----------------------------------------------------------------- alerts */

.gc-alert {
    border-radius: var(--gc-radius);
    padding: 12px 16px;
    font-size: 13.5px;
    border: 1px solid var(--gc-hairline);
    background: var(--gc-tint);
    color: var(--gc-ink-2);
}

.gc-alert a {
    font-weight: 600;
    text-decoration: underline;
    color: inherit;
}

.gc-alert-error {
    border-color: var(--gc-danger-border);
    background: var(--gc-danger-bg);
    color: var(--gc-danger-strong);
}

.gc-alert-info {
    border-color: var(--gc-info-border);
    background: var(--gc-info-bg);
    color: var(--gc-info);
}

.gc-alert-warn {
    border-color: #E8D5B5;
    background: var(--gc-warn-bg);
    color: var(--gc-warn);
}

.gc-alert-success {
    border-color: #BFE3CC;
    background: var(--gc-success-bg);
    color: var(--gc-success);
}

/* ---------------------------------------------------- conflict notice card */
/* The one-booking-per-service-per-day clash, shown at the top of the booking
   and reschedule forms as a proper notice card (not a bare error line or a
   transient toast): it names the clash - the server message carries service,
   date, time and the rule - and links straight to rescheduling or viewing the
   existing appointment, so the citizen is not left hunting. It stays until the
   citizen changes something; it is never auto-dismissed. */
.bw-conflict {
    display: flex;
    gap: 14px;
    margin: 0 0 18px;
    padding: 16px 18px;
    border-radius: var(--gc-radius-lg);
    background: #FFF7E8;
    border: 1px solid #F1D091;
    box-shadow: 0 6px 18px rgba(160, 120, 20, 0.10);
}

.bw-conflict[hidden] {
    display: none;
}

.bw-conflict-icon {
    flex: 0 0 auto;
    color: #B7791F;
}

.bw-conflict-icon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.bw-conflict-body {
    flex: 1 1 auto;
    min-width: 0;
}

.bw-conflict-title {
    margin: 0 0 4px;
    font-size: 15.5px;
    font-weight: 800;
    color: #7A5712;
}

.bw-conflict-msg {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #5F4A15;
}

.bw-conflict-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 480px) {
    .bw-conflict-actions .gc-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* ------------------------------------------------------------------ forms */

.gc-field {
    margin-bottom: 16px;
}

.gc-field > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gc-ink-2);
    margin-bottom: 6px;
}

.gc-field .gc-req {
    color: var(--gc-danger);
}

.gc-input,
select.gc-input,
textarea.gc-input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    font-size: 16px; /* never smaller: below 16px iOS zooms the page on focus */
    color: var(--gc-ink);
    background: var(--gc-surface);
    border: 1px solid var(--gc-hairline);
    border-radius: var(--gc-radius);
    transition: border-color .12s ease, box-shadow .12s ease;
}

textarea.gc-input {
    min-height: 84px;
    resize: vertical;
}

.gc-input:focus {
    outline: none;
    border-color: var(--gc-navy);
    box-shadow: 0 0 0 3px rgba(0, 59, 92, .12);
}

.gc-input[aria-invalid="true"] {
    border-color: var(--gc-danger);
}

.gc-help {
    font-size: 12.5px;
    color: var(--gc-faint);
    margin-top: 5px;
}

.gc-error-text {
    font-size: 12.5px;
    color: var(--gc-danger);
    margin-top: 5px;
}

/* --------------------------------------------------------------- stepper */

.gc-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin: 0 auto;
    max-width: 560px;
}

.gc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: none;
    width: 92px;
    text-align: center;
    /* Rendered as a <button> so completed steps can be clicked to go back. */
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: default;
}

/* Only a completed step invites a click; the current and unreached steps do not. */
.gc-step.bw-clickable {
    cursor: pointer;
}

.gc-step.bw-clickable:hover .gc-step-label {
    color: var(--gc-navy);
}

.gc-step.bw-clickable:hover .gc-step-circle {
    border-color: var(--gc-navy);
}

/* Settles on press, matching the cards, dates and slots. */
.gc-step.bw-clickable:active .gc-step-circle {
    transform: translateY(0);
}

.gc-step:focus-visible {
    outline: 3px solid var(--gc-gold);
    outline-offset: 3px;
    border-radius: 10px;
}

/* Not-yet-reached steps are inert (disabled attribute); keep them visibly muted. */
.gc-step[disabled] {
    cursor: default;
    opacity: 0.9;
}

.gc-step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--gc-hairline);
    background: var(--gc-surface);
    color: var(--gc-faint);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    /* The circle eases into its active navy/gold state as the citizen moves
       between steps, rather than snapping. */
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.gc-step.bw-clickable:hover .gc-step-circle {
    transform: translateY(-1px);
}

.gc-step-label {
    transition: color .2s ease;
}

.gc-step-circle svg {
    width: 16px;
    height: 16px;
    display: none;
}

.gc-step-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--gc-faint);
    line-height: 1.25;
}

.gc-step.active .gc-step-circle {
    border-color: var(--gc-navy);
    background: var(--gc-navy);
    color: var(--gc-gold);
}

.gc-step.active .gc-step-label {
    color: var(--gc-navy);
}

.gc-step.completed .gc-step-circle {
    border-color: var(--gc-success);
    background: var(--gc-success-bg);
    color: var(--gc-success);
}

.gc-step.completed .gc-step-circle .gc-step-num {
    display: none;
}

.gc-step.completed .gc-step-circle svg {
    display: block;
}

.gc-step-line {
    flex: 1;
    height: 2px;
    background: var(--gc-hairline);
    margin-top: 16px;
    min-width: 18px;
}

.gc-step-line.completed {
    background: var(--gc-success);
}

/* Five steps must fit a 390px phone: smaller circles, tighter columns. */
@media (max-width: 640px) {
    .gc-step {
        width: 56px;
    }

    .gc-step-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .gc-step-label {
        font-size: 9.5px;
    }

    .gc-step-line {
        min-width: 5px;
        margin-top: 13px;
    }
}

/* Text for assistive technology only (e.g. "opens in a new tab"). */
.gc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------- appointment QR */
/* The appointment QR (the bare reference code, as the mobile app encodes it):
   a white tile so it scans on any surface, scaled crisply from its viewBox. */
.gc-qr {
    display: block;
    width: 148px;
    height: 148px;
    padding: 0;
    background: #fff;
    border: 1px solid var(--gc-hairline);
    border-radius: var(--gc-radius);
    image-rendering: pixelated;
    flex: none;
}

.gc-qr[hidden] {
    display: none;
}

.gc-qr-caption {
    font-size: 12px;
    color: var(--gc-muted);
}

/* --------------------------------------------------------------- skeleton */

.gc-skeleton {
    background: linear-gradient(90deg, #F3F3F3 25%, #EBEBEB 50%, #F3F3F3 75%);
    background-size: 200% 100%;
    animation: gc-loading 1.5s infinite;
    border-radius: var(--gc-radius);
    height: 1rem;
    margin: .75rem 0;
}

@keyframes gc-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ------------------------------------------------------------ empty state */

.gc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 52px 24px;
    border: 1px solid var(--gc-hairline-2);
    border-radius: var(--gc-radius);
}

.gc-empty svg {
    width: 30px;
    height: 30px;
    color: #C4C4C4;
    margin-bottom: 14px;
}

.gc-empty .gc-et {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--gc-ink-2);
}

.gc-empty .gc-es {
    font-size: 13px;
    color: var(--gc-faint);
    margin-top: 5px;
    max-width: 340px;
}

/* ----------------------------------------------------------------- dialog */

.gc-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(23, 23, 23, .45);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    /* The backdrop fades in and the panel rises a touch as it opens - opacity and
       transform only, so nothing reflows. Exit is intentionally not animated (a
       booking dialog should dismiss the instant the citizen decides). */
    animation: gc-fade-in .16s ease-out;
}

.gc-dialog {
    background: var(--gc-surface);
    border-radius: var(--gc-radius-lg);
    box-shadow: var(--gc-shadow-lg);
    max-width: 460px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px;
    color: var(--gc-ink);
    animation: gc-rise-in .2s cubic-bezier(0.2, 0, 0, 1);
}

.gc-dialog h3 {
    margin: 0 0 8px;
    font-size: 16.5px;
    font-weight: 600;
    color: var(--gc-ink);
}

.gc-dialog .gc-dialog-body {
    font-size: 13.5px;
    color: var(--gc-body);
    line-height: 1.55;
}

.gc-dialog .gc-dialog-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.gc-radio-group {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gc-radio-group .gc-rg-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gc-ink-2);
    margin-bottom: 6px;
}

.gc-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--gc-radius);
    font-size: 13.5px;
    color: var(--gc-ink-2);
    cursor: pointer;
}

.gc-radio:hover {
    background: var(--gc-tint);
}

.gc-radio input {
    width: 16px;
    height: 16px;
    accent-color: var(--gc-navy);
    margin: 0;
    flex: none;
}

.gc-dialog textarea.gc-input {
    margin-top: 8px;
    font-size: 14px;
    min-height: 64px;
}

/* At phone width the dialog docks to the bottom, sheet-like. */
@media (max-width: 640px) {
    .gc-dialog-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .gc-dialog {
        max-width: none;
        border-radius: var(--gc-radius-lg) var(--gc-radius-lg) 0 0;
        padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    }
}

/* ----------------------------------------------------------------- toasts */

.gc-toast-region {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(400px, calc(100vw - 32px));
}

.gc-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--gc-ink);
    color: #fff;
    border-radius: var(--gc-radius);
    padding: 11px 14px;
    font-size: 13.5px;
    box-shadow: var(--gc-shadow-lg);
    animation: gc-toast-in .18s ease-out;
}

.gc-toast a {
    color: var(--gc-gold);
    font-weight: 600;
    text-decoration: underline;
}

.gc-toast.gc-toast-success {
    background: var(--gc-success);
}

.gc-toast.gc-toast-error {
    background: var(--gc-danger);
}

.gc-toast .gc-toast-x {
    background: none;
    border: none;
    color: inherit;
    opacity: .8;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    font-size: 15px;
    line-height: 1;
    flex: none;
}

.gc-toast .gc-toast-x:hover {
    opacity: 1;
}

@keyframes gc-toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.gc-toast.gc-toast-out {
    animation: gc-toast-out .16s ease-in forwards;
}

@keyframes gc-toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-6px); }
}

/* Shared entry motions (opacity + transform only). Used by the dialog, the
   calendar loading banner, the inline hold indicator and the wizard steps. */
@keyframes gc-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gc-rise-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------ page header */

.gc-page-head {
    margin-bottom: 6px;
}

.gc-page-head h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.015em;
    line-height: 1.25;
    margin: 0;
    color: var(--gc-ink);
}

.gc-page-head .gc-sub {
    font-size: 13.5px;
    color: var(--gc-muted);
    margin-top: 4px;
}

/* ------------------------------------------------------- focus visibility */

.gc-btn:focus-visible,
.gc-input:focus-visible,
.gc-radio input:focus-visible,
.gc-btn-quiet:focus-visible,
a.gc-focusable:focus-visible {
    outline: 3px solid var(--gc-gold);
    outline-offset: 2px;
}

/* --------------------------------------------------------- reduced motion */

/* A citizen who has asked their system for less motion gets the identical UI with
   every transition and animation collapsed to effectively instant - final states
   still apply (fill-mode/end keyframe), so nothing is left half-animated, hidden,
   or spinning. This one reset governs the shared layer and both page bundles;
   page styles do not re-enable motion because it wins with !important. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------- navbar band */
/* Citizen pages share Frappe's website navbar. Style it as a distinct navy
   identity band (matching the landing's hero) with a defined bottom edge, so it
   reads as its own surface rather than blending into the white page. */
.navbar {
    background: var(--gc-navy);
    position: sticky;
    top: 0;
    z-index: 200;
    padding: 10px 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.10), 0 3px 10px rgba(0, 0, 0, 0.14);
}

/* The brand is a one-row lockup: crest and wordmark side by side. Frappe's navbar
   falls back to `<span>{{ brand_html hook }}</span>` when Website Settings has no
   brand, wrapping the hook's crest+wordmark in an extra inline <span>. So make
   BOTH the brand link AND that wrapper span the flex row - whichever directly
   holds the two items lines them up on one line. */
.navbar .navbar-brand,
.navbar .navbar-brand > span {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 12px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    padding-top: 0;
    padding-bottom: 0;
}

.navbar .navbar-brand:hover,
.navbar .navbar-brand:focus {
    text-decoration: none;
    color: #fff;
}

.navbar .navbar-brand .gc-nav-logo {
    height: 40px;
    width: auto;
    /* Frappe's base navbar caps .navbar-brand img at max-height 22px / max-width
       150px; override so the larger crest is not clamped. inline-block so it
       never forces its own line even if a container is not a flex row. */
    max-height: 40px;
    max-width: none;
    display: inline-block;
    flex: none;
}

.navbar .navbar-brand .gc-nav-word {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1;
    flex: none;
}

/* At phone width the lockup stays on one line and a little larger than before,
   without crowding the menu button. */
@media (max-width: 480px) {
    .navbar .navbar-brand,
    .navbar .navbar-brand > span {
        gap: 9px;
    }
    .navbar .navbar-brand .gc-nav-logo {
        height: 34px;
        max-height: 34px;
    }
    .navbar .navbar-brand .gc-nav-word {
        font-size: 19px;
    }
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
    color: var(--gc-gold);
}

.navbar .navbar-brand:focus-visible,
.navbar .nav-link:focus-visible,
.navbar .navbar-toggler:focus-visible {
    outline: 3px solid var(--gc-gold);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Mobile menu button: legible on the navy band. */
.navbar .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #fff;
}

.navbar .navbar-toggler svg,
.navbar .navbar-toggler .icon {
    color: #fff;
    stroke: #fff;
    fill: none;
}

/* The account avatar stays visible against navy. */
.navbar .nav-avatar {
    padding: 2px 6px;
}

/* Dropdown (My Account / Log out) opens as a normal light surface. */
.navbar .dropdown-menu {
    border: 1px solid var(--gc-hairline);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    border-radius: 10px;
}

/* ----------------------------------------------------- page hero header */
/* A deliberate navy identity header for every citizen page: navy gradient,
   white title and subtitle, and room for the page's primary action. Gives each
   page a clear top and a shared rhythm. These headers only describe the current
   view, so they carry no gold left accent (captain's call) - the gold is
   reserved for actions, not for labelling the page. */
.gc-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gc-navy) 0%, var(--gc-navy-dark) 100%);
    border-radius: var(--gc-radius-lg);
    color: #fff;
    padding: 24px 26px;
    margin: 18px 0 24px;
    box-shadow: 0 12px 30px rgba(0, 41, 64, 0.22);
}

.gc-hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.gc-hero h1,
.gc-hero .gc-hero-title {
    margin: 0;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.2px;
    line-height: 1.15;
}

.gc-hero .gc-hero-sub {
    margin: 7px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14.5px;
    max-width: 60ch;
}

.gc-hero .gc-hero-actions {
    flex: none;
}

/* On a hero, the primary action reads on navy: keep the gold gradient. */
@media (max-width: 560px) {
    .gc-hero {
        padding: 20px 18px;
        margin: 14px 0 20px;
    }
    .gc-hero h1,
    .gc-hero .gc-hero-title {
        font-size: 22px;
    }
}

/* ------------------------------------------------------- section blocks */
/* Grouped sections read as designed components: a heading with a gold tick and
   a white surface, so related fields and information sit together. */
.gc-section {
    background: var(--gc-surface);
    border: 1px solid var(--gc-hairline);
    border-radius: var(--gc-radius-lg);
    box-shadow: var(--gc-shadow-sm);
    padding: 20px;
    margin-bottom: 18px;
}

.gc-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 700;
    color: var(--gc-navy);
    margin: 0 0 14px;
}

.gc-section-title::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--gc-gold) 0%, var(--gc-gold-deep) 100%);
}

/* An outline action sitting on the navy hero (e.g. a back link) reads in white. */
.gc-hero .gc-btn-outline {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}

.gc-hero .gc-btn-outline:hover,
.gc-hero .gc-btn-outline:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    color: #fff;
}

/* Inline SVG icons for website pages (gcUI.icon / data-gc-icon): the website
   bundle loads no icon font on either Frappe major. */
.gc-ico { display: inline-flex; width: 1em; height: 1em; vertical-align: -0.125em; line-height: 1; }
.gc-ico svg { width: 100%; height: 100%; }
.gc-ico-2x { font-size: 2em; }
.gc-ico-3x { font-size: 3em; }
.gc-ico-spin svg { animation: gc-ico-spin 1s linear infinite; }
@keyframes gc-ico-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gc-ico-spin svg { animation: none; } }

/* Frappe v16's web.html dropped `my-4` from <main class="container">; keep v15's
   16px gap between the navigation bar and every website page's content. */
main.container { margin-top: 16px; margin-bottom: 16px; }
