/* assets/css/custom.css - Eyram Susu Passbook Theme & HCI Layout Rules */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --pumpkin: #ff6700;
    --pumpkin-dark: #cc5200;
    --steel: #004e98;
    --steel-dark: #002f5c;
    --ocean: #3a6ea5;
    --platinum: #f4f6f8;
    --silver: #e2e8f0;

    /* Focus ring */
    --focus-ring: 0 0 0 3px rgba(0, 78, 152, 0.35);
    --focus-ring-pumpkin: 0 0 0 3px rgba(255, 103, 0, 0.3);

    /* Transition tokens */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: #1e293b;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4,
.font-heading {
    font-family: 'Outfit', 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

/* ============================================================
   FOCUS-VISIBLE: Keyboard Accessibility (WCAG 2.1)
   ============================================================ */
*:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 0.5rem;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* ============================================================
   TOUCH-FRIENDLY BUTTON BASE (Fitts's Law: ≥48px touch target)
   ============================================================ */
.btn-touch {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.875rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

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

/* ============================================================
   POLISHED CARD ELEVATION (Aesthetic-Usability Effect)
   ============================================================ */
.card-elevated {
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 4px 20px -2px rgba(0, 78, 152, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
    border-radius: 1.25rem;
    transition: all 0.2s var(--ease-in-out);
}

.card-elevated:hover {
    box-shadow: 0 10px 25px -3px rgba(0, 78, 152, 0.09), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

/* Section Card: Consistent Container Pattern (Gestalt Proximity) */
.section-card {
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (min-width: 640px) {
    .section-card {
        padding: 1.75rem;
    }
}

/* ============================================================
   PRIMARY ACTION BUTTONS (Fitts's Law: Large, Easy to Tap)
   ============================================================ */
.btn-action-primary {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.85rem 1.5rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #ff6700 0%, #ea580c 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(255, 103, 0, 0.35);
    transition: all 0.15s ease-in-out;
}

.btn-action-primary:hover {
    background: linear-gradient(135deg, #ff7a1a 0%, #d9480f 100%);
    box-shadow: 0 6px 20px 0 rgba(255, 103, 0, 0.45);
    transform: translateY(-1px);
}

.btn-action-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px 0 rgba(255, 103, 0, 0.25);
}

.btn-action-secondary {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.85rem 1.5rem;
    border-radius: 0.875rem;
    background: #ffffff;
    color: #004e98;
    border: 2px solid #004e98;
    transition: all 0.15s ease-in-out;
}

.btn-action-secondary:hover {
    background: #f0f7ff;
    border-color: #003f7a;
    color: #003f7a;
}

.btn-action-secondary:active {
    transform: scale(0.98);
}

/* ============================================================
   NAVIGATION ACTIVE STATE (Jakob's Law: Predictable Navigation)
   ============================================================ */
.nav-link-active {
    background: rgba(255, 255, 255, 0.15) !important;
    position: relative;
}

.nav-link-active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: #ff6700;
    border-radius: 1px;
}

/* Mobile bottom nav active state */
.mobile-nav-active {
    color: #004e98 !important;
}

.mobile-nav-active svg {
    color: #004e98;
}

.mobile-nav-active span {
    color: #004e98;
    font-weight: 800;
}

/* ============================================================
   PAGE ENTRANCE ANIMATION (Aesthetic-Usability Effect)
   ============================================================ */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.page-enter {
    animation: fadeSlideUp 0.35s var(--ease-out) both;
}

/* Stagger children */
.page-enter>*:nth-child(1) {
    animation-delay: 0.03s;
}

.page-enter>*:nth-child(2) {
    animation-delay: 0.06s;
}

.page-enter>*:nth-child(3) {
    animation-delay: 0.09s;
}

.page-enter>*:nth-child(4) {
    animation-delay: 0.12s;
}

/* ============================================================
   FORM VALIDATION STATES (Show Clear Error/Success States)
   ============================================================ */
.field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.field-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.field-error-msg {
    color: #ef4444;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: fadeSlideUp 0.2s var(--ease-out) both;
}

/* Shake animation for invalid submit */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

.field-shake {
    animation: shake 0.4s ease-in-out;
}

/* ============================================================
   LOADING / SPINNER STATES
   ============================================================ */
.btn-loading {
    pointer-events: none;
    opacity: 0.75;
    position: relative;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2.5px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 0.5rem;
}

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

/* Skeleton loading placeholder */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

@keyframes skeletonPulse {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================================
   NOTIFICATION CENTER & BELL (Persistent In-App Alerts)
   ============================================================ */
.notification-bell-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transition: all 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.notification-bell-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}

.notification-bell-btn:active {
    transform: scale(0.95);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 9999px;
    background: #ff6700;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #004e98;
    box-shadow: 0 2px 6px rgba(255, 103, 0, 0.5);
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
    0% {
        transform: scale(0);
    }

    80% {
        transform: scale(1.2);
    }

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

/* Notification Drawer Container */
/* Notification Drawer Container */
.notification-dropdown {
    display: none;
    position: absolute;
    right: -10px;
    top: calc(100% + 12px);
    width: 380px;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 1.25rem;
    box-shadow: 0 20px 40px -4px rgba(0, 78, 152, 0.22), 0 8px 16px -2px rgba(0, 0, 0, 0.1);
    z-index: 60;
    overflow: hidden;
    animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Subtle pointing arrow on desktop */
@media (min-width: 640px) {
    .notification-dropdown::before {
        content: '';
        position: absolute;
        top: -6px;
        right: 24px;
        width: 12px;
        height: 12px;
        background: #ffffff;
        border-top: 1px solid rgba(203, 213, 225, 0.9);
        border-left: 1px solid rgba(203, 213, 225, 0.9);
        transform: rotate(45deg);
        z-index: 1;
    }
}

/* Mobile-Responsive Full Width Fixed Sheet */
@media (max-width: 639px) {
    .notification-dropdown {
        position: fixed !important;
        top: 4.25rem !important;
        left: 0.75rem !important;
        right: 0.75rem !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(100vh - 6rem) !important;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
        border-radius: 1.25rem !important;
        z-index: 100 !important;
    }
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }

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

.notification-dropdown.open {
    display: block !important;
}

/* Backdrop: ONLY on mobile (Never blur or darken desktop) */
.notification-backdrop {
    display: none !important;
}

@media (max-width: 639px) {
    .notification-backdrop.open {
        display: block !important;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: 95;
    }
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: #f0f7ff;
    border-left: 3.5px solid #004e98;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

/* ============================================================
   CONTRAST BADGE (WCAG AA for Gold/Dark combinations)
   ============================================================ */
.badge-gold-on-dark {
    background: #ffc299;
    color: #1e293b;
    font-weight: 700;
    font-size: 0.6875rem;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
}

/* ============================================================
   STEP PROGRESS INDICATOR (Forms - Make Forms Feel Short)
   ============================================================ */
.step-progress {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1.5rem;
}

.step-progress-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    position: relative;
}

.step-progress-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 800;
    flex-shrink: 0;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.step-progress-dot.active {
    background: #004e98;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 78, 152, 0.3);
}

.step-progress-dot.completed {
    background: #10b981;
    color: white;
}

.step-progress-dot.upcoming {
    background: #e2e8f0;
    color: #94a3b8;
}

.step-progress-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 0.25rem;
}

.step-progress-line.completed {
    background: #10b981;
}

.step-progress-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

/* ============================================================
   CELEBRATORY COMPLETED CARD BANNER
   ============================================================ */
.celebration-banner {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
    border: 2px solid #10b981;
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.celebration-banner::before {
    content: "🎉";
    position: absolute;
    top: -8px;
    left: 12px;
    font-size: 2rem;
    opacity: 0.3;
    transform: rotate(-15deg);
}

.celebration-banner::after {
    content: "🎉";
    position: absolute;
    bottom: -8px;
    right: 12px;
    font-size: 2rem;
    opacity: 0.3;
    transform: rotate(15deg);
}

/* ============================================================
   EXPANDABLE/COLLAPSIBLE HELPER (Tesler's Law)
   ============================================================ */
.expandable-trigger {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #3a6ea5;
    cursor: pointer;
    padding: 0.375rem 0;
    border: none;
    background: none;
    transition: color 0.15s ease;
}

.expandable-trigger:hover {
    color: #004e98;
}

.expandable-trigger svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.expandable-trigger.open svg {
    transform: rotate(180deg);
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease-in-out), opacity 0.2s ease;
    opacity: 0;
}

.expandable-content.open {
    max-height: 500px;
    opacity: 1;
}

/* ============================================================
   SECTION HEADING WITH ICON (Gestalt Proximity)
   ============================================================ */
.section-heading {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.9375rem;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.section-heading-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ============================================================
   PASSWORD VISIBILITY TOGGLE
   ============================================================ */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.password-toggle:hover {
    color: #475569;
}

/* ============================================================
   EMPTY STATE ILLUSTRATION
   ============================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.empty-state-icon {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.empty-state-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.25rem;
}

.empty-state-text {
    font-size: 0.75rem;
    color: #94a3b8;
    max-width: 280px;
}

/* ============================================================
   FIELDSET GROUP TINT (Gestalt Proximity for Forms)
   ============================================================ */
.fieldset-group {
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: 0.875rem;
    padding: 1.25rem;
    margin-bottom: 0.5rem;
}

.fieldset-group-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8125rem;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================
   HELPER TEXT
   ============================================================ */
.helper-text {
    font-size: 0.6875rem;
    color: #94a3b8;
    margin-top: 0.375rem;
    line-height: 1.4;
}

/* ============================================================
   31-SPACE SUSU BOOK STYLING (Jakob's Law: Physical Passbook)
   ============================================================ */
.susu-passbook-container {
    background: #ffffff;
    border: 3px solid #004e98;
    border-radius: 1.5rem;
    box-shadow: 0 12px 36px -4px rgba(0, 78, 152, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.05);
    position: relative;
}

.susu-passbook-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(90deg, #ff6700, #ff6700 16px, #004e98 16px, #004e98 32px);
    border-top-left-radius: 1.3rem;
    border-top-right-radius: 1.3rem;
}

.susu-book-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 1024px) {
    .susu-book-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.625rem;
    }
}

@media (max-width: 640px) {
    .susu-book-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.5rem;
    }
}

/* Row separator every 7 spaces (visual scanning aid) */
.susu-book-grid>*:nth-child(7n+1) {
    position: relative;
}

@media (min-width: 1025px) {
    .susu-book-grid>*:nth-child(7n+1)::before {
        content: "";
        position: absolute;
        top: -0.5rem;
        left: -0.375rem;
        right: calc(-0.375rem - 100% * 6 - 0.75rem * 6);
        height: 1px;
        background: rgba(203, 213, 225, 0.4);
        pointer-events: none;
    }

    .susu-book-grid>*:nth-child(-n+7)::before {
        display: none;
        /* Hide first row separator */
    }
}

/* Individual Space Box */
.susu-space-box {
    aspect-ratio: 1 / 1.18;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.6rem 0.4rem;
    border-radius: 0.75rem;
    transition: all 0.2s var(--ease-in-out);
    position: relative;
    user-select: none;
}

/* Paid Space: Rich Stamped Appearance */
.susu-space-paid {
    background: linear-gradient(145deg, #ffffff 0%, #ecfdf5 100%);
    border: 2px solid #10b981;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.18);
}

.susu-space-paid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.28);
}

/* Next Space to Pay: Glowing Invitation */
.susu-space-next {
    background: #fff8f0;
    border: 2.5px solid #ff6700;
    box-shadow: 0 0 0 4px rgba(255, 103, 0, 0.18);
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {

    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(255, 103, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 0 7px rgba(255, 103, 0, 0.35);
    }
}

/* Empty Space: Clean Dotted */
.susu-space-empty {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    color: #94a3b8;
}

/* ============================================================
   MONEY PRESET BUTTONS (Hick's Law - Reduce Decision Complexity)
   ============================================================ */
.preset-bill-btn {
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #004e98;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    transition: all 0.15s ease;
    cursor: pointer;
}

.preset-bill-btn:hover {
    border-color: #ff6700;
    background: #fff8f0;
    color: #ff6700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 103, 0, 0.15);
}

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

/* ============================================================
   HERO CARD: Money in Bag
   ============================================================ */
.hero-money-card {
    background: linear-gradient(135deg, #004e98 0%, #002f5c 100%);
    border-radius: 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 32px -4px rgba(0, 78, 152, 0.35);
}

.hero-money-card::after {
    content: "₵";
    position: absolute;
    right: -20px;
    bottom: -35px;
    font-size: 11rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
    pointer-events: none;
    font-family: 'Outfit', sans-serif;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
    position: fixed;
    bottom: 5.5rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

@media (min-width: 768px) {
    #toast-container {
        bottom: 2rem;
        right: 2rem;
    }
}

.toast {
    pointer-events: auto;
    min-width: 290px;
    max-width: 420px;
    padding: 1rem 1.25rem;
    border-radius: 0.875rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.9rem;
    font-weight: 600;
    animation: toastIn 0.25s var(--ease-out);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }

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

/* ============================================================
   KPI CARD WITH ICON
   ============================================================ */
.kpi-card {
    background: #ffffff;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.2s ease;
}

.kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* ============================================================
   KPI TOOLTIP POPOVERS (Desktop Hover & Mobile Tap)
   ============================================================ */
.kpi-tip-popover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.2s;
}

/* Desktop Hover & Focus-within */
@media (hover: hover) and (pointer: fine) {
    .group\/tip:hover .kpi-tip-popover,
    .group\/tip:focus-within .kpi-tip-popover {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

/* Mobile Tap & Active Toggle State */
.kpi-tip-popover.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* ============================================================
   PRINT OPTIMIZATION
   ============================================================ */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    header,
    footer,
    nav,
    .no-print,
    .sticky-cta-bar {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    .card-elevated,
    .susu-passbook-container,
    .section-card {
        box-shadow: none !important;
        border: 1px solid #000000 !important;
    }

    .page-enter {
        animation: none !important;
    }

    /* Print passbook header */
    .print-passbook-header {
        display: block !important;
        text-align: center;
        padding: 1rem 0;
        margin-bottom: 1rem;
        border-bottom: 2px solid #000;
    }

    .print-passbook-header h1 {
        font-size: 1.5rem;
        font-weight: 900;
        margin: 0;
    }

    .print-passbook-header p {
        font-size: 0.75rem;
        margin: 0.25rem 0 0;
    }
}

/* ============================================================
   COLLAPSIBLE DESKTOP SIDEBAR STYLES
   ============================================================ */
#app_sidebar {
    width: 16rem;
    /* 256px */
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(180deg, #07172b 0%, #0c2340 50%, #07172b 100%);
}

body.sidebar-collapsed #app_sidebar {
    width: 5rem;
    /* 80px */
}

/* Hide text elements in collapsed state */
body.sidebar-collapsed .sidebar-text,
body.sidebar-collapsed .sidebar-brand-name,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-user-details,
body.sidebar-collapsed .sidebar-badge {
    display: none !important;
}

/* Center icons in collapsed mode */
body.sidebar-collapsed .sidebar-link {
    justify-content: center !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* Rotate collapse arrow in collapsed mode */
body.sidebar-collapsed .sidebar-collapse-icon {
    transform: rotate(180deg);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.875rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #94a3b8;
    transition: all 0.15s ease;
    text-decoration: none;
    position: relative;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(0, 78, 152, 0.85) 0%, rgba(0, 114, 206, 0.7) 100%);
    box-shadow: 0 4px 12px rgba(0, 78, 152, 0.35);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 3.5px;
    border-radius: 9999px;
    background: #ff6700;
}

body.sidebar-collapsed .sidebar-link.active::before {
    display: none;
}

.sidebar-link-accent {
    background: linear-gradient(135deg, #ff6700 0%, #ff8c33 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(255, 103, 0, 0.35);
}

.sidebar-link-accent:hover {
    filter: brightness(1.08);
}