:root {
    --bg: #0C111D;
    --surface: #131A2B;
    --raise: #1A2338;
    --line: #232E48;
    --line-soft: #1C2740;
    --amber: #F5A623;
    --amber-forte: #FFB93D;
    --amber-soft: rgba(245, 166, 35, .13);
    --verde: #2FBF71;
    --verde-soft: rgba(47, 191, 113, .14);
    --vermelho: #E5484D;
    --vermelho-soft: rgba(229, 72, 77, .13);
    --azul: #4D8DF7;
    --texto: #EAF0FA;
    --mudo: #93A0B8;
    --apagado: #7A8AA6;
    --fonte-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --fonte-display: 'Sora', 'Inter', sans-serif;
    --raio: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--texto);
    font-family: var(--fonte-ui);
    font-size: 14px;
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--amber); color: #16130A; }

.shell { display: flex; min-height: 100vh; }

.side {
    width: 236px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #101728 0%, #0C111D 100%);
    border-right: 1px solid var(--line-soft);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 14px 16px;
    z-index: 40;
}

.marca {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 22px;
    font-family: var(--fonte-display);
    letter-spacing: .01em;
}

.marca-x { font-size: 21px; font-weight: 700; }

.marca-ads {
    font-size: 12px;
    font-weight: 700;
    background: var(--amber);
    color: #16130A;
    border-radius: 7px;
    padding: 3px 8px;
    letter-spacing: .12em;
    box-shadow: 0 0 18px rgba(245, 166, 35, .35);
}

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

.nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--mudo);
    font-weight: 500;
    transition: background .15s, color .15s;
}

.nav a:hover { background: rgba(255, 255, 255, .04); color: var(--texto); }

.nav a.ativo {
    background: var(--amber-soft);
    color: var(--amber-forte);
}

.nav svg, .side-pe svg, .topo svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.side-pe {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--line-soft);
    padding-top: 14px;
}

.chip-usuario { flex: 1; min-width: 0; }

.chip-nome {
    display: block;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chip-tipo { display: block; font-size: 11.5px; color: var(--apagado); }

.sair {
    color: var(--apagado);
    padding: 8px;
    border-radius: 8px;
    transition: color .15s, background .15s;
}

.sair:hover { color: var(--vermelho); background: var(--vermelho-soft); }

.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 30px;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(12, 17, 29, .8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 30;
}

.topo h1 {
    font-family: var(--fonte-display);
    font-size: 19px;
    font-weight: 600;
    flex: 1;
}

.menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--texto);
    padding: 8px;
    cursor: pointer;
}

.conteudo { padding: 26px 30px 50px; max-width: 1280px; width: 100%; }

.flash {
    padding: 12px 16px;
    border-radius: 11px;
    margin-bottom: 20px;
    font-weight: 500;
    border: 1px solid;
}

.flash-ok { background: var(--verde-soft); border-color: rgba(47, 191, 113, .3); color: #7FE0AC; }
.flash-erro { background: var(--vermelho-soft); border-color: rgba(229, 72, 77, .3); color: #F49A9D; }

.cartoes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.cartao {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--raio);
    padding: 18px 20px;
}

.cartao .rotulo {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--apagado);
    margin-bottom: 8px;
}

.cartao .valor {
    font-family: var(--fonte-display);
    font-size: 30px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.cartao .detalhe { font-size: 12.5px; color: var(--mudo); margin-top: 6px; }

.cartao.destaque { border-color: rgba(245, 166, 35, .35); background: linear-gradient(160deg, rgba(245, 166, 35, .07), var(--surface) 55%); }

.painel {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--raio);
    margin-bottom: 22px;
    overflow: hidden;
}

.painel-topo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line-soft);
}

.painel-topo h2 {
    font-family: var(--fonte-display);
    font-size: 14.5px;
    font-weight: 600;
    flex: 1;
}

.painel-corpo { padding: 20px; }

.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }

.lamp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 11px 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--raise);
    color: var(--mudo);
    white-space: nowrap;
}

.lamp i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--apagado);
    flex-shrink: 0;
}

.lamp-on { border-color: rgba(245, 166, 35, .45); background: var(--amber-soft); color: var(--amber-forte); }
.lamp-on i { background: var(--amber); box-shadow: 0 0 9px var(--amber); animation: pulsar 2.2s ease-in-out infinite; }

.lamp-verde { border-color: rgba(47, 191, 113, .4); background: var(--verde-soft); color: #7FE0AC; }
.lamp-verde i { background: var(--verde); box-shadow: 0 0 8px rgba(47, 191, 113, .8); }

.lamp-pause { color: var(--azul); border-color: rgba(77, 141, 247, .4); background: rgba(77, 141, 247, .1); }
.lamp-pause i { background: var(--azul); }

.lamp-end i, .lamp-off i { background: var(--apagado); }

@keyframes pulsar {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

@media (prefers-reduced-motion: reduce) {
    .lamp-on i { animation: none; }
}

.tabela-envolve { overflow-x: auto; }

table.tabela { width: 100%; border-collapse: collapse; }

.tabela th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--apagado);
    padding: 11px 16px;
    border-bottom: 1px solid var(--line-soft);
    white-space: nowrap;
}

.tabela td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}

.tabela tr:last-child td { border-bottom: none; }

.tabela tr:hover td { background: rgba(255, 255, 255, .018); }

.tabela .num { font-variant-numeric: tabular-nums; text-align: right; }

.tabela .mudo { color: var(--mudo); }

.t-link { color: var(--amber-forte); font-weight: 600; }
.t-link:hover { text-decoration: underline; }

.form-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }

.campo { display: flex; flex-direction: column; gap: 6px; }

.campo-cheio { grid-column: 1 / -1; }

.campo label { font-size: 12.5px; font-weight: 600; color: var(--mudo); }

.campo input[type="text"], .campo input[type="number"], .campo input[type="date"],
.campo input[type="email"], .campo input[type="password"], .campo select, .campo textarea {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--texto);
    padding: 10px 13px;
    font-family: var(--fonte-ui);
    font-size: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}

.campo textarea { resize: vertical; min-height: 74px; }

.campo input:focus, .campo select:focus, .campo textarea:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, .15);
}

.campo .dica { font-size: 12px; color: var(--apagado); }

.opcoes-linha { display: flex; flex-wrap: wrap; gap: 8px; }

.opcao-pill { position: relative; }

.opcao-pill input { position: absolute; opacity: 0; pointer-events: none; }

.opcao-pill span {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--mudo);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all .13s;
    user-select: none;
}

.opcao-pill input:checked + span {
    background: var(--amber-soft);
    border-color: rgba(245, 166, 35, .5);
    color: var(--amber-forte);
}

.opcao-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(245, 166, 35, .25); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: var(--raise);
    color: var(--texto);
    font-family: var(--fonte-ui);
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .14s;
}

.btn:hover { border-color: var(--apagado); }

.btn-primario {
    background: var(--amber);
    border-color: var(--amber);
    color: #16130A;
    box-shadow: 0 2px 14px rgba(245, 166, 35, .25);
}

.btn-primario:hover { background: var(--amber-forte); border-color: var(--amber-forte); }

.btn-perigo { color: #F49A9D; }
.btn-perigo:hover { border-color: var(--vermelho); background: var(--vermelho-soft); }

.btn-mini { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.barras { display: flex; flex-direction: column; gap: 11px; }

.barra-item { display: grid; grid-template-columns: 44px 1fr 52px; align-items: center; gap: 12px; }

.barra-rotulo { font-weight: 600; font-size: 12.5px; color: var(--mudo); }

.barra-trilha { background: var(--bg); border-radius: 999px; height: 9px; overflow: hidden; }

.barra-preenche {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #C77E12, var(--amber));
    min-width: 3px;
}

.barra-num { font-variant-numeric: tabular-nums; font-size: 12.5px; text-align: right; color: var(--mudo); }

.dias-grafico { display: flex; align-items: flex-end; gap: 5px; height: 130px; padding-top: 8px; min-width: 460px; }

.dias-envolve { overflow-x: auto; padding-bottom: 4px; }

.dia-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }

.dia-barra {
    width: 100%;
    max-width: 34px;
    background: linear-gradient(180deg, var(--amber), #B87310);
    border-radius: 5px 5px 2px 2px;
    min-height: 3px;
}

.dia-rotulo { font-size: 10.5px; color: var(--apagado); white-space: nowrap; }

.dia-col { min-width: 26px; }

.spot-linha { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }

.spot-linha:last-child { border-bottom: none; }

.spot-play {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(245, 166, 35, .5);
    background: var(--amber-soft);
    color: var(--amber-forte);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .14s;
}

.spot-play:hover { background: var(--amber); color: #16130A; }

.spot-play svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }

.spot-info { flex: 1; min-width: 0; }

.spot-nome { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.spot-meta { font-size: 12px; color: var(--apagado); }

.vazio { text-align: center; padding: 46px 24px; color: var(--mudo); }

.vazio .vazio-icone {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: var(--raise);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vazio .vazio-icone svg { width: 24px; height: 24px; stroke: var(--apagado); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.vazio h3 { font-family: var(--fonte-display); font-size: 15px; color: var(--texto); margin-bottom: 5px; }

.vazio p { font-size: 13px; max-width: 420px; margin: 0 auto; }

.filtros { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; align-items: center; }

.filtros input[type="text"], .filtros select, .filtros input[type="date"] {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--texto);
    padding: 9px 13px;
    font-family: var(--fonte-ui);
    font-size: 13.5px;
    outline: none;
}

.filtros input:focus, .filtros select:focus { border-color: var(--amber); }

.paginacao { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }

.paginacao a, .paginacao span {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mudo);
}

.paginacao a:hover { border-color: var(--apagado); color: var(--texto); }

.paginacao .atual { background: var(--amber-soft); border-color: rgba(245, 166, 35, .5); color: var(--amber-forte); }

.chave { position: relative; display: inline-block; width: 40px; height: 22px; }

.chave input { opacity: 0; width: 0; height: 0; }

.chave .trilho {
    position: absolute;
    inset: 0;
    background: var(--raise);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    transition: all .16s;
}

.chave .trilho:before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    left: 3px;
    top: 2.6px;
    background: var(--apagado);
    border-radius: 50%;
    transition: all .16s;
}

.chave input:checked + .trilho { background: var(--amber-soft); border-color: rgba(245, 166, 35, .55); }

.chave input:checked + .trilho:before { transform: translateX(17px); background: var(--amber); box-shadow: 0 0 8px rgba(245, 166, 35, .7); }

.chave input:focus-visible + .trilho { box-shadow: 0 0 0 3px rgba(245, 166, 35, .25); }

.medidor { background: var(--bg); border-radius: 999px; height: 7px; overflow: hidden; min-width: 90px; }

.medidor i { display: block; height: 100%; background: linear-gradient(90deg, #C77E12, var(--amber)); border-radius: 999px; }

.login-corpo {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--bg);
}

.login-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 52px;
    background:
        radial-gradient(900px 500px at -10% 110%, rgba(245, 166, 35, .13), transparent 60%),
        linear-gradient(160deg, #111930 0%, #0C111D 70%);
    border-right: 1px solid var(--line-soft);
    overflow: hidden;
}

.login-hero .marca { padding: 0; }

.login-frase {
    font-family: var(--fonte-display);
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 700;
    line-height: 1.18;
    max-width: 480px;
}

.login-frase em { font-style: normal; color: var(--amber-forte); }

.login-sub { color: var(--mudo); margin-top: 14px; max-width: 430px; font-size: 14.5px; }

.eq {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 64px;
    opacity: .9;
}

.eq i {
    flex: 0 0 8px;
    background: linear-gradient(180deg, var(--amber), rgba(245, 166, 35, .25));
    border-radius: 4px 4px 0 0;
    animation: eq-sobe 1.6s ease-in-out infinite;
    transform-origin: bottom;
}

@keyframes eq-sobe {
    0%, 100% { transform: scaleY(.28); }
    50% { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
    .eq i { animation: none; transform: scaleY(.6); }
}

.login-form-lado { display: flex; align-items: center; justify-content: center; padding: 40px 26px; }

.login-caixa { width: 100%; max-width: 400px; }

.login-caixa h1 { font-family: var(--fonte-display); font-size: 22px; font-weight: 700; margin-bottom: 4px; }

.login-caixa .sub { color: var(--mudo); margin-bottom: 26px; font-size: 14px; }

.login-abas { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 4px; margin-bottom: 22px; }

.login-abas button {
    flex: 1;
    background: none;
    border: none;
    color: var(--mudo);
    font-family: var(--fonte-ui);
    font-size: 13.5px;
    font-weight: 600;
    padding: 9px;
    border-radius: 8px;
    cursor: pointer;
    transition: all .14s;
}

.login-abas button.ativa { background: var(--amber); color: #16130A; }

.login-caixa .campo { margin-bottom: 15px; }

.login-caixa .btn { width: 100%; justify-content: center; padding: 12px; font-size: 14.5px; margin-top: 4px; }

.login-pe { margin-top: 26px; text-align: center; font-size: 12.5px; color: var(--apagado); }

@media (max-width: 980px) {
    .grade-2 { grid-template-columns: 1fr; }
    .login-corpo { grid-template-columns: 1fr; }
    .login-hero { display: none; }
}

@media (max-width: 860px) {
    .side {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 30px 0 60px rgba(0, 0, 0, .5);
    }
    .side.aberta { transform: translateX(0); }
    .menu-btn { display: inline-flex; }
    .topo { padding: 15px 18px; }
    .conteudo { padding: 20px 18px 44px; }
    .form-grade { grid-template-columns: 1fr; }
}
