/* --- DESIGN SYSTEM & CSS VARIABLES --- */
:root {
    --bg-base: #0B0E14;
    --bg-surface: #131822;
    --bg-surface-elevated: #1C2333;
    --bg-glass: rgba(28, 35, 51, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(79, 70, 229, 0.4);

    --primary-color: #6366F1;
    --primary-hover: #4F46E5;
    --primary-light: rgba(99, 102, 241, 0.15);

    --accent-color: #10B981;
    --accent-hover: #059669;
    --accent-light: rgba(16, 185, 129, 0.15);

    --warning-color: #F59E0B;
    --danger-color: #EF4444;

    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --text-dim: #6B7280;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body.dark-theme {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Header & Navbar */
.app-header {
    background: rgba(19, 24, 34, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
}

.brand-name .highlight {
    color: var(--primary-color);
}

.brand-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navigation Links */
.main-nav {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-base);
    padding: 0.3rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1.1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.nav-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.nav-btn.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-surface-elevated);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.badge {
    background: var(--accent-light);
    color: var(--accent-color);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-accent {
    background: var(--accent-color);
    color: #fff;
}
.btn-accent:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.btn-icon:hover {
    color: var(--danger-color);
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.full-width {
    width: 100%;
}

/* App Main & Views */
.app-main {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem 1.5rem;
    flex: 1;
}

.view-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.view-section.active {
    display: block;
}

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

/* Glass Panels & Cards */
.glass-panel, .glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    padding: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.success { border-left: 4px solid var(--accent-color); }
.toast.error { border-left: 4px solid var(--danger-color); }
.toast.info { border-left: 4px solid var(--primary-color); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
