﻿/* ==========================================================================
   PREMIUM THEME v2 — structural redesign, not a recolor
   Fonts: Fraunces (serif, figures & headings) + Inter (sans, UI/body)
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">

   STRUCTURAL PRINCIPLES USED (this is what changed, not just color):
   1. Asymmetric corners — every surface uses a cut-corner signature
      (large radius on two diagonal corners, sharp on the other two)
      instead of one uniform border-radius on everything.
   2. Depth by edge, not by shadow — most cards read via a 1px hairline
      + a 3px accent bar on ONE side, not a soft grey shadow blob.
   3. The bottom nav is a detached floating island, not a bar glued
      to the screen edge.
   4. The balance card carries a watermark numeral + textured band —
      it's the one place doing something no other card does.
   5. Auth pages are a split panel (dark brand rail + light form),
      not a centered card floating on a gradient.
   ========================================================================== */

/* ============ Design tokens ============ */
:root {
    --ink: #10182b;
    --ink-soft: #2c3550;
    --porcelain: #f6f4ef;
    --card: #ffffff;
    --gold: #b8935a;
    --gold-deep: #8f6d3e;
    --emerald: #1f7a5c;
    --emerald-deep: #123f30;
    --claret: #a13d34;
    --hairline: rgba(16, 24, 43, 0.10);
    --hairline-dark: rgba(246, 244, 239, 0.14);
    --text-muted: #6b7280;
    /* asymmetric radius signature — reused deliberately, not per-component guessing */
    --cut-lg: 2rem 2rem 2rem 0.25rem;
    --cut-lg-rev: 0.25rem 2rem 2rem 2rem;
    --cut-md: 1.25rem 1.25rem 1.25rem 0.2rem;
    --cut-sm: 0.85rem 0.85rem 0.85rem 0.15rem;
    --shadow-card: 0 1px 2px rgba(16, 24, 43, 0.05);
    --shadow-raised: 0 20px 50px rgba(16, 24, 43, 0.16);
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* extra accent used for "info"-style states, kept in the same muted, ink-adjacent family */
    --azure: #3b6e8f;
    --azure-deep: #274a5f;
    --hairline-solid: #e7e3d8;
}

/* ==========================================================================
   BOOTSTRAP VARIABLE BRIDGE
   Bootstrap 5.3 builds most of its components (alerts, bg/text/border
   utilities, focus rings, validation states, links) from these root custom
   properties. Re-pointing them at the premium palette means every stock
   Bootstrap class — not just the bespoke ones below — inherits the same
   design language automatically, instead of the theme living only on a
   handful of hand-picked components.
   ========================================================================== */
:root {
    --bs-primary: var(--ink);
    --bs-primary-rgb: 16, 24, 43;
    --bs-secondary: var(--ink-soft);
    --bs-secondary-rgb: 44, 53, 80;
    --bs-success: var(--emerald);
    --bs-success-rgb: 31, 122, 92;
    --bs-info: var(--azure);
    --bs-info-rgb: 59, 110, 143;
    --bs-warning: var(--gold);
    --bs-warning-rgb: 184, 147, 90;
    --bs-danger: var(--claret);
    --bs-danger-rgb: 161, 61, 52;
    --bs-light: var(--porcelain);
    --bs-light-rgb: 246, 244, 239;
    --bs-dark: var(--ink);
    --bs-dark-rgb: 16, 24, 43;
    --bs-primary-text-emphasis: var(--ink);
    --bs-secondary-text-emphasis: var(--ink-soft);
    --bs-success-text-emphasis: var(--emerald-deep);
    --bs-info-text-emphasis: var(--azure-deep);
    --bs-warning-text-emphasis: var(--gold-deep);
    --bs-danger-text-emphasis: #5c211c;
    --bs-primary-bg-subtle: rgba(16, 24, 43, 0.06);
    --bs-secondary-bg-subtle: rgba(44, 53, 80, 0.08);
    --bs-success-bg-subtle: rgba(31, 122, 92, 0.10);
    --bs-info-bg-subtle: rgba(59, 110, 143, 0.10);
    --bs-warning-bg-subtle: rgba(184, 147, 90, 0.12);
    --bs-danger-bg-subtle: rgba(161, 61, 52, 0.09);
    --bs-primary-border-subtle: rgba(16, 24, 43, 0.18);
    --bs-secondary-border-subtle: rgba(44, 53, 80, 0.22);
    --bs-success-border-subtle: rgba(31, 122, 92, 0.30);
    --bs-info-border-subtle: rgba(59, 110, 143, 0.30);
    --bs-warning-border-subtle: rgba(184, 147, 90, 0.35);
    --bs-danger-border-subtle: rgba(161, 61, 52, 0.30);
    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--ink);
    --bs-body-color-rgb: 16, 24, 43;
    --bs-body-bg: var(--porcelain);
    --bs-emphasis-color: var(--ink);
    --bs-secondary-color: rgba(16, 24, 43, 0.62);
    --bs-tertiary-color: rgba(16, 24, 43, 0.42);
    --bs-tertiary-bg: rgba(16, 24, 43, 0.04);
    --bs-heading-color: var(--ink);
    --bs-link-color: var(--gold-deep);
    --bs-link-color-rgb: 143, 109, 62;
    --bs-link-hover-color: var(--ink);
    --bs-link-hover-color-rgb: 16, 24, 43;
    --bs-border-color: var(--hairline-solid);
    --bs-border-color-translucent: var(--hairline);
    --bs-border-radius: 0.6rem;
    --bs-border-radius-sm: 0.4rem;
    --bs-border-radius-lg: 1rem;
    --bs-border-radius-xl: 1.5rem;
    --bs-border-radius-xxl: 2rem;
    --bs-box-shadow: 0 12px 28px rgba(16, 24, 43, 0.12);
    --bs-box-shadow-sm: var(--shadow-card);
    --bs-box-shadow-lg: var(--shadow-raised);
    --bs-focus-ring-color: rgba(184, 147, 90, 0.25);
    --bs-form-valid-color: var(--emerald);
    --bs-form-valid-border-color: var(--emerald);
    --bs-form-invalid-color: var(--claret);
    --bs-form-invalid-border-color: var(--claret);
}

body {
    background: var(--porcelain);
    font-family: var(--font-body);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

/* ============ Text selection — always legible, on light or dark surfaces ============ */
::selection {
    background: var(--gold);
    color: var(--ink);
}

::-moz-selection {
    background: var(--gold);
    color: var(--ink);
}

a {
    text-decoration: none;
}

h1, h2, h3, h4, .display-figure {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

/* ============ Buttons ============ */
.btn-primary {
    background-color: var(--ink);
    border-color: var(--ink);
    font-weight: 500;
    border-radius: var(--cut-sm);
    padding: 0.65rem 1.5rem;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

    .btn-primary:hover, .btn-primary:focus {
        background-color: var(--gold-deep);
        border-color: var(--gold-deep);
    }

    .btn-primary:active {
        transform: scale(0.98);
    }

.btn-outline-primary {
    color: var(--ink);
    border-color: var(--ink-soft);
    border-radius: var(--cut-sm);
    font-weight: 500;
}

    .btn-outline-primary:hover {
        background-color: var(--ink);
        border-color: var(--ink);
        color: #fff;
    }

.text-primary {
    color: var(--gold-deep) !important;
}

.btn {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

    .btn:active {
        transform: scale(0.98);
    }

    .btn:disabled, .btn.disabled {
        transform: none;
        opacity: 0.55;
    }

    .btn:focus-visible {
        box-shadow: 0 0 0 0.2rem rgba(184, 147, 90, 0.28);
    }

.btn-secondary, .btn-dark {
    background-color: var(--ink-soft);
    border-color: var(--ink-soft);
    border-radius: var(--cut-sm);
    font-weight: 500;
}

    .btn-secondary:hover, .btn-dark:hover {
        background-color: var(--ink);
        border-color: var(--ink);
    }

.btn-danger {
    background-color: var(--claret);
    border-color: var(--claret);
    border-radius: var(--cut-sm);
    font-weight: 500;
}

    .btn-danger:hover, .btn-danger:focus {
        background-color: #7f2f28;
        border-color: #7f2f28;
    }

.btn-success {
    background-color: var(--emerald);
    border-color: var(--emerald);
    border-radius: var(--cut-sm);
    font-weight: 500;
}

    .btn-success:hover, .btn-success:focus {
        background-color: var(--emerald-deep);
        border-color: var(--emerald-deep);
    }

.btn-warning {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
    border-radius: var(--cut-sm);
    font-weight: 500;
}

.btn-light {
    background-color: #fff;
    border-color: var(--hairline-solid);
    color: var(--ink);
    border-radius: var(--cut-sm);
    font-weight: 500;
}

    .btn-light:hover, .btn-light:focus {
        background-color: var(--porcelain);
        border-color: var(--hairline-solid);
        color: var(--ink);
    }

.btn-outline-secondary {
    color: var(--ink-soft);
    border-color: var(--hairline-solid);
    border-radius: var(--cut-sm);
    font-weight: 500;
}

    .btn-outline-secondary:hover {
        background-color: var(--ink-soft);
        border-color: var(--ink-soft);
        color: #fff;
    }

.btn-outline-danger {
    color: var(--claret);
    border-color: rgba(161, 61, 52, 0.4);
    border-radius: var(--cut-sm);
    font-weight: 500;
}

    .btn-outline-danger:hover {
        background-color: var(--claret);
        border-color: var(--claret);
        color: #fff;
    }

.btn-sm {
    border-radius: var(--cut-sm);
}

/* ============ Forms — hand-styled, Bootstrap's blue focus ring never shows up ============ */
.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 0.4rem;
}

.form-control, .form-select {
    border: 1px solid var(--hairline-solid);
    border-radius: var(--cut-sm);
    padding: 0.6rem 0.85rem;
    background-color: #fff;
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .form-control::placeholder {
        color: rgba(16, 24, 43, 0.35);
    }

    .form-control:focus, .form-select:focus {
        border-color: var(--gold);
        box-shadow: 0 0 0 0.2rem rgba(184, 147, 90, 0.18);
    }

    .form-control:disabled, .form-control[readonly] {
        background-color: var(--porcelain);
        color: var(--text-muted);
    }

textarea.form-control {
    border-radius: var(--cut-md);
}

.form-check-input {
    border: 1px solid var(--hairline-solid);
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.2em;
}

    .form-check-input:checked {
        background-color: var(--ink);
        border-color: var(--ink);
    }

    .form-check-input:focus {
        border-color: var(--gold);
        box-shadow: 0 0 0 0.2rem rgba(184, 147, 90, 0.18);
    }

.form-check-label {
    color: var(--ink-soft);
}

.input-group-text {
    background-color: var(--porcelain);
    border: 1px solid var(--hairline-solid);
    color: var(--text-muted);
    border-radius: var(--cut-sm);
}

.was-validated .form-control:invalid, .form-control.is-invalid {
    border-color: var(--claret);
}

.invalid-feedback, .text-danger.small {
    font-size: 0.8rem;
}

/* ============ Alerts — same asymmetric-cut, hairline language as the cards ============ */
.alert {
    border: 1px solid;
    border-left-width: 3px;
    border-radius: var(--cut-sm);
    font-size: 0.9rem;
}

.alert-danger {
    border-color: var(--bs-danger-border-subtle);
    border-left-color: var(--claret);
}

.alert-success {
    border-color: var(--bs-success-border-subtle);
    border-left-color: var(--emerald);
}

.alert-warning {
    border-color: var(--bs-warning-border-subtle);
    border-left-color: var(--gold-deep);
}

.alert-info {
    border-color: var(--bs-info-border-subtle);
    border-left-color: var(--azure);
}

/* ============ Auth pages — dark ink stage, a single lit card floating on it ============
   (the layout wraps this in Bootstrap's .d-flex.align-items-center.justify-content-center,
   which centers the card for us — the styling below focuses on making that one card as
   good as the package-selection cards, rather than fighting the centering with a grid) */
.auth-page {
    min-height: 100vh;
    background: var(--ink);
    background-image: radial-gradient(60% 50% at 50% 0%, rgba(184, 147, 90, 0.12), transparent 60%), repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 14px);
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    background: var(--card);
    border-radius: var(--cut-lg);
    box-shadow: var(--shadow-raised);
    padding: 3rem 2.25rem;
    position: relative;
    overflow: hidden;
    animation: auth-card-in 0.35s ease both;
}

    /* signature accent: a single vertical gold rule instead of a top border */
    .auth-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 3rem;
        bottom: 3rem;
        width: 3px;
        background: var(--gold);
    }

    .auth-card h1, .auth-card h2 {
        font-size: 1.75rem;
        font-weight: 500;
        margin-bottom: 0.35rem;
        padding-left: 1.1rem;
    }

    .auth-card .text-muted, .auth-card p.subtitle {
        color: var(--text-muted);
        font-size: 0.92rem;
        padding-left: 1.1rem;
    }

    .auth-card form, .auth-card .form-inner {
        padding-left: 1.1rem;
    }

@keyframes auth-card-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2.25rem 1.25rem;
        border-radius: var(--cut-md);
    }
}

/* ============ App shell ============ */
.user-shell {
    min-height: 100vh;
    background: var(--porcelain);
    padding-bottom: 6.5rem;
}

.user-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    border-bottom: 1px solid var(--hairline);
    padding: 1.1rem 1.5rem;
}

.user-content {
    padding: 1.5rem;
    max-width: 960px;
    margin: 0 auto;
}

    /* ============ Page headings — every user/admin page opens with <h4 class="fw-bold">,
   give that single pattern the same kicker treatment the package page uses ============ */
    .user-content > h4.fw-bold:first-child,
    .user-content > h4.fw-bold:first-of-type {
        position: relative;
        padding-left: 0.9rem;
    }

        .user-content > h4.fw-bold:first-child::before,
        .user-content > h4.fw-bold:first-of-type::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0.15em;
            bottom: 0.15em;
            width: 3px;
            background: var(--gold);
        }

/* section sub-headings inside cards (h6.fw-bold) — a quieter version of the same kicker */
h6.fw-bold {
    position: relative;
    padding-left: 0.75rem;
    letter-spacing: 0.01em;
}

    h6.fw-bold::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0.1em;
        bottom: 0.1em;
        width: 2px;
        background: var(--hairline-solid);
    }

/* ============ Bottom navigation — floating island, detached from the edge ============ */
.bottom-nav {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    justify-content: space-around;
    background: var(--ink);
    border: 1px solid var(--hairline-dark);
    border-radius: 1.75rem;
    box-shadow: var(--shadow-raised);
    z-index: 1030;
    padding: 0.65rem 0.5rem;
    max-width: 520px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.66rem;
    font-weight: 500;
    color: rgba(246, 244, 239, 0.5);
    padding: 0.35rem 0.5rem;
    flex: 1;
    border-radius: 1.25rem;
    transition: color 0.15s ease, background 0.15s ease;
}

    .bottom-nav-item i {
        font-size: 1.15rem;
        margin-bottom: 0.2rem;
    }

a.bottom-nav-item.active {
    color: var(--ink) !important;
    background: var(--gold);
}

/* ============ Dashboard cards — vertical layout, top accent bar, icon breaks the edge ============ */
.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-top: 3px solid var(--gold);
    border-radius: var(--cut-md);
    padding: 1.25rem 1.1rem 1.1rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    height: 100%;
    color: inherit;
}

    .dashboard-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-raised);
        color: inherit;
    }

.dashboard-card-icon {
    width: 42px;
    height: 42px;
    margin-top: -1.9rem; /* breaks the top edge of the card */
    border-radius: var(--cut-sm);
    background: var(--ink);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(16, 24, 43, 0.25);
}

/* ============ Referral card — diagonal ribbon corner ============ */
.referral-card {
    background: var(--ink);
    border-radius: var(--cut-lg-rev);
    padding: 1.4rem 1.5rem;
    color: #fff;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--hairline-dark);
    position: relative;
    overflow: hidden;
}

    .referral-card::before {
        content: "";
        position: absolute;
        top: -30px;
        right: -30px;
        width: 90px;
        height: 90px;
        background: var(--gold);
        transform: rotate(45deg);
        opacity: 0.9;
    }

/* ============ Balance card — the one hero element: watermark + texture band ============ */
.balance-card {
    background: var(--emerald-deep);
    background-image: repeating-linear-gradient( 115deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 14px );
    border-radius: var(--cut-lg);
    padding: 2rem 1.75rem;
    color: #fff;
    box-shadow: var(--shadow-raised);
    position: relative;
    overflow: hidden;
}

    .balance-card::after {
        content: "$";
        font-family: var(--font-display);
        position: absolute;
        right: 0.5rem;
        bottom: -1.2rem;
        font-size: 8rem;
        color: rgba(255,255,255,0.06);
        line-height: 1;
        pointer-events: none;
    }

    .balance-card .balance-label {
        font-size: 0.8rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.72);
        margin-bottom: 0.4rem;
        letter-spacing: 0.02em;
    }

    .balance-card .balance-figure {
        font-family: var(--font-display);
        font-size: 2.75rem;
        font-weight: 500;
        line-height: 1;
        position: relative;
        z-index: 1;
    }

/* ============ Earning tiles — alternating baseline, numbered by position ============ */
.earning-tile {
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: var(--cut-sm);
    padding: 1.1rem 0.9rem;
    text-align: left;
    height: 100%;
    position: relative;
}

    .earning-tile:nth-child(even) {
        transform: translateY(0.6rem);
    }

    .earning-tile i {
        font-size: 1.1rem;
        color: var(--gold-deep);
        margin-bottom: 0.5rem;
        display: block;
    }

    .earning-tile .value {
        font-family: var(--font-display);
        font-size: 1.4rem;
        color: var(--ink);
        display: block;
    }

    .earning-tile .label {
        font-size: 0.72rem;
        color: var(--text-muted);
    }

/* ============ Confirm dialogs / modals ============ */
.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 43, 0.68);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
}

.confirm-dialog {
    background: #fff;
    border-radius: var(--cut-lg);
    padding: 1.75rem;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 30px 70px rgba(16, 24, 43, 0.4);
    border-left: 3px solid var(--gold);
}

/* ============ Package selection page — text must be explicit on the dark auth-page bg ============ */
.package-selection-page .eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.6rem;
}

.package-selection-page .page-title {
    font-family: var(--font-display);
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.package-selection-page .page-subtitle {
    color: rgba(246, 244, 239, 0.65);
    max-width: 480px;
    margin: 0 auto;
}

/* ============ Package selection cards — diagonal-cut header, ribbon for "selected" ============ */
.package-card {
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: var(--cut-md);
    padding: 0;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .package-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-raised);
    }

    .package-card.selected {
        border-color: var(--gold);
        box-shadow: 0 20px 50px rgba(184, 147, 90, 0.28);
    }

        .package-card.selected .package-header {
            background: var(--gold-deep);
        }

.package-check {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 6px 14px rgba(184, 147, 90, 0.45);
    z-index: 2;
}

.package-card .package-header {
    background: var(--ink);
    color: #fff;
    padding: 1.1rem 1.4rem;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    margin-bottom: -0.5rem;
    transition: background 0.22s ease;
}

.package-card .package-level {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.package-card .package-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0.15rem 0 0;
    color: #fff;
}

.package-card .package-body {
    padding: 1.7rem 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.package-card .price {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 0.9rem;
}

    .package-card .price .price-currency {
        font-family: var(--font-body);
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--text-muted);
        vertical-align: top;
        margin-right: 0.2rem;
    }

.package-card .package-limit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-soft);
    background: rgba(31, 122, 92, 0.08);
    border-radius: var(--cut-sm);
    padding: 0.3rem 0.65rem;
    width: fit-content;
    margin-bottom: 1rem;
}

    .package-card .package-limit i {
        color: var(--emerald);
    }

.package-card .package-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 1.1rem;
}

.package-card .package-select-btn {
    margin-top: auto;
}

.btn-selected {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
    font-weight: 600;
    border-radius: var(--cut-sm);
    padding: 0.65rem 1.5rem;
}

    .btn-selected:hover, .btn-selected:focus {
        background-color: var(--gold-deep);
        border-color: var(--gold-deep);
        color: #fff;
    }

.btn-continue {
    min-width: 220px;
}

    .btn-continue:disabled {
        background-color: var(--ink-soft);
        border-color: var(--ink-soft);
        opacity: 0.5;
    }

/* ============ General card / table polish ============ */
.card {
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--ink-soft);
    border-radius: var(--cut-md);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-body {
    padding: 1.25rem;
}

.card-header {
    background: var(--porcelain);
    border-bottom: 1px solid var(--hairline);
    font-weight: 600;
}

.table-responsive.bg-white {
    border: 1px solid var(--hairline);
    border-radius: var(--cut-md);
    overflow: hidden;
}

.table thead th {
    background: var(--ink);
    color: rgba(246, 244, 239, 0.85);
    border-bottom: none;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.9rem 1.1rem;
}

.table tbody tr {
    border-left: 3px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}

    .table tbody tr:hover {
        border-left-color: var(--gold);
        background: rgba(184, 147, 90, 0.05);
    }

.table td, .table th {
    padding: 0.9rem 1.1rem;
    vertical-align: middle;
}

.rounded {
    border-radius: var(--cut-md) !important;
}

/* ============ Badges — colors come from the Bootstrap variable bridge above ============ */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: var(--cut-sm);
    letter-spacing: 0.02em;
}

    .badge.bg-warning {
        color: var(--ink) !important;
    }

    .badge.rounded-pill {
        padding: 0.4em 0.9em;
    }

/* ============ Top loading bar ============ */
.nav-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2.5px;
    width: 100%;
    z-index: 2000;
    pointer-events: none;
    background: transparent;
}

.nav-progress-bar-inner {
    height: 100%;
    width: 0%;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(184, 147, 90, 0.6);
    transition: width 0.3s ease;
}

.nav-progress-bar.loading .nav-progress-bar-inner {
    animation: nav-progress-grow 1.1s ease-in-out infinite;
}

@keyframes nav-progress-grow {
    0% {
        width: 0%;
        margin-left: 0%;
    }

    50% {
        width: 60%;
        margin-left: 20%;
    }

    100% {
        width: 0%;
        margin-left: 100%;
    }
}

/* ============ Small global polish ============ */
hr {
    border-top: 1px solid var(--hairline);
    opacity: 1;
}

a:not(.btn):not(.bottom-nav-item):hover {
    color: var(--ink);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(16, 24, 43, 0.18);
    border-radius: 1rem;
    border: 2px solid var(--porcelain);
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(16, 24, 43, 0.32);
    }

.user-topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
}

.dropdown-menu {
    border: 1px solid var(--hairline);
    border-radius: var(--cut-sm);
    box-shadow: var(--shadow-raised);
}

.dropdown-item:active, .dropdown-item.active {
    background-color: var(--ink);
}

.progress {
    border-radius: var(--cut-sm);
    background-color: rgba(16, 24, 43, 0.06);
}

.progress-bar {
    background-color: var(--gold);
}

/* ============ Accessibility floor ============ */
a:focus-visible, button:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
/* ==========================================================================
   Razor-extracted component styling
   Moved from inline style attributes; values intentionally preserved.
   ========================================================================== */

/* Access denied */
.access-denied-page {
    min-height: 70vh;
}

.access-denied-icon {
    font-size: 3rem;
}

/* User pages */
.fbr-image {
    max-height: 400px;
}

.channel-icon,
.contact-icon,
.auth-signup-icon,
.auth-login-icon,
.task-icon {
    font-size: 2.5rem;
}

.approval-icon,
.reward-icon,
.payment-pending-icon {
    font-size: 3rem;
}

.salary-description {
    white-space: pre-wrap;
}

/* Auth pages */
.package-selection-page {
    max-width: 960px;
    width: 100%;
}

.payment-submission-page {
    max-width: 520px;
    width: 100%;
}

/* Admin pages */
.package-edit-dialog,
.task-edit-dialog {
    max-width: 420px;
}

.fbr-settings-image {
    max-height: 180px;
}

.payment-screenshot {
    max-height: 200px;
    object-fit: cover;
}
