@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --azul: #3299ff;
    --azul-escuro: #007bff;
    --fundo: #f8fafc;
    --texto: #1e293b;
    --cinza: #64748b;
    --borda: #dbe4f0;
    --card: #ffffff;
    --sombra: 0 8px 24px rgba(15, 23, 42, 0.08);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: var(--fundo);
    color: var(--texto);
}

/* TOPO PADRÃO */
.topbar {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #edf2f7;
    padding: 28px 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo-box img {
    width: 105px;
    max-height: 105px;
    object-fit: contain;
}

.page-title {
    border-left: 6px solid var(--azul);
    padding-left: 20px;
}

.page-title h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    text-transform: uppercase;
    color: #0f172a;
}

.page-title p {
    margin: 6px 0 0;
    color: var(--cinza);
    font-size: 13px;
    font-weight: 600;
}

.top-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-top,
button {
    border: 1px solid var(--borda);
    background: #fff;
    color: #334155;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: .2s;
}

.btn-top:hover,
button:hover {
    border-color: var(--azul);
    color: var(--azul-escuro);
    transform: translateY(-1px);
}

/* CONTEÚDO */
.container {
    width: calc(100% - 28px);
    margin: 18px auto;
    background: transparent;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    border: 1px solid #eef2f7;
    padding: 22px;
    margin-bottom: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    margin-bottom: 6px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--borda);
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    background: #fff;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--azul);
    box-shadow: 0 0 0 3px rgba(50,153,255,.12);
}

/* BOTÕES */
.btn-primary {
    background: var(--azul);
    color: #fff;
    border-color: var(--azul);
}

.btn-primary:hover {
    background: var(--azul-escuro);
    color: #fff;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

/* TABELA */
.table-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--borda);
    overflow: hidden;
    box-shadow: var(--sombra);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

thead {
    background: #f1f5f9;
}

th {
    padding: 14px 12px;
    font-size: 11px;
    text-transform: uppercase;
    color: #334155;
    letter-spacing: .04em;
}

td {
    padding: 13px 12px;
    border-top: 1px solid #e5edf6;
    font-size: 13px;
    color: #334155;
}

tr:hover td {
    background: #f8fbff;
}

/* CARDS RESUMO */
.resumo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.resumo-item {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--sombra);
    border-bottom: 4px solid #cbd5e1;
}

.resumo-item strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
}

.resumo-item span {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
}

.resumo-azul {
    background: var(--azul);
}

.resumo-azul strong,
.resumo-azul span {
    color: #fff;
}

/* RESPONSIVO */
@media (max-width: 900px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .resumo-grid {
        grid-template-columns: 1fr;
    }

    .page-title h1 {
        font-size: 24px;
    }
}