﻿:root {
    --primary: #1a2b4a;
    --primary-light: #243b61;
    --primary-dark: #0f1a2e;
    --accent: #c9a84c;
    --accent-light: #e8d5a0;
    --accent-bg: rgba(201,168,76,0.08);
    --red: #dc2626;
    --red-bg: #fef2f2;
    --green: #16a34a;
    --green-bg: #f0fdf4;
    --blue: #2563eb;
    --blue-bg: #eff6ff;
    --amber: #d97706;
    --amber-bg: #fffbeb;
    --purple: #7c3aed;
    --purple-bg: #f5f3ff;
    --cyan: #0891b2;
    --cyan-bg: #ecfeff;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --bottom-nav-h: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
    --page-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
}
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; overflow-x: hidden; }

/* ===== APP SHELL ===== */
.app { display: flex; min-height: 100vh; }
.page-view { display: none; animation: fadeIn 0.35s ease; }
.page-view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== HEADER (PUBLIC) ===== */
.pub-header { background: var(--primary); position: fixed; width: 100%; top: 0; z-index: 1000; box-shadow: var(--shadow); }
.pub-header-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; cursor: pointer; }
.logo-icon { width: 44px; height: 44px; background: var(--accent); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--primary); font-weight: 800; }
.logo-text { color: #fff; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.logo-text span { color: var(--accent); }
.pub-nav { display: flex; gap: 8px; }
.pub-nav a { color: rgba(255,255,255,0.85); text-decoration: none; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; transition: all 0.2s; cursor: pointer; }
.pub-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.header-actions { display: flex; gap: 12px; align-items: center; }
.mobile-menu-btn { display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

/* ===== BUTTONS ===== */
.btn { padding: 10px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--primary); }
.btn-primary:hover { background: var(--accent-light); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.3); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline-dark { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline-dark:hover { border-color: var(--text-muted); }
.btn-large { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-red { background: var(--red-bg); color: var(--red); }
.btn-green { background: var(--green-bg); color: var(--green); }
.btn-blue { background: var(--blue-bg); color: var(--blue); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-block { width: 100%; justify-content: center; }

/* ===== HERO (FIXED) ===== */
.hero { margin-top: 72px; background: var(--primary); position: relative; overflow: hidden; padding: 80px 24px 120px; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.hero-inner { max-width: 1280px; margin: 0 auto; position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(201,168,76,0.15); border: 1px solid rgba(201,168,76,0.3); color: var(--accent); padding: 8px 16px; border-radius: 50px; font-size: 13px; font-weight: 600; margin-bottom: 24px; }
.hero h1 { color: #fff; font-size: 48px; font-weight: 800; line-height: 1.1; margin-bottom: 24px; letter-spacing: -1.5px; }
.hero h1 span { color: var(--accent); }
.hero p { color: rgba(255,255,255,0.7); font-size: 17px; line-height: 1.7; margin-bottom: 32px; max-width: 540px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; }
.hero-stat { color: #fff; min-width: 140px; }
.hero-stat-value { font-size: 32px; font-weight: 800; color: var(--accent); }
.hero-stat-label { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 4px; }

.hero-card { background: var(--surface); border-radius: 24px; padding: 32px; box-shadow: var(--shadow-lg); position: relative; }
.hero-card-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.hero-avatar { width: 64px; height: 64px; border-radius: 16px; background: var(--primary); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 28px; }
.hero-card-title { font-size: 18px; font-weight: 700; }
.hero-card-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.hero-card-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.hero-card-row:last-child { border-bottom: none; }
.hero-card-label { color: var(--text-secondary); }
.hero-card-value { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.status-green { background: #dcfce7; color: #166534; }
.status-blue { background: #dbeafe; color: #1e40af; }
.status-amber { background: #fef3c7; color: #92400e; }

/* ===== QUICK ACCESS ===== */
.quick-access { position: relative; z-index: 10; margin-top: -60px; padding: 0 24px; }
.quick-access-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.quick-card { background: var(--surface); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); transition: all 0.3s; cursor: pointer; border: 2px solid transparent; }
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.quick-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px; }
.quick-icon.blue { background: #eff6ff; color: #2563eb; }
.quick-icon.green { background: #f0fdf4; color: #16a34a; }
.quick-icon.amber { background: #fffbeb; color: #d97706; }
.quick-icon.red { background: #fef2f2; color: #dc2626; }
.quick-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.quick-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ===== SECTIONS ===== */
.section { padding: 80px 24px; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-tag { display: inline-block; background: var(--accent-bg); color: var(--accent); padding: 6px 16px; border-radius: 50px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.section-header h2 { font-size: 36px; font-weight: 800; letter-spacing: -1px; margin-bottom: 16px; color: var(--primary); }
.section-header p { font-size: 17px; color: var(--text-secondary); line-height: 1.7; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { background: var(--surface); border-radius: 20px; padding: 36px; box-shadow: var(--shadow); transition: all 0.3s; border: 1px solid var(--border); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.feature-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 20px; }
.feature-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.feature-list { margin-top: 16px; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); padding: 6px 0; }
.feature-list i { color: var(--accent); font-size: 12px; }

/* Stats Section */
.stats-section { background: var(--primary); position: relative; overflow: hidden; }
.stats-section::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.stats-section .section-header h2, .stats-section .section-header p { color: #fff; }
.stats-section .section-header p { opacity: 0.7; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; z-index: 2; }
.stat-card { background: rgba(255,255,255,0.05); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 36px; text-align: center; transition: all 0.3s; }
.stat-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-4px); }
.stat-icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(201,168,76,0.2); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--accent); margin: 0 auto 16px; }
.stat-value { font-size: 36px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.stat-label { font-size: 14px; color: rgba(255,255,255,0.7); }

/* Steps */
.steps { display: flex; gap: 32px; position: relative; }
.steps::before { content: ''; position: absolute; top: 40px; left: 60px; right: 60px; height: 2px; background: var(--border); z-index: 0; }
.step { flex: 1; text-align: center; position: relative; z-index: 1; }
.step-number { width: 80px; height: 80px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: var(--accent); margin: 0 auto 24px; box-shadow: var(--shadow); }
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { background: var(--surface); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); position: relative; border: 1px solid var(--border); }
.testimonial-card::before { content: '"'; position: absolute; top: 20px; right: 24px; font-size: 80px; color: var(--accent); opacity: 0.15; font-family: Georgia, serif; line-height: 1; }
.testimonial-text { font-size: 15px; line-height: 1.7; color: var(--text); margin-bottom: 24px; position: relative; z-index: 1; }
.testimonial-author { display: flex; align-items: center; gap: 14px; }
.testimonial-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 700; font-size: 16px; }
.testimonial-name { font-weight: 700; font-size: 15px; }
.testimonial-role { font-size: 13px; color: var(--text-secondary); }

/* CTA */
.cta-section { padding: 0 24px 80px; }
.cta-box { max-width: 1280px; margin: 0 auto; background: var(--primary); border-radius: 32px; padding: 64px 48px; text-align: center; position: relative; overflow: hidden; }
.cta-box::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.cta-box h2 { color: #fff; font-size: 36px; font-weight: 800; margin-bottom: 16px; position: relative; z-index: 1; }
.cta-box p { color: rgba(255,255,255,0.7); font-size: 17px; max-width: 560px; margin: 0 auto 32px; position: relative; z-index: 1; }

/* Footer */
footer { background: #0f1a2e; color: rgba(255,255,255,0.6); padding: 64px 24px 32px; }
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .logo-text { margin-bottom: 16px; display: inline-block; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 320px; }
.footer-column h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-column a { display: block; color: rgba(255,255,255,0.6); text-decoration: none; font-size: 14px; padding: 6px 0; transition: color 0.2s; cursor: pointer; }
.footer-column a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 32px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: rgba(255,255,255,0.5); font-size: 18px; transition: color 0.2s; cursor: pointer; }
.footer-social a:hover { color: var(--accent); }

/* ===== MODALS ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,26,46,0.7); backdrop-filter: blur(4px); z-index: 2000; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.modal-overlay.active { display: flex; }
.modal { background: var(--surface); border-radius: 24px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalIn 0.3s ease; position: relative; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { padding: 28px 32px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 22px; font-weight: 800; }
.modal-close { width: 36px; height: 36px; border-radius: 10px; border: none; background: var(--surface-hover); color: var(--text-secondary); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body { padding: 24px 32px 32px; }
.modal-large { max-width: 720px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-label .required { color: var(--red); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 12px; font-size: 15px; font-family: inherit; color: var(--text); background: var(--surface); transition: all 0.2s; outline: none; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-select { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.form-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); cursor: pointer; }
.form-check label { font-size: 13px; color: var(--text-secondary); line-height: 1.5; cursor: pointer; }
.form-check label a { color: var(--accent); text-decoration: none; }
.form-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; color: var(--text-muted); font-size: 13px; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.form-error { color: var(--red); font-size: 12px; margin-top: 4px; display: none; }
.form-error.show { display: block; }

/* ===== SIDEBAR (DASHBOARD) ===== */
.sidebar { width: 280px; background: var(--primary); position: fixed; height: 100vh; left: 0; top: 0; z-index: 100; display: flex; flex-direction: column; transition: transform 0.3s ease; }
.sidebar-header { padding: 24px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; cursor: pointer; }
.sidebar-logo-icon { width: 40px; height: 40px; background: var(--accent); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--primary); }
.sidebar-logo-text { color: #fff; font-size: 18px; font-weight: 800; }
.sidebar-logo-text span { color: var(--accent); }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section { margin-bottom: 8px; }
.nav-section-title { color: rgba(255,255,255,0.35); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 16px 12px 8px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgba(255,255,255,0.65); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s; cursor: pointer; border: none; background: none; width: 100%; text-align: left; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: var(--accent); color: var(--primary); font-weight: 600; }
.nav-item i { width: 20px; text-align: center; font-size: 16px; }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px; min-width: 20px; text-align: center; }
.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,0.05); cursor: pointer; transition: all 0.2s; }
.sidebar-user:hover { background: rgba(255,255,255,0.1); }
.sidebar-user-avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 700; font-size: 14px; border: 2px solid var(--accent); }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: rgba(255,255,255,0.45); font-size: 12px; margin-top: 1px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
.sidebar-overlay.active { display: block; }

/* ===== DASHBOARD MAIN ===== */
.main { flex: 1; margin-left: 280px; min-height: 100vh; display: flex; flex-direction: column; }
.dash-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 32px; height: 68px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.dash-header-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle { display: none; background: none; border: none; font-size: 20px; color: var(--text); cursor: pointer; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; }
.menu-toggle:hover { background: var(--bg); }
.dash-title { font-size: 20px; font-weight: 700; color: var(--text); }
.dash-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.dash-breadcrumb i { font-size: 10px; }
.dash-header-right { display: flex; align-items: center; gap: 8px; }
.dash-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; position: relative; font-size: 16px; }
.dash-btn:hover { background: var(--surface-hover); border-color: var(--text-muted); }
.dash-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--red); border-radius: 50%; border: 2px solid var(--surface); }
.dash-avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--primary); display: flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 700; font-size: 14px; cursor: pointer; border: 2px solid var(--border); }
.content { flex: 1; padding: 28px 32px; max-width: 1400px; }

/* ===== CARDS & GRID ===== */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-title-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.card-actions { display: flex; gap: 8px; }
.card-action-btn { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.card-action-btn:hover { background: var(--surface-hover); border-color: var(--text-muted); }
.card-action-btn.primary { background: var(--accent); color: var(--primary); border-color: var(--accent); }
.card-action-btn.primary:hover { background: var(--accent-light); }
.card-body { padding: 24px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-cyan { background: var(--cyan-bg); color: var(--cyan); }
.badge-gray { background: #f3f4f6; color: #6b7280; }

.progress-wrap { margin-top: 16px; }
.progress-header { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.progress-bar { height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width 1s ease; }

.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -28px; top: 2px; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--surface); background: var(--accent); box-shadow: 0 0 0 2px var(--border); }
.timeline-dot.green { background: var(--green); }
.timeline-dot.red { background: var(--red); }
.timeline-dot.blue { background: var(--blue); }
.timeline-content { background: var(--surface-hover); border-radius: var(--radius-sm); padding: 16px; border: 1px solid var(--border-light); }
.timeline-date { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.timeline-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.timeline-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.timeline-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

.awards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.award-item { text-align: center; padding: 24px 16px; border-radius: var(--radius-sm); background: var(--surface-hover); border: 1px solid var(--border-light); transition: all 0.2s; }
.award-item:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.award-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-bg); display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--accent); margin: 0 auto 12px; }
.award-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.award-date { font-size: 12px; color: var(--text-muted); }
.award-desc { font-size: 12px; color: var(--text-secondary); margin-top: 8px; line-height: 1.4; }

.payment-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.payment-row:last-child { border-bottom: none; padding-bottom: 0; }
.payment-row:first-child { padding-top: 0; }
.payment-info { display: flex; align-items: center; gap: 12px; }
.payment-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.payment-name { font-size: 14px; font-weight: 600; }
.payment-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.payment-amount { text-align: right; }
.payment-sum { font-size: 15px; font-weight: 700; }
.payment-sum.positive { color: var(--green); }
.payment-sum.pending { color: var(--amber); }

.case-item { padding: 16px; border-radius: var(--radius-sm); background: var(--surface-hover); border: 1px solid var(--border-light); margin-bottom: 12px; }
.case-item:last-child { margin-bottom: 0; }
.case-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.case-number { font-size: 13px; font-weight: 700; color: var(--primary); }
.case-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.case-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.case-meta span { display: flex; align-items: center; gap: 4px; }

.appeal-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.appeal-item:last-child { border-bottom: none; padding-bottom: 0; }
.appeal-item:first-child { padding-top: 0; }
.appeal-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--purple-bg); display: flex; align-items: center; justify-content: center; color: var(--purple); font-size: 14px; font-weight: 700; flex-shrink: 0; }
.appeal-content { flex: 1; min-width: 0; }
.appeal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.appeal-author { font-size: 14px; font-weight: 600; }
.appeal-time { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.appeal-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
.appeal-footer { display: flex; gap: 12px; }
.appeal-action { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; cursor: pointer; transition: color 0.2s; }
.appeal-action:hover { color: var(--accent); }

.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-hover); border: 1px solid var(--border-light); cursor: pointer; transition: all 0.2s; }
.doc-item:hover { border-color: var(--accent); background: var(--surface); }
.doc-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.doc-action { color: var(--text-muted); font-size: 16px; padding: 8px; border-radius: 8px; transition: all 0.2s; }
.doc-item:hover .doc-action { color: var(--accent); background: var(--accent-bg); }

.privacy-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.privacy-item:last-child { border-bottom: none; padding-bottom: 0; }
.privacy-item:first-child { padding-top: 0; }
.privacy-info { display: flex; align-items: center; gap: 12px; }
.privacy-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-hover); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 14px; }
.privacy-label { font-size: 14px; font-weight: 600; }
.privacy-desc { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.toggle { width: 44px; height: 24px; border-radius: 12px; background: var(--border); position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.toggle.active { background: var(--accent); }
.toggle-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.2s; }
.toggle.active .toggle-knob { transform: translateX(20px); }

.quick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.quick-stat { background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.quick-stat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.quick-stat-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.quick-stat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.quick-stat-value { font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.quick-stat-change { font-size: 12px; font-weight: 600; }
.quick-stat-change.up { color: var(--green); }

.profile-card { display: flex; gap: 24px; align-items: flex-start; }
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar { width: 100px; height: 100px; border-radius: var(--radius); background: var(--primary); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 40px; border: 3px solid var(--accent); }
.profile-avatar-status { position: absolute; bottom: -4px; right: -4px; width: 28px; height: 28px; background: var(--green); border: 3px solid var(--surface); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.profile-rank { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-bg); color: var(--accent); padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.profile-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
.profile-detail { display: flex; flex-direction: column; gap: 2px; }
.profile-detail-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.profile-detail-value { font-size: 14px; font-weight: 600; color: var(--text); }

.medical-item { display: flex; gap: 16px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-hover); border: 1px solid var(--border-light); margin-bottom: 12px; }
.medical-item:last-child { margin-bottom: 0; }
.medical-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.medical-content { flex: 1; min-width: 0; }
.medical-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.medical-title { font-size: 14px; font-weight: 700; }
.medical-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.medical-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-hover); border-radius: 12px; margin-bottom: 20px; width: fit-content; }
.tab { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; border: none; background: none; transition: all 0.2s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 1px solid var(--border); background: var(--surface-hover); }
.data-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border-light); }
.data-table tr:hover td { background: var(--surface-hover); }
.data-table tr:last-child td { border-bottom: none; }

.chat-container { display: flex; flex-direction: column; gap: 16px; max-height: 400px; overflow-y: auto; padding-right: 8px; }
.chat-message { display: flex; gap: 12px; max-width: 80%; }
.chat-message.incoming { align-self: flex-start; }
.chat-message.outgoing { align-self: flex-end; flex-direction: row-reverse; margin-left: auto; }
.chat-bubble { padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.chat-message.incoming .chat-bubble { background: var(--surface-hover); border: 1px solid var(--border-light); border-bottom-left-radius: 4px; }
.chat-message.outgoing .chat-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.chat-input-wrap { display: flex; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.chat-input { flex: 1; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; font-size: 14px; font-family: inherit; outline: none; transition: all 0.2s; }
.chat-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }

.setting-group { margin-bottom: 32px; }
.setting-group:last-child { margin-bottom: 0; }
.setting-group-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border-light); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.setting-row:last-child { border-bottom: none; }
.setting-info { display: flex; align-items: center; gap: 12px; }
.setting-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-hover); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 14px; }
.setting-label { font-size: 14px; font-weight: 600; }
.setting-desc { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.setting-control { display: flex; align-items: center; gap: 12px; }
.setting-value { font-size: 14px; color: var(--text-secondary); font-weight: 500; }

.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { width: 80px; height: 80px; border-radius: 24px; background: var(--surface-hover); display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--text-muted); margin: 0 auto 20px; }
.empty-state-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state-desc { font-size: 14px; color: var(--text-secondary); max-width: 400px; margin: 0 auto 20px; line-height: 1.6; }

.welcome-banner { background: var(--primary); border-radius: var(--radius); padding: 32px; color: #fff; margin-bottom: 28px; position: relative; overflow: hidden; }
.welcome-banner::before { content: ''; position: absolute; top: -50%; right: -10%; width: 400px; height: 400px; background: var(--accent); opacity: 0.08; border-radius: 50%; }
.welcome-banner::after { content: ''; position: absolute; bottom: -30%; right: 10%; width: 300px; height: 300px; background: var(--accent); opacity: 0.05; border-radius: 50%; }
.welcome-content { position: relative; z-index: 1; }
.welcome-greeting { font-size: 14px; color: var(--accent); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.welcome-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.welcome-subtitle { color: rgba(255,255,255,0.6); font-size: 15px; max-width: 600px; }
.welcome-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.btn-welcome { padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn-welcome-primary { background: var(--accent); color: var(--primary); }
.btn-welcome-primary:hover { background: var(--accent-light); }
.btn-welcome-outline { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.btn-welcome-outline:hover { background: rgba(255,255,255,0.15); }

.help-categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.help-cat { padding: 20px; border-radius: var(--radius-sm); border: 2px solid var(--border); background: var(--surface); cursor: pointer; transition: all 0.2s; text-align: center; }
.help-cat:hover, .help-cat.active { border-color: var(--accent); background: var(--accent-bg); }
.help-cat i { font-size: 24px; color: var(--accent); margin-bottom: 8px; }
.help-cat-title { font-size: 14px; font-weight: 700; }
.help-cat-desc { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* Toast */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--primary); color: #fff; padding: 14px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: toastIn 0.3s ease; max-width: 400px; }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.toast-close { background: none; border: none; color: inherit; opacity: 0.6; cursor: pointer; font-size: 14px; margin-left: auto; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1280px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .awards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .menu-toggle { display: flex; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .quick-stats { grid-template-columns: repeat(2, 1fr); }
    .awards-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-card { display: none; }
    .features-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-access-inner { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { flex-direction: column; }
    .steps::before { display: none; }
    .pub-nav { display: none; }
    .mobile-menu-btn { display: block; }
}
@media (max-width: 768px) {
    .content { padding: 20px 16px; }
    .dash-header { padding: 0 16px; }
    .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
    .quick-stats { grid-template-columns: 1fr; }
    .profile-card { flex-direction: column; align-items: center; text-align: center; }
    .profile-details { grid-template-columns: 1fr; text-align: left; }

    .hero {
        margin-top: calc(56px + env(safe-area-inset-top, 0px));
        padding: 48px max(16px, env(safe-area-inset-left, 0px)) 64px max(16px, env(safe-area-inset-right, 0px));
    }

    .hero h1 { font-size: 28px; }
    .section-header h2 { font-size: 28px; }
    .features-grid, .testimonials-grid, .stats-grid, .quick-access-inner { grid-template-columns: 1fr; }
    .cta-box { padding: 48px 24px; }
    .cta-box h2 { font-size: 28px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .help-categories { grid-template-columns: 1fr; }
    .modal { max-height: 95vh; }
}


/* ===== CABINET (participant dashboard) ===== */

.sidebar { width: 280px; background: var(--primary); position: fixed; height: 100vh; left: 0; top: 0; z-index: 100; display: flex; flex-direction: column; transition: transform 0.3s ease; }
.sidebar-header { padding: 24px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.sidebar-logo-icon { width: 40px; height: 40px; background: var(--accent); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--primary); }
.sidebar-logo-text { color: #fff; font-size: 18px; font-weight: 800; }
.sidebar-logo-text span { color: var(--accent); }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }
.nav-section { margin-bottom: 8px; }
.nav-section-title { color: rgba(255,255,255,0.35); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 16px 12px 8px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgba(255,255,255,0.65); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s; cursor: pointer; border: none; background: none; width: 100%; text-align: left; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: var(--accent); color: var(--primary); font-weight: 600; }
.nav-item i { width: 20px; text-align: center; font-size: 16px; }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px; min-width: 20px; text-align: center; }
.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,0.05); cursor: pointer; transition: all 0.2s; }
.sidebar-user:hover { background: rgba(255,255,255,0.1); }
.sidebar-user-avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 700; font-size: 14px; border: 2px solid var(--accent); }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: rgba(255,255,255,0.45); font-size: 12px; margin-top: 1px; }

/* ===== MAIN ===== */
.main { flex: 1; margin-left: 280px; min-height: 100vh; display: flex; flex-direction: column; }
.header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 32px; height: 68px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.header-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle { display: none; background: none; border: none; font-size: 20px; color: var(--text); cursor: pointer; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; }
.menu-toggle:hover { background: var(--bg); }
.header-title { font-size: 20px; font-weight: 700; color: var(--text); }
.header-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.header-breadcrumb i { font-size: 10px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; position: relative; font-size: 16px; }
.header-btn:hover { background: var(--surface-hover); border-color: var(--text-muted); }
.header-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--red); border-radius: 50%; border: 2px solid var(--surface); }
.header-avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--primary); display: flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 700; font-size: 14px; cursor: pointer; border: 2px solid var(--border); }

/* ===== CONTENT ===== */
.content { flex: 1; padding: 28px 32px; max-width: 1400px; }
.page-section { display: none; animation: fadeIn 0.3s ease; }
.page-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== CARDS & GRID ===== */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-title-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.card-actions { display: flex; gap: 8px; }
.card-action-btn { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.card-action-btn:hover { background: var(--surface-hover); border-color: var(--text-muted); }
.card-action-btn.primary { background: var(--accent); color: var(--primary); border-color: var(--accent); }
.card-action-btn.primary:hover { background: var(--accent-light); }
.card-body { padding: 24px; }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-cyan { background: var(--cyan-bg); color: var(--cyan); }
.badge-gray { background: #f3f4f6; color: #6b7280; }

/* ===== BUTTONS ===== */
.btn { padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--primary); }
.btn-primary:hover { background: var(--accent-light); }
.btn-outline { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--text-muted); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-red { background: var(--red-bg); color: var(--red); }
.btn-red:hover { background: #fee2e2; }
.btn-green { background: var(--green-bg); color: var(--green); }
.btn-green:hover { background: #dcfce7; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ===== WELCOME BANNER ===== */
.welcome-banner { background: var(--primary); border-radius: var(--radius); padding: 32px; color: #fff; margin-bottom: 28px; position: relative; overflow: hidden; }
.welcome-banner::before { content: ''; position: absolute; top: -50%; right: -10%; width: 400px; height: 400px; background: var(--accent); opacity: 0.08; border-radius: 50%; }
.welcome-banner::after { content: ''; position: absolute; bottom: -30%; right: 10%; width: 300px; height: 300px; background: var(--accent); opacity: 0.05; border-radius: 50%; }
.welcome-content { position: relative; z-index: 1; }
.welcome-greeting { font-size: 14px; color: var(--accent); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.welcome-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.welcome-subtitle { color: rgba(255,255,255,0.6); font-size: 15px; max-width: 600px; }
.welcome-actions { display: flex; gap: 12px; margin-top: 20px; }
.btn-welcome { padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn-welcome-primary { background: var(--accent); color: var(--primary); }
.btn-welcome-primary:hover { background: var(--accent-light); }
.btn-welcome-outline { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.btn-welcome-outline:hover { background: rgba(255,255,255,0.15); }

/* ===== QUICK STATS ===== */
.quick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.quick-stat { background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.quick-stat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.quick-stat-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.quick-stat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.quick-stat-value { font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.quick-stat-change { font-size: 12px; font-weight: 600; }
.quick-stat-change.up { color: var(--green); }

/* ===== PROFILE ===== */
.profile-card { display: flex; gap: 24px; align-items: flex-start; }
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar { width: 100px; height: 100px; border-radius: var(--radius); background: var(--primary); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 40px; border: 3px solid var(--accent); }
.profile-avatar-status { position: absolute; bottom: -4px; right: -4px; width: 28px; height: 28px; background: var(--green); border: 3px solid var(--surface); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.profile-rank { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-bg); color: var(--accent); padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.profile-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
.profile-detail { display: flex; flex-direction: column; gap: 2px; }
.profile-detail-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.profile-detail-value { font-size: 14px; font-weight: 600; color: var(--text); }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -28px; top: 2px; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--surface); background: var(--accent); box-shadow: 0 0 0 2px var(--border); }
.timeline-dot.green { background: var(--green); }
.timeline-dot.red { background: var(--red); }
.timeline-dot.blue { background: var(--blue); }
.timeline-content { background: var(--surface-hover); border-radius: var(--radius-sm); padding: 16px; border: 1px solid var(--border-light); }
.timeline-date { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.timeline-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.timeline-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.timeline-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* ===== AWARDS ===== */
.awards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.award-item { text-align: center; padding: 24px 16px; border-radius: var(--radius-sm); background: var(--surface-hover); border: 1px solid var(--border-light); transition: all 0.2s; }
.award-item:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.award-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-bg); display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--accent); margin: 0 auto 12px; }
.award-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.award-date { font-size: 12px; color: var(--text-muted); }
.award-desc { font-size: 12px; color: var(--text-secondary); margin-top: 8px; line-height: 1.4; }

/* ===== MEDICAL ===== */
.medical-item { display: flex; gap: 16px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-hover); border: 1px solid var(--border-light); margin-bottom: 12px; }
.medical-item:last-child { margin-bottom: 0; }
.medical-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.medical-content { flex: 1; min-width: 0; }
.medical-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.medical-title { font-size: 14px; font-weight: 700; }
.medical-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.medical-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ===== PAYMENTS ===== */
.payment-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.payment-row:last-child { border-bottom: none; padding-bottom: 0; }
.payment-row:first-child { padding-top: 0; }
.payment-info { display: flex; align-items: center; gap: 12px; }
.payment-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.payment-name { font-size: 14px; font-weight: 600; }
.payment-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.payment-amount { text-align: right; }
.payment-sum { font-size: 15px; font-weight: 700; }
.payment-sum.positive { color: var(--green); }
.payment-sum.pending { color: var(--amber); }
.payment-sum.negative { color: var(--red); }

/* ===== PROGRESS ===== */
.progress-wrap { margin-top: 16px; }
.progress-header { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.progress-bar { height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width 1s ease; }

/* ===== LEGAL ===== */
.case-item { padding: 16px; border-radius: var(--radius-sm); background: var(--surface-hover); border: 1px solid var(--border-light); margin-bottom: 12px; }
.case-item:last-child { margin-bottom: 0; }
.case-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.case-number { font-size: 13px; font-weight: 700; color: var(--primary); }
.case-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.case-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.case-meta span { display: flex; align-items: center; gap: 4px; }

/* ===== FAMILY APPEALS ===== */
.appeal-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.appeal-item:last-child { border-bottom: none; padding-bottom: 0; }
.appeal-item:first-child { padding-top: 0; }
.appeal-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--purple-bg); display: flex; align-items: center; justify-content: center; color: var(--purple); font-size: 14px; font-weight: 700; flex-shrink: 0; }
.appeal-content { flex: 1; min-width: 0; }
.appeal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.appeal-author { font-size: 14px; font-weight: 600; }
.appeal-time { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.appeal-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
.appeal-footer { display: flex; gap: 12px; }
.appeal-action { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; cursor: pointer; transition: color 0.2s; }
.appeal-action:hover { color: var(--accent); }

/* ===== DOCUMENTS ===== */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-hover); border: 1px solid var(--border-light); cursor: pointer; transition: all 0.2s; }
.doc-item:hover { border-color: var(--accent); background: var(--surface); }
.doc-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.doc-action { color: var(--text-muted); font-size: 16px; padding: 8px; border-radius: 8px; transition: all 0.2s; }
.doc-item:hover .doc-action { color: var(--accent); background: var(--accent-bg); }

/* ===== PRIVACY ===== */
.privacy-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.privacy-item:last-child { border-bottom: none; padding-bottom: 0; }
.privacy-item:first-child { padding-top: 0; }
.privacy-info { display: flex; align-items: center; gap: 12px; }
.privacy-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-hover); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 14px; }
.privacy-label { font-size: 14px; font-weight: 600; }
.privacy-desc { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.toggle { width: 44px; height: 24px; border-radius: 12px; background: var(--border); position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.toggle.active { background: var(--accent); }
.toggle-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.2s; }
.toggle.active .toggle-knob { transform: translateX(20px); }

/* ===== SETTINGS ===== */
.setting-group { margin-bottom: 32px; }
.setting-group:last-child { margin-bottom: 0; }
.setting-group-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border-light); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.setting-row:last-child { border-bottom: none; }
.setting-info { display: flex; align-items: center; gap: 12px; }
.setting-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-hover); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 14px; }
.setting-label { font-size: 14px; font-weight: 600; }
.setting-desc { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.setting-control { display: flex; align-items: center; gap: 12px; }
.setting-value { font-size: 14px; color: var(--text-secondary); font-weight: 500; }

/* ===== TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 1px solid var(--border); background: var(--surface-hover); }
.data-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border-light); }
.data-table tr:hover td { background: var(--surface-hover); }
.data-table tr:last-child td { border-bottom: none; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-hover); border-radius: 12px; margin-bottom: 20px; width: fit-content; }
.tab { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; border: none; background: none; transition: all 0.2s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ===== CHAT ===== */
.chat-container { display: flex; flex-direction: column; gap: 16px; max-height: 500px; overflow-y: auto; padding-right: 8px; }
.chat-message { display: flex; gap: 12px; max-width: 80%; }
.chat-message.incoming { align-self: flex-start; }
.chat-message.outgoing { align-self: flex-end; flex-direction: row-reverse; margin-left: auto; }
.chat-bubble { padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.chat-message.incoming .chat-bubble { background: var(--surface-hover); border: 1px solid var(--border-light); border-bottom-left-radius: 4px; }
.chat-message.outgoing .chat-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.chat-input-wrap { display: flex; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.chat-input { flex: 1; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; font-size: 14px; font-family: inherit; outline: none; transition: all 0.2s; }
.chat-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1280px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .awards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .menu-toggle { display: flex; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .quick-stats { grid-template-columns: repeat(2, 1fr); }
    .awards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .content { padding: 20px 16px; }
    .header { padding: 0 16px; }
    .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
    .quick-stats { grid-template-columns: 1fr; }
    .profile-card { flex-direction: column; align-items: center; text-align: center; }
    .profile-details { grid-template-columns: 1fr; text-align: left; }
    .welcome-title { font-size: 22px; }
    .awards-grid { grid-template-columns: repeat(2, 1fr); }
    .chat-message { max-width: 95%; }
}
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
.sidebar-overlay.active { display: block; }


/* Empty state */

.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { width: 80px; height: 80px; border-radius: 24px; background: var(--surface-hover); display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--text-muted); margin: 0 auto 20px; }
.empty-state-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state-desc { font-size: 14px; color: var(--text-secondary); max-width: 400px; margin: 0 auto 20px; line-height: 1.6; }

/* ===== MOBILE BOTTOM NAV (cabinet) ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgb(0 0 0 / 0.08);
    padding: 8px max(8px, env(safe-area-inset-left, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px));
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 2px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    min-width: 0;
}

.bottom-nav-item i {
    font-size: 18px;
}

.bottom-nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.bottom-nav-item.active {
    color: var(--accent);
    background: var(--accent-bg);
}

.bottom-nav-item.active i {
    color: var(--accent);
}

.bottom-nav-item:active {
    transform: scale(0.96);
}

@media (max-width: 1024px) {
    #dashboard-app .header {
        height: auto;
        min-height: 56px;
        padding: 10px 12px;
        flex-wrap: nowrap;
        gap: 8px;
    }

    #dashboard-app .header-left {
        flex: 1;
        min-width: 0;
        gap: 0;
    }

    #dashboard-app .menu-toggle {
        display: none;
    }

    #dashboard-app .header-title {
        font-size: 17px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #dashboard-app .header-breadcrumb {
        display: none;
    }

    #dashboard-app .header-right {
        flex-shrink: 0;
        gap: 6px;
    }

    #dashboard-app .header-btn {
        display: none;
    }

    #dashboard-app .header-avatar {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    #dashboard-app .content {
        padding-bottom: var(--page-bottom);
    }

    #dashboard-app .bottom-nav {
        display: grid;
    }

    #dashboard-app .tabs {
        width: 100%;
        max-width: 100%;
    }

    #dashboard-app .main {
        min-width: 0;
    }

    #dashboard-app .grid-3 {
        grid-template-columns: 1fr;
    }

    #dashboard-app .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    #dashboard-app .card-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    #dashboard-app .content {
        padding: 16px 12px var(--page-bottom);
    }

    #dashboard-app .welcome-actions {
        flex-direction: column;
    }

    #dashboard-app .btn-welcome {
        width: 100%;
        justify-content: center;
    }

    #dashboard-app {
        overflow-x: hidden;
    }

    #dashboard-app .grid-3,
    #dashboard-app .grid-2,
    #dashboard-app .grid-4 {
        grid-template-columns: 1fr;
    }

    #dashboard-app .quick-stat-label {
        font-size: 11px;
        line-height: 1.3;
    }

    #dashboard-app .quick-stat-value {
        font-size: 22px;
        word-break: break-word;
    }

    #dashboard-app .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    #dashboard-app .card-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    #dashboard-app .card-action-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
}

/* ===== PAYMENTS LIST ===== */
.payments-card-body {
    padding: 16px;
}

.payments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-card {
    background: var(--surface-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.payment-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.payment-card__row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.payment-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.payment-card__icon--green { background: var(--green-bg); color: var(--green); }
.payment-card__icon--blue { background: var(--blue-bg); color: var(--blue); }
.payment-card__icon--amber { background: var(--amber-bg); color: var(--amber); }
.payment-card__icon--purple { background: var(--purple-bg); color: var(--purple); }
.payment-card__icon--cyan { background: var(--cyan-bg); color: var(--cyan); }
.payment-card__icon--red { background: var(--red-bg); color: var(--red); }

.payment-card__content {
    flex: 1;
    min-width: 0;
}

.payment-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 4px;
}

.payment-card__basis {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    word-break: break-word;
}

.payment-card__side {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.payment-card__date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.payment-card__sum {
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.payment-card__sum--green { color: var(--green); }
.payment-card__sum--amber { color: var(--amber); }
.payment-card__sum--blue { color: var(--blue); }

.payment-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

@media (max-width: 768px) {
    .payments-card-body {
        padding: 12px;
    }

    .payment-card__row {
        flex-wrap: wrap;
    }

    .payment-card__side {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 4px;
        padding-top: 10px;
        border-top: 1px dashed var(--border-light);
    }

    .payment-card__sum {
        font-size: 17px;
    }
}

@media (min-width: 769px) {
    .payments-card-body {
        padding: 20px 24px;
    }

    .payment-card {
        padding: 16px 18px;
    }

    .payment-card__row {
        align-items: center;
    }

    .payment-card__footer {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        margin-left: auto;
        padding-left: 16px;
        gap: 12px;
    }

    .payment-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .payment-card__row {
        flex: 1;
    }
}

/* ===== MOBILE DEVICE FIXES (all pages) ===== */
#dashboard-app {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

#public-pages {
    overflow-x: hidden;
    max-width: 100%;
}

@media (max-width: 1024px) {
    body.cabinet-mode {
        overflow-x: hidden;
    }

    body.cabinet-mode .bottom-nav {
        display: grid;
    }

    #dashboard-app .bottom-nav {
        display: grid;
    }

    input,
    select,
    textarea,
    .form-input,
    .form-select,
    .form-textarea,
    .chat-input {
        font-size: 16px !important;
        max-width: 100%;
    }

    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus,
    .chat-input:focus {
        box-shadow: 0 0 0 2px var(--accent-bg);
    }

    .modal-overlay {
        padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
        align-items: flex-start;
        padding-top: max(24px, env(safe-area-inset-top, 0px));
    }

    .modal {
        max-height: calc(100dvh - 48px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        margin: auto 0;
    }

    .modal-body {
        padding: 20px 20px 24px;
    }

    .modal-header {
        padding: 20px 20px 0;
    }

    .pub-header {
        padding-top: env(safe-area-inset-top, 0px);
    }

    .pub-header-inner {
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
        min-height: 56px;
        height: auto;
    }

    .hero {
        margin-top: calc(56px + env(safe-area-inset-top, 0px));
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }

    .section,
    .quick-access,
    .footer {
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }

    .hero h1 {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .hero-buttons .btn {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
    }

    .hero-stats {
        gap: 20px;
    }

    .hero-stat {
        min-width: 0;
        flex: 1 1 40%;
    }

    body.cabinet-mode .toast-container {
        bottom: calc(var(--page-bottom) + 12px);
        right: max(12px, env(safe-area-inset-right, 0px));
        left: max(12px, env(safe-area-inset-left, 0px));
    }

    body.cabinet-mode .toast {
        max-width: 100%;
    }
}
