/* ============================================================
   Sócio Virtual - app.css (v1)
   Design system: glass dark, indigo/cyan, Sora + Inter
   ============================================================ */

:root {
    /* Cores base */
    --bg:           #0b0b15;
    --bg-2:         #11111d;
    --bg-3:         #161628;
    --surface:      rgba(255, 255, 255, 0.04);
    --surface-hov:  rgba(255, 255, 255, 0.07);
    --border:       rgba(255, 255, 255, 0.08);
    --border-2:     rgba(255, 255, 255, 0.14);

    /* Texto */
    --text:         #e7e7f0;
    --text-muted:   rgba(231, 231, 240, 0.62);
    --text-dim:     rgba(231, 231, 240, 0.38);

    /* Acentos */
    --indigo:       #6366f1;
    --indigo-2:     #818cf8;
    --cyan:         #06b6d4;
    --cyan-2:       #22d3ee;
    --grad:         linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --grad-soft:    linear-gradient(135deg, rgba(99,102,241,0.18) 0%, rgba(6,182,212,0.18) 100%);

    /* Estado */
    --success:      #22c55e;
    --warning:      #f59e0b;
    --danger:       #ef4444;

    /* Raios e sombras */
    --r-sm: 8px;
    --r:    12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --shadow:    0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);

    /* Layout */
    --sidebar-w: 260px;
    --container: 1500px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(900px 600px at 12% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
        radial-gradient(800px 500px at 105% 110%, rgba(6, 182, 212, 0.18), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

a { color: var(--cyan-2); text-decoration: none; transition: color .15s; }
a:hover { color: var(--indigo-2); }

button { font-family: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout-app {
    display: block;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}
.main-app {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    padding: 32px 40px 80px;
    max-width: var(--container);
}
.layout-publico {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}
.main-publico {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: rgba(11, 11, 21, 0.72);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 18px 20px;
    z-index: 50;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 6px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}
.sidebar-logo {
    width: 40px; height: 40px;
    border-radius: 11px;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    color: #fff;
    letter-spacing: .5px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}
.sidebar-titulo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.sidebar-titulo strong {
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    color: var(--text);
}
.sidebar-titulo span {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: var(--r);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all .15s;
}
.nav-item:hover {
    background: var(--surface-hov);
    color: var(--text);
}
.nav-item.is-active {
    background: var(--grad-soft);
    color: var(--text);
    border: 1px solid var(--border-2);
}
.nav-item.is-active .nav-icone { filter: drop-shadow(0 0 8px rgba(99,102,241,0.6)); }
.nav-icone { font-size: 16px; width: 22px; text-align: center; }

.sidebar-rodape {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.creditos-pill {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cred-linha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}
.cred-linha strong {
    font-family: 'Sora', sans-serif;
    color: var(--text);
    font-size: 14px;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}
.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}
.user-info { display: flex; flex-direction: column; line-height: 1.2; }
.user-info strong { font-size: 13px; }
.user-info a { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   CARDS / GLASS
   ============================================================ */
.glass {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}
.card-titulo {
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    margin-bottom: 8px;
}
.card-sub {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 18px;
}

/* ============================================================
   HEADERS DE PÁGINA
   ============================================================ */
.page-header {
    margin-bottom: 28px;
}
.page-header h1 {
    font-size: 26px;
    margin-bottom: 4px;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.page-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-grupo { margin-bottom: 18px; }
.form-grupo label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}
.input, .select, .textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(11, 11, 21, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--text);
    font-size: 14px;
    transition: border-color .15s, background .15s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--indigo);
    background: rgba(11, 11, 21, 0.7);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}
.btn:hover { background: var(--surface-hov); border-color: var(--border-2); }
.btn-primary {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 24px rgba(99,102,241,0.4); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-danger { background: rgba(239, 68, 68, 0.12); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ============================================================
   ALERTAS
   ============================================================ */
.alerta {
    padding: 12px 14px;
    border-radius: var(--r);
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
}
.alerta-erro     { background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.25); color: #fca5a5; }
.alerta-sucesso  { background: rgba(34,197,94,0.10); border-color: rgba(34,197,94,0.25); color: #86efac; }
.alerta-info     { background: rgba(99,102,241,0.10); border-color: rgba(99,102,241,0.28); color: #c7d2fe; }

/* ============================================================
   AUTH (login / cadastro)
   ============================================================ */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}
.auth-brand {
    text-align: center;
    margin-bottom: 28px;
}
.auth-brand .logo {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--grad);
    margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 12px 30px rgba(99,102,241,0.4);
}
.auth-brand h1 {
    font-size: 22px;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.auth-brand p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.auth-rodape {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================================
   HOME (landing)
   ============================================================ */
.hero {
    max-width: 700px;
    text-align: center;
    padding: 60px 20px;
}
.hero .selo {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 22px;
    letter-spacing: .04em;
}
.hero h1 {
    font-size: clamp(36px, 6vw, 56px);
    line-height: 1.05;
    margin-bottom: 18px;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 540px;
    margin: 0 auto 30px;
}
.hero-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   ONBOARDING STEPPER
   ============================================================ */
.onb-wrap {
    width: 100%;
    max-width: 520px;
}
.onb-steps {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}
.onb-step {
    flex: 1;
    height: 4px;
    background: var(--surface);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}
.onb-step.is-done::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--grad);
}
.onb-step.is-active::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--grad);
    opacity: .6;
}

/* ============================================================
   CHAT (placeholder Fase 2)
   ============================================================ */
.chat-vazio {
    max-width: 540px;
    margin: 80px auto 0;
    text-align: center;
    padding: 40px 28px;
}
.chat-vazio .emoji { font-size: 42px; margin-bottom: 16px; }
.chat-vazio h2 { font-size: 22px; margin-bottom: 8px; }
.chat-vazio p { color: var(--text-muted); }

/* ============================================================
   RESPONSIVO (mobile)
   ============================================================ */
@media (max-width: 880px) {
    :root { --sidebar-w: 0px; }
    .sidebar {
        position: fixed;
        bottom: 0; top: auto; left: 0; right: 0;
        width: 100%;
        flex-direction: row;
        padding: 8px 10px;
        border-right: none;
        border-top: 1px solid var(--border);
        height: 64px;
    }
    .sidebar-brand, .sidebar-rodape { display: none; }
    .sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }
    .nav-item { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 10px; }
    .nav-item .nav-icone { font-size: 20px; }
    .main-app {
        margin-left: 0;
        padding: 20px 16px 90px;
    }
}
