/* public/assets/css/custom.css - Colorful, Animated, Layered Shadows & Modern Aesthetics */

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

:root {
    --bottle-green-dark: #064e3b;
    --bottle-green: #047857;
    --bottle-green-light: #059669;
    --bottle-green-accent: #10b981;
    --bottle-green-tint: #ecfdf5;
    
    /* Vibrant Colorful Accents */
    --accent-purple: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-indigo: #6366f1;
    --accent-amber: #f59e0b;
    --accent-cyan: #06b6d4;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: #f6f8fa;
    color: #0f172a;
}

/* ==================================================================== */
/* ANIMATIONS & KEYFRAMES                                               */
/* ==================================================================== */

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes floatSoft {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(4, 120, 87, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(4, 120, 87, 0);
    }
}

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

.animate-entrance {
    animation: cardEntrance 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggered entrance delays */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }

/* ==================================================================== */
/* NEXT-LEVEL CARDS & COLORFUL SHADOWS                                  */
/* ==================================================================== */

.card-soft {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    border-radius: 1.5rem;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.card-soft:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -8px rgba(15, 23, 42, 0.08), 0 8px 16px -4px rgba(15, 23, 42, 0.03);
    border-color: rgba(203, 213, 225, 0.9);
}

/* Colored Card Glows */
.card-glow-purple:hover {
    box-shadow: 0 20px 35px -8px rgba(139, 92, 246, 0.18), 0 8px 16px -4px rgba(139, 92, 246, 0.08);
    border-color: #ddd6fe;
}

.card-glow-emerald:hover {
    box-shadow: 0 20px 35px -8px rgba(16, 185, 129, 0.2), 0 8px 16px -4px rgba(16, 185, 129, 0.08);
    border-color: #a7f3d0;
}

.card-glow-rose:hover {
    box-shadow: 0 20px 35px -8px rgba(244, 63, 94, 0.18), 0 8px 16px -4px rgba(244, 63, 94, 0.08);
    border-color: #fecdd3;
}

.card-glow-indigo:hover {
    box-shadow: 0 20px 35px -8px rgba(99, 102, 241, 0.18), 0 8px 16px -4px rgba(99, 102, 241, 0.08);
    border-color: #c7d2fe;
}

.card-glow-blue:hover {
    box-shadow: 0 20px 35px -8px rgba(37, 99, 235, 0.18), 0 8px 16px -4px rgba(37, 99, 235, 0.08);
    border-color: #bfdbfe;
}

.card-glow-amber:hover {
    box-shadow: 0 20px 35px -8px rgba(217, 119, 6, 0.18), 0 8px 16px -4px rgba(217, 119, 6, 0.08);
    border-color: #fde68a;
}

/* ==================================================================== */
/* COLORFUL ICON CONTAINERS & HOVER SCALES                              */
/* ==================================================================== */

.icon-box {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.card-soft:hover .icon-box {
    transform: scale(1.08) rotate(-2deg);
}

.icon-box-purple {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #7c3aed;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.icon-box-emerald {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #047857;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.15);
}

.icon-box-rose {
    background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%);
    color: #e11d48;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.15);
}

.icon-box-indigo {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.icon-box-blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.icon-box-amber {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
}

/* ==================================================================== */
/* VIBRANT BUTTONS & GLOWS                                              */
/* ==================================================================== */

.btn-bottle-vibrant {
    background: linear-gradient(135deg, #065f46 0%, #047857 50%, #059669 100%);
    box-shadow: 0 6px 20px -2px rgba(4, 120, 87, 0.35);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-bottle-vibrant:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 50%, #10b981 100%);
    box-shadow: 0 8px 25px -2px rgba(4, 120, 87, 0.5);
    transform: translateY(-2px);
}

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

/* Pulse badge for live syncing */
.pulse-indicator {
    animation: pulseGlow 2s infinite;
}

/* ==================================================================== */
/* PILL BADGES WITH VIVID PASTEL COLORS                                 */
/* ==================================================================== */

.badge-category {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.badge-category:hover {
    transform: scale(1.05);
}

.badge-cat-income {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1);
}

.badge-cat-food {
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.1);
}

.badge-cat-bills {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

.badge-cat-transport {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.1);
}

.badge-cat-shopping {
    background: #faf5ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
    box-shadow: 0 2px 6px rgba(147, 51, 234, 0.1);
}

.badge-cat-other {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* ==================================================================== */
/* TABLE ROWS WITH SMOOTH HOVER ELEVATION                              */
/* ==================================================================== */

.tx-row {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tx-row:hover {
    background-color: #f8fafc;
    transform: scale(1.002);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

/* Total Assets gradient banner */
.banner-assets {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #fdf4ff 100%);
    border: 1px solid #ddd6fe;
    box-shadow: 0 4px 15px -3px rgba(124, 58, 237, 0.12);
}

/* ==================================================================== */
/* COLLAPSIBLE ICON-ONLY SIDEBAR DRAWER                                 */
/* ==================================================================== */

#desktop-sidebar {
    width: 5rem; /* 80px normally (icon-only mode) */
    transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}

#desktop-sidebar:hover,
#desktop-sidebar.expanded {
    width: 16.5rem; /* 264px when hovered or pinned expanded */
    box-shadow: 10px 0 35px -5px rgba(0, 0, 0, 0.08);
}

.sidebar-label {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s ease, max-width 0.25s ease;
}

#desktop-sidebar:hover .sidebar-label,
#desktop-sidebar.expanded .sidebar-label {
    opacity: 1;
    max-width: 180px;
}

.sidebar-brand-text {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s ease, max-width 0.25s ease;
}

#desktop-sidebar:hover .sidebar-brand-text,
#desktop-sidebar.expanded .sidebar-brand-text {
    opacity: 1;
    max-width: 180px;
}

.sidebar-user-info {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s ease, max-width 0.25s ease;
}

#desktop-sidebar:hover .sidebar-user-info,
#desktop-sidebar.expanded .sidebar-user-info {
    opacity: 1;
    max-width: 140px;
}

/* Nav Link Hover & Active */
.nav-link {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 1rem;
}

.nav-link:hover {
    background-color: #f1f5f9;
    color: #064e3b;
    transform: translateX(2px);
}

.nav-link.active {
    background: linear-gradient(135deg, #064e3b 0%, #047857 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px -2px rgba(4, 120, 87, 0.4);
}

.nav-link.active span,
.nav-link.active .sidebar-label {
    color: #ffffff !important;
}

/* Account Card Styles */
.account-card {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.account-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px -6px rgba(15, 23, 42, 0.08);
}

/* Sleek Custom Scrollbar for 12-Month Category Breakdown & Mini Lists */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);
}

/* ==================================================================== */
/* STRICT VIEWPORT & PAGE-VIEW SYSTEM ISOLATION                         */
/* ==================================================================== */

html, body {
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

#app-container {
    height: 100vh !important;
    height: 100dvh !important;
    width: 100% !important;
    overflow: hidden !important;
}

#main-viewport {
    height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

.page-view.hidden,
div.page-view.hidden,
[hidden].page-view,
.page-view[hidden],
div.page-view[hidden] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
