:root {
    --primary: #7C3AED;
    --primary-dark: #5B21B6;
    --primary-light: #8B5CF6;
    --accent: #EAB308;
    --accent-dark: #CA8A04;
    --dark: #1E1B4B;
    --text: #1F2937;
    --text-muted: #6B7280;
    --bg: #FFFFFF;
    --bg-light: #F5F3FF;
    --bg-card: #FFFFFF;
    --border: #E5E7EB;
    --success: #10B981;
    --danger: #EF4444;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(124, 58, 237, 0.08);
    --shadow-lg: 0 8px 40px rgba(124, 58, 237, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(91, 33, 182, 0.3);
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--bg-light);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
    border-radius: var(--radius);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Nav */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--bg-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-primary {
    background: rgba(91, 33, 182, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-accent {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent);
}

/* Section */
.section {
    padding: 80px 24px;
}

.section-sm {
    padding: 48px 24px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.section-sub {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 560px;
    line-height: 1.7;
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Dashboard layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 64px;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    position: fixed;
    top: 64px;
    bottom: 0;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 12px;
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
}

.sidebar-link:hover {
    background: var(--bg-light);
    color: var(--text);
}

.sidebar-link.active {
    background: rgba(91, 33, 182, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-link i {
    width: 18px;
    font-size: 15px;
}

.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 32px;
    background: var(--bg-light);
    min-height: calc(100vh - 64px);
}

/* Stats */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -1px;
    line-height: 1;
}

.stat-change {
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.table tr:last-child td {
    border-bottom: none;
}

/* Footer */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    padding: 48px 24px 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    max-width: 1100px;
    margin: 0 auto 40px;
}

.footer-brand {
    font-size: 22px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.footer-brand span {
    color: var(--accent);
}

.footer-desc {
    font-size: 14px;
    line-height: 1.7;
    max-width: 280px;
}

.footer-heading {
    font-size: 13px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.w-full { width: 100%; }

/* Responsive */
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .nav-links { display: none; }
}

@media (max-width: 640px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .section-title { font-size: 28px; }
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
