/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
    --black: #09090b;
    --dark: #0f0f12;
    --card: #18181b;
    --border: #27272a;
    --muted: #71717a;
    --text: #fafafa;
    --accent: #06b6d4;
    --accent-bg: rgba(6,182,212,.15);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gradient: linear-gradient(135deg, #06b6d4, #8b5cf6, #ec4899);
}

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

body {
    font-family: 'Instrument Sans', sans-serif;
    background: var(--black);
    color: var(--text);
    line-height: 1.6;
}

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

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all .2s;
}

.btn-primary {
    background: var(--text);
    color: var(--black);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,255,255,.15);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    width: 100%;
}

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

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

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth {
    min-height: 100vh;
    display: flex;
}

.auth-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.auth-right {
    width: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-right-content {
    color: #fff;
    text-align: center;
    max-width: 360px;
}

.auth-right h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    margin-bottom: 12px;
}

.auth-box {
    width: 100%;
    max-width: 380px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 40px;
}

.auth-logo-icon {
    width: 38px;
    height: 38px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.auth-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-sub {
    color: var(--muted);
    margin-bottom: 28px;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.auth-footer a {
    color: var(--accent);
}

@media (max-width: 800px) {
    .auth-right {
        display: none;
    }
}

/* ============================================
   APP LAYOUT
   ============================================ */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

.app-wrap {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--dark);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 18px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 17px;
}

.sidebar-logo-icon {
    width: 30px;
    height: 30px;
    background: var(--gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

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

.sidebar-nav {
    flex: 1;
    padding: 14px 10px;
    overflow-y: auto;
}

.nav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    padding: 8px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #a1a1aa;
    cursor: pointer;
    margin-bottom: 2px;
    transition: all .15s;
}

.nav-item:hover {
    background: var(--card);
    color: var(--text);
}

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

.nav-icon {
    font-size: 16px;
}

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--accent);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: var(--black);
}

.sidebar-user {
    padding: 14px;
    border-top: 1px solid var(--border);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--card);
    border-radius: 8px;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
}

.user-plan {
    font-size: 11px;
    color: var(--accent);
}

.main {
    flex: 1;
    margin-left: 250px;
}

.topbar {
    height: 56px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.content {
    padding: 28px;
}

@media (max-width: 700px) {
    .sidebar {
        display: none;
    }
    .main {
        margin-left: 0;
    }
}

/* ============================================
   MODULE PAGE & ADMIN STYLES
   ============================================ */
.main-content {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
}

.content-header {
    padding: 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--muted);
    font-size: 14px;
}

.content-body {
    padding: 28px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
}

@media (max-width: 700px) {
    .main-content {
        margin-left: 0;
    }
    .content-header {
        flex-direction: column;
        gap: 16px;
    }
}

