/**
 * SCSVMV Fee Portal — Kanchi Institutional theme
 * Deep teal primary, brass accent, Source Serif 4 + Outfit
 */
:root {
    --bg-page: radial-gradient(ellipse 120% 80% at 10% -10%, rgba(11, 79, 74, 0.09) 0%, transparent 55%),
               radial-gradient(ellipse 90% 60% at 100% 0%, rgba(166, 124, 45, 0.07) 0%, transparent 50%),
               linear-gradient(180deg, #eef5f3 0%, #e6efec 45%, #dde8e5 100%);
    --bg-page-solid: #e6efec;
    --bg-surface: #fbfcfa;
    --bg-surface-hover: #f0f6f4;
    --bg-muted: #d8e5e2;
    --primary: #0B4F4A;
    --primary-hover: #0A3F3B;
    --primary-active: #083330;
    --primary-subtle: #d8ebe8;
    --primary-border: #7eb5af;
    --accent: #A67C2D;
    --accent-light: #f7f0e3;
    --accent-hover: #8f6a24;
    --success: #0F766E;
    --success-bg: #ccfbf1;
    --success-border: #5eead4;
    --warning: #B45309;
    --warning-bg: #fef3c7;
    --warning-border: #fcd34d;
    --danger: #B91C1C;
    --danger-bg: #fee2e2;
    --danger-border: #fca5a5;
    --info: #0B4F4A;
    --info-bg: #d8ebe8;
    --info-border: #7eb5af;
    --text: #14201e;
    --text-secondary: #243532;
    --text-muted: #4a635e;
    --text-disabled: #8aa39d;
    --border: #c5d6d2;
    --border-strong: #7a9a94;
    --shadow-sm: 0 1px 2px rgba(11, 79, 74, 0.05);
    --shadow: 0 2px 10px rgba(11, 79, 74, 0.07), 0 1px 3px rgba(11, 79, 74, 0.04);
    --shadow-md: 0 8px 24px rgba(11, 79, 74, 0.1), 0 2px 8px rgba(11, 79, 74, 0.05);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --transition: 0.22s ease;
    --focus-ring: 0 0 0 3px rgba(11, 79, 74, 0.22);
    --header-height: 56px;
    --content-max: 1120px;
}

@media (prefers-reduced-motion: reduce) {
    :root { --transition: 0.01s; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-page-solid);
    background-image: var(--bg-page);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    top: -3rem;
    left: 0.75rem;
    z-index: 200;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    transition: top var(--transition);
}
.skip-link:focus {
    top: 0.75rem;
    outline: none;
    box-shadow: var(--focus-ring);
}

.main-content {
    flex: 1 0 auto;
    padding: 1.25rem 1rem 2rem;
    width: 100%;
    animation: contentIn 0.4s ease both;
}
@media (min-width: 640px) {
    .main-content { padding: 1.5rem 1.25rem 2.5rem; }
}
@media (min-width: 1024px) {
    .main-content { padding: 2rem 1.5rem 3rem; }
}

@keyframes contentIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== Sticky portal chrome (masthead + menu) ========== */
.portal-sticky-chrome {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bg-surface);
    box-shadow: 0 4px 18px rgba(11, 79, 74, 0.1);
}

/* ========== University masthead ========== */
.univ-masthead {
    background: linear-gradient(180deg, #ffffff 0%, #f7faf9 100%);
    border-bottom: 2px solid var(--accent);
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(11, 79, 74, 0.07);
}
.univ-masthead-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}
.univ-masthead-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    flex: 1 1 auto;
}
.univ-masthead-brand:hover { color: inherit; }
.univ-masthead-logo {
    display: block;
    width: 56px;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(11, 79, 74, 0.12));
}
.univ-masthead-text {
    min-width: 0;
    flex: 1 1 auto;
}
.univ-masthead-sanskrit,
.univ-masthead-name,
.univ-masthead-address {
    overflow: visible;
    text-overflow: unset;
    word-break: normal;
    overflow-wrap: break-word;
}
.univ-masthead-sanskrit {
    margin: 0 0 0.12rem;
    font-family: var(--font-display);
    font-size: clamp(0.78rem, 1.35vw, 1.05rem);
    font-weight: 700;
    color: #7a1f1f;
    line-height: 1.35;
    letter-spacing: 0.01em;
}
.univ-masthead-name {
    margin: 0 0 0.12rem;
    font-family: var(--font-display);
    font-size: clamp(0.82rem, 1.4vw, 1.05rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.univ-masthead-address {
    margin: 0;
    font-size: clamp(0.68rem, 1vw, 0.8rem);
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 500;
}

/* Parampara sits to the right of the university name */
.univ-masthead-parampara {
    flex: 0 0 auto;
    max-width: min(300px, 32vw);
    max-height: 62px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: right center;
    border-radius: 4px;
    align-self: center;
}

.univ-masthead-app {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 0.15rem;
    padding: 0.45rem 0.85rem;
    background: linear-gradient(135deg, var(--primary) 0%, #0d5c56 100%);
    color: #fff;
    border-radius: var(--radius);
    border: 1px solid rgba(166, 124, 45, 0.45);
    box-shadow: 0 4px 14px rgba(11, 79, 74, 0.18);
    flex-shrink: 0;
}
.univ-masthead-app-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 232, 180, 0.9);
}
.univ-masthead-app-title {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #fff;
    white-space: nowrap;
}

/* Desktop */
@media (min-width: 900px) {
    .univ-masthead-logo { width: 60px; }
    .univ-masthead-parampara {
        max-width: min(340px, 30vw);
        max-height: 68px;
    }
}

/*
 * Tablet / mobile: compact row — logo + full wrapping name, parampara on the right.
 */
@media (max-width: 899px) {
    .portal-sticky-chrome {
        top: 0;
        padding-top: 0;
    }
    .univ-masthead {
        border-bottom-width: 1px;
        box-shadow: 0 1px 6px rgba(11, 79, 74, 0.06);
    }
    .univ-masthead-inner {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem 0.5rem;
        padding: 0.35rem 0.65rem 0.4rem;
        padding-top: max(0.35rem, env(safe-area-inset-top, 0px));
    }
    .univ-masthead-brand {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        align-items: flex-start;
        gap: 0.45rem;
    }
    .univ-masthead-logo {
        width: 36px;
        margin-top: 0.05rem;
    }
    .univ-masthead-sanskrit {
        font-size: 0.72rem;
        line-height: 1.25;
        margin: 0 0 0.05rem;
    }
    .univ-masthead-name {
        font-size: 0.78rem;
        line-height: 1.25;
        margin: 0 0 0.05rem;
    }
    .univ-masthead-address {
        font-size: 0.65rem;
        line-height: 1.25;
    }
    .univ-masthead-parampara {
        max-width: min(148px, 38vw);
        max-height: 46px;
        margin-left: 0;
        align-self: center;
    }
    .univ-masthead-inner--with-app .univ-masthead-app {
        flex: 1 1 100%;
        align-items: flex-start;
        text-align: left;
        max-width: none;
        gap: 0.05rem;
        padding: 0.28rem 0.5rem;
        border-radius: 6px;
        box-shadow: none;
    }
    .univ-masthead-app-label {
        font-size: 0.7rem;
        letter-spacing: 0.1em;
        line-height: 1.2;
    }
    .univ-masthead-app-title {
        white-space: normal;
        font-size: 1rem;
        line-height: 1.25;
        overflow: visible;
        word-break: normal;
        overflow-wrap: break-word;
    }
    .univ-masthead::after { display: none; content: none; }
}

/* Very narrow phones: denser, still full wrapping text */
@media (max-width: 420px) {
    .univ-masthead-inner {
        gap: 0.28rem 0.4rem;
        padding: 0.28rem 0.5rem 0.32rem;
        padding-top: max(0.28rem, env(safe-area-inset-top, 0px));
    }
    .univ-masthead-logo { width: 32px; }
    .univ-masthead-sanskrit { font-size: 0.68rem; }
    .univ-masthead-name { font-size: 0.72rem; }
    .univ-masthead-address { font-size: 0.6rem; }
    .univ-masthead-parampara {
        max-width: min(120px, 34vw);
        max-height: 38px;
    }
    .univ-masthead-inner--with-app .univ-masthead-app {
        padding: 0.22rem 0.4rem;
    }
    .univ-masthead-app-title { font-size: 0.9rem; }
}

/* Legacy trust strip (login / verify pages) */
.trust-strip {
    background: linear-gradient(90deg, var(--primary) 0%, #0d5c56 50%, var(--primary-hover) 100%);
    color: rgba(255, 255, 255, 0.92);
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--accent);
}
.trust-strip strong {
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ========== Header / nav bar ========== */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.header-brand-strip { display: none; }
.header-brand-strip-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
}
.header-brand-strip .header-brand {
    color: var(--text);
    gap: 0.85rem;
}
.header-brand-strip .header-brand:hover { color: var(--primary); }
.header-brand-strip .header-brand:hover .header-app-name { color: var(--primary); }
.header-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(11, 79, 74, 0.25);
}
.header-banner-img {
    display: block;
    height: 44px;
    width: auto;
    max-width: min(280px, 80vw);
    object-fit: contain;
}
@media (min-width: 640px) {
    .header-banner-img { height: 52px; max-width: 340px; }
}
@media (min-width: 900px) {
    .header-banner-img { height: 60px; max-width: 400px; }
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    position: relative;
}
.header-menu-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    margin-right: auto;
    flex: 1 1 auto;
}
.header-menu-kicker {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    line-height: 1.2;
}
.header-menu-title {
    font-family: var(--font-display);
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    white-space: normal;
    overflow: visible;
}
.header-menu-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
}
.header-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    min-height: 44px;
    padding: 0.35rem 0;
}
.header-brand:hover { color: var(--primary); }
.header-brand:hover .header-app-name { color: var(--primary); }
.header-logo-img {
    display: block;
    height: 48px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}
@media (min-width: 640px) {
    .header-logo-img { height: 56px; max-width: 200px; }
}
.header-app-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: inherit;
    line-height: 1.25;
}
.header-app-name small {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 0.1rem;
}
@media (min-width: 640px) {
    .header-app-name { font-size: 1.2rem; }
}

@media (max-width: 899px) {
    .site-header {
        background: linear-gradient(90deg, var(--primary) 0%, #0d5c56 100%);
        border-bottom: 1px solid rgba(166, 124, 45, 0.5);
    }
    .header-inner {
        min-height: 36px;
        padding: 0.2rem 0.45rem 0.2rem 0.65rem;
        justify-content: space-between;
        gap: 0.4rem;
    }
    .header-menu-label {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
    }
    .header-menu-kicker {
        color: rgba(255, 232, 180, 0.92);
        font-size: 0.72rem;
        letter-spacing: 0.1em;
    }
    .header-menu-title {
        color: #fff;
        font-size: 1rem;
        font-weight: 700;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        line-height: 1.2;
    }
    .header-menu-sub { display: none; }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: min(70vh, 520px);
        background: var(--bg-surface);
        border-bottom: 2px solid var(--accent);
        box-shadow: var(--shadow-md);
        color: var(--text);
    }
}

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text);
    flex-shrink: 0;
    position: relative;
}
.nav-toggle:hover {
    background: var(--bg-muted);
    border-color: var(--border-strong);
}
.nav-toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.nav-toggle::before,
.nav-toggle::after {
    content: '';
    position: absolute;
    left: 11px;
    right: 11px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform var(--transition);
}
.nav-toggle::before { top: 16px; }
.nav-toggle::after { top: 24px; }
.nav-toggle.is-open::before {
    top: 20px;
    transform: rotate(45deg);
}
.nav-toggle.is-open::after {
    top: 20px;
    transform: rotate(-45deg);
}
.nav-toggle-bars { display: none; }
.nav-toggle-text { display: none; }

@media (max-width: 899px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        width: auto;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0 0.75rem;
        background: rgba(255, 255, 255, 0.14);
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 8px;
        color: #fff;
        box-shadow: none;
    }
    .nav-toggle:hover {
        background: rgba(255, 255, 255, 0.22);
        border-color: rgba(255, 255, 255, 0.5);
        color: #fff;
    }
    .nav-toggle::before,
    .nav-toggle::after { display: none; content: none; }
    .nav-toggle-text {
        display: inline;
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.02em;
    }
    .nav-toggle-bars {
        display: block;
        width: 12px;
        height: 2px;
        background: #fff;
        border-radius: 1px;
        position: relative;
    }
    .nav-toggle-bars::before,
    .nav-toggle-bars::after {
        content: '';
        display: block;
        position: absolute;
        left: 0;
        width: 12px;
        height: 2px;
        background: #fff;
        border-radius: 1px;
    }
    .nav-toggle-bars::before { top: -3.5px; }
    .nav-toggle-bars::after { top: 3.5px; }
    .nav-toggle.is-open .nav-toggle-bars { background: transparent; }
    .nav-toggle.is-open .nav-toggle-bars::before {
        top: 0;
        transform: rotate(45deg);
    }
    .nav-toggle.is-open .nav-toggle-bars::after {
        top: 0;
        transform: rotate(-45deg);
    }
}
@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .header-inner {
        justify-content: flex-start;
        gap: 1rem;
    }
    .header-menu-label {
        display: flex;
        flex: 0 1 auto;
        max-width: min(420px, 38vw);
    }
    .main-nav {
        margin-left: auto;
    }
}

.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    padding: 0.75rem 1rem 1.25rem;
    gap: 0.25rem;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.main-nav.is-open { display: flex; }
@media (min-width: 900px) {
    .main-nav {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        flex: 1;
        justify-content: flex-end;
        gap: 0.125rem;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
        max-height: none;
        overflow: visible;
        flex-wrap: wrap;
        min-width: 0;
    }
}

.nav-icon {
    font-size: 1.05em;
    margin-right: 0.35rem;
    opacity: 0.9;
    flex-shrink: 0;
}
.nav-item {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.55rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--transition), background var(--transition);
    gap: 0.3rem;
    min-height: 44px;
    box-sizing: border-box;
}
.nav-item:hover {
    color: var(--primary);
    background: var(--primary-subtle);
}
.nav-item:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}
.nav-item--primary,
.nav-item--active {
    color: var(--primary);
    font-weight: 600;
    background: var(--primary-subtle);
    box-shadow: inset 0 -2px 0 var(--accent);
}
.nav-item--dropdown {
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.55rem 0.8rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
}
.nav-chevron {
    margin-left: 0.2rem;
    font-size: 0.7rem;
    opacity: 0.85;
    transition: transform var(--transition);
}
.nav-item--dropdown.is-open .nav-chevron { transform: rotate(180deg); }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    min-width: 210px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 50;
    display: none;
}
.nav-dropdown-menu.is-open { display: block; animation: contentIn 0.2s ease; }
@media (max-width: 899px) {
    .nav-dropdown { width: 100%; }
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding-left: 1rem;
        min-width: 0;
        margin-top: 0.25rem;
    }
}
.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}
.nav-dropdown-menu a:hover {
    color: var(--primary);
    background: var(--primary-subtle);
}
.nav-dropdown-menu a.is-active {
    color: var(--primary);
    background: var(--primary-subtle);
    font-weight: 700;
}
.nav-user-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    width: 100%;
}
.main-nav .header-help,
.main-nav .header-logout {
    margin-left: 0;
    margin-top: 0;
    border-left: none;
    justify-content: center;
    min-height: 44px;
}
@media (min-width: 900px) {
    .nav-user-actions {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        width: auto;
        flex: 0 0 auto;
        margin-left: 0.35rem;
        gap: 0.45rem;
    }
    .nav-user-actions .nav-item-static {
        flex-shrink: 0;
    }
    .main-nav .header-help {
        flex-shrink: 0;
        white-space: nowrap;
    }
    .main-nav .header-logout {
        margin-left: 0;
        margin-top: 0;
        padding-left: 1rem;
        border-left: 1px solid var(--border);
        border-radius: 0;
        flex-shrink: 0;
        white-space: nowrap;
    }
}
/* Highlighted Student Help — sits left of Logout (logged-in only) */
.header-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    color: #084c42;
    background: linear-gradient(135deg, #dff7ef 0%, #b8ead8 55%, #9fdcc8 100%);
    border: 1px solid #6fbfa8;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        0 4px 12px rgba(13, 107, 92, 0.18);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.header-help i {
    font-size: 1rem;
    line-height: 1;
    color: #0d6b5c;
}
.header-help:hover {
    color: #063830;
    text-decoration: none;
    background: linear-gradient(135deg, #c8f0e2 0%, #8fd4bc 100%);
    border-color: #3d9f84;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 6px 16px rgba(13, 107, 92, 0.28);
    transform: translateY(-1px);
}
.header-help:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring), 0 4px 12px rgba(13, 107, 92, 0.2);
}
.header-help.is-active {
    color: #fff;
    background: linear-gradient(135deg, #0d6b5c 0%, #084c42 100%);
    border-color: #063830;
}
.header-help.is-active i { color: #fff; }
.header-logout {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    background: transparent;
    border: 1px solid transparent;
    transition: color var(--transition), background var(--transition);
}
.header-logout .nav-icon { margin-right: 0.35rem; }
.header-logout:hover {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: var(--danger-border);
}
.header-logout:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition),
                box-shadow var(--transition), transform 0.15s ease;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(11, 79, 74, 0.25);
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    color: #fff;
}
.btn-primary:active:not(:disabled) { background: var(--primary-active); }
.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline-primary:hover:not(:disabled) {
    background: var(--primary-subtle);
    border-color: var(--primary-hover);
    color: var(--primary-hover);
}
.btn-outline-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-outline-secondary:hover:not(:disabled) {
    background: var(--bg-muted);
    border-color: var(--border-strong);
}
.btn-secondary {
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--bg-muted);
    border-color: var(--border-strong);
}
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { filter: brightness(1.06); }
.btn-info {
    background: var(--primary-subtle);
    color: var(--primary);
    border: 1px solid var(--primary-border);
}
.btn-info:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
}
.btn-block { width: 100%; }
@media (max-width: 480px) {
    .btn { min-height: 44px; padding: 0.75rem 1.25rem; }
}

/* ========== Cards ========== */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), border-color var(--transition);
    animation: cardFadeIn 0.35s ease both;
}
.card:hover {
    box-shadow: var(--shadow);
}
@media (min-width: 640px) {
    .card { padding: 1.5rem 1.75rem; }
}
.card-title {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}
.page-title {
    font-family: var(--font-display);
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 1.5rem;
    line-height: 1.3;
}
@media (min-width: 768px) {
    .page-title { font-size: 1.875rem; }
}

/* ========== Forms ========== */
.form-group { margin-bottom: 1.25rem; }
.form-group:last-of-type { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    min-height: 44px;
    box-sizing: border-box;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control::placeholder { color: var(--text-disabled); }
.form-control:hover:not(:disabled) { border-color: var(--border-strong); }
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}
@media (max-width: 480px) {
    .form-control { padding: 0.75rem 1rem; min-height: 48px; font-size: 16px; }
}

/* ========== Alerts ========== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid;
    font-size: 0.9375rem;
    animation: cardFadeIn 0.3s ease;
}
.alert-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}
.alert-danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger);
}
.alert-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--warning);
}
.alert-info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: var(--info);
}

/* ========== Stats ========== */
.dashboard-grid {
    display: grid;
    gap: 1.25rem;
}
@media (min-width: 640px) {
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .dashboard-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md);
}
.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.stat-card-link:hover .stat-value { color: var(--primary); }
.stat-desc {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.hero-cards { margin-top: 2rem; }

/* ========== Table ========== */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-surface);
}
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
table.data-table th,
table.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
table.data-table th {
    background: var(--primary-subtle);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover td { background: var(--bg-surface-hover); }
table.data-table td.num { text-align: right; white-space: nowrap; }
.badge {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-secondary { background: var(--bg-muted); color: var(--text-muted); }
.txn-id {
    font-family: ui-monospace, 'SF Mono', monospace;
    font-size: 0.8125rem;
    color: var(--text-muted);
    word-break: break-all;
}
.table-cell-empty { color: var(--text-muted); }

/* ========== Footer ========== */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    margin-top: auto;
    flex-shrink: 0;
}
.footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 1.5rem 1rem 1.25rem;
    text-align: center;
}
@media (min-width: 640px) {
    .footer-inner { padding: 2rem 1.25rem 1.5rem; }
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
}
.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition);
    padding: 0.25rem 0;
    min-height: 44px;
    box-sizing: border-box;
}
.footer-links a:hover { color: var(--primary); }
.footer-copy {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ========== Hero / content ========== */
.hero {
    text-align: center;
    padding: 2.5rem 0 3rem;
    max-width: 560px;
    margin: 0 auto;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 0.75rem;
    line-height: 1.25;
}
.hero p {
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
    font-size: 1rem;
    line-height: 1.65;
}
@media (min-width: 768px) {
    .hero h1 { font-size: 2rem; }
}
.content-page {
    max-width: 720px;
    margin: 0 auto;
}
.content-page h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text);
}
.content-page h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--text);
}
.content-page p,
.content-page li { color: var(--text-secondary); line-height: 1.65; }
.content-page ul { padding-left: 1.5rem; }
.content-page a { color: var(--primary); font-weight: 500; }
.content-page a:hover { text-decoration: underline; }
.content-page table,
.card table {
    width: 100%;
    border-collapse: collapse;
}
.content-page table td,
.card table td {
    word-break: break-word;
    overflow-wrap: break-word;
}

.qr-wrap {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}
.qr-wrap img {
    max-width: 100%;
    height: auto;
    width: 200px;
}

/* Verify receipt */
.verify-receipt-page {
    max-width: 520px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}
.verify-receipt-page .card table td { padding: 0.35rem 0; }
.verify-success {
    border: 2px solid var(--success-border) !important;
    background: var(--success-bg) !important;
}
.verify-fail {
    border: 2px solid var(--danger-border) !important;
    background: var(--danger-bg) !important;
}
.verify-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.75rem;
    margin: 0 auto;
}
.verify-icon--ok { background: var(--success); }
.verify-icon--bad { background: var(--danger); }
.verify-title {
    text-align: center;
    margin: 0.75rem 0 0.5rem;
    font-family: var(--font-display);
}
.verify-title--ok { color: var(--success); }
.verify-title--bad { color: var(--danger); }
.verify-desc {
    text-align: center;
    margin: 0 0 1rem;
}
.verify-desc--ok { color: var(--success); }
.verify-desc--bad { color: var(--danger); }
.verify-meta {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.verify-meta td:first-child {
    color: var(--text-muted);
    padding: 0.35rem 0;
}
.verify-meta td:last-child {
    font-weight: 600;
    padding: 0.35rem 0;
}
.verify-receipt-page .page-title { text-align: center; }
.verify-receipt-page > .card-desc { text-align: center; }
.verify-center { text-align: center; margin-bottom: 0.5rem; }
.verify-actions { text-align: center; margin-top: 1.5rem; }

/* Help page */
.help-page .lead { font-size: 1.0625rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.help-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    background: var(--primary-subtle);
    border-radius: var(--radius);
    border: 1px solid var(--primary-border);
}
.help-nav a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.help-nav a:hover { text-decoration: underline; }
.help-section { margin-bottom: 2rem; }
.help-section h2 { margin-top: 0; display: flex; align-items: center; gap: 0.5rem; }
.help-steps { padding-left: 1.5rem; margin: 0 0 1rem; }
.help-steps li { margin-bottom: 1rem; }
.help-steps li:last-child { margin-bottom: 0; }
.feature-map { margin: 0; }
.feature-map dt {
    font-weight: 600;
    color: var(--text);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.feature-map dt:first-child { margin-top: 0; }
.feature-map dd {
    margin: 0.25rem 0 0 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.faq-list { margin-top: 1rem; }
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 1rem; margin: 0 0 0.5rem; color: var(--primary); font-weight: 600; }
.faq-a { margin: 0; color: var(--text-secondary); line-height: 1.65; }
.help-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.help-footer .btn { min-height: 44px; }

/* Fee summary */
.fee-summary { display: grid; gap: 0.75rem; margin: 1rem 0; }
.fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.fee-row:last-child { border-bottom: none; }
.fee-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.5rem;
}

/* Containers */
.container,
.container-wide {
    max-width: var(--content-max);
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
}
.container { max-width: 720px; }
.container-wide { max-width: 1120px; }
@media (min-width: 640px) {
    .container, .container-wide { padding-left: 1.25rem; padding-right: 1.25rem; }
}
@media (min-width: 1024px) {
    .container, .container-wide { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* Dashboard chrome */
.dashboard-page .page-title,
.fees-page .page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}
.dashboard-page .page-title .title-icon,
.fees-page .page-title .title-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius);
    background: var(--primary-subtle);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
@media (max-width: 899px) {
    .main-content {
        padding: 0.75rem 0.75rem 1.5rem;
    }
    .dashboard-page .page-title,
    .fees-page .page-title {
        gap: 0.5rem;
        margin-bottom: 0.85rem;
        font-size: 1.2rem;
        line-height: 1.25;
        white-space: normal;
        overflow: visible;
    }
    .dashboard-page .page-title .title-icon,
    .fees-page .page-title .title-icon {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
}
.dashboard-reg-form .card {
    border-left: 4px solid var(--primary);
    animation: cardFadeIn 0.35s ease;
}
.dashboard-reg-form .form-control {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}
.dashboard-reg-form .btn-primary { padding: 0.75rem 1.5rem; }
.card-desc {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}
.fees-page .card-desc { margin-bottom: 1rem; }

.dashboard-stats {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
@media (min-width: 640px) {
    .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .dashboard-stats { grid-template-columns: repeat(4, 1fr); }
}
.stat-card-mod {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    animation: cardFadeIn 0.35s ease backwards;
    position: relative;
    overflow: hidden;
}
.stat-card-mod:nth-child(1) { animation-delay: 0.03s; }
.stat-card-mod:nth-child(2) { animation-delay: 0.06s; }
.stat-card-mod:nth-child(3) { animation-delay: 0.09s; }
.stat-card-mod:nth-child(4) { animation-delay: 0.12s; }
.stat-card-mod:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md);
}
.stat-card-mod .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
}
.stat-card-mod .stat-icon.reg { background: var(--info-bg); color: var(--info); }
.stat-card-mod .stat-icon.name { background: var(--primary-subtle); color: var(--primary); }
.stat-card-mod .stat-icon.pending { background: var(--warning-bg); color: var(--warning); }
.stat-card-mod .stat-icon.paid { background: var(--success-bg); color: var(--success); }
.stat-card-mod .stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.stat-card-mod .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}
.stat-card-mod .stat-value--warning { color: var(--warning); }
.stat-card-mod .stat-value--success { color: var(--success); }

.dashboard-progress-wrap {
    margin-bottom: 2rem;
    animation: cardFadeIn 0.35s ease 0.1s backwards;
}
.dashboard-progress-wrap .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.dashboard-progress-wrap .progress-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}
.dashboard-progress-wrap .progress-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}
.dashboard-progress-wrap .progress-bar-track {
    height: 8px;
    background: var(--bg-muted);
    border-radius: 999px;
    overflow: hidden;
}
.dashboard-progress-wrap .progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transition: width 0.4s ease;
}
.dashboard-progress-wrap .progress-legend {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.dashboard-progress-wrap .progress-legend span { display: flex; align-items: center; gap: 0.35rem; }
.dashboard-progress-wrap .progress-legend .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.dashboard-progress-wrap .progress-legend .dot.paid { background: var(--success); }
.dashboard-progress-wrap .progress-legend .dot.pending { background: var(--warning); }

.dashboard-table-card { animation: cardFadeIn 0.35s ease 0.15s backwards; }
.dashboard-table-card .card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.dashboard-table-card .card-title { margin: 0; }
.dashboard-table-card .meta-line {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}
.dashboard-table-card .table-wrap {
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
}
.dashboard-table-card .data-table th,
.dashboard-table-card .data-table td { padding: 0.875rem 1rem; }
.dashboard-table-card .data-table tbody tr:hover td {
    background: var(--primary-subtle);
}
.dashboard-table-card .data-table .btn-pay {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background var(--transition), transform var(--transition);
}
.dashboard-table-card .data-table .btn-pay:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}
.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.fees-page .card { border-left: 4px solid var(--primary); }
.fees-page .fee-details-card { animation: cardFadeIn 0.35s ease; }
.fees-page .meta-line {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}
.fees-page .fee-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    padding: 0.75rem 0;
    margin-top: 0.5rem;
}

.result-page .page-title { margin-bottom: 1.5rem; }
.result-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    max-width: 480px;
    width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    animation: cardFadeIn 0.4s ease;
}
.result-card.result-success { border-color: var(--success-border); background: var(--success-bg); }
.result-card.result-danger { border-color: var(--danger-border); background: var(--danger-bg); }
.result-card.result-warning { border-color: var(--warning-border); background: var(--warning-bg); }
.result-card.result-warning .result-icon { background: var(--warning); color: #fff; }
.result-card .result-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.result-card.result-success .result-icon { background: var(--success); color: #fff; }
.result-card.result-danger .result-icon { background: var(--danger); color: #fff; }
.result-card .result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}
@media (max-width: 380px) {
    .result-card .result-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .result-card .result-actions .btn { width: 100%; }
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
}
.status-badge.status-success { background: var(--success-bg); color: var(--success); }
.status-badge.status-failed,
.status-badge.status-cancelled { background: var(--danger-bg); color: var(--danger); }
.status-badge.status-pending { background: var(--warning-bg); color: var(--warning); }
.order-id-cell { font-size: 0.8125rem; word-break: break-all; }
.btn-copy-order-id {
    margin-left: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-subtle);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.btn-copy-order-id:hover { background: var(--primary-border); color: var(--primary-active); }
.payment-status-form .form-group { max-width: 28rem; }

/* Payment status — mobile-first, no horizontal scroll */
.payment-status-page {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
}
.pay-attempt-grid-card,
.payment-status-form,
.pay-check-panels {
    max-width: 100%;
    overflow-x: clip;
}
.pay-attempt-intro {
    margin-bottom: 1rem;
    max-width: 40rem;
    font-size: 0.92rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.pay-attempt-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    max-width: 100%;
}
.pay-attempt-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border, #d8e0de);
    border-radius: var(--radius, 10px);
    background: var(--bg-surface, #fff);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}
.pay-attempt-card--attention {
    background: color-mix(in srgb, var(--warning-bg, #fff8e6) 75%, #fff);
    border-color: color-mix(in srgb, var(--warning, #b8860b) 35%, var(--border, #d8e0de));
}
.pay-attempt-card {
    cursor: pointer;
}
.pay-attempt-card.is-selected {
    border-color: var(--brand, #0B4F4A);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand, #0B4F4A) 28%, transparent);
}
.pay-selected-meta {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
}
.pay-selected-badge { margin-left: auto; }
.pay-attempt-card__head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.pay-attempt-card__fee {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.6rem;
    font-size: 0.95rem;
}
.pay-attempt-card__amount {
    margin-left: auto;
    font-family: var(--font-display, inherit);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary, #0B4F4A);
    white-space: nowrap;
}
.pay-attempt-card__status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.85rem;
}
.pay-meta-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.25rem;
}
.pay-attempt-card__issue {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text-muted);
}
.pay-attempt-card__when {
    font-size: 0.8rem;
}
.pay-attempt-card__check-hint {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.35;
}
.pay-ref-cell {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.5rem 0.65rem;
    background: var(--bg-muted, #f4f7f6);
    border-radius: var(--radius-sm, 6px);
}
.pay-ref-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.pay-ref-value {
    font-size: 0.9rem;
    word-break: break-all;
    overflow-wrap: anywhere;
}
.pay-ref-extra { word-break: break-all; overflow-wrap: anywhere; }
.pay-attempt-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    width: 100%;
}
.pay-attempt-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
}
.pay-attempt-card {
    cursor: default;
}
.pay-attempt-actions .inline-form,
.pay-check-now-form {
    display: block;
    margin: 0;
    width: 100%;
}
.pay-copy-fill-btn.is-copied { border-color: var(--success); color: var(--success); }
.pay-copy-hint {
    margin-top: 0.75rem;
    color: var(--success);
    font-weight: 500;
    overflow-wrap: anywhere;
}
.pay-check-panels {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.payment-status-form .form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 16px; /* prevent iOS zoom */
}
.pay-form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pay-form-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
}
.pay-check-panel--active {
    outline: 2px solid var(--brand, #0B4F4A);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand, #0B4F4A) 18%, transparent);
}

@media (min-width: 720px) {
    .pay-attempt-actions {
        display: flex;
        flex-wrap: wrap;
        grid-template-columns: none;
    }
    .pay-attempt-actions .btn { width: auto; }
    .pay-attempt-actions .inline-form,
    .pay-check-now-form { width: auto; }
    .pay-form-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    .pay-form-actions .btn { width: auto; }
    .payment-status-form .form-group { max-width: 28rem; }
}

@media (max-width: 480px) {
    .pay-attempt-grid-card h2,
    .payment-status-form h2 {
        font-size: 1.15rem;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }
    .pay-attempt-card { padding: 0.85rem; }
    .pay-attempt-card__amount { margin-left: 0; width: 100%; }
}

/* ========== Student login — single column (mobile + PC) ========== */
.app-body.student-login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg-page-solid);
    background-image: var(--bg-page);
    padding: 0;
    margin: 0;
}

/* University strip — only branding place on this page */
.sl-topbar {
    flex-shrink: 0;
    background: #fff;
    border-bottom: 3px solid var(--accent);
    box-shadow: 0 2px 10px rgba(11, 79, 74, 0.07);
}
.sl-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    padding-top: max(0.75rem, env(safe-area-inset-top));
}
.sl-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1 1 auto;
}
.sl-topbar-logo {
    width: 48px;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
}
.sl-topbar-text { min-width: 0; flex: 1; }
.sl-topbar-parampara {
    flex: 0 1 auto;
    max-width: min(280px, 40vw);
    max-height: 44px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: right center;
    border-radius: 4px;
    margin-left: auto;
}
.sl-topbar-sanskrit {
    margin: 0 0 0.1rem;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    color: #7a1f1f;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sl-topbar-name {
    margin: 0 0 0.1rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sl-topbar-addr {
    margin: 0;
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.sl-main {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding: 1rem 1rem 1.5rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    animation: contentIn 0.35s ease both;
}
.sl-stage {
    width: 100%;
    max-width: 440px;
}

.sl-app-badge {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.85rem;
    padding: 0.7rem 0.95rem;
    background: linear-gradient(135deg, var(--primary) 0%, #0d5c56 100%);
    color: #fff;
    border-radius: var(--radius);
    border: 1px solid rgba(166, 124, 45, 0.4);
    box-shadow: 0 4px 14px rgba(11, 79, 74, 0.18);
}
.sl-app-badge-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 232, 180, 0.92);
}
.sl-app-badge-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}

.sl-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.15rem 1.35rem;
    box-shadow: var(--shadow-md);
    border-top: 3px solid var(--accent);
}
.sl-card-title {
    margin: 0 0 0.3rem;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.sl-card-desc {
    margin: 0 0 1.15rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.sl-form .form-group { margin-bottom: 1.1rem; }
.sl-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}
.sl-field-hint {
    margin: 0 0 0.45rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.sl-form .form-control {
    min-height: 52px;
    font-size: 16px; /* prevents iOS zoom */
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border-width: 1.5px;
}
.sl-submit {
    min-height: 54px;
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 0.35rem;
    border-radius: 10px;
    gap: 0.5rem;
}

.sl-perks {
    list-style: none;
    margin: 0.9rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
}
.sl-perks li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    background: rgba(251, 252, 250, 0.88);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 550;
    color: var(--text-secondary);
}
.sl-perks i {
    color: var(--primary);
    font-size: 1.05rem;
}

.sl-footer-note {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
    padding: 0 0.5rem;
}

/* Old desktop side panel removed */
.sl-desktop-panel { display: none !important; }

/* Tablet */
@media (min-width: 600px) {
    .sl-topbar-inner {
        padding: 0.95rem 1.5rem;
        gap: 1rem;
    }
    .sl-topbar-logo { width: 56px; }
    .sl-topbar-parampara {
        max-width: min(300px, 36vw);
        max-height: 50px;
    }
    .sl-topbar-sanskrit { font-size: 0.95rem; white-space: normal; }
    .sl-topbar-name { font-size: 0.95rem; -webkit-line-clamp: unset; }
    .sl-topbar-addr { font-size: 0.75rem; }
    .sl-main { padding: 1.5rem 1.25rem 2rem; }
    .sl-card { padding: 1.5rem 1.5rem 1.65rem; }
    .sl-card-title { font-size: 1.55rem; }
    .sl-perks {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .sl-perks li {
        flex-direction: column;
        text-align: center;
        gap: 0.35rem;
        padding: 0.7rem 0.5rem;
        font-size: 0.78rem;
        line-height: 1.3;
    }
}

/* Desktop — centered stage, no side brand panel */
@media (min-width: 900px) {
    .app-body.student-login-page {
        background:
            radial-gradient(ellipse 70% 50% at 50% -5%, rgba(11, 79, 74, 0.12) 0%, transparent 55%),
            radial-gradient(ellipse 50% 40% at 100% 30%, rgba(166, 124, 45, 0.08) 0%, transparent 50%),
            radial-gradient(ellipse 45% 35% at 0% 80%, rgba(11, 79, 74, 0.07) 0%, transparent 45%),
            linear-gradient(180deg, #eef5f3 0%, #e6efec 50%, #dde8e5 100%);
        background-attachment: fixed;
    }
    .sl-topbar {
        border-bottom-width: 3px;
    }
    .sl-topbar-inner {
        max-width: 1100px;
        padding: 1rem 2rem;
    }
    .sl-topbar-logo { width: 64px; }
    .sl-topbar-parampara {
        max-width: min(320px, 32vw);
        max-height: 54px;
    }
    .sl-topbar-sanskrit { font-size: 1.05rem; }
    .sl-topbar-name { font-size: 1.05rem; }
    .sl-topbar-addr { font-size: 0.8rem; }

    .sl-main {
        align-items: center;
        padding: 2.5rem 1.5rem 3rem;
    }
    .sl-stage {
        max-width: 460px;
    }
    .sl-app-badge {
        padding: 0.85rem 1.1rem;
        border-radius: var(--radius-lg);
        margin-bottom: 1rem;
    }
    .sl-app-badge-title { font-size: 1.15rem; }
    .sl-card {
        padding: 1.75rem 1.75rem 1.85rem;
        border-radius: 18px;
        box-shadow: var(--shadow-md), 0 16px 40px rgba(11, 79, 74, 0.08);
    }
    .sl-card-title { font-size: 1.7rem; }
    .sl-card-desc { font-size: 0.95rem; margin-bottom: 1.25rem; }
    .sl-form .form-control { min-height: 54px; }
    .sl-submit { min-height: 56px; }
    .sl-perks { margin-top: 1.1rem; gap: 0.55rem; }
    .sl-footer-note { margin-top: 1.25rem; font-size: 0.8rem; }
}

/* Very small phones */
@media (max-width: 360px) {
    .sl-topbar-inner { padding: 0.65rem 0.75rem; gap: 0.55rem; }
    .sl-topbar-logo { width: 42px; }
    .sl-topbar-parampara {
        max-width: 38vw;
        max-height: 34px;
    }
    .sl-topbar-sanskrit { font-size: 0.7rem; }
    .sl-topbar-name { font-size: 0.72rem; }
    .sl-main { padding: 0.85rem 0.75rem 1.25rem; }
    .sl-card { padding: 1.05rem 0.95rem 1.15rem; }
    .sl-card-title { font-size: 1.25rem; }
    .sl-app-badge-title { font-size: 0.95rem; }
}

/* Legacy login-split helpers (other pages / finance reuse) */
.app-body.login-split {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    background: none;
    background-image: none;
}
.login-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 1.15rem;
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(166, 124, 45, 0.18) 0%, transparent 55%),
        linear-gradient(160deg, #0B4F4A 0%, #0A3F3B 45%, #083330 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.login-brand-logo {
    display: block;
    width: 72px;
    height: auto;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}
.login-brand-sanskrit {
    margin: 0 0 0.5rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffe8b0;
    line-height: 1.35;
}
.login-brand-wordmark {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin: 0 0 0.5rem;
}
.login-brand-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.3rem;
    margin-bottom: 0.75rem;
}
.login-brand-lead {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 1rem;
}
.login-brand-addr {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}
.login-brand-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}
.login-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem 1rem 1.75rem;
    background: var(--bg-page-solid);
    background-image: var(--bg-page);
}
.login-form-panel .login-container {
    margin: 0 auto;
    width: 100%;
    max-width: 420px;
}
.login-form-panel .card {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    border-top: 3px solid var(--accent);
}

/* ========== Student dashboard (fee-first) ========== */
.student-dash {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 960px;
    margin: 0 auto;
}

.fee-dues-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    /* Never clip stacked pay-channel CTAs on any viewport */
    overflow: visible;
    animation: cardFadeIn 0.35s ease both;
}

.fee-dues-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1.35rem 1.5rem;
    background:
        radial-gradient(ellipse 80% 120% at 100% 0%, rgba(166, 124, 45, 0.14) 0%, transparent 55%),
        linear-gradient(135deg, #f7faf9 0%, var(--primary-subtle) 100%);
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: visible;
}
.fee-dues-hero--clear {
    background:
        radial-gradient(ellipse 80% 120% at 100% 0%, rgba(15, 118, 110, 0.12) 0%, transparent 55%),
        linear-gradient(135deg, #f7faf9 0%, var(--success-bg) 100%);
}
.fee-dues-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-hover);
}
.fee-dues-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.fee-dues-summary {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.fee-dues-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    padding: 0.65rem 1rem;
    background: var(--bg-surface);
    border: 1px solid rgba(166, 124, 45, 0.35);
    border-radius: var(--radius);
    min-width: 140px;
    box-shadow: var(--shadow-sm);
}
.fee-dues-hero--clear .fee-dues-total {
    border-color: var(--success-border);
}
.fee-dues-total-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.fee-dues-total-value {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}
.fee-dues-hero--clear .fee-dues-total-value { color: var(--success); }

.fee-clear-state {
    text-align: center;
    padding: 2rem 1.5rem 2.25rem;
}
.fee-clear-icon {
    font-size: 2.5rem;
    color: var(--success);
    margin-bottom: 0.5rem;
}
.fee-clear-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
}
.fee-clear-text {
    margin: 0 auto 1.25rem;
    max-width: 36ch;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.fee-clear-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.fee-due-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fee-due-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    animation: cardFadeIn 0.35s ease both;
    overflow: visible;
    min-width: 0;
}
.fee-due-item:last-child { border-bottom: none; }
.fee-due-item:nth-child(even) {
    background: rgba(11, 79, 74, 0.02);
}
@media (min-width: 720px) {
    .fee-due-item {
        grid-template-columns: 1.2fr 0.9fr;
        align-items: start;
        gap: 1.5rem;
    }
}
.fee-due-type-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
}
.fee-due-id {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.fee-due-brief {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}
.fee-due-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.fee-due-meta i { margin-right: 0.3rem; color: var(--primary); }
.fee-due-pay {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
    overflow: visible;
}
@media (min-width: 720px) {
    .fee-due-pay { align-items: flex-end; text-align: right; }
}
.fee-due-amount-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
@media (min-width: 720px) {
    .fee-due-amount-block { align-items: flex-end; }
}
.fee-due-amount-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.fee-due-amount {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}
.fee-due-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
    min-width: 0;
    overflow: visible;
}
.fee-due-actions-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.fee-due-actions-count {
    letter-spacing: 0.02em;
    text-transform: none;
    font-weight: 650;
    color: var(--primary);
    background: var(--primary-subtle);
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    font-size: 0.68rem;
    flex-shrink: 0;
}
.fee-due-channel-list {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    max-height: none;
    overflow: visible;
}
.fee-due-channel {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 52px;
    box-sizing: border-box;
    padding: 0.7rem 0.8rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.fee-due-channel:hover,
.fee-due-channel:focus {
    text-decoration: none;
    color: var(--text);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}
.fee-due-channel:active {
    transform: scale(0.99);
}
.fee-due-channel-icon {
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    background: var(--bg-muted);
    color: var(--primary);
}
.fee-due-channel-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    text-align: left;
}
.fee-due-channel-label {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
}
.fee-due-channel-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.fee-due-channel-go {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 1rem;
}
.fee-due-channel--icici {
    border-left: 4px solid var(--primary);
}
.fee-due-channel--icici .fee-due-channel-icon {
    background: var(--primary-subtle);
    color: var(--primary);
}
.fee-due-channel--bbps {
    border-left: 4px solid #1a73e8;
}
.fee-due-channel--bbps .fee-due-channel-icon {
    background: #e8f0fe;
    color: #1a73e8;
}
.fee-due-channel--ib {
    border-left: 4px solid #5b4b8a;
}
.fee-due-channel--ib .fee-due-channel-icon {
    background: #efeaf8;
    color: #5b4b8a;
}
.fee-due-channel--offline {
    border-left: 4px solid var(--warning);
}
.fee-due-channel--offline .fee-due-channel-icon {
    background: var(--warning-bg);
    color: var(--warning);
}
@media (min-width: 720px) {
    .fee-due-actions {
        align-items: stretch;
        max-width: 22rem;
        margin-left: auto;
    }
    .fee-due-actions-label {
        justify-content: space-between;
    }
}
.fee-due-no-channel {
    margin: 0;
    font-size: 0.875rem;
}
.fee-due-year {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--warning);
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}
.fee-due-item--migrated-notice {
    background: linear-gradient(180deg, rgba(254, 243, 199, 0.45) 0%, transparent 42%);
}
.fee-due-item:nth-child(even).fee-due-item--migrated-notice {
    background: linear-gradient(180deg, rgba(254, 243, 199, 0.55) 0%, rgba(11, 79, 74, 0.02) 42%);
}
.fee-due-migrate-notice {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
    padding: 0.75rem 0.9rem;
    background: var(--warning-bg);
    border: 1.5px solid var(--warning-border);
    border-left: 4px solid var(--warning);
    border-radius: var(--radius);
    color: #92400e;
    box-shadow: 0 1px 0 rgba(180, 83, 9, 0.08);
}
.fee-due-migrate-notice > i {
    flex: 0 0 auto;
    margin-top: 0.12rem;
    font-size: 1.15rem;
    color: var(--warning);
}
.fee-due-migrate-notice p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    font-weight: 500;
}
.fee-due-migrate-notice strong {
    color: #78350f;
    font-weight: 700;
}

/* Compact welcome strip */
.student-welcome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1rem;
    padding: 0.95rem 1.15rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    animation: cardFadeIn 0.35s ease 0.05s both;
}
.student-welcome-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--primary-subtle);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.student-welcome-body { flex: 1 1 200px; min-width: 0; }
.student-welcome-hello {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.student-welcome-name {
    margin: 0.1rem 0 0.25rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
}
/* ========== Installment selection (student) ========== */
.inst-page {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    animation: cardFadeIn 0.35s ease 0.06s both;
}
.inst-hero { margin-bottom: 1rem; }
.inst-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.inst-hero h2 {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 4.5vw, 1.65rem);
    font-weight: 700;
    line-height: 1.25;
}
.inst-lead {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.inst-deadline { color: var(--warning); white-space: nowrap; }
.inst-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}
.inst-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.9rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.inst-meta-item--deadline {
    border-color: var(--warning-border);
    background: var(--warning-bg);
}
.inst-meta-label {
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.inst-meta-item strong {
    font-size: 1.02rem;
    color: var(--primary);
    word-break: break-word;
}
.inst-meta-item--deadline strong { color: var(--warning); }

.inst-circular {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding: 0.8rem 0.9rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    line-height: 1.4;
}
.inst-circular i {
    color: var(--primary);
    font-size: 1.15rem;
    margin-top: 0.1rem;
}
.inst-circular strong { display: block; color: var(--text); }
.inst-circular span { color: var(--text-muted); }
.inst-notice { margin-bottom: 0.75rem; }
.inst-window-msg {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.inst-status {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--success-border);
    background: var(--success-bg);
}
.inst-status--locked {
    border-color: var(--border);
    background: var(--bg-muted);
}
.inst-status-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--success);
    font-size: 1.2rem;
}
.inst-status--locked .inst-status-icon { color: var(--text-muted); }
.inst-status-body { min-width: 0; flex: 1; }
.inst-status-body h3 {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}
.inst-status-facts {
    list-style: none;
    margin: 0 0 0.55rem;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}
.inst-status-facts li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.6rem;
    background: rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}
.inst-status-facts span { color: var(--text-muted); }
.inst-status-body p {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.inst-steps {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0.55rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.inst-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.45rem 0.25rem;
    text-align: center;
    border-radius: var(--radius-sm);
    opacity: 0.55;
}
.inst-step--active,
.inst-step--done { opacity: 1; }
.inst-step--active { background: var(--primary-subtle); }
.inst-step-num {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--bg-muted);
    color: var(--text-muted);
}
.inst-step--active .inst-step-num,
.inst-step--done .inst-step-num {
    background: var(--primary);
    color: #fff;
}
.inst-step-text {
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--text-secondary);
    line-height: 1.2;
}

.inst-form {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1rem 1.15rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}
.inst-fieldset {
    margin: 0 0 1.15rem;
    padding: 0;
    border: none;
}
.inst-fieldset legend {
    padding: 0;
    margin: 0 0 0.25rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}
.inst-req { color: var(--danger); }
.inst-hint {
    margin: 0 0 0.65rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.inst-plan-grid {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.inst-plan-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0;
    padding: 0.85rem 0.9rem;
    min-height: 3.5rem;
    cursor: pointer;
    background: var(--bg-surface-hover);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.inst-plan-card:hover {
    border-color: var(--primary-border);
}
.inst-plan-card.is-selected {
    border-color: var(--primary);
    background: var(--primary-subtle);
    box-shadow: 0 0 0 1px var(--primary);
}
.inst-plan-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.inst-plan-radio {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    border-radius: 999px;
    border: 2px solid var(--border-strong);
    background: #fff;
    position: relative;
}
.inst-plan-card.is-selected .inst-plan-radio {
    border-color: var(--primary);
}
.inst-plan-card.is-selected .inst-plan-radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 999px;
    background: var(--primary);
}
.inst-plan-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.inst-plan-title {
    font-size: 0.975rem;
    font-weight: 650;
    color: var(--text);
    line-height: 1.3;
}
.inst-plan-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.inst-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.inst-toggle-opt {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin: 0;
    padding: 0.65rem 0.9rem;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-surface-hover);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.inst-toggle-opt input { position: absolute; opacity: 0; pointer-events: none; }
.inst-toggle-opt.is-selected {
    border-color: var(--primary);
    background: var(--primary-subtle);
    color: var(--primary);
}

.inst-form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.inst-cta,
.inst-cta-secondary {
    width: 100%;
    min-height: 48px;
    justify-content: center;
}

.inst-lock-panel {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--accent-light);
    border: 1px solid #e2d2ad;
    border-radius: var(--radius-lg);
}
.inst-lock-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--accent);
    font-size: 1.15rem;
}
.inst-lock-body { min-width: 0; flex: 1; }
.inst-lock-body h3 {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}
.inst-lock-body p {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.inst-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.inst-empty i {
    font-size: 1.75rem;
    color: var(--text-muted);
}
.inst-empty h3 {
    margin: 0.5rem 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
}
.inst-empty p {
    margin: 0 0 0.9rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.inst-tips {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}
.inst-tips h3 {
    margin: 0 0 0.6rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}
.inst-tips ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.inst-tips li {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.45;
}
.inst-tips i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: var(--success);
}

@media (min-width: 560px) {
    .inst-meta {
        grid-template-columns: 1fr 1fr;
    }
    .inst-form-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .inst-cta,
    .inst-cta-secondary {
        width: auto;
        flex: 1 1 auto;
        min-width: min(100%, 11rem);
    }
    .inst-toggle {
        flex-direction: row;
    }
    .inst-toggle-opt { flex: 1; }
}

@media (max-width: 480px) {
    .inst-form,
    .inst-status,
    .inst-lock-panel,
    .inst-tips {
        border-radius: var(--radius);
        padding: 0.9rem 0.85rem;
    }
    .inst-step-text { font-size: 0.68rem; }
}

.student-welcome-meta {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.student-welcome-meta .dot { margin: 0 0.2rem; opacity: 0.6; }
.student-welcome-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

/* Payment help — mobile-first student guide */
/* ========== Student receipts (online / offline / download) ========== */
.rcpt-page {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    animation: cardFadeIn 0.35s ease 0.06s both;
}
.rcpt-hero { margin-bottom: 0.9rem; }
.rcpt-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.rcpt-hero h2 {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 4.5vw, 1.65rem);
    font-weight: 700;
    line-height: 1.25;
}
.rcpt-lead {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.rcpt-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.rcpt-summary {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.rcpt-summary--ok {
    background: var(--success-bg);
    border-color: var(--success-border);
}
.rcpt-summary-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.rcpt-summary--ok .rcpt-summary-count { color: var(--success); }
.rcpt-summary-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 550;
}

.rcpt-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0 0 1rem;
}
.rcpt-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 3.85rem;
    padding: 0.55rem 0.4rem;
    text-align: center;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 650;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.rcpt-tab i { font-size: 1.15rem; color: var(--primary); }
.rcpt-tab:hover,
.rcpt-tab:focus-visible {
    background: var(--primary-subtle);
    border-color: var(--primary-border);
    color: var(--primary);
    outline: none;
}
.rcpt-tab.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.rcpt-tab.is-active i { color: #fff; }
.rcpt-tab--action {
    border-style: dashed;
}

.rcpt-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.rcpt-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}
.rcpt-card--muted {
    border-left-color: var(--border-strong);
    opacity: 0.98;
}
.rcpt-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.rcpt-fee {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}
.rcpt-amount {
    flex-shrink: 0;
    font-size: 1.1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
}
.rcpt-brief {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.rcpt-card-badges { margin-top: 0.35rem; }
.rcpt-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    margin: 0.65rem 0 0;
}
.rcpt-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0.55rem;
    background: var(--bg-surface-hover);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}
.rcpt-meta dt {
    margin: 0;
    color: var(--text-muted);
    font-weight: 550;
}
.rcpt-meta dd {
    margin: 0;
    text-align: right;
    color: var(--text-secondary);
    font-weight: 600;
    word-break: break-word;
}
.rcpt-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}
.rcpt-download,
.rcpt-cta {
    width: 100%;
    min-height: 48px;
    justify-content: center;
}
.rcpt-wait {
    margin: 0;
    padding: 0.7rem 0.8rem;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-muted);
    background: var(--bg-surface-hover);
    border-radius: var(--radius-sm);
}
.rcpt-empty {
    text-align: center;
    padding: 1.6rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.rcpt-empty i {
    font-size: 1.85rem;
    color: var(--text-muted);
}
.rcpt-empty h3 {
    margin: 0.55rem 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
}
.rcpt-empty p {
    margin: 0 0 0.95rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.rcpt-empty-actions,
.rcpt-footer-cta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.rcpt-footer-cta { margin-top: 0.85rem; }

.rcpt-list--download .rcpt-dl-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 0.95rem;
    text-decoration: none;
    color: inherit;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    min-height: 4.5rem;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.rcpt-list--download .rcpt-dl-item:hover,
.rcpt-list--download .rcpt-dl-item:focus-visible {
    border-color: var(--primary-border);
    background: var(--primary-subtle);
    outline: none;
    box-shadow: var(--shadow);
}
.rcpt-dl-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 1.25rem;
}
.rcpt-dl-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.rcpt-dl-title {
    font-weight: 700;
    font-size: 0.975rem;
    color: var(--text);
    line-height: 1.3;
}
.rcpt-dl-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.35;
}
.rcpt-dl-ref {
    color: var(--text-secondary);
}
.rcpt-dl-action {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.rcpt-dl-action i { font-size: 1rem; }
.rcpt-footnote {
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
    text-align: center;
}
.rcpt-footnote a {
    color: var(--primary);
    font-weight: 600;
}

@media (min-width: 900px) {
    .rcpt-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .rcpt-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .rcpt-meta > div {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }
    .rcpt-meta dd { text-align: left; }
    .rcpt-empty-actions,
    .rcpt-footer-cta {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .rcpt-empty-actions .rcpt-cta,
    .rcpt-footer-cta .rcpt-cta {
        width: auto;
        min-width: 12rem;
    }
}

@media (max-width: 480px) {
    .rcpt-card,
    .rcpt-empty,
    .rcpt-list--download .rcpt-dl-item {
        border-radius: var(--radius);
        padding: 0.85rem;
    }
    .rcpt-tab span { font-size: 0.72rem; }
}

.pay-help {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    animation: cardFadeIn 0.35s ease 0.08s both;
}
.pay-help-hero {
    margin-bottom: 1rem;
}
.pay-help-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pay-help-hero h2 {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 4.5vw, 1.7rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
}
.pay-help-lead {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.pay-help-lead a {
    color: var(--primary);
    font-weight: 600;
}
.pay-help-reg {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    padding: 0.7rem 0.9rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.pay-help-reg-label {
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pay-help-reg-value {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary);
    word-break: break-all;
}

.pay-help-quick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0 0 1.15rem;
}
.pay-help-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 4.25rem;
    padding: 0.65rem 0.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.pay-help-quick-item i {
    font-size: 1.2rem;
    color: var(--primary);
}
.pay-help-quick-item:hover,
.pay-help-quick-item:focus-visible {
    background: var(--primary-subtle);
    border-color: var(--primary-border);
    color: var(--primary);
    outline: none;
}
.pay-help-quick-item--primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pay-help-quick-item--primary i { color: #fff; }
.pay-help-quick-item--primary:hover,
.pay-help-quick-item--primary:focus-visible {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}

.pay-help-channels {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.pay-help-channel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--border-strong);
}
.pay-help-channel--gateway { border-left-color: var(--primary); }
.pay-help-channel--bbps { border-left-color: #1a73e8; }
.pay-help-channel--ib { border-left-color: #5b4b8a; }
.pay-help-channel--offline { border-left-color: var(--warning); }

.pay-help-channel-top {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 0.55rem;
}
.pay-help-step {
    flex-shrink: 0;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    background: var(--primary-subtle);
    color: var(--primary);
}
.pay-help-channel--bbps .pay-help-step {
    background: #e8f0fe;
    color: #1a73e8;
}
.pay-help-channel--ib .pay-help-step {
    background: #efeaf8;
    color: #5b4b8a;
}
.pay-help-channel--offline .pay-help-step {
    background: var(--warning-bg);
    color: var(--warning);
}
.pay-help-channel-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    min-width: 0;
}
.pay-help-channel-title h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}
.pay-help-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: var(--bg-muted);
    color: var(--text-muted);
}
.pay-help-badge--best {
    background: var(--success-bg);
    color: var(--success);
}
.pay-help-badge--warn {
    background: var(--warning-bg);
    color: var(--warning);
}
.pay-help-channel-desc {
    margin: 0 0 0.65rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.pay-help-accepted {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.45;
}
.pay-help-mini-steps {
    margin: 0 0 0.9rem;
    padding: 0.65rem 0.65rem 0.65rem 1.7rem;
    background: var(--bg-surface-hover);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.45;
}
.pay-help-mini-steps li + li { margin-top: 0.3rem; }

.pay-help-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pay-help-actions--apps {
    margin-bottom: 0.55rem;
}
.pay-help-cta,
.pay-help-cta-secondary {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    text-align: center;
}
.pay-help-cta--block {
    margin-top: 0.85rem;
}
.pay-help-guides {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.pay-help-guides a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 550;
    color: var(--primary);
    text-decoration: none;
    min-height: 40px;
}
.pay-help-guides a:hover,
.pay-help-guides a:focus-visible {
    text-decoration: underline;
    outline: none;
}

.pay-help-trouble {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin: 0 0 1.1rem;
    padding: 1rem;
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: var(--radius-lg);
}
.pay-help-trouble-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--warning);
    font-size: 1.15rem;
}
.pay-help-trouble-body {
    min-width: 0;
    flex: 1;
}
.pay-help-trouble-body h3 {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}
.pay-help-trouble-body p {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.pay-help-tips {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1rem 1.15rem;
    box-shadow: var(--shadow-sm);
}
.pay-help-tips h3 {
    margin: 0 0 0.65rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}
.pay-help-tips-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.pay-help-tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.45;
}
.pay-help-tips-list i {
    flex-shrink: 0;
    margin-top: 0.12rem;
    color: var(--success);
    font-size: 1.05rem;
}

@media (min-width: 900px) {
    .pay-help-quick {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .pay-help-actions:not(.pay-help-actions--apps) {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .pay-help-actions:not(.pay-help-actions--apps) .pay-help-cta,
    .pay-help-actions:not(.pay-help-actions--apps) .pay-help-cta-secondary {
        width: auto;
        flex: 1 1 auto;
        min-width: min(100%, 11rem);
    }
    .pay-help-actions--apps {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .pay-help-actions--apps .pay-help-cta {
        width: auto;
        flex: 1 1 10rem;
    }
    .pay-help-guides {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem 1.25rem;
    }
    .pay-help-cta--block {
        width: auto;
        max-width: 22rem;
    }
}

@media (max-width: 480px) {
    .pay-help-channel {
        padding: 0.9rem 0.85rem 1rem;
        border-radius: var(--radius);
    }
    .pay-help-channel-title h3 {
        font-size: 1rem;
    }
    .pay-help-mini-steps {
        padding-left: 1.45rem;
        font-size: 0.84rem;
    }
}

.profile-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.profile-value {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

/* Mobile card table */
@media (max-width: 768px) {
    .dashboard-table-card .table-wrap {
        overflow: visible;
        border: none;
        border-radius: 0;
    }
    .dashboard-table-card .data-table { min-width: 0; width: 100%; }
    .dashboard-table-card .data-table thead { display: none; }
    .dashboard-table-card .data-table tbody tr {
        display: block;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 1rem;
        padding: 1rem;
        background: var(--bg-surface);
        box-shadow: var(--shadow-sm);
    }
    .dashboard-table-card .data-table tbody tr:hover td { background: transparent; }
    .dashboard-table-card .data-table tbody td {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 0.35rem;
        padding: 0.5rem 0;
        border: none;
        font-size: 0.9375rem;
    }
    .dashboard-table-card .data-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: var(--text-muted);
        min-width: 7.5rem;
        flex-shrink: 0;
    }
    .dashboard-table-card .data-table tbody td:last-child {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border);
    }
    .dashboard-table-card .data-table tbody td:last-child .btn-pay,
    .dashboard-table-card .data-table tbody td:last-child .btn {
        width: 100%;
        max-width: 100%;
        min-height: 48px;
        justify-content: center;
    }
    .dashboard-table-card .data-table .txn-id {
        word-break: break-all;
        font-size: 0.8125rem;
    }
    .dashboard-table-card .data-table .num { text-align: left; }
}

@media (max-width: 640px) {
    .table-wrap {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .header-logo-img { height: 44px; max-width: 140px; }
    .header-banner-img { height: 40px; max-width: min(260px, 85vw); }
    .header-app-name { font-size: 0.95rem; }
}

@media (max-width: 480px) {
    .container, .container-wide { padding-left: 0.75rem; padding-right: 0.75rem; }
    .main-content { padding: 1rem 0.75rem 1.5rem; }
    .dashboard-stats { grid-template-columns: 1fr; }
    .stat-card-mod { padding: 1rem 1.25rem; }
    .page-title { font-size: 1.375rem; }
    .nav-item { padding: 0.625rem 0.75rem; font-size: 0.9375rem; }
    .footer-links { gap: 0.5rem 1rem; }
    .footer-links a { font-size: 0.8125rem; }
    .header-app-name { font-size: 0.9rem; }
    .card { padding: 1rem 1.25rem; border-radius: var(--radius); }
    .result-card { padding: 1.25rem 1rem; }
    .help-footer { flex-direction: column; align-items: stretch; }
    .help-footer .btn { width: 100%; }
    .verify-receipt-page { margin: 1rem auto; padding: 0 0.75rem; }
    .payment-status-form .form-group { max-width: none; }
    .qr-wrap img { width: min(200px, 80vw); }
}

@media (max-width: 380px) {
    .nav-item { padding: 0.5rem 0.6rem; font-size: 0.875rem; min-height: 44px; }
    .page-title { font-size: 1.15rem; }
    .result-card .result-actions { flex-direction: column; align-items: stretch; }
    .result-card .result-actions .btn { width: 100%; }
    .feature-map dd { margin-left: 0; }
}
