:root {
    --amarelo: #f8d300;
    --fundo: #0e0e13;
    --cartao: #18181f;
    --borda: #2c2c36;
    --texto: #f2f2f2;
    --apagado: #9a9aa6;
    --verde: #3fb950;
    --vermelho: #e5534b;
}

* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    background: var(--fundo);
    color: var(--texto);
}
a {
    color: var(--amarelo);
}
h1 {
    font-size: 1.6rem;
    margin: 0 0 1rem;
}
h2 {
    font-size: 1.15rem;
    margin: 0 0 0.8rem;
}
small,
.dica {
    color: var(--apagado);
}
.dica {
    font-size: 0.9rem;
    margin: 0 0 1rem;
}
code {
    background: #000;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 1.05rem;
    color: var(--amarelo);
}
[hidden] {
    display: none !important;
}

/* ---------- Topo e menu ---------- */

.topo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    padding: 0.8rem 1.5rem;
    background: #000;
    border-bottom: 1px solid var(--borda);
}
.marca {
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}
#menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    flex: 1;
}
#menu a {
    color: var(--texto);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
}
#menu a:hover,
#menu a.ativo {
    background: var(--amarelo);
    color: #000;
}
.menu-botao {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--borda);
    color: var(--texto);
    font-size: 1.3rem;
    padding: 0.2rem 0.7rem;
    border-radius: 6px;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ---------- Blocos ---------- */

.cartao {
    background: var(--cartao);
    border: 1px solid var(--borda);
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.2rem;
}
.cabecalho-pagina {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.cabecalho-pagina h1 {
    margin: 0;
}
.colunas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}
.colunas .cartao {
    margin-bottom: 0;
}
.colunas + .cartao {
    margin-top: 1.2rem;
}
.atalhos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}
.atalho {
    flex: 1 1 12rem;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.2rem;
    background: var(--cartao);
    border: 1px solid var(--borda);
    border-radius: 10px;
    color: var(--texto);
    text-decoration: none;
    font-weight: 600;
}
.atalho:hover {
    border-color: var(--amarelo);
}
.vazio {
    color: var(--apagado);
    margin: 0;
}
.lista-simples {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lista-simples li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--borda);
}
.lista-simples li:last-child {
    border-bottom: 0;
}

/* ---------- Avisos e etiquetas ---------- */

.aviso {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}
.aviso-sucesso {
    background: rgba(63, 185, 80, 0.12);
    border-color: var(--verde);
}
.aviso-erro {
    background: rgba(229, 83, 75, 0.12);
    border-color: var(--vermelho);
}
.aviso-alerta {
    background: rgba(248, 211, 0, 0.1);
    border-color: var(--amarelo);
}
.etiqueta {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.05rem 0.5rem;
    border-radius: 99px;
    background: rgba(248, 211, 0, 0.15);
    color: var(--amarelo);
    vertical-align: middle;
    margin-left: 0.3rem;
}
.etiqueta-verde {
    background: rgba(63, 185, 80, 0.15);
    color: var(--verde);
}
.etiqueta-vermelha {
    background: rgba(229, 83, 75, 0.18);
    color: var(--vermelho);
}

/* ---------- Tabelas ---------- */

.tabela {
    width: 100%;
    border-collapse: collapse;
}
.tabela th {
    text-align: left;
    font-weight: 600;
    color: var(--apagado);
    font-size: 0.85rem;
    padding: 0 0.5rem 0.4rem;
}
.tabela td {
    padding: 0.55rem 0.5rem;
    border-top: 1px solid var(--borda);
    vertical-align: middle;
}
.tabela a {
    text-decoration: none;
}
.nao-quebra {
    white-space: nowrap;
}
.centro {
    text-align: center;
}
.em-falta td,
.tabela-apagada {
    opacity: 0.6;
}
.acoes-linha {
    white-space: nowrap;
    text-align: right;
}
.acoes-linha form {
    display: inline;
}
.busca {
    width: 100%;
    margin-bottom: 1.2rem;
}

/* ---------- Botões ---------- */

.botao,
.botao-pequeno {
    display: inline-block;
    font: inherit;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    border: 1px solid var(--amarelo);
    background: var(--amarelo);
    color: #000;
}
.botao {
    padding: 0.6rem 1.3rem;
}
.botao-secundario {
    background: transparent;
    color: var(--texto);
    border-color: var(--borda);
}
.botao-perigo {
    background: transparent;
    color: var(--vermelho);
    border-color: var(--vermelho);
    margin-left: auto;
}
.botao-pequeno {
    padding: 0.25rem 0.7rem;
    font-size: 0.85rem;
    background: transparent;
    color: var(--texto);
    border-color: var(--borda);
}
.botao-pequeno:hover:not(:disabled) {
    border-color: var(--amarelo);
}
.botao-pequeno:disabled {
    opacity: 0.3;
    cursor: default;
}
.botao-pequeno-verde {
    color: var(--verde);
    border-color: var(--verde);
}

/* ---------- Formulários ---------- */

.formulario label,
.login label,
.formulario-estreito label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
}
.formulario label small,
.formulario-estreito label small {
    font-weight: 400;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="search"],
select,
textarea {
    display: block;
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.6rem 0.7rem;
    font: inherit;
    font-weight: 400;
    color: var(--texto);
    background: var(--fundo);
    border: 1px solid var(--borda);
    border-radius: 8px;
}
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--amarelo);
    outline-offset: -1px;
}
input[type="date"] {
    color-scheme: dark;
}
input[type="file"] {
    font: inherit;
    margin-bottom: 0.3rem;
}
.formulario label.opcao,
.formulario-estreito label.opcao,
label.opcao {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    margin-bottom: 0.6rem;
}
label.opcao input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--amarelo);
}
fieldset {
    border: 1px solid var(--borda);
    border-radius: 8px;
    padding: 1rem 1.2rem 0.4rem;
    margin: 0 0 1.2rem;
}
legend {
    font-weight: 700;
    padding: 0 0.4rem;
    color: var(--amarelo);
}
.campos-duplos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}
.campos-icone {
    grid-template-columns: 7rem 1fr;
}
.sabores-campos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}
input[type="color"] {
    display: block;
    width: 5rem;
    height: 2.4rem;
    margin-top: 0.3rem;
    padding: 0.15rem;
    background: var(--fundo);
    border: 1px solid var(--borda);
    border-radius: 8px;
}
.amostra-cor {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    margin-right: 0.3rem;
    vertical-align: middle;
}
.caracteristicas-campos {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.5rem;
}
.sabor-campo {
    margin-bottom: 1rem;
}
.sabor-campo label {
    margin-bottom: 0.4rem;
}
.previa {
    display: block;
    max-width: 260px;
    max-height: 180px;
    border-radius: 8px;
    margin-bottom: 0.6rem;
}
.previa-logo {
    max-width: 100px;
    max-height: 100px;
}
.acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}
.formulario-estreito {
    max-width: 520px;
}
.tabela-horarios input {
    margin: 0;
}
.tabela-horarios td {
    border-top: 0;
    padding: 0.25rem;
}

/* ---------- Login ---------- */

.login {
    max-width: 380px;
    margin: 12vh auto 0;
}
.login h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}
.login .botao {
    width: 100%;
}
.voltar-site {
    text-align: center;
    margin: 1rem 0 0;
    font-size: 0.9rem;
}
.senha-gerada {
    border-color: var(--verde);
    max-width: 520px;
}

/* ---------- Celular ---------- */

@media (max-width: 720px) {
    main {
        padding: 1rem;
    }
    .menu-botao {
        display: block;
    }
    #menu {
        display: none;
        flex-direction: column;
        flex-basis: 100%;
    }
    #menu.aberto {
        display: flex;
    }
    .colunas,
    .campos-duplos,
    .sabores-campos {
        grid-template-columns: 1fr;
    }
    .campos-icone {
        grid-template-columns: 5rem 1fr;
    }
    /* Tabelas viram blocos empilhados */
    .tabela:not(.tabela-horarios) tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.3rem 0.8rem;
        padding: 0.6rem 0;
        border-top: 1px solid var(--borda);
    }
    .tabela:not(.tabela-horarios) thead {
        display: none;
    }
    .tabela:not(.tabela-horarios) td {
        border: 0;
        padding: 0;
    }
    .tabela:not(.tabela-horarios) td:first-child {
        flex-basis: 100%;
    }
    .acoes-linha {
        margin-left: auto;
    }
    .tabela-horarios thead {
        display: none;
    }
    .tabela-horarios tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
        padding-bottom: 0.8rem;
        margin-bottom: 0.8rem;
        border-bottom: 1px solid var(--borda);
    }
    .tabela-horarios td:nth-child(3) {
        grid-column: 1 / -1;
    }
    .tabela-horarios td.centro::before {
        content: "Remover ";
        color: var(--apagado);
    }
}
