:root {
    --bg: #070b12;
    --bg-card: #0f1623;
    --bg-input: #0a1019;
    --border: rgba(148, 163, 184, 0.14);
    --text: #e8edf5;
    --muted: #8b9bb3;
    --accent: #3b82f6;
    --accent-2: #22d3ee;
    --ok: #22c55e;
    --danger: #ef4444;
    --radius: 12px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "Cascadia Code", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* —— Login —— */
.atlas-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(59, 130, 246, 0.18), transparent),
        var(--bg);
}

.atlas-login-card {
    width: min(440px, 100%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 1.75rem 2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.atlas-logo {
    display: block;
    max-width: 100%;
    height: auto;
}

.atlas-login-hero {
    text-align: center;
    margin-bottom: 1.25rem;
}

.atlas-logo-login {
    width: min(300px, 88%);
    margin: 0 auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.atlas-login-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.atlas-login-mark {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
}

.atlas-login-brand h1 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.atlas-login-brand p {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.atlas-field {
    display: block;
    margin-bottom: 1rem;
}

.atlas-field span {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.atlas-field input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-size: 0.95rem;
}

.atlas-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.atlas-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    background: var(--accent);
}

.atlas-btn:hover {
    filter: brightness(1.08);
}

.atlas-btn-block {
    width: 100%;
    margin-top: 0.25rem;
}

.atlas-alert {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.atlas-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.atlas-alert-ok {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.atlas-login-foot {
    margin-top: 1.25rem;
    font-size: 0.72rem;
    color: var(--muted);
    text-align: center;
}

/* —— App shell —— */
.atlas-shell {
    display: flex;
    min-height: 100vh;
}

.atlas-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #0a0f18;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1rem 0.75rem;
}

.atlas-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.atlas-logo-sidebar {
    width: 44px;
    height: 44px;
    object-fit: cover;
    object-position: center 24%;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.atlas-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.atlas-brand strong {
    display: block;
    font-size: 0.95rem;
}

.atlas-brand small {
    color: var(--muted);
    font-size: 0.68rem;
}

.atlas-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.atlas-nav-link {
    display: block;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    border-left: 3px solid transparent;
}

.atlas-nav-link:hover {
    color: var(--text);
    background: rgba(148, 163, 184, 0.06);
}

.atlas-nav-link.is-active {
    color: var(--text);
    background: rgba(59, 130, 246, 0.12);
    border-left-color: var(--accent);
    font-weight: 600;
}

.atlas-nav-link.muted {
    font-size: 0.8rem;
}

.atlas-sidebar-foot {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.atlas-user {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.5rem 0.65rem;
}

.atlas-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-2);
}

.atlas-main {
    flex: 1;
    min-width: 0;
    padding: 1.25rem 1.5rem 2rem;
}

.atlas-page-header {
    margin-bottom: 1.25rem;
}

.atlas-page-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.atlas-page-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.atlas-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}

.atlas-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.atlas-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.atlas-inline-link {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 600;
}

.atlas-inline-link:hover {
    text-decoration: underline;
}

.atlas-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}

.atlas-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted);
}

.atlas-badge-ok {
    background: rgba(34, 197, 94, 0.15);
    color: var(--ok);
}

.atlas-roadmap {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.atlas-roadmap li {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}

.atlas-roadmap li strong {
    color: var(--text);
}

@media (max-width: 768px) {
    .atlas-shell {
        flex-direction: column;
    }

    .atlas-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .atlas-nav {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }
}
