/* ── VARIABLES ────────────────────────────────────────────────────────── */
:root {
    --bg:           #080E18;
    --bg-surface:   #0D1520;
    --bg-card:      #111827;
    --accent:       #00C2D4;
    --accent-dim:   #009EAE;
    --border:       rgba(255, 255, 255, 0.07);
    --text-1:       #FFFFFF;
    --text-2:       #A8B3C4;
    --text-3:       #5C6B7E;
    --danger:       #EF4444;
    --success:      #22C55E;
    --radius-sm:    8px;
    --radius-md:    14px;
    --radius-lg:    20px;
    --sidebar-w:    240px;
    --accent-glow:  rgba(0, 194, 212, 0.15);
    --border-accent: rgba(0, 194, 212, 0.22);
    --shadow-card:  0 4px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.04) inset;
}

/* ── RESET ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-1);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
img, svg { display: block; }

/* ── LAYOUT ───────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: #0C0F16;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
}
.sidebar-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-1);
    padding: 0 10px 28px;
    letter-spacing: -0.01em;
}
.sidebar-nav {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-2);
    transition: background 0.15s, color 0.15s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.05); color: var(--text-1); }
.sidebar-nav a.active {
    background: rgba(0, 194, 212, 0.1);
    color: var(--accent);
}
.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.sidebar-footer a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text-3);
    transition: color 0.15s;
}
.sidebar-footer a:hover { color: var(--text-2); }

.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 32px;
    min-height: 100vh;
}
.main-content.full-width {
    margin-left: 0;
}

/* ── FLASH MESSAGES ───────────────────────────────────────────────────── */
.flash-messages { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
}
.alert-success { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.25); color: #4ade80; }
.alert-danger  { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.25);  color: #f87171; }
.alert-info    { background: rgba(0,194,212,0.10);  border-color: rgba(0,194,212,0.25);  color: var(--accent); }
.alert-warning { background: rgba(251,191,36,0.10); border-color: rgba(251,191,36,0.25); color: #fbbf24; }

/* ── CARDS ────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.card h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.card-header-row h2 { margin-bottom: 0; }

/* Buttons and form styles → see components/forms.css */

/* ── AUTH PAGES ───────────────────────────────────────────────────────── */
.auth-card {
    max-width: 420px;
    margin: 60px auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.5);
}
.auth-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 28px; letter-spacing: -0.02em; }
.auth-card p { margin-top: 18px; font-size: 0.9rem; color: var(--text-2); }
.auth-card a { color: var(--accent); transition: opacity 0.2s; }
.auth-card a:hover { opacity: 0.8; }
.auth-card .btn-primary { width: 100%; justify-content: center; margin-top: 8px; padding: 12px; }

/* ── DASHBOARD ────────────────────────────────────────────────────────── */
.dashboard { max-width: 900px; }
.status-card { border-left: 3px solid var(--accent); }
.status-city { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.status-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: capitalize;
}
.status-in_town  { background: rgba(0,194,212,0.15); color: var(--accent); }
.status-available { background: rgba(34,197,94,0.15); color: #4ade80; }
.status-busy     { background: rgba(251,191,36,0.15); color: #fbbf24; }
.status-invisible { background: rgba(100,100,100,0.15); color: var(--text-3); }

/* ── FRIENDS LIST ─────────────────────────────────────────────────────── */
.friends-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.friend-item:hover { background: rgba(255,255,255,0.04); }
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--border); }
.avatar-lg { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.friend-name { font-weight: 600; flex: 1; }
.friend-city { font-size: 0.88rem; color: var(--text-2); }
.friend-actions { margin-left: auto; }

/* ── REQUESTS LIST ────────────────────────────────────────────────────── */
.requests-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.requests-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.requests-list li:last-child { border-bottom: none; }
.requests-list li span:first-child { flex: 1; font-weight: 500; }

/* ── NOTIFICATIONS ────────────────────────────────────────────────────── */
.notifications-list { list-style: none; display: flex; flex-direction: column; }
.notification-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.notification-item:last-child { border-bottom: none; }
.notification-item.unread .notification-title { color: var(--text-1); }
.notification-item:not(.unread) .notification-title { color: var(--text-2); }
.notification-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.notification-body { font-size: 0.85rem; color: var(--text-2); margin-bottom: 4px; }
.notification-time { font-size: 0.78rem; color: var(--text-3); }

/* ── PAGE HEADER ──────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}
.page-header h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }

/* ── PROFILE ──────────────────────────────────────────────────────────── */
.avatar-preview { margin-bottom: 24px; }

/* City-status select and search-form modifiers → see components/forms.css */

/* ── BADGE ────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255,255,255,0.07);
    color: var(--text-3);
}

/* ── TEXT UTILITIES ───────────────────────────────────────────────────── */
.text-muted { color: var(--text-3); font-size: 0.9rem; }
.text-muted a { color: var(--accent); }
