:root {
    --bg: #09090b;
    --ink: #fafafa;
    --muted: #a1a1aa;
    --line: #27272a;
    --card: #18181b;
    --brand: #10b981;
    --brand-dark: #6ee7b7;
    --topbar: rgba(9, 9, 11, 0.88);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
}
a { color: var(--brand-dark); }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: var(--topbar);
    backdrop-filter: blur(12px);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 20px;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; font-size: 15px; }
.brand-text span { font-size: 12px; font-weight: 500; color: var(--muted); }
.brand-logo { display: block; height: 112px; width: 112px; }
.logo { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.who { font-size: 13px; color: var(--muted); }
.credito {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-dark);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 999px;
    padding: 6px 12px;
}
.saldo-cifra { font-size: 40px; font-weight: 750; margin: 4px 0 8px; color: var(--brand-dark); letter-spacing: -0.03em; }
.meter { font-size: 14px; font-weight: 600; color: var(--ink); background: #09090b; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.inline .tiny { width: 88px; }
.inline .btn { padding: 8px 12px; font-size: 13px; }
.pos { color: #6ee7b7; font-weight: 600; }
.neg { color: #fca5a5; font-weight: 600; }
.btn {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    text-decoration: none;
    background: var(--brand);
    color: #052e16;
}
.btn-outline { background: transparent; border: 1px solid #3f3f46; color: var(--ink); }
.btn-danger { background: #b91c1c; color: #fff; }
.azioni { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.edit-box { background: #09090b; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.edit-box h3 { margin: 0 0 12px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.auth { max-width: 440px; margin: 6vh auto 0; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.55; }
.banner { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; }
.banner.error { background: rgba(153, 27, 27, 0.28); color: #fecaca; }
.banner.ok { background: rgba(22, 101, 52, 0.35); color: #bbf7d0; }
.banner.info { background: rgba(16, 185, 129, 0.12); color: var(--brand-dark); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input, textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #3f3f46;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #09090b;
    color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); }
.field { margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.03em; }
h2 { font-size: 18px; margin: 0 0 12px; }
video { width: 100%; max-height: 70vh; background: #000; border-radius: 12px; }
.stage { display: grid; gap: 12px; }
.status { font-weight: 600; color: var(--brand-dark); }
@media (max-width: 800px) {
    .topbar-inner { align-items: flex-start; flex-direction: column; }
    .nav { justify-content: flex-start; }
    .grid-2 { grid-template-columns: 1fr; }
}
