/* ============================================================================
   uco-modern.css  --  UCO Bank Online Services Portal, modern UI layer (v2)
   ----------------------------------------------------------------------------
   Loaded LAST on every page, after style.css / login.css / services.css /
   threshold.css. It never changes markup or behaviour: it only re-declares the
   design tokens and restyles the existing class vocabulary, so the servlet and
   JSP flows stay untouched.

   Strict-CSP safe: no remote @import, no remote fonts. Every image is either a
   local file or an inline SVG data: URI (img-src allows data:).

   Sections
     1  Tokens and legacy bridge
     2  Keyframes
     3  Page backdrop and base typography
     4  Accessibility / theme toolbar
     5  Headers and chrome
     6  Buttons
     7  Fields, selects, textareas, radios
     8  Login page
     9  Dashboard
    10  Service form pages
    11  Banners, toasts, modals, spinners
    12  uco-* components injected by uco-modern.js
    13  Responsive, reduced motion, print
   ========================================================================== */

/* ==========================================================================
   1. TOKENS AND LEGACY BRIDGE
   ========================================================================== */

:root {
    /* brand ramp */
    --uco-navy-900: #061d3c;
    --uco-navy-800: #0a2c5e;
    --uco-navy-700: #0d3f80;
    --uco-blue-600: #0f52a8;
    --uco-blue-500: #1366d6;
    --uco-blue-400: #2b86f0;
    --uco-blue-200: #a8ccf7;
    --uco-blue-100: #e3eefd;
    --uco-blue-050: #f2f7ff;

    /* UCO saffron accent */
    --uco-gold-600: #c87d06;
    --uco-gold-500: #ef9c11;
    --uco-gold-400: #f8b73f;
    --uco-gold-100: #fff2d9;

    /* semantic */
    --uco-ok: #0d7a53;
    --uco-ok-bg: #e7f8f0;
    --uco-ok-line: #a6e3c9;
    --uco-warn: #9a6207;
    --uco-warn-bg: #fff6e4;
    --uco-warn-line: #f6ce8a;
    --uco-err: #b3261e;
    --uco-err-bg: #fdecea;
    --uco-err-line: #f3b7b2;
    --uco-info: #0f52a8;
    --uco-info-bg: #eaf2fe;
    --uco-info-line: #b7d4f8;

    /* ink and surfaces */
    --uco-ink: #10233c;
    --uco-ink-soft: #2c4463;
    --uco-muted: #5d7190;
    --uco-faint: #8a9ab2;
    --uco-surface: #ffffff;
    --uco-surface-2: #f7faff;
    --uco-surface-3: #eef4fd;
    --uco-line: #e2eaf6;
    --uco-line-strong: #c9d8ee;
    --uco-glass: rgba(255, 255, 255, .78);
    --uco-glass-strong: rgba(255, 255, 255, .92);
    --uco-glass-solid: rgba(255, 255, 255, .985);

    /* geometry */
    --uco-r-xs: 8px;
    --uco-r-sm: 12px;
    --uco-r-md: 16px;
    --uco-r-lg: 22px;
    --uco-r-xl: 30px;
    --uco-r-pill: 999px;

    /* elevation */
    --uco-sh-1: 0 1px 2px rgba(10, 44, 94, .06), 0 2px 8px rgba(10, 44, 94, .05);
    --uco-sh-2: 0 2px 6px rgba(10, 44, 94, .07), 0 10px 26px rgba(10, 44, 94, .09);
    --uco-sh-3: 0 4px 10px rgba(10, 44, 94, .08), 0 22px 52px rgba(10, 44, 94, .14);
    --uco-sh-4: 0 10px 24px rgba(10, 44, 94, .12), 0 40px 90px rgba(10, 44, 94, .20);
    --uco-sh-focus: 0 0 0 4px rgba(19, 102, 214, .18);
    --uco-sh-gold: 0 10px 28px rgba(239, 156, 17, .28);

    /* motion */
    --uco-ease: cubic-bezier(.22, 1, .36, 1);
    --uco-ease-io: cubic-bezier(.65, 0, .35, 1);
    --uco-fast: .16s;
    --uco-dur: .32s;
    --uco-slow: .62s;

    /* gradients */
    --uco-grad-brand: linear-gradient(135deg, var(--uco-navy-800) 0%, var(--uco-blue-500) 55%, var(--uco-blue-400) 100%);
    --uco-grad-gold: linear-gradient(135deg, var(--uco-gold-600), var(--uco-gold-400));
    --uco-grad-rail: linear-gradient(90deg, var(--uco-blue-500), var(--uco-gold-500), var(--uco-blue-400));

    /* ---------- bridge: legacy variable names used by the old sheets --- */
    --blue-900: var(--uco-navy-800);
    --blue-800: var(--uco-navy-700);
    --blue-700: var(--uco-blue-600);
    --blue-600: var(--uco-blue-500);
    --blue-500: var(--uco-blue-400);
    --blue-300: var(--uco-blue-200);
    --blue-100: var(--uco-blue-100);
    --ink: var(--uco-ink);
    --muted: var(--uco-muted);
    --line: var(--uco-line);
    --white: var(--uco-surface);
    --glass: var(--uco-glass);
    --danger: var(--uco-err);
    --ok: var(--uco-ok);
    --radius-xl: var(--uco-r-lg);
    --radius: var(--uco-r-md);
    --radius-sm: var(--uco-r-sm);
    --shadow-xl: var(--uco-sh-3);
    --shadow: var(--uco-sh-2);
    --speed: var(--uco-dur) var(--uco-ease);
    --focus: var(--uco-blue-500);
    --bar-bg: var(--uco-glass);
    --bar-border: var(--uco-line);
    --bar-ink: var(--uco-blue-600);
    --bar-hover: var(--uco-blue-100);
}

[data-theme="dark"] {
    --uco-ink: #e8eefb;
    --uco-ink-soft: #c3d2ea;
    --uco-muted: #97a7c1;
    --uco-faint: #74859f;
    --uco-surface: #121c30;
    --uco-surface-2: #0f1828;
    --uco-surface-3: #16233c;
    --uco-line: #26344f;
    --uco-line-strong: #33456a;
    --uco-glass: rgba(18, 28, 48, .74);
    --uco-glass-strong: rgba(18, 28, 48, .92);
    --uco-glass-solid: rgba(16, 25, 44, .985);

    --uco-blue-200: #33507d;
    --uco-blue-100: #16253e;
    --uco-blue-050: #111b2d;

    --uco-ok: #58d3a2;
    --uco-ok-bg: #0e2a20;
    --uco-ok-line: #1d5a41;
    --uco-warn: #f2c260;
    --uco-warn-bg: #2d2309;
    --uco-warn-line: #6b5215;
    --uco-err: #f3938b;
    --uco-err-bg: #2e1512;
    --uco-err-line: #6d2a24;
    --uco-info: #74b0f5;
    --uco-info-bg: #12233c;
    --uco-info-line: #27456f;

    --uco-sh-1: 0 1px 2px rgba(0, 0, 0, .35);
    --uco-sh-2: 0 6px 18px rgba(0, 0, 0, .38);
    --uco-sh-3: 0 18px 44px rgba(0, 0, 0, .46);
    --uco-sh-4: 0 28px 70px rgba(0, 0, 0, .55);
    --uco-sh-focus: 0 0 0 4px rgba(43, 134, 240, .26);

    --blue-900: #d7e6ff;
    --blue-800: #a9c9f6;
    --blue-700: #5aa0f2;
    --blue-600: #4b93ec;
    --blue-500: #6fb0ff;
    --blue-300: #33456a;
    --focus: #7cb8ff;
    --bar-ink: #d7e6ff;
    --bar-hover: #1b2942;
}

/* ==========================================================================
   2. KEYFRAMES
   ========================================================================== */

@keyframes ucoAurora {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(-3%, 2%, 0) scale(1.08); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes ucoRiseIn {
    from { opacity: 0; transform: translateY(22px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

@keyframes ucoSlideInRight {
    from { opacity: 0; transform: translateX(26px); }
    to   { opacity: 1; transform: none; }
}

@keyframes ucoPop {
    0%   { opacity: 0; transform: translateY(-10px) scale(.94); }
    60%  { opacity: 1; transform: translateY(2px) scale(1.02); }
    100% { opacity: 1; transform: none; }
}

@keyframes ucoShine {
    from { transform: translateX(-120%) skewX(-18deg); }
    to   { transform: translateX(260%) skewX(-18deg); }
}

@keyframes ucoPulseDot {
    0%   { box-shadow: 0 0 0 0 rgba(13, 122, 83, .55); }
    70%  { box-shadow: 0 0 0 12px rgba(13, 122, 83, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 122, 83, 0); }
}

@keyframes ucoSpin { to { transform: rotate(360deg); } }

@keyframes ucoRail {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes ucoShake {
    0%, 100% { transform: translateX(0); }
    15%      { transform: translateX(-7px); }
    30%      { transform: translateX(6px); }
    45%      { transform: translateX(-4px); }
    60%      { transform: translateX(3px); }
    80%      { transform: translateX(-1px); }
}

@keyframes ucoBarIndet {
    0%   { left: -40%; width: 40%; }
    50%  { left: 25%;  width: 55%; }
    100% { left: 100%; width: 40%; }
}

@keyframes ucoCheckPop {
    0%   { transform: scale(.4); opacity: 0; }
    70%  { transform: scale(1.18); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes ucoGlowRing {
    0%, 100% { box-shadow: 0 0 0 3px rgba(19, 102, 214, .18); }
    50%      { box-shadow: 0 0 0 7px rgba(19, 102, 214, .10); }
}

@keyframes ucoSkeleton {
    0%   { background-position: -220% 0; }
    100% { background-position: 220% 0; }
}

/* ==========================================================================
   3. PAGE BACKDROP AND BASE TYPOGRAPHY
   ========================================================================== */

html { scroll-behavior: smooth; }

body {
    font-family: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui,
                 -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: var(--uco-ink);
    letter-spacing: -.005em;
    -webkit-font-smoothing: antialiased;
    background: var(--uco-surface-2);
    background-attachment: scroll;
}

/* animated aurora mesh, replacing the static radial stack in style.css */
body::before {
    content: "";
    position: fixed;
    inset: -14%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(38% 34% at 10% 6%, rgba(19, 102, 214, .22) 0%, transparent 62%),
        radial-gradient(34% 30% at 92% 4%, rgba(239, 156, 17, .18) 0%, transparent 60%),
        radial-gradient(42% 38% at 86% 88%, rgba(13, 63, 128, .18) 0%, transparent 62%),
        radial-gradient(36% 32% at 8% 92%, rgba(43, 134, 240, .16) 0%, transparent 58%);
    background-size: auto;
    -webkit-mask-image: none;
            mask-image: none;
    animation: ucoAurora 26s var(--uco-ease-io) infinite;
    will-change: transform;
}
/*
 * The drawn backdrop: rings, ribbons, wave lines and slash marks, in the same
 * register as the backdrop on the bank's online account-opening site. It is an
 * SVG rather than a photograph, so it is a few kilobytes, stays sharp on any
 * screen, and can be re-tinted in one file.
 *
 * Referenced relatively (../Images/), so it resolves whatever the servlet
 * context path is, and it is same-origin, so `img-src 'self'` covers it with
 * no CSP change.
 */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("../Images/uco-backdrop.svg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    /* Drawn for a landscape screen. Faded towards the middle of the page, so
       the pattern frames the content instead of sitting under the text. */
    opacity: .9;
    -webkit-mask-image: radial-gradient(ellipse 78% 64% at 50% 46%, transparent 12%, #000 86%);
            mask-image: radial-gradient(ellipse 78% 64% at 50% 46%, transparent 12%, #000 86%);
}

/* The page itself picks up a faint violet, the way the account-opening site
   does, so the artwork sits on a tinted sheet rather than on flat grey. */
body { background-color: #fbfaff; }

[data-theme="dark"] body { background: #0a1120; }

[data-theme="dark"] body::before {
    background:
        radial-gradient(38% 34% at 10% 6%, rgba(43, 134, 240, .20) 0%, transparent 62%),
        radial-gradient(34% 30% at 92% 4%, rgba(239, 156, 17, .13) 0%, transparent 60%),
        radial-gradient(42% 38% at 86% 88%, rgba(16, 48, 100, .34) 0%, transparent 64%),
        radial-gradient(36% 32% at 8% 92%, rgba(24, 68, 140, .24) 0%, transparent 60%);
}

/* The artwork is drawn in pale lavender for a white page. On the dark theme it
   is inverted and held well back, so it reads as depth rather than haze. */
[data-theme="dark"] body::after {
    opacity: .34;
    filter: invert(1) hue-rotate(185deg) saturate(.7) brightness(1.15);
}

h1, h2, h3, h4 {
    letter-spacing: -.022em;
    color: var(--uco-ink);
}

a { color: var(--uco-blue-600); }

::selection {
    background: rgba(19, 102, 214, .22);
    color: var(--uco-ink);
}

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--uco-line-strong) transparent; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: transparent; }

*::-webkit-scrollbar-thumb {
    background: var(--uco-line-strong);
    border: 3px solid transparent;
    border-radius: var(--uco-r-pill);
    background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover { background-color: var(--uco-blue-200); background-clip: content-box; }

.skip-link {
    background: var(--uco-grad-brand);
    border-radius: 0 0 var(--uco-r-sm) var(--uco-r-sm);
    box-shadow: var(--uco-sh-2);
    letter-spacing: .01em;
}

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--uco-blue-400);
    outline-offset: 2px;
    border-radius: var(--uco-r-xs);
}

/* ==========================================================================
   4. ACCESSIBILITY / THEME TOOLBAR
   ========================================================================== */

.a11y-bar {
    gap: 2px;
    padding: 4px;
    background: var(--uco-glass-strong);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-pill);
    box-shadow: var(--uco-sh-1);
    backdrop-filter: blur(10px) saturate(1.4);
    -webkit-backdrop-filter: blur(10px) saturate(1.4);
}

.a11y-btn {
    min-width: 36px;
    height: 36px;
    color: var(--uco-blue-600);
    font-weight: 700;
    border-radius: var(--uco-r-pill);
    transition: background var(--uco-fast) var(--uco-ease),
                color var(--uco-fast) var(--uco-ease),
                transform var(--uco-fast) var(--uco-ease);
}

.a11y-btn:hover {
    background: var(--uco-blue-100);
    transform: translateY(-1px);
}

.a11y-btn:active { transform: translateY(0) scale(.95); }
.a11y-btn svg { width: 19px; height: 19px; }
.a11y-sep { background: var(--uco-line); height: 22px; }

.page-topbar {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 26px 0;
}

/* ==========================================================================
   5. HEADERS AND CHROME
   ========================================================================== */

.app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 14px clamp(16px, 3vw, 36px);
    background: var(--uco-glass-strong);
    border: 0;
    border-bottom: 1px solid var(--uco-line);
    box-shadow: none;
    backdrop-filter: blur(16px) saturate(1.6);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    /* Its own compositing layer: a sticky bar with a backdrop-filter that the
       scroller repaints shimmers in Chrome, and promoting it stops that. */
    transform: translateZ(0);
    /* Nothing that changes the bar's HEIGHT may be transitioned here. A sticky
       header is still in flow, so shrinking it on scroll pulls the content up,
       which moves the scroll position, which re-tests the threshold: the bar
       then flickers between its two sizes for as long as you keep scrolling. */
    transition: box-shadow var(--uco-dur) var(--uco-ease),
                background-color var(--uco-dur) var(--uco-ease);
}

/* the gradient hairline that carries the brand */
.app-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: var(--uco-grad-rail);
    background-size: 200% 100%;
    animation: ucoRail 9s linear infinite;
    opacity: .9;
}

/* uco-modern.js adds .is-stuck once the page has scrolled past the threshold.
   Depth only: shadow and a more opaque pane. The bar keeps exactly the same
   height scrolled or not, so the content below it never jumps. */
.app-header.is-stuck {
    box-shadow: var(--uco-sh-2);
    background-color: var(--uco-glass-solid);
    border-bottom-color: var(--uco-line-strong);
}

.app-header.is-stuck::after { opacity: 1; }

.app-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }

/* the logo PNG carries its own field: no card, no padding, no border */
.app-logo {
    height: 54px;
    width: auto;
    background: none;
    border: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: transform var(--uco-dur) var(--uco-ease);
}

/* no hover transform on the mark; see .app-logo */

.app-brand-text { display: flex; flex-direction: column; min-width: 0; }

.app-brand-text .kicker {
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--uco-gold-600);
}

.app-brand-text .name {
    font-size: 1.0625rem;
    font-weight: 750;
    color: var(--uco-navy-800);
    letter-spacing: -.015em;
    line-height: 1.25;
}

[data-theme="dark"] .app-brand-text .name { color: var(--uco-ink); }
[data-theme="dark"] .app-brand-text .kicker { color: var(--uco-gold-400); }

.app-user { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.app-user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 14px;
    background: var(--uco-surface-3);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-sm);
}

.app-user-meta span {
    font-size: .75rem;
    font-weight: 600;
    color: var(--uco-muted);
    font-variant-numeric: tabular-nums;
}

.app-user-meta .u-acc {
    color: var(--uco-navy-800);
    font-weight: 750;
    font-size: .8125rem;
}

[data-theme="dark"] .app-user-meta .u-acc { color: var(--uco-ink); }

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--uco-err);
    text-decoration: none;
    background: var(--uco-surface);
    border: 1px solid var(--uco-err-line);
    border-radius: var(--uco-r-pill);
    box-shadow: var(--uco-sh-1);
    transition: all var(--uco-fast) var(--uco-ease);
}

.logout-btn:hover {
    color: #fff;
    background: var(--uco-err);
    border-color: var(--uco-err);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(179, 38, 30, .28);
}

.logout-btn svg { width: 17px; height: 17px; }

.dash-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 26px 16px 34px;
    color: var(--uco-muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .01em;
}

.dash-footer .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--uco-ok);
    animation: ucoPulseDot 2.6s var(--uco-ease-io) infinite;
}

.back-link { position: relative; z-index: 2; margin: 0 0 16px; }

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--uco-blue-600);
    text-decoration: none;
    background: var(--uco-glass-strong);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-pill);
    box-shadow: var(--uco-sh-1);
    transition: all var(--uco-fast) var(--uco-ease);
}

.back-link a:hover {
    transform: translateX(-4px);
    border-color: var(--uco-blue-200);
    background: var(--uco-surface);
    box-shadow: var(--uco-sh-2);
    text-decoration: none;
}

/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

.btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 14px 20px;
    font: inherit;
    font-size: .9375rem;
    font-weight: 700;
    letter-spacing: .004em;
    border: 1px solid transparent;
    border-radius: var(--uco-r-sm);
    cursor: pointer;
    transition: transform var(--uco-fast) var(--uco-ease),
                box-shadow var(--uco-dur) var(--uco-ease),
                filter var(--uco-fast) var(--uco-ease),
                background var(--uco-dur) var(--uco-ease),
                color var(--uco-fast) var(--uco-ease);
}

/* the sweep that crosses a button on hover */
.btn::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 36%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .42), transparent);
    transform: translateX(-120%) skewX(-18deg);
    pointer-events: none;
}

.btn:hover:not(:disabled)::after { animation: ucoShine .72s var(--uco-ease) forwards; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.995); }

.btn-primary {
    color: #fff;
    background: var(--uco-grad-brand);
    background-size: 160% 160%;
    background-position: 0% 50%;
    box-shadow: 0 8px 22px rgba(13, 63, 128, .26), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.btn-primary:hover:not(:disabled) {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(13, 63, 128, .32), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.btn-primary:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: .62;
    filter: grayscale(.25);
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    color: var(--uco-blue-600);
    background: var(--uco-surface);
    border-color: var(--uco-line-strong);
    box-shadow: var(--uco-sh-1);
}

.btn-secondary:hover:not(:disabled) {
    color: var(--uco-navy-800);
    background: var(--uco-blue-050);
    border-color: var(--uco-blue-200);
    transform: translateY(-2px);
    box-shadow: var(--uco-sh-2);
}

[data-theme="dark"] .btn-secondary { background: var(--uco-surface-3); color: var(--uco-ink); }
[data-theme="dark"] .btn-secondary:hover:not(:disabled) { color: #fff; }

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #8f1d17, #d4342a);
    box-shadow: 0 8px 22px rgba(179, 38, 30, .28);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(179, 38, 30, .36);
}

.btn-link {
    width: auto;
    padding: 10px 14px;
    color: var(--uco-blue-600);
    background: transparent;
    border-radius: var(--uco-r-pill);
    box-shadow: none;
}

.btn-link::after { display: none; }
.btn-link:hover:not(:disabled) { background: var(--uco-blue-100); transform: none; }
.btn-link:disabled { background: transparent; color: var(--uco-faint); }

.btn-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.btn-row .btn { width: auto; flex: 1 1 190px; min-width: 150px; }

.form-submit { margin-top: 24px; }

.linklike {
    color: var(--uco-blue-600);
    font-weight: 700;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

.linklike:hover { color: var(--uco-navy-800); }
[data-theme="dark"] .linklike:hover { color: #fff; }

.icon-btn, .audio-btn, .volume-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    color: var(--uco-blue-600);
    background: var(--uco-surface);
    border: 1px solid var(--uco-line-strong);
    border-radius: var(--uco-r-sm);
    cursor: pointer;
    box-shadow: var(--uco-sh-1);
    transition: all var(--uco-fast) var(--uco-ease);
}

.icon-btn { font-size: 1.25rem; line-height: 1; }

.icon-btn:hover, .audio-btn:hover, .volume-btn:hover {
    color: #fff;
    background: var(--uco-blue-500);
    border-color: var(--uco-blue-500);
    transform: translateY(-2px) rotate(-4deg);
    box-shadow: var(--uco-sh-2);
}

.icon-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.audio-btn svg, .volume-btn svg { width: 19px; height: 19px; }

/* busy state applied by uco-modern.js while a request is in flight */
.btn.is-busy { color: transparent !important; pointer-events: none; }

.btn.is-busy::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 19px;
    height: 19px;
    margin: -10px 0 0 -10px;
    border: 2.5px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ucoSpin .68s linear infinite;
}

.btn-secondary.is-busy::before,
.btn-link.is-busy::before {
    border-color: rgba(19, 102, 214, .28);
    border-top-color: var(--uco-blue-500);
}

/* ==========================================================================
   7. FIELDS
   ========================================================================== */

.field { margin-bottom: 20px; }

.field label,
.field .field-label,
.field-label {
    display: block;
    margin-bottom: 7px;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .005em;
    color: var(--uco-ink-soft);
}

.field input,
.field select,
.field textarea,
.combo-input {
    width: 100%;
    padding: 13px 15px;
    font: inherit;
    font-size: .9375rem;
    color: var(--uco-ink);
    background: var(--uco-surface);
    background-image: none;
    border: 1.5px solid var(--uco-line-strong);
    border-radius: var(--uco-r-sm);
    outline: none;
    box-shadow: var(--uco-sh-1);
    transition: border-color var(--uco-fast) var(--uco-ease),
                box-shadow var(--uco-fast) var(--uco-ease),
                background-color var(--uco-fast) var(--uco-ease);
}

.field textarea { min-height: 104px; resize: vertical; line-height: 1.55; }

.field input:hover:not(:disabled):not([readonly]),
.field select:hover:not(:disabled),
.field textarea:hover:not(:disabled) { border-color: var(--uco-blue-200); }

.field input:focus,
.field select:focus,
.field textarea:focus,
.combo-input:focus {
    border-color: var(--uco-blue-500);
    box-shadow: var(--uco-sh-focus);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
    color: var(--uco-faint);
    background-color: var(--uco-surface-3);
    cursor: not-allowed;
    box-shadow: none;
}

input[readonly],
.field input[readonly] {
    background-color: var(--uco-surface-3);
    color: var(--uco-ink-soft);
    font-weight: 700;
    border-style: dashed;
    box-shadow: none;
}

/* dark mode: longhands only, so the select chevron is never reset */
[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .field textarea {
    background-color: var(--uco-surface-2);
    color: var(--uco-ink);
    border-color: var(--uco-line-strong);
}

[data-theme="dark"] input[readonly],
[data-theme="dark"] .field input[readonly] { background-color: var(--uco-surface-3); color: var(--uco-ink-soft); }

/* custom select chevron: all four background properties restated under a
   selector at least as specific as the dark-mode shorthand in style.css */
.field select,
[data-theme="dark"] .field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 42px;
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 18px 18px;
    cursor: pointer;
}

.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235d7190' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

[data-theme="dark"] .field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2397a7c1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.field input::placeholder,
.field textarea::placeholder { color: var(--uco-faint); }

.field-hint,
.field .field-hint {
    display: block;
    margin-top: 7px;
    font-size: .75rem;
    line-height: 1.5;
    color: var(--uco-muted);
}

.field-err-text {
    display: block;
    margin-top: 7px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--uco-err);
}

.note-red { color: var(--uco-err); font-weight: 700; font-size: .78rem; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 22px;
}

.form-grid .field { margin-bottom: 18px; }
.field-wide, .form-grid .field-wide { grid-column: 1 / -1; }

.form-fieldset {
    margin: 0 0 24px;
    padding: 20px 22px 6px;
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-md);
    background: var(--uco-surface-2);
}

.form-fieldset legend {
    padding: 4px 13px;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--uco-blue-600);
    background: var(--uco-surface);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-pill);
}

/* radios and checkboxes */
.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }

.radio-row {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 16px;
    font-size: .875rem;
    font-weight: 650;
    color: var(--uco-ink-soft);
    background: var(--uco-surface);
    border: 1.5px solid var(--uco-line-strong);
    border-radius: var(--uco-r-pill);
    cursor: pointer;
    transition: all var(--uco-fast) var(--uco-ease);
}

.radio-row:hover {
    border-color: var(--uco-blue-200);
    background: var(--uco-blue-050);
    transform: translateY(-1px);
}

.radio-row input[type="radio"],
.radio-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--uco-blue-500);
    cursor: pointer;
    margin: 0;
}

.radio-row:has(input:checked) {
    color: var(--uco-navy-800);
    background: var(--uco-blue-100);
    border-color: var(--uco-blue-500);
    box-shadow: var(--uco-sh-focus);
}

[data-theme="dark"] .radio-row:has(input:checked) { color: var(--uco-ink); }

.radio-row:has(input:disabled) {
    opacity: .5;
    cursor: not-allowed;
    background: var(--uco-surface-3);
}

.accept-row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 15px 17px;
    margin: 6px 0 4px;
    font-size: .84rem;
    line-height: 1.55;
    color: var(--uco-ink-soft);
    background: var(--uco-warn-bg);
    border: 1px solid var(--uco-warn-line);
    border-radius: var(--uco-r-md);
}

.accept-row input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--uco-blue-500); }

/* combo box */
.combo { position: relative; }

.combo-list {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    margin-top: 6px;
    max-height: 268px;
    overflow: auto;
    display: none;
    padding: 6px;
    background: var(--uco-surface);
    border: 1px solid var(--uco-line-strong);
    border-radius: var(--uco-r-md);
    box-shadow: var(--uco-sh-3);
}

.combo-list.open { display: block; animation: ucoPop .2s var(--uco-ease) both; }

.combo-item {
    padding: 10px 13px;
    font-size: .875rem;
    color: var(--uco-ink-soft);
    border-radius: var(--uco-r-xs);
    cursor: pointer;
    transition: background var(--uco-fast) var(--uco-ease);
}

.combo-item:hover, .combo-item.active {
    color: var(--uco-navy-800);
    background: var(--uco-blue-100);
}

[data-theme="dark"] .combo-item:hover,
[data-theme="dark"] .combo-item.active { color: var(--uco-ink); }

.combo-empty { padding: 14px; font-size: .8125rem; color: var(--uco-muted); text-align: center; }

/* ==========================================================================
   8. LOGIN PAGE
   ========================================================================== */

.login-body { display: flex; flex-direction: column; min-height: 100vh; }

.portal {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 3vw, 42px);
}

.portal-panel {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 0;
    width: 100%;
    max-width: 1140px;
    overflow: hidden;
    background: var(--uco-surface);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-xl);
    box-shadow: var(--uco-sh-4);
    animation: ucoRiseIn var(--uco-slow) var(--uco-ease) both;
}

/* ---- hero rail ---- */
.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: clamp(26px, 3vw, 44px);
    color: #eaf2ff;
    background: linear-gradient(155deg, #061d3c 0%, #0b3a78 48%, #0f52a8 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20%;
    z-index: -1;
    background:
        radial-gradient(34% 30% at 18% 12%, rgba(239, 156, 17, .30) 0%, transparent 62%),
        radial-gradient(40% 36% at 88% 86%, rgba(43, 134, 240, .36) 0%, transparent 64%);
    animation: ucoAurora 20s var(--uco-ease-io) infinite;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 30% 20%, #000 10%, transparent 78%);
            mask-image: radial-gradient(ellipse 90% 80% at 30% 20%, #000 10%, transparent 78%);
}

.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; flex-direction: column; gap: 20px; }
.hero-brand { display: flex; align-items: center; gap: 16px; }

/* big, completely borderless logo */
.hero-logo {
    height: 86px;
    width: auto;
    background: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    /* The bank mark does not move. It is an identity, not an ornament: a logo
       that bobs or tilts under the pointer reads as a toy on a bank page. */
}

.hero-brand-text { display: flex; flex-direction: column; gap: 3px; }

.hero-brand-text .kicker {
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--uco-gold-400);
}

.hero-brand-text .name {
    font-size: 1.125rem;
    font-weight: 750;
    color: #fff;
    letter-spacing: -.015em;
}

.hero-headline {
    margin: 0;
    font-size: clamp(1.7rem, 2.9vw, 2.45rem);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -.03em;
    color: #fff;
}

.hero-sub {
    margin: 0;
    max-width: 44ch;
    font-size: .9375rem;
    line-height: 1.68;
    color: rgba(230, 240, 255, .82);
}

.hero-services {
    padding: 18px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--uco-r-lg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-services-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: rgba(224, 236, 255, .72);
}

.hero-badge {
    padding: 4px 11px;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: none;
    color: #3a2704;
    background: var(--uco-grad-gold);
    border-radius: var(--uco-r-pill);
    box-shadow: var(--uco-sh-gold);
}

.svc-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin: 0;
    padding: 0;
}

.svc-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--uco-r-sm);
    transition: background var(--uco-dur) var(--uco-ease),
                border-color var(--uco-dur) var(--uco-ease),
                transform var(--uco-dur) var(--uco-ease),
                box-shadow var(--uco-dur) var(--uco-ease);
    animation: ucoRiseIn var(--uco-dur) var(--uco-ease) both;
}

.svc-chip:nth-child(1) { animation-delay: .10s; }
.svc-chip:nth-child(2) { animation-delay: .18s; }
.svc-chip:nth-child(3) { animation-delay: .26s; }
.svc-chip:nth-child(4) { animation-delay: .34s; }
.svc-chip:nth-child(5) { animation-delay: .42s; }

.svc-chip:hover {
    background: rgba(255, 255, 255, .13);
    border-color: rgba(248, 183, 63, .5);
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .22);
}

.svc-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    color: #0a2c5e;
    background: var(--uco-grad-gold);
    border-radius: var(--uco-r-xs);
    box-shadow: 0 4px 12px rgba(239, 156, 17, .3);
}

.svc-ic svg { width: 17px; height: 17px; }

.svc-name {
    font-size: .78rem;
    font-weight: 650;
    line-height: 1.38;
    color: rgba(236, 244, 255, .94);
}

/* ---- auth card ---- */
.auth-card {
    display: flex;
    flex-direction: column;
    padding: clamp(26px, 3vw, 44px);
    background: var(--uco-surface);
}

.auth-title {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.028em;
    color: var(--uco-navy-800);
}

[data-theme="dark"] .auth-title { color: var(--uco-ink); }

.auth-sub { margin: 0 0 22px; font-size: .875rem; color: var(--uco-muted); }

.seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 24px;
    background: var(--uco-surface-3);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-pill);
}

.seg-btn {
    padding: 11px 10px;
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    color: var(--uco-muted);
    background: transparent;
    border: 0;
    border-radius: var(--uco-r-pill);
    cursor: pointer;
    transition: all var(--uco-dur) var(--uco-ease);
}

.seg-btn:hover { color: var(--uco-blue-600); }

.seg-btn.is-active {
    color: #fff;
    background: var(--uco-grad-brand);
    box-shadow: 0 6px 16px rgba(13, 63, 128, .28);
}

[data-theme="dark"] .seg-btn.is-active { color: #fff; }
.seg-btn:disabled { opacity: .55; cursor: not-allowed; }

/* captcha */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 11px;
}

.captcha-img {
    height: 50px;
    flex: 1 1 150px;
    min-width: 132px;
    object-fit: contain;
    background: var(--uco-surface-2);
    border: 1.5px dashed var(--uco-line-strong);
    border-radius: var(--uco-r-sm);
    padding: 2px 6px;
}

[data-theme="dark"] .captcha-img { background: var(--uco-surface-2); border-color: var(--uco-line-strong); }

/* the volume control and the speaker button are in section 15 */

/* OTP entry */
.otp-section {
    margin-top: 8px;
    padding: 20px;
    background: var(--uco-blue-050);
    border: 1px solid var(--uco-blue-100);
    border-radius: var(--uco-r-md);
    animation: ucoRiseIn var(--uco-dur) var(--uco-ease) both;
}

[data-theme="dark"] .otp-section { background: var(--uco-surface-2); border-color: var(--uco-line); }

.otp-fieldset { border: 0; margin: 0; padding: 0; }

.otp-legend {
    padding: 0;
    margin-bottom: 11px;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--uco-ink-soft);
}

.otp-boxes { display: flex; gap: 9px; flex-wrap: wrap; }

.otp-digit {
    width: 50px;
    height: 58px;
    padding: 0;
    flex: 0 0 auto;
    font-size: 1.4rem;
    font-weight: 800;
    text-align: center;
    color: var(--uco-navy-800);
    background: var(--uco-surface);
    border: 2px solid var(--uco-line-strong);
    border-radius: var(--uco-r-sm);
    box-shadow: var(--uco-sh-1);
    caret-color: var(--uco-blue-500);
    transition: all var(--uco-fast) var(--uco-ease);
}

[data-theme="dark"] .otp-digit {
    color: var(--uco-ink);
    background: var(--uco-surface-2);
    border-color: var(--uco-line-strong);
}

.otp-digit::-webkit-inner-spin-button,
.otp-digit::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.otp-digit:focus {
    border-color: var(--uco-blue-500);
    transform: translateY(-3px) scale(1.04);
    animation: ucoGlowRing 1.6s var(--uco-ease-io) infinite;
}

.otp-digit.filled {
    color: #fff;
    background: var(--uco-grad-brand);
    border-color: var(--uco-blue-600);
    box-shadow: 0 8px 20px rgba(13, 63, 128, .26);
}

.otp-timer {
    margin: 13px 0 0;
    font-size: .8125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--uco-ok);
}

.otp-timer.expired { color: var(--uco-err); }

.resend-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: .8125rem;
    color: var(--uco-muted);
}

/* inline form message (login.js writes into #formMsg) */
.form-msg {
    display: block;
    margin-top: 14px;
    padding: 0;
    font-size: .84rem;
    font-weight: 650;
    line-height: 1.55;
    color: var(--uco-muted);
}

.form-msg:empty { display: none; }
.form-msg.ok { color: var(--uco-ok); }
.form-msg.error { color: var(--uco-err); }

/* uco-modern.js mirrors #formMsg into .uco-alert and #otpTimer into the
   validity ring, and hides each raw line with the helper below. */
/* Mirrored into a richer component: hidden from the eye, still in the
   accessibility tree, so the live region keeps announcing it exactly once. */
.uco-mirrored {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
}

/* ==========================================================================
   9. DASHBOARD
   ========================================================================== */

.dash-body { display: flex; flex-direction: column; min-height: 100vh; }

.dash-wrap {
    position: relative;
    z-index: 2;
    flex: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 28px) 10px;
}

.welcome-strip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: clamp(20px, 2.4vw, 30px) clamp(20px, 2.6vw, 32px);
    margin-bottom: 24px;
    color: #eaf2ff;
    background: linear-gradient(135deg, #061d3c 0%, #0d3f80 52%, #0f52a8 100%);
    border: 0;
    border-radius: var(--uco-r-lg);
    box-shadow: var(--uco-sh-3);
    overflow: hidden;
    animation: ucoRiseIn var(--uco-dur) var(--uco-ease) both;
}

.welcome-strip::before {
    content: "";
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(30% 50% at 12% 20%, rgba(239, 156, 17, .26) 0%, transparent 60%),
        radial-gradient(34% 54% at 90% 80%, rgba(43, 134, 240, .32) 0%, transparent 62%);
    animation: ucoAurora 18s var(--uco-ease-io) infinite;
    pointer-events: none;
}

.welcome-strip > * { position: relative; z-index: 1; }

.welcome-title {
    margin: 0 0 7px;
    font-size: clamp(1.3rem, 2.3vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -.028em;
    color: #fff;
}

.welcome-title .greeting {
    background: var(--uco-grad-gold);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-sub { margin: 0; font-size: .875rem; line-height: 1.6; color: rgba(226, 238, 255, .8); }

.welcome-badge {
    padding: 9px 17px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: #3a2704;
    background: var(--uco-grad-gold);
    border-radius: var(--uco-r-pill);
    box-shadow: var(--uco-sh-gold);
    white-space: nowrap;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(298px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.service-card {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 19px 20px;
    text-decoration: none;
    color: inherit;
    background: var(--uco-surface);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-md);
    box-shadow: var(--uco-sh-1);
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--uco-dur) var(--uco-ease),
                box-shadow var(--uco-dur) var(--uco-ease),
                border-color var(--uco-dur) var(--uco-ease);
    animation: ucoRiseIn var(--uco-dur) var(--uco-ease) both;
}

.services-grid .service-card:nth-child(1) { animation-delay: .04s; }
.services-grid .service-card:nth-child(2) { animation-delay: .10s; }
.services-grid .service-card:nth-child(3) { animation-delay: .16s; }
.services-grid .service-card:nth-child(4) { animation-delay: .22s; }
.services-grid .service-card:nth-child(5) { animation-delay: .28s; }
.services-grid .service-card:nth-child(6) { animation-delay: .34s; }
.services-grid .service-card:nth-child(7) { animation-delay: .40s; }
.services-grid .service-card:nth-child(8) { animation-delay: .46s; }

/* left accent bar that grows on hover */
.service-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 0;
    transform: translateY(-50%);
    background: var(--uco-grad-gold);
    border-radius: 0 4px 4px 0;
    transition: height var(--uco-dur) var(--uco-ease);
}

/* cursor spotlight, fed by --uco-mx / --uco-my from uco-modern.js */
.service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: radial-gradient(260px circle at var(--uco-mx, 50%) var(--uco-my, 50%),
                rgba(19, 102, 214, .10), transparent 68%);
    transition: opacity var(--uco-dur) var(--uco-ease);
}

.service-card:hover,
.service-card:focus-visible {
    transform: translateY(-5px);
    border-color: var(--uco-blue-200);
    box-shadow: var(--uco-sh-3);
}

.service-card:hover::before,
.service-card:focus-visible::before { height: 62%; }
.service-card:hover::after { opacity: 1; }

.card-ic,
.service-card .card-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    color: var(--uco-blue-600);
    background: var(--uco-blue-100);
    border: 1px solid var(--uco-blue-200);
    border-radius: var(--uco-r-sm);
    transition: all var(--uco-dur) var(--uco-ease);
}

.card-ic svg,
.service-card .card-ic svg { width: 24px; height: 24px; }

.service-card:hover .card-ic {
    color: #fff;
    background: var(--uco-grad-brand);
    border-color: transparent;
    transform: rotate(-7deg) scale(1.08);
    box-shadow: 0 10px 22px rgba(13, 63, 128, .28);
}

.card-body { flex: 1; min-width: 0; }

.card-body h3,
.service-card .card-body h3 {
    margin: 0 0 4px;
    font-size: .9375rem;
    font-weight: 750;
    line-height: 1.32;
    letter-spacing: -.012em;
    color: var(--uco-navy-800);
}

[data-theme="dark"] .card-body h3 { color: var(--uco-ink); }

.card-body p,
.service-card .card-body p {
    margin: 0;
    font-size: .78rem;
    line-height: 1.52;
    color: var(--uco-muted);
}

.card-arrow,
.service-card .card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    color: var(--uco-blue-500);
    background: var(--uco-surface-3);
    border-radius: 50%;
    transition: all var(--uco-dur) var(--uco-ease);
}

.card-arrow svg,
.service-card .card-arrow svg { width: 15px; height: 15px; }

.service-card:hover .card-arrow {
    color: #fff;
    background: var(--uco-gold-500);
    transform: translateX(5px);
    box-shadow: var(--uco-sh-gold);
}

/* empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    padding: 46px 26px;
    text-align: center;
    background: var(--uco-surface);
    border: 1.5px dashed var(--uco-line-strong);
    border-radius: var(--uco-r-lg);
}

.empty-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    color: var(--uco-blue-500);
    background: var(--uco-blue-100);
    border-radius: 50%;
}

.empty-ic svg { width: 30px; height: 30px; }
.empty-title { margin: 0; font-size: 1.0625rem; font-weight: 750; color: var(--uco-navy-800); }
[data-theme="dark"] .empty-title { color: var(--uco-ink); }
.empty-sub { margin: 0; max-width: 46ch; font-size: .84rem; line-height: 1.6; color: var(--uco-muted); }
.empty-meta { font-size: .75rem; color: var(--uco-faint); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   10. SERVICE FORM PAGES
   ========================================================================== */

.form-card {
    position: relative;
    max-width: 880px;
    margin: 0 auto 26px;
    padding: clamp(22px, 3vw, 38px);
    background: var(--uco-surface);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-lg);
    box-shadow: var(--uco-sh-3);
    overflow: hidden;
    animation: ucoRiseIn var(--uco-dur) var(--uco-ease) both;
}

/* brand rail along the top edge of every form card */
.form-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--uco-grad-rail);
    background-size: 200% 100%;
    animation: ucoRail 9s linear infinite;
}

.form-card-title {
    margin: 0 0 6px;
    font-size: clamp(1.18rem, 2vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -.026em;
    color: var(--uco-navy-800);
}

[data-theme="dark"] .form-card-title { color: var(--uco-ink); }

.form-card-sub { margin: 0 0 26px; font-size: .875rem; line-height: 1.62; color: var(--uco-muted); }

/* ---- stepper ---- */
.stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0 0 28px;
}

.stepper .step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: .875rem;
    font-weight: 800;
    color: var(--uco-faint);
    background: var(--uco-surface);
    border: 2px solid var(--uco-line-strong);
    border-radius: 50%;
    transition: all var(--uco-dur) var(--uco-ease);
}

.step.active .step-num {
    color: #fff;
    background: var(--uco-grad-brand);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(13, 63, 128, .3);
    animation: ucoCheckPop var(--uco-dur) var(--uco-ease) both;
}

.step.done .step-num {
    font-size: 0;
    color: transparent;
    background-color: var(--uco-ok);
    border-color: var(--uco-ok);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 20px 20px;
}

.step-line {
    position: relative;
    flex: 1 1 auto;
    height: 4px;
    min-width: 26px;
    background: var(--uco-line);
    border-radius: var(--uco-r-pill);
    overflow: hidden;
}

.step.done + .step-line { background: var(--uco-ok); }

/* ---- review list ---- */
.review {
    margin: 4px 0 8px;
    padding: 0;
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-md);
    background: var(--uco-surface-2);
    overflow: hidden;
}

.review-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--uco-line);
    transition: background var(--uco-fast) var(--uco-ease);
}

.review-item:hover { background: var(--uco-blue-050); }
.review-item:last-child { border-bottom: 0; }

.review-item .rl {
    flex: 0 0 44%;
    font-size: .8125rem;
    font-weight: 650;
    color: var(--uco-muted);
}

.review-item .rv {
    flex: 1;
    text-align: right;
    font-size: .875rem;
    font-weight: 750;
    color: var(--uco-navy-800);
    word-break: break-word;
    font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .review-item .rv { color: var(--uco-ink); }

/* ---- charges / data tables ---- */
.charges {
    width: 100%;
    margin: 6px 0 18px;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--uco-surface);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-md);
    overflow: hidden;
    font-size: .84rem;
}

.charges caption {
    padding: 12px 16px;
    text-align: left;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--uco-blue-600);
    background: var(--uco-surface-3);
    border-bottom: 1px solid var(--uco-line);
}

.charges td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--uco-line);
    color: var(--uco-ink-soft);
    font-variant-numeric: tabular-nums;
}

.charges tr:last-child td { border-bottom: 0; }
.charges tr td:first-child { font-weight: 700; color: var(--uco-navy-800); }
[data-theme="dark"] .charges tr td:first-child { color: var(--uco-ink); }
.charges tr:hover td { background: var(--uco-blue-050); }
[data-theme="dark"] .charges tr:hover td { background: var(--uco-surface-3); }

.charge-view {
    padding: 14px 16px;
    font-size: .84rem;
    color: var(--uco-ink-soft);
    background: var(--uco-blue-050);
    border: 1px solid var(--uco-blue-100);
    border-radius: var(--uco-r-md);
}

[data-theme="dark"] .charge-view { background: var(--uco-surface-3); border-color: var(--uco-line); }

/* ---- notes ---- */
.notes-box {
    padding: 17px 19px;
    margin: 4px 0 22px;
    background: var(--uco-warn-bg);
    border: 1px solid var(--uco-warn-line);
    border-left: 4px solid var(--uco-gold-500);
    border-radius: var(--uco-r-md);
}

.subs-head {
    margin: 0 0 9px;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--uco-warn);
}

.notes-list { margin: 0; padding-left: 20px; }

.notes-list li {
    margin-bottom: 6px;
    font-size: .8125rem;
    line-height: 1.6;
    color: var(--uco-ink-soft);
}

.notes-list li::marker { color: var(--uco-gold-500); }

/* email split row */
.email-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.email-row .email-local { flex: 1 1 180px; }
.email-row .email-domain { flex: 1 1 160px; }
.email-at { font-weight: 800; color: var(--uco-muted); }

/* ==========================================================================
   11. BANNERS, TOASTS, MODALS, SPINNERS
   ========================================================================== */

.banner {
    position: relative;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 13px;
    padding: 15px 18px;
    margin: 0 0 22px;
    font-size: .875rem;
    font-weight: 650;
    line-height: 1.58;
    border: 1px solid var(--uco-info-line);
    border-left: 4px solid var(--uco-blue-500);
    border-radius: var(--uco-r-md);
    background: var(--uco-info-bg);
    color: var(--uco-ink-soft);
    box-shadow: var(--uco-sh-1);
    animation: ucoPop var(--uco-dur) var(--uco-ease) both;
}

/* icon drawn in CSS so the JSP markup stays as it is */
.banner::before {
    content: "";
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f52a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.6v.9'/%3E%3C/svg%3E");
}

.banner-ok {
    color: #0b5c3e;
    background: var(--uco-ok-bg);
    border-color: var(--uco-ok-line);
    border-left-color: var(--uco-ok);
}

.banner-ok::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d7a53' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8.2 12.4l2.6 2.6 5-5.4'/%3E%3C/svg%3E");
}

.banner-err {
    color: #8c1d16;
    background: var(--uco-err-bg);
    border-color: var(--uco-err-line);
    border-left-color: var(--uco-err);
    animation: ucoPop var(--uco-dur) var(--uco-ease) both, ucoShake .5s var(--uco-ease) .18s;
}

.banner-err::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3261e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9L2.5 17.3A1.9 1.9 0 0 0 4.2 20h15.6a1.9 1.9 0 0 0 1.7-2.7L13.7 3.9a1.9 1.9 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.2v4M12 16.3v.9'/%3E%3C/svg%3E");
}

/* the "what to do next" line uco-modern.js appends drops below the message,
   indented past the icon, instead of sitting beside it as a flex sibling */
.banner .uco-alert-hint {
    flex: 1 0 100%;
    margin: 0 0 0 35px;
}

[data-theme="dark"] .banner { color: var(--uco-ink-soft); }
[data-theme="dark"] .banner-ok { color: #9ae7c4; }
[data-theme="dark"] .banner-err { color: #f8b5ae; }

/* legacy single toast on the dashboard */
.toast {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 70;
    max-width: min(380px, calc(100vw - 40px));
    padding: 14px 18px;
    font-size: .84rem;
    font-weight: 650;
    line-height: 1.5;
    color: #eef5ff;
    background: linear-gradient(135deg, #0a2c5e, #0f52a8);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--uco-r-md);
    box-shadow: var(--uco-sh-4);
    opacity: 0;
    transform: translateY(16px) scale(.96);
    pointer-events: none;
    transition: opacity var(--uco-dur) var(--uco-ease),
                transform var(--uco-dur) var(--uco-ease);
}

.toast.show { opacity: 1; transform: none; }
.toast:empty { display: none; }

/* modals */
.modal-overlay,
.custom-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(6, 20, 42, .58);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-overlay.open,
.custom-modal-overlay.open { display: flex; }

.modal-card,
.custom-modal-card {
    width: 100%;
    max-width: 440px;
    padding: 28px;
    text-align: center;
    background: var(--uco-surface);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-lg);
    box-shadow: var(--uco-sh-4);
    animation: ucoPop var(--uco-dur) var(--uco-ease) both;
}

.modal-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    color: var(--uco-err);
    background: var(--uco-err-bg);
    border-radius: 50%;
}

.modal-ic svg { width: 28px; height: 28px; }
.modal-ic-blue { color: var(--uco-blue-600); background: var(--uco-blue-100); }

.modal-title,
.custom-modal-title {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--uco-navy-800);
}

[data-theme="dark"] .modal-title,
[data-theme="dark"] .custom-modal-title { color: var(--uco-ink); }

.modal-sub,
.custom-modal-msg {
    margin: 0 0 20px;
    font-size: .875rem;
    line-height: 1.62;
    color: var(--uco-muted);
}

.modal-actions { display: flex; gap: 11px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 140px; width: auto; }
.custom-modal-btn { width: 100%; }

/* route spinner (services.js) */
.route-spinner {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(243, 248, 255, .72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

[data-theme="dark"] .route-spinner { background: rgba(8, 16, 30, .76); }

.route-spinner.show { display: flex; animation: ucoPop .22s var(--uco-ease) both; }

.route-spinner-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px 38px;
    background: var(--uco-surface);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-lg);
    box-shadow: var(--uco-sh-4);
}

.route-spinner-ring {
    width: 44px;
    height: 44px;
    border: 4px solid var(--uco-blue-100);
    border-top-color: var(--uco-blue-500);
    border-right-color: var(--uco-gold-500);
    border-radius: 50%;
    animation: ucoSpin .82s linear infinite;
}

.route-spinner-text { margin: 0; font-size: .84rem; font-weight: 700; color: var(--uco-ink-soft); }

/* ==========================================================================
   12. uco-* COMPONENTS INJECTED BY uco-modern.js
   ========================================================================== */

/* --- top progress bar --- */
.uco-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 120;
    background: transparent;
    overflow: hidden;
    opacity: 0;
    transition: opacity .2s var(--uco-ease);
}

.uco-progress.is-on { opacity: 1; }

.uco-progress span {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--uco-grad-rail);
    background-size: 200% 100%;
    animation: ucoBarIndet 1.15s var(--uco-ease-io) infinite;
}

/* --- toast stack --- */
.uco-toasts {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 130;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(392px, calc(100vw - 32px));
    pointer-events: none;
}

.uco-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 15px;
    pointer-events: auto;
    background: var(--uco-glass-strong);
    border: 1px solid var(--uco-line);
    border-left: 4px solid var(--uco-blue-500);
    border-radius: var(--uco-r-md);
    box-shadow: var(--uco-sh-3);
    backdrop-filter: blur(14px) saturate(1.5);
    -webkit-backdrop-filter: blur(14px) saturate(1.5);
    overflow: hidden;
    animation: ucoSlideInRight var(--uco-dur) var(--uco-ease) both;
}

.uco-toast.is-leaving { animation: ucoSlideInRight var(--uco-fast) var(--uco-ease) reverse both; }

.uco-toast-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--uco-info);
    background: var(--uco-info-bg);
}

.uco-toast-ic svg { width: 17px; height: 17px; }
.uco-toast-body { flex: 1; min-width: 0; }

.uco-toast-title {
    margin: 0 0 2px;
    font-size: .8125rem;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--uco-navy-800);
}

[data-theme="dark"] .uco-toast-title { color: var(--uco-ink); }

.uco-toast-text {
    margin: 0;
    font-size: .8125rem;
    line-height: 1.52;
    color: var(--uco-ink-soft);
    overflow-wrap: break-word;
}

.uco-toast-actions { margin-top: 9px; display: flex; gap: 8px; flex-wrap: wrap; }

.uco-toast-act {
    padding: 6px 13px;
    font: inherit;
    font-size: .75rem;
    font-weight: 750;
    color: #fff;
    background: var(--uco-grad-brand);
    border: 0;
    border-radius: var(--uco-r-pill);
    cursor: pointer;
}

.uco-toast-act.is-ghost { color: var(--uco-blue-600); background: var(--uco-blue-100); }

.uco-toast-x {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    padding: 0;
    font: inherit;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--uco-faint);
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--uco-fast) var(--uco-ease);
}

.uco-toast-x:hover { color: var(--uco-err); background: var(--uco-err-bg); }

.uco-toast-life {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    transform-origin: left center;
    background: var(--uco-blue-400);
    opacity: .55;
}

.uco-toast.t-ok   { border-left-color: var(--uco-ok); }
.uco-toast.t-ok   .uco-toast-ic { color: var(--uco-ok); background: var(--uco-ok-bg); }
.uco-toast.t-ok   .uco-toast-life { background: var(--uco-ok); }
.uco-toast.t-err  { border-left-color: var(--uco-err); }
.uco-toast.t-err  .uco-toast-ic { color: var(--uco-err); background: var(--uco-err-bg); }
.uco-toast.t-err  .uco-toast-life { background: var(--uco-err); }
.uco-toast.t-warn { border-left-color: var(--uco-gold-500); }
.uco-toast.t-warn .uco-toast-ic { color: var(--uco-warn); background: var(--uco-warn-bg); }
.uco-toast.t-warn .uco-toast-life { background: var(--uco-gold-500); }
.uco-toast.t-busy .uco-toast-ic svg { animation: ucoSpin .8s linear infinite; }

/* --- rich inline alert mirroring #formMsg --- */
.uco-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 14px;
    padding: 13px 15px;
    font-size: .84rem;
    line-height: 1.55;
    border: 1px solid var(--uco-info-line);
    border-left: 4px solid var(--uco-info);
    border-radius: var(--uco-r-md);
    background: var(--uco-info-bg);
    color: var(--uco-ink-soft);
    animation: ucoPop var(--uco-fast) var(--uco-ease) both;
}

/* a class rule with display: flex beats the user-agent [hidden] rule, so every
   component uco-modern.js hides with .hidden = true needs this explicitly */
.uco-alert[hidden],
.uco-otpmeter[hidden],
.uco-attempts[hidden],
.uco-fieldmeta[hidden],
.uco-alert-hint[hidden] { display: none !important; }

.uco-alert-ic { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; }
.uco-alert-ic svg { width: 20px; height: 20px; }
.uco-alert-body { flex: 1; min-width: 0; }
.uco-alert-title { display: block; font-weight: 800; margin-bottom: 2px; }
.uco-alert-text { display: block; font-weight: 600; }

.uco-alert-hint {
    display: block;
    margin-top: 6px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--uco-muted);
}

.uco-alert.a-ok   { color: #0b5c3e; background: var(--uco-ok-bg);   border-color: var(--uco-ok-line);   border-left-color: var(--uco-ok); }
.uco-alert.a-warn { color: #7a4e06; background: var(--uco-warn-bg); border-color: var(--uco-warn-line); border-left-color: var(--uco-gold-500); }
.uco-alert.a-busy { color: var(--uco-ink-soft); }
.uco-alert.a-busy .uco-alert-ic svg { animation: ucoSpin .8s linear infinite; }

.uco-alert.a-err {
    color: #8c1d16;
    background: var(--uco-err-bg);
    border-color: var(--uco-err-line);
    border-left-color: var(--uco-err);
    animation: ucoPop var(--uco-fast) var(--uco-ease) both, ucoShake .46s var(--uco-ease) .1s;
}

[data-theme="dark"] .uco-alert.a-ok   { color: #9ae7c4; }
[data-theme="dark"] .uco-alert.a-err  { color: #f8b5ae; }
[data-theme="dark"] .uco-alert.a-warn { color: #f4cf86; }

/* --- live field counter / validity meter --- */
.uco-fieldmeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--uco-faint);
    font-variant-numeric: tabular-nums;
}

.uco-count { letter-spacing: .02em; }
.uco-count.is-full { color: var(--uco-ok); }

.uco-bar {
    flex: 1;
    height: 4px;
    max-width: 140px;
    background: var(--uco-line);
    border-radius: var(--uco-r-pill);
    overflow: hidden;
}

.uco-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--uco-grad-brand);
    border-radius: inherit;
    transition: width var(--uco-dur) var(--uco-ease), background var(--uco-dur) var(--uco-ease);
}

.uco-bar.is-full i { background: linear-gradient(135deg, #0d7a53, #39b183); }

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
    border-color: var(--uco-err);
    box-shadow: 0 0 0 4px rgba(179, 38, 30, .12);
}

.field.is-valid input,
.field.is-valid select { border-color: var(--uco-ok-line); }

/* --- advisory strip --- */
.uco-advice {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 18px 0 0;
    padding: 13px 15px;
    font-size: .76rem;
    line-height: 1.55;
    color: var(--uco-ink-soft);
    background: var(--uco-warn-bg);
    border: 1px solid var(--uco-warn-line);
    border-radius: var(--uco-r-md);
}

.uco-advice svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--uco-gold-600); margin-top: 1px; }
.uco-advice strong { color: var(--uco-warn); }
[data-theme="dark"] .uco-advice strong { color: var(--uco-gold-400); }
[data-theme="dark"] .uco-advice svg { color: var(--uco-gold-400); }

/* --- OTP attempt / countdown meters --- */
.uco-otpmeter {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.uco-ring {
    position: relative;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: conic-gradient(var(--uco-blue-500) calc(var(--uco-pct, 100) * 1%), var(--uco-line) 0);
    display: grid;
    place-items: center;
    transition: background .95s linear;
}

.uco-ring::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: var(--uco-surface);
    border-radius: 50%;
}

.uco-ring b {
    position: relative;
    z-index: 1;
    font-size: .68rem;
    font-weight: 800;
    color: var(--uco-ink-soft);
    font-variant-numeric: tabular-nums;
}

.uco-ring.is-low { background: conic-gradient(var(--uco-err) calc(var(--uco-pct, 100) * 1%), var(--uco-line) 0); }
.uco-ring.is-low b { color: var(--uco-err); }

/* The wording that used to sit in the #otpTimer sentence. It lives here now,
   beside the ring, so the time is on screen once rather than twice. */
.uco-otpcap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.uco-otpcap-t {
    font-size: .8125rem;
    font-weight: 800;
    letter-spacing: -.005em;
    color: var(--uco-ink-soft);
}

.uco-otpcap-s {
    font-size: .72rem;
    font-weight: 600;
    color: var(--uco-muted);
}

/* class rather than :has(), which the older Chrome builds in the branches
   do not support */
.uco-otpmeter.is-low .uco-otpcap-t { color: var(--uco-err); }

.uco-attempts {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding: 6px 13px;
    font-size: .72rem;
    font-weight: 800;
    color: var(--uco-warn);
    background: var(--uco-warn-bg);
    border: 1px solid var(--uco-warn-line);
    border-radius: var(--uco-r-pill);
}

.uco-attempts.is-critical { color: var(--uco-err); background: var(--uco-err-bg); border-color: var(--uco-err-line); }

/* --- service filter on the dashboard --- */
.uco-filter {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
}

.uco-filter input {
    width: 100%;
    padding: 12px 15px 12px 44px;
    font: inherit;
    font-size: .875rem;
    color: var(--uco-ink);
    background-color: var(--uco-glass-strong);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d7190' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 18px 18px;
    border: 1.5px solid var(--uco-line);
    border-radius: var(--uco-r-pill);
    outline: none;
    box-shadow: var(--uco-sh-1);
    transition: all var(--uco-fast) var(--uco-ease);
}

.uco-filter input:focus { border-color: var(--uco-blue-500); box-shadow: var(--uco-sh-focus); }

.uco-filter-count {
    font-size: .72rem;
    font-weight: 750;
    color: var(--uco-muted);
    white-space: nowrap;
}

.service-card.is-filtered { display: none; }

/* --- idle / session warning sheet --- */
.uco-idle {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(6, 20, 42, .6);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.uco-idle.is-on { display: flex; }

.uco-idle-card {
    width: 100%;
    max-width: 430px;
    padding: 28px;
    text-align: center;
    background: var(--uco-surface);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-lg);
    box-shadow: var(--uco-sh-4);
    animation: ucoPop var(--uco-dur) var(--uco-ease) both;
}

.uco-idle-card h3 { margin: 14px 0 8px; font-size: 1.125rem; font-weight: 800; }
.uco-idle-card p { margin: 0 0 20px; font-size: .875rem; line-height: 1.6; color: var(--uco-muted); }
.uco-idle-card .uco-ring { width: 64px; height: 64px; margin: 0 auto; }
.uco-idle-card .uco-ring b { font-size: .9rem; }
.uco-idle-actions { display: flex; gap: 11px; flex-wrap: wrap; }
.uco-idle-actions .btn { flex: 1 1 140px; width: auto; }

/* --- skeleton helper --- */
.uco-skel {
    background: linear-gradient(90deg, var(--uco-surface-3) 24%, var(--uco-surface) 38%, var(--uco-surface-3) 52%);
    background-size: 220% 100%;
    animation: ucoSkeleton 1.3s linear infinite;
    border-radius: var(--uco-r-xs);
    color: transparent !important;
}

/* --- scroll reveal, applied by uco-modern.js --- */
.uco-reveal { opacity: 0; transform: translateY(26px); }

.uco-reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity var(--uco-slow) var(--uco-ease),
                transform var(--uco-slow) var(--uco-ease);
}

/* --- threshold.jsp: replaces the two inline style attributes --- */
.uco-hidden { display: none !important; }

/* initial hidden state only: NO !important, so threshold.js can still reveal
   the block with element.style.display = "block" */
.uco-init-hidden { display: none; }

.uco-readonly-strong {
    background-color: var(--uco-surface-3) !important;
    font-weight: 800;
    color: var(--uco-navy-800);
}

[data-theme="dark"] .uco-readonly-strong { color: var(--uco-ink); }

/* ==========================================================================
   13. RESPONSIVE, REDUCED MOTION, PRINT
   ========================================================================== */

@media (max-width: 1040px) {
    .portal-panel { grid-template-columns: 1fr; max-width: 620px; }
    .hero { order: 1; }
    .auth-card { order: 2; }
    .hero-logo { height: 70px; }
    .svc-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    /*
     * Same wordmark problem as the login bar: sized by height the logo came
     * out 342px wide on a 390px phone, which drove the header to 162px and
     * pushed Logout onto a third row where it was effectively off screen.
     *
     * Cap it by width, let the portal name take its own line under it, and
     * pin the user block to the right of the first row so Logout is always
     * where a customer expects it - top right, next to the brand.
     */
    .app-header { padding: 10px 14px; gap: 8px 12px; flex-wrap: wrap; }

    /*
     * Two tidy rows:
     *
     *   [ logo ]                    [ Logout ]
     *   Customer Services Portal    [ A- A A+ ]
     *
     * Both boxes dissolve so their children become items of the bar itself,
     * and ::before is an empty full-width item that forces the row break at a
     * fixed point. Relying on wrapping alone would let the name creep onto the
     * first row on a slightly wider phone and push Logout off again.
     */
    .app-brand,
    .app-user { display: contents; }

    .app-logo {
        order: 10;
        height: auto;
        width: auto;
        max-width: 172px;
        max-height: 30px;
    }

    .logout-btn { order: 20; margin-left: auto; }

    .app-header::before {
        content: "";
        order: 25;
        flex: 1 0 100%;
        height: 0;
        margin: -4px 0;        /* the row gap would otherwise count twice */
    }

    .app-brand-text { order: 30; min-width: 0; }
    .app-brand-text .kicker { display: none; }
    .app-brand-text .name { font-size: .8125rem; }

    .app-header .a11y-bar { order: 40; margin-left: auto; }
    /* The wrapper is dissolved at this width, so without an order the masked
       A/C block sorts to 0 and lands ahead of the logo. It belongs on row two
       with the portal name. */
    .app-user-meta { order: 35; padding: 6px 11px; }

    .dash-wrap { padding: 16px 14px 6px; }
    .welcome-strip { padding: 18px; }
    .services-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-card { padding: 20px 17px; border-radius: var(--uco-r-md); }
    .otp-digit { width: 44px; height: 52px; font-size: 1.2rem; }
    .svc-list { grid-template-columns: 1fr; }
    .review-item { flex-direction: column; gap: 4px; }
    .review-item .rl, .review-item .rv { flex: none; text-align: left; }
    .uco-toasts { top: 10px; right: 10px; left: 10px; width: auto; }
    .toast { right: 12px; left: 12px; bottom: 14px; max-width: none; }
    .btn-row .btn { flex: 1 1 100%; }
    .hero-headline { font-size: 1.55rem; }
}

@media (max-width: 420px) {
    .otp-digit { width: 40px; height: 48px; font-size: 1.1rem; }
    .otp-boxes { gap: 6px; }
    /* the masked account and mobile go; Logout must not */
    .app-user-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .uco-reveal { opacity: 1; transform: none; }
}

@media print {
    body::before, body::after { display: none; }
    .app-header, .page-topbar, .a11y-bar, .logout-btn, .back-link,
    .uco-toasts, .uco-progress, .toast, .route-spinner, .uco-filter,
    .uco-idle, .dash-footer { display: none !important; }
    .form-card, .review, .charges { box-shadow: none; border: 1px solid #bbb; }
    body { background: #fff; }
}

/* ==========================================================================
   14. LOGIN SHELL - ONE SCREEN, BRAND ON TOP
   --------------------------------------------------------------------------
   The login page is a single screen: the window itself never scrolls. The
   brand bar sits at the top of the column, the panel takes the rest of the
   height, and whichever pane is too tall for it scrolls inside its own box.
   Nothing is ever out of reach, and nothing moves the page under the customer
   while they are typing an account number.
   ========================================================================== */

.login-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;   /* login.css centres them, which shrink-wraps the bar */
    justify-content: flex-start;
    height: 100vh;
    height: 100dvh;         /* phones: the real height, below the address bar */
    min-height: 0;          /* section 8 asks for 100vh, which 100dvh must beat */
    max-height: 100vh;
    max-height: 100dvh;
    padding: 0;
    overflow: hidden;
}

/* ---- the brand bar ---- */
.page-topbar {
    flex: 0 0 auto;
    position: relative;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 9px clamp(14px, 3vw, 38px);
    background: var(--uco-glass-strong);
    border-bottom: 1px solid var(--uco-line);
    backdrop-filter: blur(14px) saturate(1.5);
    -webkit-backdrop-filter: blur(14px) saturate(1.5);
}

.page-topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: var(--uco-grad-rail);
    background-size: 200% 100%;
    animation: ucoRail 9s linear infinite;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    animation: ucoRiseIn var(--uco-dur) var(--uco-ease) both;
}

/* the logo PNG carries its own field: no card, no padding, no border */
.topbar-logo {
    height: 46px;
    width: auto;
    background: none;
    border: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    /* The bank mark does not move. It is an identity, not an ornament: a logo
       that bobs or tilts under the pointer reads as a toy on a bank page. */
}

.topbar-brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.topbar-brand-text .kicker {
    font-size: .625rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--uco-gold-600);
}

.topbar-brand-text .name {
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -.015em;
    line-height: 1.2;
    color: var(--uco-navy-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .topbar-brand-text .name { color: var(--uco-ink); }
[data-theme="dark"] .topbar-brand-text .kicker { color: var(--uco-gold-400); }

/* ---- the panel fills whatever height is left ---- */
.portal {
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
    max-width: none;   /* login.css caps it at 1080px, with no auto margin */
    padding: clamp(10px, 1.6vh, 22px) clamp(12px, 2.6vw, 34px) clamp(12px, 1.8vh, 24px);
}

.portal-panel {
    width: 100%;
    max-width: 1180px;
    height: 100%;
    min-height: 0;       /* login.css asks for 600px, which would overflow */
    max-height: 100%;
    overflow: hidden;
}

/* Each pane scrolls on its own, so the window never has to.
   The hero itself stays clipped: its aurora layer is inset by -20%, and an
   absolutely positioned descendant that hangs below the box counts towards
   scrollable overflow - the pane would offer 160px of scroll into nothing.
   .hero-scroll holds the real content and is the one that scrolls. */
.hero { overflow: hidden; display: flex; }

.hero-scroll {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .3) transparent;
}

.auth-card {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--uco-line-strong) transparent;
}

.hero-scroll::-webkit-scrollbar,
.auth-card::-webkit-scrollbar { width: 8px; }

.hero-scroll::-webkit-scrollbar-track,
.auth-card::-webkit-scrollbar-track { background: transparent; }

.hero-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .26); border-radius: 99px; }
.auth-card::-webkit-scrollbar-thumb { background: var(--uco-line-strong); border-radius: 99px; }

/* the logo now lives on the bar above, so the hero leads with the headline */
.hero-brand { display: none; }

.hero { gap: 20px; padding: clamp(20px, 2.4vw, 34px); justify-content: center; }
.hero-top { gap: 14px; }
.hero-headline { font-size: clamp(1.5rem, 2.3vw, 2.05rem); }
.hero-sub { font-size: .875rem; line-height: 1.62; }
.hero-services { padding: 15px; }
.hero-services-head { margin-bottom: 11px; }
.svc-list { gap: 8px; }
.svc-chip { padding: 9px 10px; gap: 9px; }
.svc-ic { width: 28px; height: 28px; }
.svc-ic svg { width: 15px; height: 15px; }
.svc-name { font-size: .75rem; }

/* ---- the auth card, tightened so a 900px window needs no inner scroll ---- */
.auth-card { padding: clamp(20px, 2.4vw, 32px) clamp(20px, 2.6vw, 36px); }
.auth-title { margin-bottom: 4px; font-size: 1.375rem; }
.auth-sub { margin-bottom: 14px; }
.seg { margin-bottom: 14px; }
.auth-card .field { margin-bottom: 14px; }
.captcha-img { height: 46px; }
.captcha-row { margin-bottom: 8px; }
.auth-card .uco-advice { margin-top: 12px; padding: 11px 13px; }
.otp-section { padding: 16px; }


/* ---- one column: the viewport column scrolls, not the window ---- */
@media (max-width: 1040px) {
    /* The scroller moves out to .portal. It cannot be the panel: a grid with
       a definite height sizes its auto rows to the space available, not to
       their content, and with min-height 0 on the panes the two rows are
       simply squashed until they overlap. A plain block scroller holding an
       auto-height flex column has no such rule. */
    .portal {
        display: block;
        padding: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .portal-panel {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
        height: auto;
        min-height: 100%;
        max-height: none;
        overflow: visible;
    }

    /* Stacked, each pane flows at its own height. The hero stays clipped:
       its aurora layer hangs 20% below the box, and in a scrolling column
       that is 100px of empty scroll past the last service. */
    .hero-scroll,
    .auth-card { overflow: visible; }
    .hero,
    .auth-card { flex: 0 0 auto; }
    .hero-scroll { justify-content: flex-start; }

    /* Stacked, the brand panel leads and the form follows it, the way the two
       columns read left to right on a wide screen. It is trimmed hard below so
       the first field is barely a thumb-flick away. */
    .hero { order: 1; }
    .auth-card { order: 2; }
    .svc-list { grid-template-columns: 1fr 1fr; }
}

/* ---- phones ---- */
@media (max-width: 680px) {
    /* edge to edge: a rounded card floating in a gutter wastes a third of a
       small screen, and the brand bar above already frames the page */
    .portal-panel { max-width: none; border: 0; border-radius: 0; box-shadow: none; }

    /*
     * The brand lockup on a narrow screen.
     *
     * The logo is a wordmark, 800x103 - nearly eight times wider than it is
     * tall. Sized by height alone it came out 295px wide on a 390px phone and
     * left 57px for the portal name, which then ellipsised to nothing; on the
     * dashboard it pushed the whole header to 162px and threw Logout onto a
     * third row.
     *
     * So the logo is capped by WIDTH here, and the name drops to its own line
     * underneath it. Two short rows, both legible, instead of one crushed one.
     * The kicker goes: the logo already says UCO BANK, in two scripts.
     */
    /* a tight row gap: the break item plus two gaps was adding 28px */
    .page-topbar { padding: 6px 14px; gap: 4px 10px; }

    .topbar-brand {
        /* The brand box dissolves, so the logo and the name become items of
           the bar itself. Otherwise a full-width name forces the whole brand
           box full width and shoves the display controls onto a third row. */
        display: contents;
    }

    .topbar-logo {
        order: 1;
        height: auto;
        width: auto;
        max-width: 172px;
        max-height: 30px;
    }

    /* Two rows, the same shape as the dashboard header:
         [ logo ]  [ links ]
         Customer Services Portal   [ A- A A+ ]
       ::before is an empty full-width item that forces the break; wrapping
       alone put the display controls on a row of their own and made the bar
       148px tall. */
    .page-topbar::before {
        content: "";
        order: 2;
        flex: 1 0 100%;
        height: 0;
        margin: -4px 0;
    }

    .page-topbar .a11y-bar { order: 4; margin-left: auto; }

    .topbar-brand-text {
        order: 3;
        flex: 0 1 auto;
        min-width: 0;
        gap: 0;
    }

    .topbar-brand-text .kicker { display: none; }

    .topbar-brand-text .name {
        font-size: .8125rem;
        white-space: normal;      /* it has a whole row now; let it use it */
        overflow: visible;
        text-overflow: clip;
    }

    /* 40px square: the smallest comfortable tap target */
    .a11y-btn { min-width: 40px; height: 40px; }
    .a11y-bar { gap: 1px; padding: 3px; }

    .auth-card { padding: 20px 16px 26px; }
    .auth-title { font-size: 1.25rem; }
    /* The brand panel is above the form now, so every pixel it takes is a
       pixel between the customer and the account-number field. Two columns of
       small chips instead of five full-width rows saves about 130px. */
    .hero { padding: 18px 16px 20px; }
    .hero-scroll { gap: 14px; }
    .hero-top { gap: 10px; }
    .hero-headline { font-size: 1.3rem; }
    .hero-sub { font-size: .8125rem; line-height: 1.5; }
    .hero-services { padding: 12px; }
    .hero-services-head { margin-bottom: 9px; }
    .svc-list { grid-template-columns: 1fr 1fr; gap: 7px; }
    .svc-chip { padding: 8px 9px; gap: 8px; }
    .svc-ic { width: 24px; height: 24px; }
    .svc-ic svg { width: 13px; height: 13px; }
    .svc-name { font-size: .6875rem; line-height: 1.3; }

    /* 16px, or iOS zooms the whole page the moment a field takes focus */
    .auth-card .field input,
    .auth-card .field select { font-size: 16px; padding: 12px 14px; }

    .captcha-img { flex: 1 1 100%; min-width: 0; height: 54px; }
    .captcha-row { gap: 8px; }
    .seg-btn { padding: 12px 8px; }

    /* five boxes that divide the width, instead of a fixed size that wraps */
    .otp-boxes { gap: 7px; }
    .otp-digit { flex: 1 1 0; width: auto; min-width: 0; height: 54px; font-size: 1.25rem; }

}

@media (max-width: 380px) {
    /* The name stays: it is the one thing that says which portal this is. */
    .page-topbar { gap: 8px; padding: 7px 10px; }
    .topbar-logo { max-width: 148px; max-height: 26px; }
    .topbar-brand-text .name { font-size: .75rem; }
    .otp-digit { height: 48px; font-size: 1.1rem; }
}

/* A short landscape phone has no room for a hero at all; the sign-in form is
   the only thing that matters there. */
@media (max-height: 460px) and (orientation: landscape) and (max-width: 1040px) {
    .hero { display: none; }
    .topbar-logo { height: 32px; }
    .page-topbar { padding: 5px 14px; }
}

/* On the login page the toast stack would sit on top of the brand bar, which
   is the one thing that tells the customer whose site they are on - and the
   bar is two rows tall on a phone, the second of them the portal name. */
@media (max-width: 760px) {
    .login-body .uco-toasts { top: 116px; }
}

/* ==========================================================================
   15. AUDIO CAPTCHA
   --------------------------------------------------------------------------
   The speaker button is the whole accessible route into this page, so it is
   given the same weight as the refresh button and a state a listener can see.
   ========================================================================== */

/* size and chrome come from the shared .icon-btn rule; this adds the ring */
.audio-btn { position: relative; }

.audio-btn svg { width: 19px; height: 19px; }

/* playing: filled, with a ring that keeps pace with the reading */
.audio-btn.is-playing {
    color: #fff;
    background: var(--uco-grad-brand);
    border-color: var(--uco-blue-600);
}

.audio-btn.is-playing::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    border: 2px solid var(--uco-blue-500);
    opacity: .55;
    animation: ucoAudioRing 1.4s var(--uco-ease-io) infinite;
}

@keyframes ucoAudioRing {
    0%   { transform: scale(.92); opacity: .65; }
    70%  { transform: scale(1.14); opacity: 0; }
    100% { transform: scale(1.14); opacity: 0; }
}

/* The volume control costs a line of a small screen, so it stays out of the
   way until login.js marks the row as being in use. */
.volume-container { display: none; }

.captcha-row.is-audio .volume-container {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 11px 3px 4px;
    background: var(--uco-surface-2);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-pill);
    animation: ucoPop var(--uco-dur) var(--uco-ease) both;
}

.volume-btn {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--uco-blue-600);
    cursor: pointer;
}

.volume-btn:hover {
    transform: none;
    background: var(--uco-blue-100);
    color: var(--uco-blue-600);
}

/* the two arcs fall away as the level drops, so the state reads without
   colour and without reading the slider */
.volume-btn #volWave1,
.volume-btn #volWave2 { transition: opacity var(--uco-fast) var(--uco-ease); }
.volume-btn.is-low #volWave2 { opacity: 0; }
.volume-btn.is-muted #volWave1,
.volume-btn.is-muted #volWave2 { opacity: 0; }
.volume-btn.is-muted { color: var(--uco-muted); }

.volume-slider {
    width: 78px;
    height: 5px;
    accent-color: var(--uco-blue-500);
    cursor: pointer;
}

@media (max-width: 680px) {
    .volume-btn { width: 40px; height: 40px; }
    .captcha-row.is-audio .volume-container { flex: 1 1 auto; justify-content: center; }
    .volume-slider { width: 100%; max-width: 180px; }
}

/* ==========================================================================
   16. USEFUL LINKS DRAWER
   --------------------------------------------------------------------------
   The same idea as the IRPS drawer in the SSO portal: a trigger in the chrome
   bar opens a panel of categorised links with a search box. The list itself is
   server-rendered by com.util.QuickLinks, so this file only dresses it.
   ========================================================================== */

/* ---- the trigger, beside the display controls ---- */
.ql-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px 0 11px;
    font: inherit;
    font-size: .8125rem;
    font-weight: 750;
    color: var(--uco-blue-600);
    background: var(--uco-surface);
    border: 1px solid var(--uco-line-strong);
    border-radius: var(--uco-r-pill);
    box-shadow: var(--uco-sh-1);
    cursor: pointer;
    transition: all var(--uco-fast) var(--uco-ease);
}

.ql-trigger-ic { display: inline-flex; }
.ql-trigger-ic svg { width: 17px; height: 17px; }

.ql-trigger:hover {
    color: #fff;
    background: var(--uco-grad-brand);
    border-color: var(--uco-blue-600);
    transform: translateY(-2px);
    box-shadow: var(--uco-sh-2);
}

.ql-trigger:focus-visible {
    outline: none;
    border-color: var(--uco-blue-500);
    box-shadow: var(--uco-sh-focus);
}

.ql-trigger[aria-expanded="true"] {
    color: #fff;
    background: var(--uco-grad-brand);
    border-color: var(--uco-blue-600);
}

/* ---- the dimmed backdrop ---- */
.ql-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(6, 20, 42, .46);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity var(--uco-dur) var(--uco-ease);
}

.ql-overlay.is-open { opacity: 1; }

/* ---- the panel ---- */
.ql-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 160;
    width: min(420px, 100vw);
    display: flex;
    flex-direction: column;
    background: var(--uco-surface);
    border-left: 1px solid var(--uco-line);
    box-shadow: -28px 0 70px rgba(10, 44, 94, .22);
    transform: translateX(104%);
    transition: transform var(--uco-slow) var(--uco-ease);
}

.ql-panel.is-open { transform: translateX(0); }

/* a class rule with display:flex beats the user-agent [hidden] rule */
.ql-panel[hidden], .ql-overlay[hidden], .ql-none[hidden] { display: none !important; }

.ql-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 14px;
    color: #fff;
    background: var(--uco-grad-brand);
}

.ql-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ql-head-text strong { font-size: 1.0625rem; font-weight: 800; letter-spacing: -.015em; }
.ql-head-text span { font-size: .75rem; font-weight: 600; color: rgba(236, 244, 255, .82); }

.ql-close {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--uco-r-sm);
    cursor: pointer;
    transition: background var(--uco-fast) var(--uco-ease);
}

.ql-close:hover { background: rgba(255, 255, 255, .26); }
.ql-close svg { width: 17px; height: 17px; }

.ql-search { padding: 14px 18px 4px; }

.ql-search input {
    width: 100%;
    padding: 11px 14px;
    font: inherit;
    font-size: .875rem;
    color: var(--uco-ink);
    background: var(--uco-surface-2);
    border: 1.5px solid var(--uco-line-strong);
    border-radius: var(--uco-r-sm);
    outline: none;
}

.ql-search input:focus { border-color: var(--uco-blue-500); box-shadow: var(--uco-sh-focus); }

.ql-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 18px 22px;
    scrollbar-width: thin;
}

.ql-cat { margin-top: 14px; }
.ql-cat.is-filtered { display: none; }

.ql-cat-title {
    margin: 0 0 9px;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--uco-muted);
}

.ql-cat-grid { display: flex; flex-direction: column; gap: 8px; }

.ql-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    text-decoration: none;
    color: var(--uco-ink);
    background: var(--uco-surface-2);
    border: 1px solid var(--uco-line);
    border-radius: var(--uco-r-sm);
    transition: all var(--uco-fast) var(--uco-ease);
}

.ql-card.is-filtered { display: none; }

.ql-card:hover {
    background: var(--uco-surface);
    border-color: var(--uco-blue-200);
    transform: translateX(3px);
    box-shadow: var(--uco-sh-2);
    text-decoration: none;
}

.ql-card:focus-visible { outline: none; border-color: var(--uco-blue-500); box-shadow: var(--uco-sh-focus); }

.ql-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    color: #0a2c5e;
    background: var(--uco-grad-gold);
    border-radius: var(--uco-r-xs);
    box-shadow: 0 4px 12px rgba(239, 156, 17, .26);
}

.ql-ico svg { width: 17px; height: 17px; }

.ql-name { flex: 1; min-width: 0; font-size: .84rem; font-weight: 700; line-height: 1.35; }

.ql-go { flex: 0 0 auto; color: var(--uco-faint); opacity: 0; transform: translateX(-4px); transition: all var(--uco-fast) var(--uco-ease); }
.ql-go svg { width: 15px; height: 15px; }
.ql-card:hover .ql-go { opacity: 1; transform: translateX(0); color: var(--uco-blue-500); }

.ql-none { padding: 26px 18px; text-align: center; font-size: .8125rem; font-weight: 600; color: var(--uco-muted); }

@media (max-width: 680px) {
    /* the label would crowd the bar; the grid icon carries it */
    .ql-trigger-tx { display: none; }
    .ql-trigger { height: 40px; padding: 0; width: 40px; justify-content: center; }
    .ql-panel { width: 100vw; }

    /* The brand leads. Both bars dissolve their wrappers at this width, so the
       trigger is a bare flex item and would otherwise sort to the front on its
       default order of 0. It shares row one with the logo, ahead of the break. */
    .page-topbar .ql-trigger { order: 1; margin-left: auto; }
}

@media (max-width: 760px) {
    .app-header .ql-trigger { order: 15; }   /* after the logo, before Logout */
}

@media (prefers-reduced-motion: reduce) {
    .ql-panel { transition: none; }
    .ql-card:hover { transform: none; }
}
