:root {
    /* Color Palette - Dark Mode Premium */
    --bg-color: #0f172a; /* Slate 900 */
    --bg-panel: rgba(30, 41, 59, 0.7); /* Slate 800 with opacity */
    --text-main: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    
    --primary: #6366f1; /* Indigo 500 */
    --primary-hover: #4f46e5; /* Indigo 600 */
    --accent: #8b5cf6; /* Violet 500 */
    
    --success: #10b981; /* Emerald 500 */
    --success-bg: rgba(16, 185, 129, 0.15);
    
    --danger: #ef4444; /* Red 500 */
    --danger-bg: rgba(239, 68, 68, 0.15);
    
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Effects */
    --glass-blur: blur(12px);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

/* Layout */
.app-container { display: flex; height: 100vh; padding: 1rem; gap: 1.5rem; }

/* Sidebar */
.sidebar { width: 250px; display: flex; flex-direction: column; padding: 1.5rem; position: relative; z-index: 10; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-size: 1.5rem; font-weight: 700; color: var(--text-main); margin-bottom: 3rem; }
.logo i { color: var(--primary); font-size: 2rem; }

.nav-menu { display: flex; flex-direction: column; gap: 0.5rem; flex-grow: 1; }
.nav-item {
    display: flex; align-items: center; gap: 1rem; padding: 0.875rem 1rem;
    border-radius: 12px; color: var(--text-muted); text-decoration: none;
    font-weight: 500; transition: var(--transition);
}
.nav-item i { font-size: 1.25rem; }
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-main); transform: translateX(4px); }
.nav-item.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }

.sidebar-bottom { display: flex; flex-direction: column; gap: 0.5rem; margin-top: auto; }
.text-danger { color: var(--danger) !important; }
.text-danger:hover { background: var(--danger-bg) !important; }
.text-success { color: var(--success); }

/* Main Content */
.main-content { flex-grow: 1; display: flex; flex-direction: column; gap: 1.5rem; overflow-y: auto; padding-right: 0.5rem; }
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; }
.header-text h1 { font-size: 1.75rem; font-weight: 600; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; }
.header-actions { display: flex; align-items: center; gap: 1.25rem; }

.search-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem; border-radius: 999px; width: 300px; transition: var(--transition); }
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); }
.search-bar i { color: var(--text-muted); font-size: 1.25rem; }
.search-bar input { background: transparent; border: none; outline: none; color: var(--text-main); width: 100%; font-family: inherit; }

.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); color: var(--text-main); cursor: pointer; transition: var(--transition); position: relative; background: transparent; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.icon-btn i { font-size: 1.25rem; }
.badge { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; background-color: var(--danger); border-radius: 50%; box-shadow: 0 0 0 2px var(--bg-color); }

.avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); cursor: pointer; transition: var(--transition); }
.avatar img:hover { transform: scale(1.05); }

/* Dashboard Cards */
.overview-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.stat-card { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; transition: var(--transition); }
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(255, 255, 255, 0.2); }
.gradient-card { background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2)); border-color: rgba(99, 102, 241, 0.3); }
.card-header { display: flex; justify-content: space-between; align-items: center; }
.card-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.gradient-card .card-icon { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; }
.badge-trend { display: flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.card-label { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0.25rem; }
.card-value { font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; }

/* Bottom Content */
.dashboard-bottom { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; flex-grow: 1; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.section-header h3 { font-size: 1.125rem; font-weight: 600; }

.chart-container { padding: 1.5rem; display: flex; flex-direction: column; }
.chart-wrapper { flex-grow: 1; position: relative; min-height: 300px; }

.transactions-container { padding: 1.5rem; display: flex; flex-direction: column; }
.view-all { color: var(--primary); text-decoration: none; font-size: 0.875rem; font-weight: 500; transition: var(--transition); }
.view-all:hover { color: var(--primary-hover); }

/* Table */
.table-responsive { overflow-x: auto; }
.transactions-table { width: 100%; border-collapse: collapse; }
.transactions-table th { text-align: left; padding-bottom: 1rem; color: var(--text-muted); font-weight: 500; font-size: 0.875rem; border-bottom: 1px solid var(--border-color); }
.transactions-table td { padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.875rem; vertical-align: middle; }
.transactions-table tr:last-child td { border-bottom: none; }
.tx-icon-desc { display: flex; align-items: center; gap: 1rem; }
.tx-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.tx-desc strong { display: block; color: var(--text-main); font-weight: 500; }
.tx-desc span { color: var(--text-muted); font-size: 0.75rem; }

/* Forms & Modals */
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 8px; font-family: inherit; font-weight: 600; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); }

.custom-input { background: rgba(0, 0, 0, 0.2); border: 1px solid var(--border-color); color: var(--text-main); padding: 0.75rem 1rem; border-radius: 8px; font-family: inherit; font-size: 0.875rem; outline: none; width: 100%; transition: var(--transition); }
.custom-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); }
.custom-input option { background: var(--bg-color); color: var(--text-main); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.875rem; }

.btn-delete { background: transparent; color: var(--text-muted); border: none; cursor: pointer; padding: 0.5rem; border-radius: 8px; transition: var(--transition); font-size: 1.2rem; }
.btn-delete:hover { color: var(--danger); background: var(--danger-bg); }

/* Landing Page Premium */
.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 50% -20%, #1e293b, var(--bg-dark));
    overflow-y: auto;
    width: 100%;
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}
.landing-logo i { color: var(--primary); }

.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 5%;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    gap: 4rem;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.badge-pill {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    background: white;
    color: #1e293b;
    border: none;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}
.hero-btn:hover { transform: scale(1.05); }
.hero-btn img { width: 24px; height: 24px; }

.security-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-visual {
    flex: 1;
    min-width: 300px;
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.abstract-card {
    position: absolute;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: float 6s ease-in-out infinite;
}

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

.main-ac-card {
    width: 280px;
    height: 320px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ac-header { display: flex; align-items: center; gap: 1rem; }
.ac-circle { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.1); }
.ac-line { height: 12px; border-radius: 6px; background: rgba(255,255,255,0.1); }
.ac-line.short { width: 40%; }
.ac-line.medium { width: 70%; }
.ac-line.long { width: 100%; }

.ac-body {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}
.ac-bar { flex: 1; border-radius: 4px 4px 0 0; }
.bg-success { background: var(--success); }
.bg-danger { background: var(--danger); }

.floating-card-1 {
    top: 20%;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation-delay: -2s;
    width: 220px;
}
.floating-card-2 {
    bottom: 15%;
    right: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation-delay: -4s;
    width: 220px;
}

.ac-stack { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.floating-card-1 i, .floating-card-2 i { font-size: 2rem; }

.features-section {
    padding: 5rem 5%;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.section-title { text-align: center; margin-bottom: 4rem; }
.section-title h2 { font-size: 2.5rem; margin-bottom: 1rem; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    text-align: left;
    transition: transform 0.3s;
}
.feature-card:hover { transform: translateY(-5px); }
.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.landing-footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-section { flex-direction: column; text-align: center; padding-top: 2rem; }
    .hero-subtitle { margin: 0 auto 2.5rem auto; }
    .security-text { justify-content: center; }
    .hero-visual { display: none; }
}

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 50; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.show { opacity: 1; }
.modal-content { width: 100%; max-width: 450px; padding: 2rem; transform: translateY(-20px); transition: transform 0.3s ease; }
.modal-overlay.show .modal-content { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h3 { font-size: 1.25rem; font-weight: 600; }

/* Credit Cards Grid & Visuals */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.credit-card {
    height: 200px; border-radius: 16px; padding: 1.5rem; position: relative; overflow: hidden;
    color: white; display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4); transition: transform 0.3s ease; border: 1px solid rgba(255,255,255,0.2);
}
.credit-card:hover { transform: translateY(-5px); }
.cc-chip { width: 45px; height: 35px; background: linear-gradient(135deg, #e2e8f0, #94a3b8); border-radius: 6px; position: relative; z-index: 2;}
.cc-number { font-size: 1.5rem; font-family: monospace; letter-spacing: 3px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); z-index: 2; position: relative;}
.cc-bottom { display: flex; justify-content: space-between; align-items: flex-end; z-index: 2; position: relative;}
.cc-name { font-size: 0.875rem; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0,0,0,0.5);}
.cc-brand { font-size: 1.5rem; font-weight: 800; font-style: italic; text-shadow: 0 2px 4px rgba(0,0,0,0.5);}
.cc-bg-pattern { position: absolute; right: -30px; top: -30px; width: 180px; height: 180px; background: rgba(255,255,255,0.1); border-radius: 50%; z-index: 1;}
.cc-bg-pattern::after { content: ''; position: absolute; left: -50px; bottom: -50px; width: 120px; height: 120px; background: rgba(255,255,255,0.05); border-radius: 50%; }
.cc-delete { position: absolute; top: 1rem; right: 1rem; background: rgba(0,0,0,0.3); border: none; color: white; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; z-index: 3; backdrop-filter: blur(4px);}
.cc-delete:hover { background: var(--danger); transform: scale(1.1); }
.cc-limit-container { z-index: 2; position: relative; margin-top: -0.5rem; }
.cc-limit-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.2); border-radius: 3px; overflow: hidden; }
.cc-limit-fill { height: 100%; background: #10b981; border-radius: 3px; transition: width 0.5s ease; }
.cc-limit-fill.warning { background: #f59e0b; }
.cc-limit-fill.danger { background: #ef4444; }
.cc-limit-text { font-size: 0.75rem; color: rgba(255,255,255,0.8); margin-top: 0.25rem; display: flex; justify-content: space-between; font-weight: 500; }

.btn-filter { background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); color: var(--text-muted); padding: 0.5rem 1rem; border-radius: 99px; cursor: pointer; transition: 0.3s; font-size: 0.875rem; }
.btn-filter:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }
.btn-filter.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Responsive Mobile Layout (Bottom Bar Navigation) */
@media (max-width: 768px) {
    .app-container { padding: 0; gap: 0; }
    
    /* Top Header Adjustments */
    .header { padding: 1rem; flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
    .header-actions { width: 100%; margin-top: 1rem; justify-content: space-between; }
    .search-bar { width: auto; flex-grow: 1; margin-right: 0.5rem; }
    
    /* Make Main Content fill space and scroll behind bottom bar */
    .main-content { padding: 1rem; padding-bottom: 90px; }
    .dashboard-bottom { grid-template-columns: 1fr; }
    
    /* Sidebar becomes Fixed Bottom Bar */
    .sidebar { 
        position: fixed; bottom: 0; left: 0; width: 100%; height: auto; 
        padding: 0.5rem; background: var(--bg-panel); backdrop-filter: var(--glass-blur);
        border-top: 1px solid var(--border-color); border-radius: 16px 16px 0 0;
        z-index: 100; flex-direction: row;
    }
    
    .logo { display: none; } /* Hide logo on mobile bottom bar */
    
    /* Combine menus horizontally */
    .nav-menu { flex-direction: row; justify-content: space-around; gap: 0; }
    .sidebar-bottom { display: flex; flex-direction: row; gap: 0; margin-top: 0; }
    
    .nav-item { 
        flex-direction: column; gap: 0.25rem; font-size: 0.65rem; 
        padding: 0.5rem; border-radius: 8px; justify-content: center;
    }
    .nav-item i { font-size: 1.5rem; margin-bottom: 2px; }
    .nav-item span { display: none; } /* Hide text on very small screens, keep icons */
    
    /* Modal Fixes */
    .modal-content { max-width: 90%; padding: 1.5rem; }
}

@media (min-width: 400px) and (max-width: 768px) {
    .nav-item span { display: block; font-size: 0.6rem; }
}
