/* ==========================================================================
   ENIGMAX FINANCIAL & MARKETING SUITE — LUXURY DARK GLASSMORPHISM
   ========================================================================== */

:root {
    --bg-dark: #07090e;
    --bg-surface: #0d121d;
    --bg-card: rgba(15, 22, 36, 0.7);
    --bg-card-hover: rgba(22, 32, 52, 0.85);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(200, 255, 0, 0.3);
    
    --neon-lime: #c8ff00;
    --neon-cyan: #00f2fe;
    --neon-green: #00e676;
    --neon-red: #ff4b72;
    --neon-orange: #ff9800;
    --neon-purple: #9d4edd;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --shadow-card: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px rgba(200, 255, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(200, 255, 0, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 242, 254, 0.03) 0%, transparent 40%),
        linear-gradient(180deg, #07090e 0%, #0a0e17 100%);
    background-attachment: fixed;
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    box-shadow: var(--shadow-card);
    text-align: center;
}

.login-logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(200, 255, 0, 0.1);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-lime);
    font-size: 24px;
    margin-bottom: 16px;
}

.login-brand h2 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 6px;
}

.login-brand p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.pin-display-wrapper {
    margin-bottom: 24px;
    position: relative;
}

.pin-display-wrapper label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.pin-dots .dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.pin-dots .dot.filled {
    background: var(--neon-lime);
    border-color: var(--neon-lime);
    box-shadow: 0 0 12px rgba(200, 255, 0, 0.6);
    transform: scale(1.15);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.pin-keypad .key {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 20px;
    font-weight: 700;
    height: 54px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-keypad .key:hover {
    background: rgba(200, 255, 0, 0.1);
    border-color: var(--border-glow);
    color: var(--neon-lime);
    transform: translateY(-2px);
}

.pin-keypad .key.action-key {
    color: var(--neon-red);
    font-size: 16px;
}

.pin-keypad .key.submit-key {
    background: var(--neon-lime);
    color: #000;
    border: none;
    font-size: 18px;
}

.pin-keypad .key.submit-key:hover {
    background: #d8ff33;
    box-shadow: 0 0 15px rgba(200, 255, 0, 0.5);
}

.login-footer-hint {
    font-size: 12px;
    color: var(--text-dim);
}

.login-footer-hint strong {
    color: var(--neon-lime);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* ==========================================================================
   APP MAIN LAYOUT
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #090d16;
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-glass);
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: rgba(200, 255, 0, 0.1);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-lime);
    font-size: 18px;
}

.brand-text h2 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #fff;
    line-height: 1.1;
}

.brand-text span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--neon-lime);
}

.sidebar-menu {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.menu-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    padding: 8px 12px;
    margin-top: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--text-dim);
    transition: color 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.nav-item:hover i {
    color: var(--neon-lime);
}

.nav-item.active {
    background: rgba(200, 255, 0, 0.1);
    color: var(--neon-lime);
    border-left: 3px solid var(--neon-lime);
    font-weight: 700;
}

.nav-item.active i {
    color: var(--neon-lime);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.2);
}

.currency-toggle {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 14px;
}

.curr-label {
    font-size: 11px;
    color: var(--text-dim);
    padding-left: 6px;
    padding-right: 8px;
}

.curr-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.curr-btn.active {
    background: var(--neon-lime);
    color: #000;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(200, 255, 0, 0.15);
    color: var(--neon-lime);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-info strong {
    font-size: 13px;
    color: #fff;
}

.user-info small {
    font-size: 11px;
    color: var(--text-dim);
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}

.logout-btn:hover {
    color: var(--neon-red);
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    padding: 30px;
    background: transparent;
}

/* Top App Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 20px;
    flex-wrap: wrap;
}

.mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}

.page-title-group h1 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.period-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 6px 14px;
}

.period-filter-group i {
    color: var(--neon-lime);
    font-size: 14px;
}

.custom-select, select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

select option {
    background: #0d121d;
    color: #fff;
}

.quick-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--neon-lime);
    color: #000;
}

.btn-primary:hover {
    background: #d8ff33;
    box-shadow: 0 0 18px rgba(200, 255, 0, 0.4);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--neon-red);
    color: #fff;
}

.btn-danger:hover {
    background: #ff6487;
    box-shadow: 0 0 18px rgba(255, 75, 114, 0.4);
}

.btn-danger-outline {
    background: rgba(255, 75, 114, 0.1);
    color: var(--neon-red);
    border: 1px solid rgba(255, 75, 114, 0.3);
}

.btn-danger-outline:hover {
    background: rgba(255, 75, 114, 0.2);
    border-color: var(--neon-red);
}

.btn-accent {
    background: rgba(0, 242, 254, 0.15);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 242, 254, 0.4);
}

.btn-accent:hover {
    background: rgba(0, 242, 254, 0.25);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-xs {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   TAB PANE SYSTEM (CRITICAL)
   ========================================================================== */
.tab-pane {
    display: none !important;
}

.tab-pane.active {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CARDS & KPI GRID
   ========================================================================== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.kpi-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.15);
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kpi-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.card-income .kpi-icon { background: rgba(0, 230, 118, 0.15); color: var(--neon-green); }
.card-expenses .kpi-icon { background: rgba(255, 75, 114, 0.15); color: var(--neon-red); }
.card-profit .kpi-icon { background: rgba(200, 255, 0, 0.15); color: var(--neon-lime); }
.card-marketing .kpi-icon { background: rgba(0, 242, 254, 0.15); color: var(--neon-cyan); }
.card-mrr .kpi-icon { background: rgba(157, 78, 221, 0.15); color: var(--neon-purple); }

.kpi-value {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    margin-bottom: 8px;
}

.kpi-value.highlight-profit {
    color: var(--neon-lime);
    text-shadow: 0 0 15px rgba(200, 255, 0, 0.3);
}

.kpi-subtext {
    font-size: 12px;
    color: var(--text-muted);
}

/* Badges */
.badge-positive { color: var(--neon-green); font-weight: 700; }
.badge-margin { color: var(--neon-lime); font-weight: 800; }
.badge-neutral { color: var(--text-dim); }

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.chart-container-large {
    min-height: 360px;
}

.chart-container-small {
    min-height: 360px;
}

.card-head-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-head-bar h3 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-head-bar h3 i {
    color: var(--neon-lime);
}

.tag-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--text-dim);
}

.chart-wrapper {
    position: relative;
    height: 280px;
    width: 100%;
}

.pie-wrapper {
    height: 260px;
}

/* Dashboard Tables Row */
.dashboard-tables-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

/* Custom Dark Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.custom-table th {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border-glass);
}

.custom-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    vertical-align: middle;
}

.custom-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.cell-title {
    font-weight: 700;
    color: #fff;
}

.cell-sub {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.category-tag {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--neon-cyan);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.category-expense {
    background: rgba(255, 75, 114, 0.1);
    border-color: rgba(255, 75, 114, 0.2);
    color: var(--neon-red);
}

.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.status-paid, .status-active {
    background: rgba(0, 230, 118, 0.15);
    color: var(--neon-green);
}

.status-pending {
    background: rgba(255, 152, 0, 0.15);
    color: var(--neon-orange);
}

.status-cancelled, .status-completed {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-muted);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(200, 255, 0, 0.1);
    border-color: var(--border-glow);
    color: var(--neon-lime);
}

.btn-icon-danger:hover {
    background: rgba(255, 75, 114, 0.1);
    border-color: var(--neon-red);
    color: var(--neon-red);
}

/* Renewals List */
.renewals-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.renewal-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 14px;
    transition: transform 0.2s ease;
}

.renewal-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.renewal-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--neon-lime);
}

.renewal-info {
    flex: 1;
}

.renewal-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.renewal-subtitle {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.renewal-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.renewal-amount {
    font-size: 14px;
    font-weight: 800;
}

.badge-renewal-client { color: var(--neon-green); font-weight: 700; }
.badge-renewal-tool { color: var(--neon-red); font-weight: 700; }

.urgent-danger {
    border-color: rgba(255, 75, 114, 0.4);
    background: rgba(255, 75, 114, 0.05);
}

.empty-state-card {
    padding: 30px;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
}

/* ==========================================================================
   MARKETING ROI SPECIAL CARDS
   ========================================================================== */
.marketing-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.mkpi-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mkpi-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.mkpi-val {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.highlight-blue { color: var(--neon-cyan); }
.highlight-green { color: var(--neon-green); }
.highlight-gold { color: #facc15; }

.badge-roas {
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.3);
    color: #facc15;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 800;
}

/* Tab Header Actions & Filters */
.tab-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.search-filter-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.search-input-wrapper {
    position: relative;
    min-width: 260px;
    flex: 1;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 13px;
}

.search-input-wrapper input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px 14px 10px 38px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input-wrapper input:focus {
    border-color: var(--border-glow);
}

.search-filter-box select {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
}

.section-title-wrap h3 {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.section-title-wrap p {
    font-size: 12px;
    color: var(--text-muted);
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.report-card {
    text-align: center;
    padding: 36px 24px;
}

.report-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(200, 255, 0, 0.1);
    color: var(--neon-lime);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 18px;
}

.report-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.report-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.report-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==========================================================================
   MODALS (CRITICAL)
   ========================================================================== */
.modal-backdrop {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 5, 9, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.active {
    display: flex !important;
    animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-dialog {
    background: #0f1624;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    padding: 28px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 14px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #fff;
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--neon-lime);
    background: rgba(200, 255, 0, 0.02);
}

.input-with-addon {
    display: flex;
    gap: 6px;
}

.input-with-addon input {
    flex: 2;
}

.currency-select {
    flex: 1;
    max-width: 80px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
}

/* Helpers */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-dim) !important; }
.text-success { color: var(--neon-green) !important; }
.text-danger { color: var(--neon-red) !important; }
.font-weight-bold { font-weight: 700; }
.mt-4 { margin-top: 24px; }

/* Responsive Mobile Layout */
@media (max-width: 1024px) {
    .charts-row, .dashboard-tables-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }
    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.8);
        z-index: 99;
    }
    .mobile-overlay.active {
        display: block;
    }
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Print Styles */
@media print {
    .sidebar, .top-bar, .quick-actions, .btn-icon, .modal-backdrop {
        display: none !important;
    }
    .main-content {
        margin-left: 0;
        padding: 0;
    }
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .glass-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        background: #fff !important;
        color: #000 !important;
    }
}
