:root {
            /* Light Theme Colors */
            --bg-outer: #e5e7eb;
            --bg-app: #f9fafb;
            --bg-card: #ffffff;
            --primary-grad: linear-gradient(135deg, #e60012, #b91c1c);
            --primary-color: #e60012;
            --secondary-color: #9ca3af;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --border-color: rgba(0, 0, 0, 0.05);
            --shadow-sm: 0 4px 15px rgba(0,0,0,0.03);
            --shadow-md: 0 10px 25px rgba(230, 0, 18, 0.15);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', -apple-system, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-outer);
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background-image: radial-gradient(#94a3b8 1px, transparent 1px);
            background-size: 20px 20px;
        }

        /* Mobile Container (Max 768px) */
        .mobile-container {
            width: 100%;
            max-width: 768px;
            height: 100vh;
            background-color: var(--bg-app);
            position: relative;
            display: flex;
            flex-direction: column;
            overflow: hidden; /* ?먯떇 ?붿냼(content)留??ㅽ겕濡ㅻ릺?꾨줉 蹂寃?*/
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        }

        /* PC View ( > 768px ) */
        @media (min-width: 769px) {
            .mobile-container {
                height: 98vh;
                border-radius: 20px;
                border: 8px solid #ffffff;
                box-shadow: 0 30px 60px rgba(0,0,0,0.15), inset 0 0 20px rgba(0,0,0,0.02);
            }
            .mobile-container::before {
                content: '';
                position: absolute;
                top: 0;
                left: 50%;
                transform: translateX(-50%);
                width: 120px;
                height: 24px;
                background-color: #ffffff;
                border-bottom-left-radius: 12px;
                border-bottom-right-radius: 12px;
                z-index: 1000;
                box-shadow: 0 5px 10px rgba(0,0,0,0.05);
            }
            .content {
                padding: 0 40px;
            }
        }

        /* Sidebar & Overlay */
        .sidebar {
            position: absolute;
            top: 0;
            left: -280px;
            width: 260px;
            height: 100%;
            background-color: var(--bg-card);
            z-index: 1001;
            transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 4px 0 25px rgba(0,0,0,0.1);
            display: flex;
            flex-direction: column;
        }
        .sidebar.open {
            left: 0;
        }
        .sidebar-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(15, 23, 42, 0.4);
            backdrop-filter: blur(4px);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .sidebar-overlay.open {
            opacity: 1;
            visibility: visible;
        }

        .sidebar-header {
            padding: 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid var(--border-color);
        }
        .sidebar-header h2 { font-size: 1.2rem; font-weight: 700; color: var(--primary-color); }
        .sidebar-close { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; }
        
        .sidebar-menu {
            list-style: none;
            padding: 20px 0;
            flex: 1;
            overflow-y: auto;
        }
        .sidebar-menu li > a.menu-item {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 14px 24px;
            color: var(--text-main);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.95rem;
            transition: background 0.2s;
        }
        .sidebar-menu li > a.menu-item:hover {
            background: rgba(230, 0, 18, 0.05);
            color: var(--primary-color);
        }
        .sidebar-menu li > a.menu-item .material-icons-round { font-size: 1.3rem; color: var(--text-muted); }
        .sidebar-menu li > a.menu-item:hover .material-icons-round { color: var(--primary-color); }
        
        .submenu {
            display: none;
            list-style: none;
            background: rgba(0,0,0,0.02);
            padding-left: 54px;
            padding-bottom: 10px;
        }
        .submenu.open {
            display: block;
            animation: fadeIn 0.3s ease;
        }
        .submenu li a {
            display: block;
            padding: 10px 24px 10px 0;
            font-size: 0.85rem;
            color: var(--text-muted);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s;
        }
        .submenu li a:hover {
            color: var(--primary-color);
        }
        .expand-icon {
            transition: transform 0.2s ease;
        }
        .expand-icon.rotated {
            transform: rotate(180deg);
        }
        .text-danger { color: #ef4444 !important; }


        /* Header */
        .header {
            flex-shrink: 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 20px;
            background: rgba(248, 250, 252, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 16px;
            animation: fadeIn 0.5s ease forwards;
        }

        .hamburger-btn {
            background: none;
            border: none;
            color: var(--text-main);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: var(--bg-card);
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
            transition: all 0.2s ease;
        }
        .hamburger-btn:hover { background: #f1f5f9; }

        .greeting h1 {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--text-main);
            letter-spacing: -0.5px;
        }

        .greeting p {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-weight: 500;
        }

        .profile-btn {
            width: 45px;
            height: 45px;
/*            border-radius: 50%;
            background: var(--primary-grad); */
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 1.2rem;
/*            box-shadow: var(--shadow-md); */
            cursor: pointer;
        }

        /* Content Area */
        .content {
            flex: 1;
            min-height: 0; /* CRITICAL for Flexbox scrolling */
            overflow-y: auto;
            overflow-x: hidden;
            padding: 0 10px;
            display: flex;
            flex-direction: column;
            gap: 28px;
        }
        .content > * { flex-shrink: 0; }

        /* Hero Summary Card */
        .hero-card {
            background: #f8fafc; border-radius: 28px; padding: 28px; color: #1e293b;
            box-shadow: 0 10px 30px rgba(230, 0, 18, 0.08);
            border: 1px solid #e2e8f0; border-top: 4px solid var(--primary-color);
            position: relative;
            overflow: hidden;
            animation: slideUp 0.6s ease forwards;
        }

        .hero-card::after {
            content: '';
            position: absolute;
            top: -50px;
            right: -50px;
            width: 150px;
            height: 150px;
            background: rgba(230,0,18,0.03);
            border-radius: 50%;
        }

        .hero-label {
            font-size: 0.9rem;
            font-weight: 500;
            opacity: 0.9;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .hero-amount {
            font-size: 2.5rem;
            font-weight: 800;
            margin: 8px 0 15px;
            letter-spacing: -1px;
        }

        .hero-stats {
            display: flex;
            justify-content: space-between;
            background: #008836;
            border: 1px solid #166534;
            padding: 14px 20px;
            border-radius: 16px;
            color: white;
            box-shadow: 0 4px 15px rgba(22, 101, 52, 0.2);
        }

        .stat-item h4 {
            font-size: 0.75rem;
            font-weight: 500;
            opacity: 0.9;
            margin-bottom: 4px;
        }

        .stat-item p {
            font-size: 1.1rem;
            font-weight: 700;
        }

        /* Section Titles */
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-bottom: 16px;
        }

        .section-header h3 {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--text-main);
        }

        .section-header a {
            font-size: 0.85rem;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
        }

        /* Quick Actions Grid */
        .quick-actions {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            animation: slideUp 0.6s ease forwards;
            animation-delay: 0.2s;
            opacity: 0;
        }

        .action-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            text-decoration: none;
        }

        .action-icon {
            width: 60px; /* 怨좎젙 ?ш린濡?蹂寃쏀븯??PC?먯꽌 鍮꾨??댁???臾몄젣 ?닿껐 */
            height: 60px;
            border-radius: 20px;
            background: var(--bg-card);
            box-shadow: var(--shadow-sm);
            display: flex;
            justify-content: center;
            align-items: center;
            color: var(--primary-color);
            font-size: 1.8rem;
            transition: all 0.3s ease;
            border: 1px solid var(--border-color);
        }

        .action-btn:hover .action-icon {
            background: var(--primary-grad);
            color: white !important;
            transform: translateY(-5px);
            box-shadow: var(--shadow-md);
        }
        .action-btn:hover .action-icon .material-icons-round,
        .action-btn:hover .action-icon i {
            color: white !important;
        }

        .action-btn span {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-main);
            text-align: center;
            word-break: keep-all;
        }

        /* Business Performance (Progress Card) */
        .performance-sec {
            animation: slideUp 0.6s ease forwards;
            animation-delay: 0.3s;
            opacity: 0;
        }
        .perf-card {
            background: var(--bg-card);
            border-radius: 24px;
            padding: 24px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
        }
        .perf-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        .perf-header h4 { font-size: 1rem; color: var(--text-main); font-weight: 700; }
        .perf-header span { font-size: 0.85rem; color: var(--primary-color); font-weight: 600; background: rgba(230, 0, 18,0.1); padding: 4px 10px; border-radius: 12px; }
        .progress-bar-bg {
            width: 100%;
            height: 12px;
            background: #e2e8f0;
            border-radius: 6px;
            overflow: hidden;
            margin-bottom: 8px;
        }
        .progress-bar-fill {
            height: 100%;
            background: var(--primary-grad);
            width: 75%; /* Example progress */
            border-radius: 6px;
        }
        .perf-details {
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        /* Recent Activity List */
        .activity-sec {
            animation: slideUp 0.6s ease forwards;
            animation-delay: 0.4s;
            opacity: 0;
        }
        .activity-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .activity-card {
            background: var(--bg-card);
            border-radius: 20px;
            padding: 16px;
            display: flex;
            align-items: center;
            gap: 16px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
            transition: transform 0.2s ease;
        }

        .activity-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.06);
        }

        .act-icon {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            background: #f1f5f9;
            display: flex;
            justify-content: center;
            align-items: center;
            color: var(--primary-color);
        }

        .act-icon.orange { color: #f59e0b; background: #fef3c7; }
        .act-icon.green { color: #10b981; background: #d1fae5; }
        .act-icon.purple { color: var(--primary-color); background: #fef2f2; }

        .act-details {
            flex: 1;
        }

        .act-details h4 {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 4px;
        }

        .act-details p {
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .act-value {
            font-weight: 700;
            font-size: 1rem;
            color: var(--text-main);
        }
        .act-value.positive {
            color: #10b981;
        }

        /* Bottom Navigation Bar */
        .bottom-nav {
            flex-shrink: 0;
            width: 100%;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: space-around;
            padding: 12px 20px 24px;
            z-index: 200;
        }

        @media (min-width: 769px) {
            .bottom-nav {
                border-bottom-left-radius: 32px;
                border-bottom-right-radius: 32px;
            }
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            color: var(--text-muted);
            text-decoration: none;
            transition: color 0.2s ease;
        }

        .nav-item.active {
            color: var(--primary-color);
        }

        .nav-item .material-icons-round {
            font-size: 1.8rem;
        }

        .nav-item span {
            font-size: 0.7rem;
            font-weight: 600;
        }

        /* Animations */
        @keyframes slideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
/* ==========================================================================
   Fractal Premium UI Components (Glassmorphism & Modern Aesthetics)
   ========================================================================== */

/* Animated Background for the outer container (if applicable) */
body.sidebar-active .card-fractal {
    transform: scale(0.98);
}

/* Glassmorphism Card */
.card-fractal {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    padding: 35px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04), 
                inset 0 0 0 1px rgba(255, 255, 255, 0.9),
                inset 0 10px 20px rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card-fractal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 60%);
    opacity: 0.5;
    pointer-events: none;
    transform: rotate(30deg);
}

.card-fractal:hover {
    box-shadow: 0 25px 50px rgba(230, 0, 18, 0.1), 
                inset 0 0 0 1px rgba(255, 255, 255, 1);
    transform: translateY(-4px);
}

/* Form Labels */
.form-label-fractal {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: color 0.3s ease;
}
.form-label-fractal small {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    margin-left: 6px;
    opacity: 0.7;
}

/* Modern Form Controls */
.form-control-fractal {
    width: 100%;
    padding: 16px 20px;
    border-radius: 18px;
    border: 2px solid rgba(230, 0, 18, 0.2);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02),
                inset 0 2px 5px rgba(0,0,0,0.01);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control-fractal::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.form-control-fractal:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(230, 0, 18, 0.15), 
                0 10px 25px rgba(230, 0, 18, 0.1);
    transform: translateY(-2px);
}

.form-control-fractal:hover:not(:focus):not([readonly]) {
    border-color: rgba(230, 0, 18, 0.3);
    background: #ffffff;
}

/* Readonly State */
.form-control-fractal[readonly] {
    background: rgba(241, 245, 249, 0.6);
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.15);
    box-shadow: none;
    cursor: not-allowed;
    font-weight: 500;
}
.form-control-fractal[readonly]:focus {
    transform: none;
    box-shadow: none;
}

/* Primary Button (Gradient + Glow) */
.btn-fractal-primary {
    background: var(--primary-grad);
    color: white !important;
    border: none;
    border-radius: 20px;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(230, 0, 18, 0.3),
                inset 0 2px 0 rgba(255,255,255,0.2);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-fractal-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-20deg);
    transition: all 0.6s ease;
}

.btn-fractal-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(230, 0, 18, 0.4),
                inset 0 2px 0 rgba(255,255,255,0.3);
}

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

.btn-fractal-primary:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px rgba(230, 0, 18, 0.3);
}

/* Outline Button */
.btn-fractal-outline {
    background: rgba(255,255,255,0.5);
    color: var(--text-muted);
    border: 2px solid rgba(100, 116, 139, 0.2);
    border-radius: 20px;
    padding: 15px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: block;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.btn-fractal-outline:hover {
    background: #ffffff;
    color: var(--text-main);
    border-color: rgba(100, 116, 139, 0.4);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

/* Grouping and Layout Adjustments */
.fractal-group {
    position: relative;
}

/* Add focus-within styling for labels */
.mb-4:focus-within .form-label-fractal {
    color: var(--primary-color);
}

/* Subtle animation on load */
@keyframes fractalFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#app-content > div {
    animation: fractalFadeInUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}


/* ==========================================================================
   Sidebar Glassmorphism & Active State Enhancements
   ========================================================================== */

/* Glassmorphism for Sidebar */
.sidebar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.05);
}

/* Custom Scrollbar for Sidebar Menu */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}
.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(230, 0, 18, 0.15);
    border-radius: 10px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(230, 0, 18, 0.3);
}

/* Active State for Sidebar & Bottom Nav Links */
.sidebar-menu a.active {
    background: rgba(230, 0, 18, 0.1);
    color: var(--primary-color) !important;
    font-weight: 700 !important;
    border-right: 4px solid var(--primary-color);
}
.sidebar-menu a.active .material-icons-round {
    color: var(--primary-color) !important;
}

/* Custom Scrollbar for all scrollable areas inside app */
.mobile-container * {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.mobile-container *::-webkit-scrollbar {
    display: none;
}
.content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.content::-webkit-scrollbar {
    display: none;
}

@media (min-width: 769px) {
    .mobile-container * {
        -ms-overflow-style: auto;
        scrollbar-width: auto;
    }
    .mobile-container *::-webkit-scrollbar {
        display: block;
        width: 6px;
    }
    .mobile-container *::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.04);
        border-radius: 8px;
    }
    .mobile-container *::-webkit-scrollbar-thumb {
        background: rgba(230, 0, 18, 0.6);
        border-radius: 8px;
    }
    .mobile-container *::-webkit-scrollbar-thumb:hover {
        background: rgba(230, 0, 18, 0.9);
    }

    .content {
        -ms-overflow-style: auto;
        scrollbar-width: auto;
    }
    .content::-webkit-scrollbar {
        display: block;
        width: 10px !important;
    }
    .content::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05) !important;
        border-radius: 10px !important;
        margin: 10px 0 !important;
    }
    .content::-webkit-scrollbar-thumb {
        background: rgba(230, 0, 18, 0.8) !important;
        border-radius: 10px !important;
        border: 2px solid transparent !important;
        background-clip: content-box !important;
    }
    .content::-webkit-scrollbar-thumb:hover {
        background: rgba(230, 0, 18, 1) !important;
        border: 2px solid transparent !important;
        background-clip: content-box !important;
    }
}
/* ==========================================================================
   Glassmorphism Tables & Badges
   ========================================================================== */

.table-fractal-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), 0 10px 20px rgba(0,0,0,0.02);
}

.table-fractal {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-fractal th {
    background: rgba(230, 0, 18, 0.08);
    color: var(--primary-color);
    font-weight: 700;
    padding: 16px;
    font-size: 0.95rem;
    border-bottom: 2px solid rgba(230, 0, 18, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-fractal td {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    color: var(--text-main);
    font-size: 0.95rem;
    vertical-align: middle;
}

.table-fractal tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.table-fractal tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.005);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.table-fractal tbody tr:last-child td {
    border-bottom: none;
}

/* Glassmorphism Badge */
.badge-fractal {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(230, 0, 18, 0.15) 0%, rgba(230, 0, 18, 0.05) 100%);
    border: 1px solid rgba(230, 0, 18, 0.2);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(230, 0, 18, 0.1);
}

/* Ensure scrollbar works inside the table container */
.table-fractal-container::-webkit-scrollbar { width: 6px; height: 6px; }
.table-fractal-container::-webkit-scrollbar-track { background: transparent; }
.table-fractal-container::-webkit-scrollbar-thumb { background: rgba(230, 0, 18, 0.3); border-radius: 10px; }
.table-fractal-container::-webkit-scrollbar-thumb:hover { background: rgba(230, 0, 18, 0.6); }

/* ==========================================================================
   Shopping Mall Styles
   ========================================================================== */
.shop-card {
    padding: 0; overflow: hidden; display: flex; flex-direction: column; height: 100%;
}
.shop-card-img {
    width: 100%; height: 150px; object-fit: cover; background-color: #f1f5f9;
}
.shop-card-body {
    padding: 16px; flex: 1; display: flex; flex-direction: column;
}
.shop-card-title {
    font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; color: var(--text-main);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-card-price {
    font-size: 1.15rem; font-weight: 800; color: var(--primary-color); margin-top: auto;
}
.shop-card-pv {
    font-size: 0.75rem; font-weight: 700; color: #64748b; background: rgba(230, 0, 18, 0.1);
    padding: 3px 8px; border-radius: 6px; display: inline-block; margin-bottom: 12px;
}

/* Checkout Bottom Sheet */
.checkout-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); 
    backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px);
    z-index: 2000; opacity: 0; visibility: hidden; pointer-events: none; transition: 0.3s ease;
}
.checkout-overlay.show { 
    opacity: 1; visibility: visible; pointer-events: auto; 
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}

.checkout-sheet {
    position: absolute; bottom: -100%; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border-top-left-radius: 28px; border-top-right-radius: 28px;
    padding: 24px 24px 40px; z-index: 2001; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15); max-height: 85vh; overflow-y: auto;
}
.checkout-overlay.show .checkout-sheet { bottom: 0; }
.checkout-sheet-handle {
    width: 40px; height: 5px; background: #cbd5e1; border-radius: 5px; margin: 0 auto 20px;
}
.pay-method-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px;
}
.pay-method-btn {
    background: rgba(255,255,255,0.8); border: 2px solid rgba(230, 0, 18, 0.1);
    border-radius: 12px; padding: 12px; text-align: center; color: #64748b;
    font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: 0.2s;
}
.pay-method-btn.active {
    background: rgba(230, 0, 18, 0.1); border-color: var(--primary-color);
    color: var(--primary-color);
}
.pay-method-btn i, .pay-method-btn span { display: block; font-size: 1.5rem; margin-bottom: 5px; }

.checkout-section { display: none; animation: fadeIn 0.3s ease; }
.checkout-section.active { display: block; }

/* Search Bar */
.search-fractal-container { position: relative; margin-bottom: 24px; }
.search-fractal-input {
    width: 100%; padding: 14px 20px 14px 45px; border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), 0 4px 10px rgba(0,0,0,0.02);
    color: var(--text-main); font-size: 0.95rem; transition: 0.3s;
}
.search-fractal-input:focus { outline: none; border-color: rgba(230, 0, 18, 0.5); background: rgba(255, 255, 255, 0.8); }
.search-fractal-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }

/* Pagination */
.pagination-fractal { display: flex; justify-content: center; gap: 8px; margin-top: 35px; margin-bottom: 20px; }
.page-fractal-item {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border-radius: 12px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(255, 255, 255, 0.8);
    color: #64748b; font-weight: 700; text-decoration: none; transition: 0.2s;
    backdrop-filter: blur(5px); box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.page-fractal-item:hover { background: rgba(255, 255, 255, 0.9); color: var(--primary-color); transform: translateY(-2px); }
.page-fractal-item.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); box-shadow: 0 4px 10px rgba(230, 0, 18, 0.3); }
/* ==========================================================================
   SHARP & COOL PREMIUM UI (Straight Lines, Purple Accent)
   ========================================================================== */

/* 1. Global App Background */
body {
    background-color: #f1f5f9 !important;
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1.2" fill="%2394a3b8"/></svg>') !important;
    background-size: 24px 24px !important;
    background-attachment: fixed !important;
}
.mobile-container {
    background-color: #f8fafc !important;
    border: none !important;
    max-width: 768px !important;
    margin: 0 auto !important;
    min-height: 100vh !important;
    position: relative !important;
    overflow-x: hidden !important;
    /* REDUCED PADDING FOR WIDER CONTENT AREA */
    border-radius: 6px 6px 0 0 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02) !important;
    padding: 12px 5px 15px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

/* 2. Unified Card Design (Merging top banner and bottom form with sharp lines) */
.card-fractal {
    background: #ffffff !important;
    border: none !important;
    border-radius: 6px 6px 0 0 !important; /* Sharp */
    box-shadow: 0 4px 20px rgba(0,0,0,0.02) !important;
    padding: 24px 30px 15px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.card-fractal::before, .card-fractal::after { display: none !important; }
.card-fractal h4, .card-fractal .text-white {
    color: #1e293b !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    text-shadow: none !important;
    margin-bottom: 0 !important;
}
.card-fractal p, .card-fractal .text-white-50 { display: none !important; }
.card-fractal .bg-primary.bg-opacity-10, .card-fractal .mdi { display: none !important; }

/* 3. Main Content Cards (The Form Container) */
.premium-card {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 0 6px 6px !important; /* Sharp */
    box-shadow: 0 10px 20px rgba(0,0,0,0.02) !important;
    padding: 15px !important;
    margin-top: 0 !important; 
    z-index: 10;
}
.premium-card.bg-dark { background: #ffffff !important; }

/* 4. Sharp Neat Inputs */
.form-label-fractal {
    color: #64748b !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin-bottom: 8px !important;
    display: block !important;
}
.form-control, .form-control-fractal, input.bg-dark {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important; /* Very sharp */
    padding: 14px 16px !important;
    color: #1e293b !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}
.form-control:focus, .form-control-fractal:focus, input.bg-dark:focus {
    background-color: #ffffff !important;
    border-color: #9333ea !important;
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.15) !important;
    outline: none !important;
}

/* 5. Purple Gradient Button (Image 3 Style) */
.btn-success, .btn-primary, .btn-premium-submit {
    background: linear-gradient(135deg, #b91c1c, var(--primary-color)) !important;
    border: none !important;
    border-radius: 8px !important; /* Match straight lines, but keep it a bit soft so it looks like the 3rd image */
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    padding: 14px !important;
    box-shadow: 0 6px 15px rgba(230, 0, 18, 0.25) !important;
    transition: all 0.2s ease !important;
    text-shadow: none !important;
    letter-spacing: 0 !important;
}
.btn-success:hover, .btn-primary:hover, .btn-premium-submit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 20px rgba(230, 0, 18, 0.35) !important;
    background: linear-gradient(135deg, #b56df8, #996bf7) !important;
}
.btn-success:active, .btn-primary:active, .btn-premium-submit:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 10px rgba(230, 0, 18, 0.2) !important;
}

/* 6. General fixes for leftover HTML dark mode classes (Crucial!) */
h1.text-white, h2.text-white, h3.text-white, h4.text-white, h5.text-white, p.text-white, label.text-white, span.text-white:not(.badge):not(.btn), div.text-white:not(.btn) { color: #1e293b !important; text-shadow: none !important; }
.bg-dark:not(.btn):not(body):not(html) { background-color: #ffffff !important; color: #1e293b !important; }
.text-white-50 { color: #64748b !important; }
.border-secondary { border-color: #e2e8f0 !important; }

/* Force ALL cards, inputs, and buttons globally to follow the sharp radius if they missed the specific classes */
.card { border-radius: 6px !important; }
.btn { border-radius: 8px !important; }

.container {--bs-gutter-x:0!important}/* ==========================================================================
   SIDEBAR REFRESHING GEOMETRIC OVERHAUL
   ========================================================================== */

/* 1. Geometric & Refreshing Background */
.sidebar {
    background-color: #ffffff !important;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(230, 0, 18, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
        url('data:image/svg+xml;utf8,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="%23a855f7" stroke-width="1" stroke-opacity="0.08"><path d="M30 0L60 30L30 60L0 30Z"/><circle cx="30" cy="30" r="15"/></g></svg>') !important;
    background-size: 100% 100%, 100% 100%, 60px 60px !important;
    background-attachment: fixed, fixed, local !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: 10px 0 30px rgba(0,0,0,0.03) !important;
}

/* 2. Increased Font Sizes & Spacing */
.sidebar-header {
    padding: 30px 24px 20px !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
}
.sidebar-header h2 {
    font-size: 1.5rem !important; /* Larger Header */
    font-weight: 800 !important;
    color: var(--primary-color) !important; /* Cool Purple */
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

.sidebar-menu li > a.menu-item {
    font-size: 1.1rem !important; /* Larger Menu Items */
    font-weight: 600 !important;
    color: #334155 !important;
    padding: 16px 24px !important;
    transition: all 0.2s ease !important;
    margin: 4px 12px !important;
    border-radius: 8px !important;
}
.sidebar-menu li > a.menu-item:hover, .sidebar-menu a.active {
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.1), rgba(230, 0, 18, 0.05)) !important;
    color: var(--primary-color) !important;
    transform: translateX(4px) !important;
}
.sidebar-menu li > a.menu-item i, .sidebar-menu li > a.menu-item .material-icons-round {
    font-size: 1.4rem !important; /* Larger Icons */
    color: #94a3b8 !important;
    margin-right: 8px !important;
    transition: all 0.2s ease !important;
}
.sidebar-menu li > a.menu-item:hover i, .sidebar-menu a.active i {
    color: var(--primary-color) !important;
}

/* 3. Submenu Enhancements */
.submenu {
    background: rgba(248, 250, 252, 0.5) !important;
    margin: 0 12px !important;
    border-radius: 0 0 8px 8px !important;
    border-left: 2px solid rgba(185, 28, 28, 0.2) !important;
}
.submenu li > a {
    font-size: 1.0rem !important; /* Larger Submenu */
    font-weight: 500 !important;
    color: #64748b !important;
    padding: 12px 20px 12px 30px !important;
    display: block !important;
    transition: all 0.2s ease !important;
}
.submenu li > a:hover {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    background: transparent !important;
    transform: translateX(4px) !important;
}


/* Prevent Sidebar Menu Line Breaks */
.sidebar { width: 310px !important; }
.sidebar-menu li > a.menu-item, .submenu li > a { white-space: nowrap !important; }


/* Fix Sidebar Closed State Offset */
.sidebar { left: -320px !important; }
.sidebar.open { left: 0 !important; }


/* Sidebar Compact Spacing Override */
.sidebar-menu { padding: 10px 0 !important; }
.sidebar-header { padding: 20px 16px 15px !important; }
.sidebar-menu li > a.menu-item {
    padding: 12px 16px !important;
    margin: 2px 8px !important;
    gap: 8px !important; /* ?袁⑹뵠?꾩꼵????용뮞???????揶쏄쑨爰??????곕벡??*/
}
.sidebar-menu li > a.menu-item i, .sidebar-menu li > a.menu-item .material-icons-round {
    margin-right: 0 !important; /* gap????????嚥?margin ??볤탢 */
}
.submenu {
    margin: 0 8px !important;
}
.submenu li > a {
    padding: 10px 16px 10px 36px !important; /* ??뺥닏筌롫뗀???袁⑸툡??揶쏄쑨爰??곕벡??*/
}


/* Submenu Horizontal Space Fix (Zero-in on spacing) */
.submenu {
    padding-left: 0 !important; /* Remove default UL padding that was pushing everything right */
    margin: 0 12px 0 44px !important; /* Align left edge exactly with parent text */
    border-left: 1px solid rgba(230, 0, 18, 0.2) !important;
    border-radius: 0 !important;
}
.submenu li {
    list-style: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
.submenu li > a {
    display: block !important;
    width: 100% !important;
    padding: 10px 16px 10px 20px !important; /* Clean inner padding */
    text-align: left !important;
    margin: 2px 0 !important;
    border: none !important; /* Remove any strange right-borders */
    border-radius: 6px !important;
}
.submenu li > a:hover, .submenu li > a.active {
    background: rgba(230, 0, 18, 0.08) !important; /* Fill entire block */
    transform: none !important; /* Remove shifting on submenu to keep it aligned */
    padding-left: 24px !important; /* Just a slight indent on hover instead of transform */
}


/* Re-adjust sidebar width after compaction */
.sidebar { width: 270px !important; left: -280px !important; }


/* Sidebar Shrink More */
.sidebar { width: 240px !important; left: -250px !important; }
.sidebar-menu li > a.menu-item { padding: 10px 14px !important; }


/* Home Page Font Size Adjustments */
.hero-amount { font-size: 2.0rem !important; } /* ??疫꼲???곕벡??(2.5 -> 2.0) */
.hero-label { font-size: 1.0rem !important; font-weight: 600 !important; } /* ??곕： ?類? (0.9 -> 1.0) */
.stat-item h4 { font-size: 0.9rem !important; opacity: 0.9 !important; } /* ?臾? 疫꼲???類? (0.75 -> 0.9) */
.stat-item p { font-size: 1.15rem !important; font-weight: 700 !important; }
.action-btn span { font-size: 0.9rem !important; font-weight: 600 !important; } /* ?臾? ?袁⑹뵠????곌볼 ?類? (0.75 -> 0.9) */
.section-header h3 { font-size: 1.25rem !important; } /* ?諭??????? ??곕： 鈺곌퀣??*/

@media (max-width: 767px) {
    .promo-card, .purchase-card, .history-card, .card-fractal {
        padding: 15px!important;
    }
}
