/* ==========================================================
   ADVANCED FINTECH SAAS DESIGN SYSTEM
   App: Money & Business Tracking System (Antigravity 2.0)
   Domain: monytracker.codexhub09.shop
   ========================================================== */

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

:root {
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Brand Colors */
    --primary: #6366f1;
    --primary-rgb: 99, 102, 241;
    --primary-hover: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    --primary-glow: rgba(99, 102, 241, 0.25);

    --success: #10b981;
    --success-rgb: 16, 185, 129;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);

    --danger: #ef4444;
    --danger-rgb: 239, 68, 68;
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

    --warning: #f59e0b;
    --warning-rgb: 245, 158, 11;
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

    --info: #06b6d4;
    --info-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);

    --purple: #8b5cf6;
    --purple-gradient: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);

    /* Theme Layout */
    --sidebar-bg: #090d16;
    --sidebar-border: rgba(255, 255, 255, 0.07);
    --sidebar-item-hover: rgba(255, 255, 255, 0.06);
    --body-bg: #f8fafc;
    --surface: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    /* Elevation Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 4px -1px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 10px 30px -5px var(--primary-glow);
}

/* Base Setup */
body {
    font-family: var(--font-main);
    background-color: var(--body-bg);
    color: var(--text-primary);
    letter-spacing: -0.015em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: var(--font-heading);
    letter-spacing: -0.025em;
}

/* Wrapper */
#wrapper {
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==========================================================
   SIDEBAR NAVIGATION
   ========================================================== */
#sidebar-wrapper {
    min-height: 100vh;
    width: 275px;
    margin-left: -275px;
    transition: margin 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(180deg, #090d16 0%, #0f172a 100%) !important;
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 1040;
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.5rem 1.35rem;
    border-bottom: 1px solid var(--sidebar-border);
    background: rgba(255, 255, 255, 0.02);
}

#sidebar-wrapper .list-group {
    width: 275px;
    padding: 1rem 0.85rem;
}

#sidebar-wrapper .nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    padding: 0.75rem 1rem 0.35rem;
}

.list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    margin-bottom: 0.3rem;
    border-radius: 0.85rem;
    color: #94a3b8 !important;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    position: relative;
}

.list-group-item i {
    font-size: 1.2rem;
    transition: transform 0.2s ease, color 0.2s ease;
    opacity: 0.85;
}

.list-group-item:hover {
    background-color: var(--sidebar-item-hover) !important;
    color: #ffffff !important;
    transform: translateX(4px);
}

.list-group-item:hover i {
    transform: scale(1.1);
    opacity: 1;
    color: #818cf8 !important;
}

/* Active Nav Item */
.active-nav {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.active-nav i {
    color: #ffffff !important;
    opacity: 1;
}

.active-nav::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: #ffffff;
    border-radius: 4px 0 0 4px;
}

/* ==========================================================
   TOPBAR NAVIGATION
   ========================================================== */
#page-content-wrapper {
    min-width: 100vw;
    background-color: #f8fafc;
}

.top-navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0.85rem 1.75rem;
}

.quick-search-trigger {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    border-radius: 0.75rem;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-search-trigger:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

.shortcut-badge {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.1rem 0.4rem;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: #475569;
}

/* ==========================================================
   CARDS & CONTAINERS
   ========================================================== */
.content-container {
    max-width: 1480px;
}

.card {
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 1.15rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    background-color: #ffffff;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.hover-up {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.hover-up:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}

/* Modern Gradient Stat Cards */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.15rem;
    padding: 1.5rem;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--stat-accent, var(--primary-gradient));
}

.stat-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.5rem;
    transition: transform 0.2s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.08) rotate(3deg);
}

/* Icon Box Color Schemes */
.stat-primary { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.stat-success { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.stat-danger  { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.stat-warning { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.stat-info    { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.stat-purple  { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

/* ==========================================================
   TABLES & LISTS
   ========================================================== */
.table-responsive {
    border-radius: 1rem;
}

.table {
    margin-bottom: 0;
    vertical-align: middle;
}

.table th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.15rem;
}

.table td {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
}

.table-hover tbody tr {
    transition: background-color 0.15s ease;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* ==========================================================
   BUTTONS & CONTROLS
   ========================================================== */
.btn {
    font-family: var(--font-main);
    font-weight: 600;
    border-radius: 0.85rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.92rem;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.28);
    color: #ffffff;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-success {
    background: var(--success-gradient);
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.28);
    color: #ffffff;
}
.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-danger {
    background: var(--danger-gradient);
    border: none;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.28);
    color: #ffffff;
}
.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

/* Form Inputs */
.form-control, .form-select {
    border: 1px solid #cbd5e1;
    border-radius: 0.85rem;
    padding: 0.7rem 1.15rem;
    font-size: 0.95rem;
    transition: all 0.18s ease;
    background-color: #ffffff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
    outline: none;
}

/* Rounded Pill Badges */
.badge {
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.45em 0.85em;
    border-radius: 9999px;
}

/* Modals */
.modal-content {
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.35rem 1.75rem;
}

.modal-body {
    padding: 1.75rem;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1.15rem 1.75rem;
}

/* ==========================================================
   COMMAND PALETTE MODAL (Ctrl + K)
   ========================================================== */
#commandPaletteModal .modal-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.cmd-search-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    padding: 1rem 1.25rem;
    width: 100%;
    outline: none;
}

.cmd-search-input::placeholder {
    color: #64748b;
}

.cmd-result-item {
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-radius: 0.75rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.cmd-result-item:hover, .cmd-result-item.selected {
    background: rgba(99, 102, 241, 0.2);
    color: #ffffff;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1090;
}

.custom-toast {
    background: #0f172a;
    color: #ffffff;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Custom Scrollbars */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Responsive adjustments */
@media (min-width: 768px) {
    #sidebar-wrapper { margin-left: 0; }
    #page-content-wrapper { min-width: 0; width: 100%; }
    #wrapper.toggled #sidebar-wrapper { margin-left: -275px; }
}

/* ==========================================================
   FINTECH DARK MODE STYLING SYSTEM ([data-bs-theme="dark"])
   ========================================================== */
[data-bs-theme="dark"] body {
    background-color: #090d16 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] #page-content-wrapper {
    background-color: #090d16 !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .card {
    background-color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .top-navbar,
[data-bs-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .table {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .table th {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .table td {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #64748b !important;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .quick-search-trigger {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .quick-search-trigger:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .shortcut-badge {
    background-color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .btn-light {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .alert-light {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
}

