:root {
    /* Official Amul Milk Signature Red & White Visual Identity */
    --wh: #D32F2F;        /* Amul Classic Red */
    --wh2: #EF4444;       /* Amul Bright Vibrant Red */
    --wh-deep: #991B1B;   /* Amul Crimson Deep Red */
    --cyan: #FCA5A5;      /* Milk Rose Glow */
    --cyan-lite: #FEE2E2;
    --tint: #FFF1F1;      /* Pure Milk Soft Warm White */
    --tint-2: #FFE4E4;
    --line: #FECDD3;      /* Soft Rose Divider */
    --ink: #180808;       /* Deep Charcoal for readability */
    --ink3: #7F1D1D;      /* Crimson Muted Text */
    --ink4: #994D4D;
    --paper: #FFF8F8;     /* Pure Milk & Cream Canvas */
    --card: #FFFFFF;      /* Crisp White Card */
    --field: #FFFFFF;     /* White Input Field */
    --ok: #D32F2F;
    --danger: #DC2626;
    --success: #16A34A;
    --gold: #D97706;
    --gold-lite: #FFFBEB;
    --ez: cubic-bezier(.4, 0, .2, 1);
    --sp: cubic-bezier(.34, 1.45, .5, 1);

    /* Amul Red Claymorphic Depth Shadows */
    --clay-1: 0 4px 10px -4px rgba(153, 27, 27, .18), 0 1px 2px rgba(153, 27, 27, .08), inset 0 1px 0 rgba(255, 255, 255, .98), inset 0 -2px 0 rgba(153, 27, 27, .06);
    --clay-2: 0 10px 22px -10px rgba(153, 27, 27, .24), 0 3px 8px -5px rgba(153, 27, 27, .12), inset 0 2px 0 rgba(255, 255, 255, .98), inset 0 -3px 0 rgba(153, 27, 27, .07);
    --clay-3: 0 18px 34px -16px rgba(153, 27, 27, .32), 0 6px 14px -8px rgba(153, 27, 27, .15), inset 0 2px 0 rgba(255, 255, 255, 1), inset 0 -4px 0 rgba(153, 27, 27, .09);
    --clay-on: 0 10px 20px -8px rgba(211, 47, 47, .55), 0 3px 8px -5px rgba(153, 27, 27, .20), inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(153, 27, 27, .22);
    --clay-in: inset 0 3px 8px -2px rgba(153, 27, 27, .14), inset 0 -1px 0 rgba(255, 255, 255, .8);
    --dome: #FFF1F1;
    --brandg: linear-gradient(150deg, #EF4444 0%, #D32F2F 50%, #991B1B 100%);
    --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--paper);
    color: var(--ink);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

svg {
    display: block;
    flex: none;
}

.app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    position: relative;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
    background: #FFF8F8;
}

/* Animations */
.rise {
    animation: riseIn .45s var(--ez) both;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Global Navigation Bar */
.nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    height: 72px;
    background: #ffffff;
    box-shadow: 0 -10px 25px -5px rgba(153, 27, 27, 0.12), inset 0 1px 0 rgba(255, 255, 255, 1);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom);
}

.nv {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    height: 100%;
    color: #994D4D;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nv svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s var(--sp);
}

.nv .nl {
    font-size: 11px;
    font-weight: 700;
}

.nv.on {
    color: var(--wh);
}

.nv.on svg {
    transform: scale(1.12);
}

/* Cards & Components */
.card-clay {
    background: #ffffff;
    border-radius: 22px;
    box-shadow: var(--clay-2);
    padding: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.16s var(--sp);
}

.btn:active {
    transform: translateY(2px);
}

.btn-primary {
    background: var(--brandg);
    color: #fff;
    box-shadow: var(--clay-on);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
}

.badge-active { background: #DCFCE7; color: #166534; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-primary { background: #FEE2E2; color: var(--wh); }

/* Global Toast */
#gToast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #180808;
    color: #fff;
    padding: 14px 22px;
    border-radius: 18px;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
    z-index: 9999;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    max-width: 90%;
    text-align: center;
}

#gToast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

#gToast.success {
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
    box-shadow: 0 10px 24px -5px rgba(22, 163, 74, 0.6);
}

#gToast.error {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
    box-shadow: 0 10px 24px -5px rgba(220, 38, 38, 0.6);
}

/* Global Full-screen Loader */
.g-loader {
    position: fixed;
    inset: 0;
    background: rgba(24, 8, 8, 0.45);
    backdrop-filter: blur(4px);
    display: none;
    place-items: center;
    z-index: 9998;
}

.g-loader.show {
    display: grid;
}

.g-loader-box {
    background: #ffffff;
    padding: 24px 32px;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.g-spinner {
    width: 40px;
    height: 40px;
    border: 3.5px solid #FEE2E2;
    border-top-color: var(--wh);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.g-loader-text {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
}

/* Sliding Bottom Sheets */
.cov {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cov.show {
    opacity: 1;
    pointer-events: auto;
}

.sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 28px 28px 0 0;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 -16px 40px -10px rgba(153, 27, 27, 0.35);
    z-index: 500;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 1, 0.23, 1);
}

.sheet.show {
    transform: translateY(0);
}

.grab {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: #FECDD3;
    margin: 0 auto 16px;
}
