/* ============================================
   InvestPro - Fintech UI
   Dark Sidebar + Modern Dashboard
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --primary: #0b0f1a;
    --primary-light: #111827;
    --primary-hover: #1f2937;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.1);
    --accent-glow: rgba(99, 102, 241, 0.25);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --success-glow: rgba(16, 185, 129, 0.2);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --info: #06b6d4;
    --info-light: rgba(6, 182, 212, 0.1);
    --bg: #f0f2f7;
    --surface: #ffffff;
    --surface-alt: #f8f9fc;
    --surface-hover: #f3f4f8;
    --text: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-dark: #d1d5db;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-accent: 0 4px 14px rgba(99, 102, 241, 0.15);
    --radius-sm: 8px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --sidebar-width: 272px;
    --header-height: 68px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-family);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: 1.875rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
p { margin-bottom: 1rem; }
hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* --- Utilities --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-accent { color: var(--accent); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-mono { font-family: var(--font-mono); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }

/* --- Alerts --- */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid;
    backdrop-filter: blur(8px);
}
.alert svg { flex-shrink: 0; }
.alert span { flex: 1; }
.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.6;
    padding: 0 0.25rem;
    line-height: 1;
    transition: var(--transition);
}
.alert-close:hover { opacity: 1; }
.alert-success { background: var(--success-light); color: #065f46; border-color: rgba(16, 185, 129, 0.2); }
.alert-error { background: var(--danger-light); color: #991b1b; border-color: rgba(239, 68, 68, 0.2); }
.alert-warning { background: var(--warning-light); color: #92400e; border-color: rgba(245, 158, 11, 0.2); }
.alert-info { background: var(--info-light); color: #155e75; border-color: rgba(6, 182, 212, 0.2); }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.5;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-secondary { background: var(--primary-light); color: #fff; border-color: var(--primary-light); }
.btn-secondary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.btn-success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}
.btn-success:hover { background: #059669; border-color: #059669; color: #fff; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: rgba(99, 102, 241, 0.3);
}
.btn-outline:hover { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow-accent); }

.btn-outline-danger { background: transparent; color: var(--danger); border-color: rgba(239, 68, 68, 0.3); }
.btn-outline-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.8rem 2rem; font-size: 0.9375rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* --- Forms --- */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
    letter-spacing: 0.01em;
}
.form-group label .required { color: var(--danger); margin-left: 2px; }

.form-control {
    width: 100%;
    padding: 0.6875rem 0.9375rem;
    font-size: 0.875rem;
    color: var(--text);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { background: var(--surface-alt); cursor: not-allowed; opacity: 0.7; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    padding-right: 2.5rem;
}
textarea.form-control { resize: vertical; min-height: 100px; }

.form-text { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-error { font-size: 0.8125rem; color: var(--danger); margin-top: 0.25rem; font-weight: 500; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}
.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--accent);
    border-radius: 4px;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.form-section:last-child { border-bottom: none; }
.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

/* --- Cards --- */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
}
.card-header h3 { margin: 0; font-size: 0.9375rem; font-weight: 600; }
.card-body { padding: 1.25rem; }
.card-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--surface-alt);
}

/* --- Stat Cards --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.375rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    border-radius: 0 4px 4px 0;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-card:nth-child(1)::before { background: var(--accent); }
.stat-card:nth-child(2)::before { background: var(--success); }
.stat-card:nth-child(3)::before { background: var(--info); }
.stat-card:nth-child(4)::before { background: var(--warning); }
.stat-card:nth-child(5)::before { background: var(--danger); }
.stat-card:nth-child(6)::before { background: var(--accent); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.accent { background: var(--accent-light); color: var(--accent); }
.stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-icon.warning { background: var(--warning-light); color: var(--warning); }
.stat-icon.danger { background: var(--danger-light); color: var(--danger); }
.stat-icon.info { background: var(--info-light); color: var(--info); }

.stat-info { flex: 1; min-width: 0; }
.stat-info h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}
.stat-info .stat-sub {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* --- Tables --- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.table th {
    background: var(--surface-alt);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr { transition: var(--transition); }
.table tbody tr:hover { background: var(--surface-hover); }
.table tbody tr:last-child td { border-bottom: none; }
.table .empty-row td { text-align: center; padding: 3rem 1rem; color: var(--text-muted); font-style: italic; }
.table .font-bold { font-family: var(--font-mono); letter-spacing: -0.01em; }

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 100px;
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
}
.badge-success { background: var(--success-light); color: #059669; border-color: rgba(16, 185, 129, 0.15); }
.badge-warning { background: var(--warning-light); color: #d97706; border-color: rgba(245, 158, 11, 0.15); }
.badge-danger { background: var(--danger-light); color: #dc2626; border-color: rgba(239, 68, 68, 0.15); }
.badge-info { background: var(--info-light); color: #0891b2; border-color: rgba(6, 182, 212, 0.15); }
.badge-secondary { background: rgba(107, 114, 128, 0.1); color: var(--text-secondary); border-color: rgba(107, 114, 128, 0.1); }
.badge-primary { background: var(--accent-light); color: var(--accent); border-color: rgba(99, 102, 241, 0.15); }

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    justify-content: center;
    margin-top: 1.5rem;
}
.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.page-link:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: rgba(99, 102, 241, 0.2);
}
.page-link.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}
.page-dots { padding: 0 0.25rem; color: var(--text-muted); }

/* --- Tabs --- */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 0 0.25rem;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-link {
    padding: 0.875rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.tab-link:hover { color: var(--text); }
.tab-link.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- Modal --- */
.modal-overlay, .modal[id] {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 15, 26, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.active, .modal[id].active { display: flex; }
.modal-content, .modal-overlay > .modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}
.modal-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 1.125rem; }
.modal-close {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }
.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: var(--surface-alt);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================
   LAYOUT - Landing Page
   ============================================ */
.landing-page {
    background: var(--primary);
    min-height: 100vh;
    color: #fff;
}

.landing-nav {
    background: rgba(11, 15, 26, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.landing-logo {
    font-size: 1.375rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: -0.01em;
}
.landing-logo .logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent), #818cf8);
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9375rem;
    letter-spacing: 0;
}
.landing-nav-links { display: flex; align-items: center; gap: 1.5rem; }
.landing-nav-links a { color: rgba(255,255,255,0.6); font-weight: 500; font-size: 0.9rem; transition: var(--transition); }
.landing-nav-links a:hover { color: #fff; }
.landing-nav-links .btn { color: #fff; }

.hero {
    padding: 6rem 2rem 5rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -0.03em;
}
.hero h1 .highlight {
    background: linear-gradient(135deg, #818cf8, var(--accent), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-buttons .btn-primary {
    background: linear-gradient(135deg, var(--accent), #818cf8);
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}
.hero-buttons .btn-primary:hover { box-shadow: 0 6px 28px rgba(99, 102, 241, 0.45); }
.hero-buttons .btn-outline {
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    padding: 0.875rem 2rem;
    font-size: 1rem;
}
.hero-buttons .btn-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); color: #fff; box-shadow: none; }

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.hero-stat .hero-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}
.hero-stat .hero-stat-label {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.features-section {
    padding: 5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}
.features-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    color: #fff;
    letter-spacing: -0.02em;
}
.features-section .section-subtitle {
    text-align: center;
    color: rgba(255,255,255,0.4);
    margin-bottom: 3.5rem;
    font-size: 1.05rem;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}
.feature-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--transition);
}
.feature-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}
.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { margin-bottom: 0.5rem; font-size: 1.05rem; color: #fff; }
.feature-card p { color: rgba(255,255,255,0.45); font-size: 0.9rem; margin: 0; line-height: 1.6; }

/* Active Investments on Landing */
.investments-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.investments-section h2 { text-align: center; margin-bottom: 0.5rem; font-size: 2rem; color: #fff; }
.investments-section .section-subtitle { text-align: center; color: rgba(255,255,255,0.4); margin-bottom: 3rem; }
.landing-investment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}
.landing-inv-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}
.landing-inv-card:hover { border-color: rgba(99, 102, 241, 0.3); background: rgba(255,255,255,0.05); }
.landing-inv-card h3 { color: #fff; font-size: 1.05rem; margin-bottom: 0.5rem; }
.landing-inv-card .inv-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}
.landing-inv-card .inv-meta-item label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.35); font-weight: 600; display: block; }
.landing-inv-card .inv-meta-item span { font-size: 0.9375rem; font-weight: 600; color: #fff; font-family: var(--font-mono); }
.landing-inv-card .inv-meta-item span.roi { color: var(--success); }

.cta-section {
    padding: 5rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.05));
    border-top: 1px solid rgba(255,255,255,0.04);
}
.cta-section h2 { color: #fff; font-size: 2.25rem; margin-bottom: 1rem; letter-spacing: -0.02em; }
.cta-section p { color: rgba(255,255,255,0.4); max-width: 500px; margin: 0 auto 2rem; }
.cta-section .btn-primary {
    background: linear-gradient(135deg, var(--accent), #818cf8);
    border: none;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.landing-footer {
    padding: 2rem;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.8125rem;
    border-top: 1px solid rgba(255,255,255,0.04);
}

/* ============================================
   LAYOUT - Authentication Pages
   ============================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--primary);
    position: relative;
    overflow: hidden;
}
.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
    pointer-events: none;
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05);
    position: relative;
    z-index: 1;
}
.auth-card.wide { max-width: 720px; }
.auth-header {
    padding: 2.25rem 2rem 0;
    text-align: center;
}
.auth-header .auth-logo {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}
.auth-header .auth-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #818cf8);
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}
.auth-header p { color: var(--text-secondary); margin-top: 0.375rem; }
.auth-body { padding: 1.5rem 2rem 2rem; }
.auth-footer {
    padding: 1.25rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--surface-alt);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Multi-step registration */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
}
.step-item { display: flex; align-items: center; gap: 0.5rem; }
.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-alt);
    border: 2px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    transition: var(--transition);
}
.step-label { font-size: 0.8125rem; font-weight: 500; color: var(--text-muted); }
.step-line { width: 40px; height: 2px; background: var(--border); margin: 0 0.5rem; transition: var(--transition); }
.step-item.active .step-number { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3); }
.step-item.active .step-label { color: var(--accent); font-weight: 600; }
.step-item.completed .step-number { background: var(--success); border-color: var(--success); color: #fff; }
.step-item.completed .step-label { color: var(--success); }
.step-line.completed { background: var(--success); }
.step-line.active { background: var(--accent); }
.reg-step { display: none; }
.reg-step.active { display: block; }

/* ============================================
   LAYOUT - Dashboard / App
   ============================================ */
.app-layout { display: flex; min-height: 100vh; }

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.04);
}
.sidebar-header {
    padding: 1.375rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sidebar-logo {
    font-size: 1.175rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: -0.01em;
}
.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #818cf8);
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}
.sidebar-nav { flex: 1; padding: 0.75rem 0; }
.sidebar-label {
    padding: 0.75rem 1.25rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.25);
    margin-top: 0.5rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    margin: 1px 0;
}
.sidebar-link:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.04);
}
.sidebar-link.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.12);
    border-left-color: var(--accent);
}
.sidebar-link.active svg { opacity: 1; }
.sidebar-link svg { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.6; }
.sidebar-link .count-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user { display: flex; align-items: center; gap: 0.75rem; }
.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #818cf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info .name { font-size: 0.875rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info .role { font-size: 0.6875rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; }

/* --- Main Content Area --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Top Header --- */
.top-header {
    border-bottom: 1px solid var(--border);
    padding: 0 1.75rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 99;
    backdrop-filter: blur(12px);
    background: rgba(240, 242, 247, 0.85);
}
.top-header-left { display: flex; align-items: center; gap: 1rem; }
.top-header-right { display: flex; align-items: center; gap: 1rem; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.375rem;
    color: var(--text);
}
.menu-toggle svg { width: 24px; height: 24px; }

.page-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }

.header-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--success);
    font-family: var(--font-mono);
    letter-spacing: -0.01em;
}
.header-badge svg { width: 16px; height: 16px; }

/* --- Page Container --- */
.page-content { flex: 1; padding: 1.75rem; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-header h1 { font-size: 1.5rem; margin: 0; letter-spacing: -0.02em; }
.page-header p { font-size: 0.875rem; color: var(--text-secondary); margin: 0.25rem 0 0; }

/* --- Investment Browse Cards --- */
.investment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.25rem;
}
.investment-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}
.investment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--info));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0;
    transition: var(--transition);
}
.investment-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.investment-card:hover::before { opacity: 1; }
.investment-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.875rem;
}
.investment-card-header h3 { font-size: 1.0625rem; margin: 0; }
.investment-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex: 1;
}
.investment-detail-item label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    font-weight: 600;
    margin-bottom: 0.125rem;
}
.investment-detail-item span {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
}

/* --- Investment Detail Page --- */
.investment-progress {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 100px;
    height: 8px;
    overflow: hidden;
    margin: 1rem 0;
}
.investment-progress-bar {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--accent), #818cf8);
    transition: width 0.5s ease;
    position: relative;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.detail-item {
    padding: 1.125rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.detail-item:hover { border-color: rgba(99, 102, 241, 0.15); box-shadow: var(--shadow-sm); }
.detail-item label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}
.detail-item .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}
.detail-item .value.success { color: var(--success); }
.detail-item .value.accent { color: var(--accent); }
.detail-item .detail-label, .detail-item span.detail-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}
.detail-item .detail-value, .detail-item span.detail-value {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: none; }
.financial-summary { max-width: 500px; }
.filter-bar { margin-bottom: 0; }

/* --- Terms & Conditions --- */
.terms-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.7;
}
.terms-container h3 { margin-top: 1.5rem; margin-bottom: 0.75rem; }
.terms-container h3:first-child { margin-top: 0; }
.terms-container p { margin-bottom: 0.75rem; }
.terms-container ul, .terms-container ol { margin-left: 1.25rem; margin-bottom: 0.75rem; }
.terms-scroll-notice {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Empty States --- */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-muted);
}
.empty-state svg { width: 64px; height: 64px; margin-bottom: 1rem; opacity: 0.2; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 0.5rem; font-size: 1.125rem; }
.empty-state p { max-width: 400px; margin: 0 auto 1.5rem; font-size: 0.9rem; }

/* --- Sidebar Overlay (Mobile) --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 199;
}
.sidebar-overlay.active { display: block; }

/* --- Withdraw Type Selector --- */
.withdraw-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.withdraw-type {
    padding: 1.25rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.withdraw-type:hover { border-color: var(--accent); background: var(--accent-light); }
.withdraw-type.selected {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.withdraw-type h4 { margin-bottom: 0.25rem; font-size: 0.9rem; }
.withdraw-type p { font-size: 0.8125rem; color: var(--text-secondary); margin: 0; font-family: var(--font-mono); }

/* --- Financial Summary --- */
.financial-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.financial-item {
    text-align: center;
    padding: 1.25rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.financial-item label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}
.financial-item .value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* --- Notification dot --- */
.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* --- Loading Spinner --- */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* --- Admin Form Elements --- */
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
    letter-spacing: 0.01em;
}
.form-help {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* --- Stat Label (admin stat cards) --- */
.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.125rem;
}

/* --- Tab Buttons (admin uses button.tab-btn) --- */
.tab-btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    font-family: inherit;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn .badge { margin-left: 0.375rem; font-size: 0.625rem; padding: 0.125rem 0.5rem; }

/* --- Dashboard Grid Layout --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.dashboard-grid .card-full { grid-column: 1 / -1; }

/* --- Content Wrapper --- */
.content-narrow { max-width: 500px; }
.content-medium { max-width: 600px; }
.content-wide { max-width: 800px; margin: 0 auto; }

/* --- Quick Actions Bar --- */
.quick-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* --- Admin Financials Grid --- */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

/* --- Additional Animation for Cards --- */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.stat-card { animation: cardFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both; }
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }
.stat-card:nth-child(5) { animation-delay: 0.2s; }
.stat-card:nth-child(6) { animation-delay: 0.25s; }

/* --- Money Display (monospace) in Tables --- */
.table td .money, .money { font-family: var(--font-mono); letter-spacing: -0.01em; }

/* --- Status Pulse --- */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.badge-warning { animation: pulse 2s ease-in-out infinite; }

/* --- Gradient Text Utility --- */
.text-gradient {
    background: linear-gradient(135deg, var(--accent), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Active Row Highlight --- */
.table tbody tr.highlight { background: var(--accent-light); }

/* --- Flex Column Layout --- */
.flex-col { display: flex; flex-direction: column; }

/* --- Card Accent Top Border --- */
.card-accent { border-top: 3px solid var(--accent); }
.card-success { border-top: 3px solid var(--success); }
.card-warning { border-top: 3px solid var(--warning); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .page-content { padding: 1.25rem; }
    .top-header {
        padding: 0.75rem 1rem;
        min-height: var(--header-height);
        height: auto;
        align-items: flex-start;
    }
    .top-header-left,
    .top-header-right {
        min-width: 0;
    }
    .top-header-left {
        flex: 1;
        align-items: flex-start;
    }
    .page-title {
        font-size: 0.95rem;
        line-height: 1.35;
        word-break: break-word;
    }
    .header-badge {
        padding: 0.375rem 0.65rem;
        font-size: 0.75rem;
    }
    .form-row { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .hero { padding: 3rem 1.5rem; }
    .hero h1 { font-size: 2.25rem; }
    .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
    .hero-stat .hero-stat-value { font-size: 1.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .investment-grid { grid-template-columns: 1fr; }
    .landing-investment-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr 1fr; }
    .step-label { display: none; }
    .step-line { width: 24px; }
    .auth-body { padding: 1.25rem 1.5rem 1.5rem; }
    .auth-header { padding: 1.5rem 1.5rem 0; }
    .landing-nav {
        padding: 0.75rem 1rem;
        min-height: 72px;
        height: auto;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .landing-nav-links {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .landing-nav-links a {
        font-size: 0.82rem;
    }
    .table { font-size: 0.8125rem; }
    .table th, .table td { padding: 0.625rem 0.75rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .financial-summary { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .form-actions .btn {
        width: 100%;
    }

    /* Tabs: scrollable, touch-friendly */
    .tabs { padding: 0; gap: 0; }
    .tab-link { padding: 0.75rem 1rem; font-size: 0.75rem; }

    /* Table responsive: card layout on mobile */
    .table-mobile-cards thead { display: none; }
    .table-mobile-cards tbody tr {
        display: block;
        padding: 0.875rem 1rem;
        border-bottom: 1px solid var(--border);
    }
    .table-mobile-cards tbody tr:last-child { border-bottom: none; }
    .table-mobile-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.3rem 0;
        border-bottom: none;
        font-size: 0.8125rem;
    }
    .table-mobile-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
        margin-right: 0.75rem;
    }

    /* Profile tabs-container on mobile */
    .tabs-container .tabs { margin-bottom: 1rem; }
    .tabs-container .card { border-radius: var(--radius); }
    .card-body { padding: 1rem; }

    /* Table horizontal scroll hint */
    .table-responsive { position: relative; }
    .table-responsive::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 24px;
        background: linear-gradient(to left, var(--surface), transparent);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s;
    }
    .table-responsive.has-scroll::after { opacity: 1; }
}

@media (max-width: 480px) {
    .top-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }
    .top-header-left,
    .top-header-right {
        width: 100%;
    }
    .top-header-right {
        justify-content: flex-start;
    }
    .header-badge {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .landing-nav {
        align-items: flex-start;
    }
    .landing-nav-links {
        width: 100%;
        justify-content: flex-start;
    }
    .landing-nav-links .btn {
        flex: 1;
        justify-content: center;
    }
    .stats-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.75rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-stats { flex-direction: column; gap: 1rem; }
    .btn-group { flex-direction: column; }
    .btn-group .btn { width: 100%; }
    .hero-buttons .btn { width: 100%; }

    /* Even smaller tab sizing */
    .tab-link { padding: 0.625rem 0.75rem; font-size: 0.6875rem; }

    /* Profile page adjustments */
    .page-header h1 { font-size: 1.25rem; }
    .page-header p { font-size: 0.8125rem; }

    /* Card body tighter on small screens */
    .card-body { padding: 0.875rem; }
    .form-group label { font-size: 0.75rem; }
    .form-control { padding: 0.5625rem 0.75rem; font-size: 0.8125rem; }
}

/* --- Print Styles --- */
@media print {
    .sidebar, .top-header, .menu-toggle, .btn, .sidebar-overlay { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .page-content { padding: 0 !important; }
    body { background: #fff; }
}

/* ============================================
   PROFIT DISTRIBUTION PAGE
   ============================================ */

/* Selector form layout */
.pd-selector-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
    align-items: flex-end;
}
.pd-selector-btn { display: flex; align-items: flex-end; }
.pd-selector-btn .btn { height: 42px; }

/* Profit split bar */
.pd-split-bar {
    display: flex;
    height: 32px;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    background: var(--surface-alt);
}
.pd-split-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    transition: var(--transition-slow);
    min-width: 36px;
}
.pd-split-investor { background: var(--success); }
.pd-split-admin { background: var(--accent); }

/* Split legend */
.pd-split-legend {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.pd-split-legend-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.pd-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pd-legend-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.pd-legend-value {
    font-size: 1.125rem;
    font-weight: 700;
}

/* Stats grid override for profit distribution */
.pd-stats-grid { grid-template-columns: repeat(3, 1fr); }

/* Responsive: profit distribution */
@media (max-width: 768px) {
    .pd-selector-form { grid-template-columns: 1fr; }
    .pd-selector-btn .btn { width: 100%; }
    .pd-stats-grid { grid-template-columns: 1fr; }
    .pd-split-legend { gap: 1.25rem; }
    .pd-legend-value { font-size: 1rem; }
}

@media (max-width: 480px) {
    .pd-split-bar { height: 24px; }
    .pd-split-segment { font-size: 0.625rem; }
    .pd-split-legend { flex-direction: column; gap: 0.75rem; }
}
