:root {
    --astra-bg: #070d19;
    --astra-surface: #0c1526;
    --astra-surface-2: #111d33;
    --astra-line: #1b2942;
    --astra-ink: #eef3fb;
    --astra-muted: #9fb0cd;
    --astra-accent: #fbbf24;
    --astra-accent-2: #38bdf8;
    --astra-radius: 14px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background:
        radial-gradient(900px 420px at 15% -10%, rgba(56, 189, 248, .10), transparent 60%),
        radial-gradient(800px 480px at 100% 100%, rgba(251, 191, 36, .07), transparent 55%),
        var(--astra-bg);
    color: var(--astra-ink);
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .astra-brand-text strong {
    font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
    letter-spacing: -.02em;
}

code {
    color: #fde68a;
    background: rgba(251, 191, 36, .08);
    border: 1px solid rgba(251, 191, 36, .18);
    border-radius: 6px;
    padding: 1px 6px;
    font-size: .85em;
}

.text-secondary { color: var(--astra-muted) !important; }

/* ── Shell ─────────────────────────────────────────────────────────────── */

.astra-app {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
}

.astra-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 16px;
    background: rgba(9, 16, 30, .88);
    border-right: 1px solid var(--astra-line);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.astra-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    color: var(--astra-ink);
    text-decoration: none;
}

.astra-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--astra-accent), #f59e0b);
    color: #1a1205;
    font-size: 1.1rem;
    flex: 0 0 auto;
    box-shadow: 0 10px 30px rgba(251, 191, 36, .18);
}

.astra-brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.astra-brand-text strong { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.astra-brand-text small { color: var(--astra-muted); font-size: .73rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.astra-nav { display: flex; flex-direction: column; gap: 3px; }

.astra-nav-label {
    margin: 16px 10px 6px;
    font-size: .66rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #6f83a6;
    font-weight: 700;
}

.astra-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    color: #c7d3e8;
    text-decoration: none;
    font-size: .89rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.astra-nav-link i { font-size: 1rem; color: #8fa3c4; }

.astra-nav-link:hover { background: rgba(255, 255, 255, .04); color: #fff; }

.astra-nav-link.active {
    background: rgba(251, 191, 36, .09);
    border-color: rgba(251, 191, 36, .22);
    color: #fff;
}

.astra-nav-link.active i { color: var(--astra-accent); }

.astra-nav-link.is-soon {
    cursor: default;
    color: #7f8fae;
    opacity: .75;
}

.astra-nav-link.is-soon em {
    margin-left: auto;
    font-style: normal;
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #b99546;
    background: rgba(251, 191, 36, .08);
    border: 1px solid rgba(251, 191, 36, .18);
    border-radius: 999px;
    padding: 2px 7px;
}

.astra-sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--astra-line); }

.astra-main { display: flex; flex-direction: column; min-width: 0; }

.astra-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 30px 0;
}

.astra-kicker {
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--astra-accent);
    font-weight: 700;
}

.astra-page-title { margin: 4px 0 0; font-size: 1.5rem; }

.astra-user { color: var(--astra-muted); font-size: .85rem; display: inline-flex; align-items: center; gap: 7px; }

.astra-content { padding: 24px 30px 40px; }

/* ── Componentes ───────────────────────────────────────────────────────── */

.astra-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 45%), var(--astra-surface);
    border: 1px solid var(--astra-line);
    border-radius: var(--astra-radius);
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
}

.astra-stat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    height: 100%;
    padding: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 50%), var(--astra-surface);
    border: 1px solid var(--astra-line);
    border-radius: var(--astra-radius);
}

.astra-stat-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(56, 189, 248, .08);
    border: 1px solid rgba(56, 189, 248, .18);
    color: var(--astra-accent-2);
    font-size: 1.05rem;
}

.astra-stat-label { margin: 0; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--astra-muted); }
.astra-stat-value { margin: 2px 0 0; font-size: 1.7rem; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.astra-stat-hint { margin: 0; font-size: .74rem; color: #6f83a6; }

.astra-empty {
    display: grid;
    place-items: center;
    gap: 6px;
    text-align: center;
    padding: 38px 16px;
    border: 1px dashed var(--astra-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .015);
}

.astra-empty i { font-size: 1.8rem; color: #5f7394; }

.astra-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: rgba(251, 191, 36, .07);
    border: 1px solid rgba(251, 191, 36, .22);
    color: #f6e2ac;
    font-size: .88rem;
}

.astra-alert i { color: var(--astra-accent); font-size: 1.05rem; }
.astra-alert strong { color: #fff; }

/* ── Guest / login ─────────────────────────────────────────────────────── */

.astra-guest {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 32px 16px;
}

.astra-guest-wrap { width: min(440px, 100%); }

.astra-guest-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-left: 4px;
}

.astra-guest-brand strong { display: block; font-family: 'Space Grotesk', sans-serif; }
.astra-guest-brand small { color: var(--astra-muted); font-size: .78rem; }

.astra-guest-card { padding: 28px; }

.astra-guest-foot { margin: 18px 0 0; text-align: center; font-size: .8rem; color: #6f83a6; }
.astra-guest-foot a { color: var(--astra-muted); text-decoration: none; }
.astra-guest-foot a:hover { color: var(--astra-accent); }

.astra-platform-home .astra-guest-card { padding: 32px; }
.astra-platform-home .astra-guest-card code { white-space: nowrap; }

/* ── Bootstrap overrides ───────────────────────────────────────────────── */

.form-control, .form-select {
    background-color: #0a1322;
    border-color: var(--astra-line);
    color: var(--astra-ink);
}

.form-control:focus, .form-select:focus {
    background-color: #0a1322;
    border-color: rgba(251, 191, 36, .55);
    box-shadow: 0 0 0 .2rem rgba(251, 191, 36, .12);
    color: #fff;
}

.form-control::placeholder { color: #5f7394; }
.form-label { font-size: .82rem; color: var(--astra-muted); font-weight: 600; }
.form-check-label { font-size: .84rem; color: var(--astra-muted); }

.btn-warning { background: linear-gradient(135deg, var(--astra-accent), #f59e0b); border: 0; color: #1a1205; }
.btn-warning:hover, .btn-warning:focus { background: linear-gradient(135deg, #fcd34d, #f59e0b); color: #1a1205; }
.btn-outline-light { border-color: var(--astra-line); color: #c7d3e8; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .06); border-color: #2a3b5c; color: #fff; }

.table-dark {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--astra-line);
    --bs-table-hover-bg: rgba(255, 255, 255, .035);
    --bs-table-color: var(--astra-ink);
}

.badge.text-bg-secondary { background: #16233a !important; color: #a9b9d4 !important; border: 1px solid var(--astra-line); }
.badge.text-bg-success { background: rgba(34, 197, 94, .14) !important; color: #7ee2a8 !important; border: 1px solid rgba(34, 197, 94, .3); }

.alert-danger { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .3); color: #fca5a5; }

/* ── Responsivo ────────────────────────────────────────────────────────── */

@media (max-width: 991.98px) {
    .astra-app { grid-template-columns: 1fr; }
    .astra-sidebar {
        position: static;
        height: auto;
        flex-direction: column;
        border-right: 0;
        border-bottom: 1px solid var(--astra-line);
    }
    .astra-nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .astra-nav-label { display: none; }
    .astra-nav-link { padding: 7px 10px; font-size: .82rem; }
    .astra-nav-link.is-soon { display: none; }
    .astra-sidebar-foot { display: none; }
    .astra-topbar { padding: 18px 18px 0; }
    .astra-content { padding: 18px; }
    .astra-page-title { font-size: 1.25rem; }
}

/* ── Passos (landing do painel) ─────────────────────────────────────────── */

.astra-steps {
    margin: 22px 0 0;
    padding-left: 20px;
    display: grid;
    gap: 12px;
    color: var(--astra-muted);
    font-size: .9rem;
    line-height: 1.55;
}

.astra-steps li strong { color: #fff; }
.astra-steps code { font-size: .78rem; }
