/* ==========================================================================
   MAHAPARV AURORA THEME — FLO-INSPIRED REDESIGN v2.0
   Based on Mahaparv Design Tokens + Flo Aesthetic Principles
   ========================================================================== */

:root {
    --navy: #1E3A8A; /* Rich visible Navy Blue */
}

/* ── Base Reset ──────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-primary);
    background: var(--body-gradient, linear-gradient(160deg, #E8E6FF 0%, #F5E8FF 40%, #FFE8F2 80%, #FFF3E0 100%));
    color: var(--ink);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Device Frame ─────────────────────────────────────────── */
#app-viewport {
    width: var(--viewport-width);
    height: 844px;
    max-height: 100vh;
    background: var(--grad-ambient);
    border-radius: 48px;
    box-shadow:
        0 0 0 10px #1A1A2E,
        0 40px 80px rgba(108, 99, 255, .25),
        0 20px 40px rgba(0, 0, 0, .15);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

@media (max-width: 450px) {

    html,
    body {
        height: 100%; /* fallback */
        height: calc(var(--vh, 1vh) * 100);
        width: 100%;
        overflow: hidden;
        position: fixed;
        top: 0;
        left: 0;
    }

    body {
        background: var(--surface);
    }

    #app-viewport {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 100%; /* fallback */
        height: calc(var(--vh, 1vh) * 100);
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .app-header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: var(--white) !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .bottom-nav {
        position: fixed !important;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
    }

    .screen-content {
        padding-top: 64px !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ── App Header ───────────────────────────────────────────── */
.app-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-16);
    background: transparent;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.back-btn {
    border: none;
    background: transparent;
    color: var(--ink);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--motion-fast);
}

.back-btn:active {
    background: rgba(108, 99, 255, 0.1);
    transform: scale(0.92);
}

.header-title {
    font-size: var(--body-lg);
    font-weight: 600;
    color: var(--ink);
    flex-grow: 1;
    text-align: center;
    padding-right: 24px;
}

/* Language Selector */
.lang-selector {
    display: flex;
    background: rgba(108, 99, 255, 0.08);
    border-radius: var(--radius-full);
    padding: 2px;
    border: 1px solid rgba(108, 99, 255, 0.12);
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-primary);
    font-size: var(--caption);
    font-weight: 600;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--motion-fast);
}

.lang-btn.active {
    background: var(--iris);
    color: var(--white);
    box-shadow: var(--elevation-1);
}

/* ── Scrollable Screen Content ────────────────────────────── */
.screen-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 0 12px var(--space-32);
    display: flex;
    flex-direction: column;
}

.screen-content>* {
    flex-shrink: 0;
}

.screen-content::-webkit-scrollbar {
    display: none;
}

/* ── Auth Hero Top Banner ─────────────────────────────────── */
.auth-hero-top {
    background: var(--grad-hero);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.auth-hero-top::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
}

.auth-hero-top::after {
    content: '';
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 64px;
    background: var(--grad-ambient);
    border-radius: 50%;
}

.auth-hero-logo {
    font-family: var(--font-secondary);
    font-style: italic;
    font-size: 48px;
    color: var(--white);
    text-shadow: 0 2px 20px rgba(0, 0, 0, .15);
    position: relative;
    z-index: 1;
    letter-spacing: -1px;
}

.auth-hero-tag {
    font-size: var(--body-md);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 1;
    margin-top: 4px;
}

/* ── Hero Section (non-auth) ──────────────────────────────── */
.hero-section {
    text-align: center;
    padding: var(--space-16) 0 var(--space-24);
}

.brand-icon-wrapper {
    width: 64px;
    height: 64px;
    background: var(--grad-hero);
    border-radius: var(--radius-lg);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-16);
    box-shadow: var(--elevation-3);
}

.brand-icon-wrapper span {
    font-size: 32px;
    color: var(--white);
}

.brand-title {
    font-family: var(--font-secondary);
    font-size: var(--display-lg);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: var(--space-8);
}

.brand-subtitle {
    font-size: var(--body-md);
    color: var(--ink-soft);
    padding: 0 var(--space-12);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-20);
    box-shadow: var(--elevation-2);
    border: 1px solid var(--border);
    margin-bottom: var(--space-16);
}

/* Gradient hero card (dashboard) */
.hero-card {
    background: var(--grad-hero);
    border-radius: var(--radius-xl);
    padding: var(--space-24);
    margin-bottom: var(--space-16);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

.hero-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 60px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.hero-greeting {
    font-size: 13px;
    color: rgba(255, 255, 255, .8);
    font-weight: 500;
    margin-bottom: 4px;
}

.hero-name {
    font-family: var(--font-secondary);
    font-style: italic;
    font-size: 28px;
    color: var(--white);
    margin-bottom: var(--space-12);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.hero-chip {
    background: rgba(255, 255, 255, .2);
    border-radius: var(--radius-full);
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--white);
    backdrop-filter: blur(8px);
}

.hero-progress {
    margin-top: var(--space-16);
    background: rgba(255, 255, 255, .2);
    border-radius: var(--radius-full);
    height: 6px;
    overflow: hidden;
}

.hero-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, .9);
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

/* Welcome card (old compat) */
.welcome-card-gradient {
    background: var(--grad-hero);
    color: var(--white);
}

.welcome-card-gradient .card-title {
    color: var(--white);
    font-family: var(--font-secondary);
    font-size: var(--heading-md);
    margin-bottom: var(--space-8);
}

.welcome-card-gradient .card-desc {
    color: rgba(255, 255, 255, .85);
    font-size: var(--body-md);
    line-height: 1.4;
}

/* ── Stat Row ─────────────────────────────────────────────── */
.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-12);
    margin-bottom: var(--space-16);
}

.stat-card {
    border-radius: var(--radius-lg);
    padding: var(--space-16) var(--space-12);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-card.s1 {
    background: var(--grad-card1);
}

.stat-card.s2 {
    background: var(--grad-card2);
}

.stat-card.s3 {
    background: var(--grad-card3);
}

.stat-ico {
    font-size: 18px;
    color: rgba(255, 255, 255, .7);
    margin-bottom: 2px;
}

.stat-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-lbl {
    font-size: 11px;
    color: rgba(255, 255, 255, .8);
    font-weight: 500;
}

/* ── Section Title ────────────────────────────────────────── */
.sec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: var(--space-16) 0 var(--space-12);
}

.sec-title {
    font-size: 15px;
    font-weight: 850;
    color: var(--primary);
    letter-spacing: 0;
}

.sec-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--iris);
    cursor: pointer;
}

/* ── Chip Filters ─────────────────────────────────────────── */
.chips {
    display: flex;
    gap: var(--space-8);
    margin-bottom: var(--space-16);
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.chips::-webkit-scrollbar {
    display: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    background: var(--white);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--motion-fast);
    font-family: var(--font-primary);
    flex-shrink: 0;
}

.chip .material-symbols-rounded {
    font-size: 16px;
}

.chip.on {
    background: var(--iris-light);
    border-color: var(--iris);
    color: var(--iris);
}

/* ── Activity / Feature List Cards ───────────────────────── */
.list-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: var(--space-12);
    box-shadow: var(--elevation-1);
}

.list-row {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    padding: var(--space-16);
    cursor: pointer;
    transition: background var(--motion-fast);
    position: relative;
}

.list-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.list-row:hover {
    background: var(--surface);
}

.list-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.list-icon .material-symbols-rounded {
    font-size: 20px;
}

.list-icon.i-iris {
    background: var(--iris-light);
    color: var(--iris);
}

.list-icon.i-rose {
    background: var(--rose-light);
    color: var(--rose);
}

.list-icon.i-teal {
    background: var(--teal-light);
    color: var(--teal);
}

.list-icon.i-amber {
    background: var(--amber-light);
    color: var(--amber);
}

.list-icon.i-error {
    background: var(--error-light);
    color: var(--error);
}

.list-body {
    flex: 1;
}

.list-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
}

.list-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.list-arrow {
    font-size: 20px;
    color: var(--muted);
}

/* ── Tags ─────────────────────────────────────────────────── */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.tag.iris {
    background: var(--iris-light);
    color: var(--iris-dark);
}

.tag.rose {
    background: var(--rose-light);
    color: #C2185B;
}

.tag.amber {
    background: var(--amber-light);
    color: #E65100;
}

.tag.teal {
    background: var(--teal-light);
    color: #006064;
}

/* ── Form Fields ──────────────────────────────────────────── */
.form-group {
    margin-bottom: var(--space-16);
    position: relative;
}

.form-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-bottom: var(--space-6);
    transition: color var(--motion-fast);
}

.form-group:focus-within .form-label {
    color: var(--primary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    height: 52px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0 var(--space-16);
    font-family: var(--font-primary);
    font-size: var(--body-md);
    color: var(--ink);
    transition: all var(--motion-fast);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-input::placeholder,
.bs-fi::placeholder {
    font-family: var(--font-primary);
    color: #9CA3AF;
    /* var(--muted) equivalent with opacity */
    opacity: 1;
    /* Firefox reset */
    font-weight: 400;
}

#login-mobile,
#reg-mobile,
#forgot-mobile {
    font-weight: 700 !important;
}

.form-input:hover {
    border-color: var(--secondary);
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--primary-light), 0 4px 12px rgba(225, 29, 72, 0.08);
}

.form-input.has-error {
    border-color: var(--error);
    background: #FFF5F5;
}

.form-input.has-error:focus {
    box-shadow: 0 0 0 4px var(--error-light);
}

/* Input trailing */
.input-trailing {
    position: absolute;
    right: 8px;
    border: none;
    background: transparent;
    color: var(--muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--motion-fast);
}

.input-trailing:active {
    color: var(--primary);
    background: var(--primary-light);
}

/* Validation */
.validation-message {
    font-size: var(--caption);
    color: var(--error);
    margin-top: var(--space-4);
    display: none;
    align-items: center;
    gap: 4px;
}

.validation-message.active {
    display: flex;
}

.validation-message .material-symbols-rounded {
    font-size: 14px;
}

/* ── OTP / PIN Grid ───────────────────────────────────────── */
.otp-container {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: var(--space-8) 0;
}

.otp-box {
    flex: 1;
    min-width: 0;
    height: 52px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
    font-family: var(--font-primary);
    font-size: var(--title);
    font-weight: 700;
    text-align: center;
    color: var(--ink);
    transition: all var(--motion-fast);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
    -webkit-appearance: none;
}

.otp-box:hover {
    border-color: var(--secondary);
}

.otp-box:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--primary-light), 0 4px 12px rgba(225, 29, 72, 0.08);
    transform: scale(1.08);
}

.otp-box.has-value {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.04);
}

.otp-box.has-error {
    border-color: var(--error);
    background: var(--error-light);
}

.otp-box[type="password"] {
    font-size: 22px;
    letter-spacing: 2px;
}

/* ── Progress Steps ───────────────────────────────────────── */
.step-indicator-bar {
    display: flex;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-20);
    overflow: hidden;
    margin-top: var(--space-8);
}

.step-progress {
    height: 100%;
    width: 50%;
    background: var(--iris);
    border-radius: var(--radius-full);
    transition: width var(--motion-normal);
}

.step-section {
    display: none;
}

.step-section.active {
    display: block;
    animation: fadeInUp var(--motion-normal) ease-out;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    border: none;
    font-family: var(--font-primary);
    font-size: var(--body-lg);
    font-weight: 600;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-8);
    cursor: pointer;
    transition: var(--motion-fast);
    width: 100%;
    height: 52px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--grad-hero);
    color: var(--white);
    box-shadow: 0 8px 24px rgba(108, 99, 255, .35);
    background-size: 150% 150%;
    background-position: 0% 50%;
}

.btn-primary:hover {
    box-shadow: 0 12px 32px rgba(108, 99, 255, .45);
}

.btn-primary:active {
    transform: scale(0.97);
    background-position: 100% 50%;
    box-shadow: var(--elevation-1);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: 0.75s;
    pointer-events: none;
}

.btn-primary:hover::after {
    left: 125%;
}

.btn-primary:disabled {
    background: var(--disabled);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--iris-light);
    color: var(--iris-dark);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(108, 99, 255, .15);
}

.btn-secondary:active {
    background: rgba(108, 99, 255, .2);
    transform: scale(0.97);
}

.btn-outline {
    background: transparent;
    color: var(--iris);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--iris);
    background: var(--iris-light);
}

.btn-outline:active {
    transform: scale(0.97);
}

.btn-text {
    background: transparent;
    color: var(--iris);
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    padding: var(--space-8) var(--space-12);
    font-size: var(--body-md);
    transition: var(--motion-fast);
    width: auto;
    height: auto;
}

.btn-text:active {
    color: var(--iris-dark);
}

/* ── Button Loader ────────────────────────────────────────── */
.btn-loader {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.9s linear infinite;
    display: none;
}

.btn.loading .btn-text-content {
    visibility: hidden;
}

.btn.loading .btn-loader {
    display: block;
    position: absolute;
}

/* ── Sticky Bottom Actions ────────────────────────────────── */
.sticky-bottom-actions {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(16px);
    padding: var(--space-16) var(--space-20) calc(var(--space-16) + env(safe-area-inset-bottom, 16px));
    border-top: 1px solid var(--border);
    z-index: 100;
}

/* ── Bottom Sheet ─────────────────────────────────────────── */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 26, 0.5);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--motion-normal), visibility var(--motion-normal);
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 70%;
    background: var(--white);
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    box-shadow: var(--elevation-4);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform var(--motion-slow);
}

.bottom-sheet-overlay.active .bottom-sheet {
    transform: translateY(0);
}

.bottom-sheet-header {
    padding: var(--space-16) var(--space-20);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bottom-sheet-title {
    font-size: var(--body-lg);
    font-weight: 700;
    color: var(--ink);
}

.bottom-sheet-close {
    border: none;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 24px;
}

.bottom-sheet-body {
    padding: var(--space-16) var(--space-20);
    overflow-y: auto;
    flex-grow: 1;
}

.bottom-sheet-search {
    margin-bottom: var(--space-12);
}

.district-list {
    list-style: none;
}

.district-item {
    padding: var(--space-16) 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-size: var(--body-md);
    color: var(--ink-soft);
    transition: var(--motion-fast);
}

.district-item:active {
    color: var(--iris);
    padding-left: var(--space-8);
}

/* ── Snackbar ─────────────────────────────────────────────── */
.snackbar-container {
    position: absolute;
    bottom: 20px;
    left: var(--space-16);
    right: var(--space-16);
    z-index: 1200;
    pointer-events: none;
}

.snackbar {
    background: #1e1e2f;
    color: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-12) var(--space-16);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--elevation-3);
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--motion-normal), transform var(--motion-normal), visibility var(--motion-normal);
}

.snackbar.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.snackbar.error {
    background: var(--error);
}

.snackbar.success {
    background: var(--success);
}

.snackbar-text {
    font-size: var(--body-md);
    font-weight: 500;
}

.snackbar-action {
    background: transparent;
    border: none;
    color: var(--white);
    font-weight: 700;
    font-size: var(--caption);
    cursor: pointer;
    margin-left: var(--space-16);
    opacity: .8;
}

/* ── Loading Overlay ──────────────────────────────────────── */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(4px);
    z-index: 1300;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--motion-fast), visibility var(--motion-fast);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--iris-light);
    border-top-color: var(--iris);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ── Checkbox ─────────────────────────────────────────────── */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-12);
    cursor: pointer;
    font-size: var(--body-md);
    color: var(--ink-soft);
    line-height: 1.4;
    user-select: none;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--muted);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    transition: var(--motion-fast);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-label input[type="checkbox"]:checked+.custom-checkbox {
    border-color: var(--iris);
    background-color: var(--iris);
}

.custom-checkbox span {
    font-size: 16px;
    color: var(--white);
    display: none;
}

.checkbox-label input[type="checkbox"]:checked+.custom-checkbox span {
    display: block;
}

/* ── PIN Strength ─────────────────────────────────────────── */
.strength-meter-container {
    margin-top: var(--space-8);
}

.strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: width var(--motion-normal), background-color var(--motion-normal);
}

.strength-fill.weak {
    width: 33.33%;
    background-color: var(--error);
}

.strength-fill.medium {
    width: 66.66%;
    background-color: var(--warning);
}

.strength-fill.strong {
    width: 100%;
    background-color: var(--success);
}

.strength-text {
    font-size: var(--caption);
    font-weight: 600;
    color: var(--muted);
    display: block;
}

.pin-rules-list {
    margin-top: var(--space-12);
    list-style: none;
}

.pin-rule {
    font-size: var(--caption);
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.pin-rule.valid {
    color: var(--success);
}

.pin-rule span {
    font-size: 14px;
}

/* ── Auth Footer ──────────────────────────────────────────── */
.auth-footer {
    margin-top: auto;
    text-align: center;
    padding: var(--space-16) 0;
}

/* Support Pill */
.support-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: var(--space-8) var(--space-20);
    border-radius: var(--radius-full);
    background: rgba(108, 99, 255, .08);
    border: 1px solid rgba(108, 99, 255, .15);
    color: var(--ink-soft);
    font-size: var(--caption);
    font-weight: 600;
    transition: transform var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.support-chip .material-symbols-rounded {
    font-size: 18px;
    color: var(--iris);
}

.support-chip:hover {
    background: rgba(108, 99, 255, .14);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, .15);
}

.support-chip:active {
    transform: translateY(0);
}

/* Forgot PIN */
.forgot-pin-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--iris);
    font-size: var(--body-md);
    font-weight: 600;
    text-decoration: none;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-sm);
    transition: color var(--motion-fast), background var(--motion-fast);
}

.forgot-pin-link:hover {
    color: var(--iris-dark);
    background: var(--iris-light);
}

.forgot-pin-link .material-symbols-rounded {
    font-size: 17px;
}

/* Auth support prompt */
.auth-support-prompt {
    font-size: var(--caption);
    color: var(--muted);
}

/* ── OTP Bypass Banner ────────────────────────────────────── */
.otp-bypass-banner {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    background: var(--amber-light);
    border: 1px solid var(--amber);
    border-radius: var(--radius-md);
    padding: var(--space-12) var(--space-16);
    margin-bottom: var(--space-16);
}

.otp-bypass-banner .material-symbols-rounded {
    color: var(--amber);
    font-size: 20px;
    flex-shrink: 0;
}

.otp-bypass-banner p {
    font-size: var(--caption);
    color: #7c4d00;
    font-weight: 500;
    line-height: 1.4;
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    color: var(--muted);
    font-size: 13px;
    margin: var(--space-16) 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Bottom Nav ───────────────────────────────────────────── */
.bottom-nav {
    height: 76px;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    flex-shrink: 0;
    padding-bottom: 4px;
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}

.nav-tab>* {
    pointer-events: none;
}

.nav-pill {
    width: 52px;
    height: 30px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--motion-fast);
}

.nav-tab.active .nav-pill {
    background: var(--iris-light);
}

.nav-tab .material-symbols-rounded {
    font-size: 22px;
    color: #000000;
}

.nav-tab.active .material-symbols-rounded {
    color: var(--iris);
}

.nav-lbl {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    line-height: 1;
}

.nav-tab.active .nav-lbl {
    color: var(--iris);
}

/* Elevated middle Plus tab */
.nav-tab.elevated {
    position: relative;
    z-index: 105;
}

.nav-tab.elevated .nav-pill {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--grad-hero);
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
    transform: translateY(-12px);
    border: 3px solid var(--white);
    transition: transform var(--motion-fast), box-shadow var(--motion-fast);
}

.nav-tab.elevated:active .nav-pill {
    transform: translateY(-8px) scale(0.95);
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.3);
}

.nav-tab.elevated .material-symbols-rounded {
    color: var(--white) !important;
    font-size: 24px;
}

/* ── Info Banner ──────────────────────────────────────────── */
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-12);
    padding: var(--space-16);
    border-radius: var(--radius-lg);
    border: 1px solid;
    margin-bottom: var(--space-16);
}

.info-banner.error {
    background: var(--error-light);
    border-color: var(--error);
}

.info-banner.warning {
    background: var(--amber-light);
    border-color: var(--amber);
}

.info-banner .material-symbols-rounded {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 1px;
}

.info-banner.error .material-symbols-rounded {
    color: var(--error);
}

.info-banner.warning .material-symbols-rounded {
    color: var(--amber);
}

.info-banner-body h3 {
    font-size: var(--body-md);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
}

.info-banner-body p {
    font-size: var(--caption);
    color: var(--ink-soft);
    line-height: 1.5;
}

/* ── Premium Dashboard Specific Styles ────────────────────────── */

/* Carousel styling */
.promo-carousel {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-16);
    box-shadow: var(--elevation-1);
    flex-shrink: 0;
}

.carousel-track {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    width: 33.333%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-12) var(--space-16);
    color: var(--white);
}

.slide-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
}

.slide-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2px;
}

.slide-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.carousel-dots {
    position: absolute;
    bottom: 8px;
    right: 16px;
    display: flex;
    gap: 4px;
    z-index: 3;
}

.carousel-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--motion-fast);
}

.carousel-dot.active {
    background: var(--white);
    width: 12px;
    border-radius: var(--radius-full);
}

/* Stat row cards customization */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    margin-bottom: var(--space-16);
    flex-shrink: 0;
}

.dashboard-stat-card {
    border-radius: var(--radius-md);
    padding: var(--space-12) var(--space-8);
    color: var(--white);
    box-shadow: var(--elevation-1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dashboard-stat-card::before {
    content: '';
    position: absolute;
    top: -15px;
    right: -15px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-stat-card.visits {
    background: var(--card-gradient-1);
}

.dashboard-stat-card.customers {
    background: var(--card-gradient-2);
}

.dashboard-stat-card.pending {
    background: var(--card-gradient-3);
}

.db-stat-icon {
    font-size: 18px;
    opacity: 0.8;
    margin-bottom: 2px;
}

.db-stat-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}

.db-stat-label {
    font-size: 10px;
    opacity: 0.85;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Grid Menu (3x3 grid) */
.grid-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-12);
    margin-bottom: var(--space-16);
}

.grid-menu-item {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-12) var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: transform var(--motion-fast), box-shadow var(--motion-fast), border-color var(--motion-fast);
    text-align: center;
}

.grid-menu-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--elevation-2);
    border-color: var(--iris);
}

.grid-menu-item:active {
    transform: translateY(0);
}

.grid-item-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--iris-light);
    color: var(--iris);
    transition: background var(--motion-fast), color var(--motion-fast);
}

.grid-menu-item:hover .grid-item-icon-wrapper {
    background: var(--iris);
    color: var(--white);
}

.grid-item-icon-wrapper .material-symbols-rounded {
    font-size: 20px;
}

.grid-item-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-soft);
}

/* Premium modal */
.premium-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 2, 9, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--motion-normal), visibility var(--motion-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-20);
}

.premium-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.premium-modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 340px;
    box-shadow: var(--elevation-4);
    border: 1px solid var(--border);
    transform: scale(0.9);
    transition: transform var(--motion-normal);
    overflow: hidden;
}

.premium-modal-overlay.active .premium-modal {
    transform: scale(1);
}

.premium-modal-header {
    background: var(--grad-hero);
    padding: var(--space-16) var(--space-20);
    color: var(--white);
    text-align: center;
    position: relative;
}

.premium-modal-title {
    font-family: var(--font-secondary);
    font-style: italic;
    font-size: 20px;
    font-weight: 700;
}

.premium-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.premium-modal-body {
    padding: var(--space-20);
    text-align: center;
}

.modal-info-icon {
    font-size: 44px;
    color: var(--iris);
    margin-bottom: var(--space-12);
}

.modal-heading {
    font-size: var(--body-lg);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: var(--space-8);
}

.modal-text {
    font-size: var(--body-md);
    color: var(--ink-soft);
    line-height: 1.5;
    margin-bottom: var(--space-16);
}

/* Tab view routing */
.tab-view {
    display: none;
    animation: fadeIn var(--motion-normal) ease-out;
}

.tab-view.active {
    display: flex;
    flex-direction: column;
}

/* Profile styles */
.profile-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-24);
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--grad-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--space-12);
    box-shadow: var(--elevation-2);
    border: 3px solid var(--white);
}

.profile-name {
    font-size: var(--title);
    font-weight: 700;
    color: var(--ink);
}

.profile-role {
    font-size: var(--caption);
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}