/* ─── RESET & BASE ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #0d1117;
    --surface:   #161b22;
    --border:    #30363d;
    --accent:    #1a73e8;
    --accent-h:  #1557b0;
    --success:   #2ea043;
    --danger:    #da3633;
    --warn:      #e3b341;
    --text:      #e6edf3;
    --text-muted:#8b949e;
    --radius:    10px;
    --shadow:    0 4px 24px rgba(0,0,0,.4);
    --font:      'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── BOTÕES ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--accent);  color: #fff; }
.btn-primary:hover  { background: var(--accent-h); }
.btn-success  { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-warn     { background: var(--warn);    color: #000; }
.btn-ghost    { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { padding: 6px 12px; font-size: .83rem; }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ─── FORMULÁRIOS ────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
label { font-size: .88rem; color: var(--text-muted); font-weight: 500; }
input, select, textarea {
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .95rem;
    font-family: var(--font);
    transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}
input::placeholder { color: var(--text-muted); }

/* ─── ALERTAS ────────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: .9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-error   { background: rgba(218,54,51,.15); border: 1px solid var(--danger); color: #ff7b72; }
.alert-success { background: rgba(46,160,67,.15); border: 1px solid var(--success); color: #7ee787; }
.alert-warn    { background: rgba(227,179,65,.15); border: 1px solid var(--warn); color: var(--warn); }

/* ─── CARD ───────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

/* ─── SPINNER ────────────────────────────────────────────────────── */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── UTILITÁRIOS ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.hidden { display: none !important; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* ─── SCROLLBAR ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ─── TEMA CLARO ──────────────────────────────────────────────────── */
body.light {
    --bg:        #f0f2f5;
    --surface:   #ffffff;
    --border:    #d0d7de;
    --text:      #1c1e21;
    --text-muted:#656d76;
    --shadow:    0 4px 24px rgba(0,0,0,.1);
}
