/**
 * Componente: Forms
 * ─────────────────────────────────────────────────────────────────────────────
 * Estilos para formulários: inputs, labels, botões, selects, textareas.
 *
 * Classes utilitárias:
 *   .form-pair     → 2 campos lado a lado
 *   .form-actions  → linha de botões de ação (direita)
 */

/* ── Layout de formulário ────────────────────────────────────────────────── */

form {
    display: grid;
    gap: 14px;
}

/* ── Label ───────────────────────────────────────────────────────────────── */

label {
    color: var(--muted);
    display: grid;
    font-size: 11px;
    font-weight: 800;
    gap: 5px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ── Campos de entrada ───────────────────────────────────────────────────── */

input,
select,
textarea {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    font: inherit;
    min-height: 42px;
    outline: none;
    padding: 10px 14px;
    transition: border-color var(--transition),
                box-shadow var(--transition),
                background var(--transition);
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(215, 25, 32, .10);
}

input::placeholder,
textarea::placeholder {
    color: var(--ink-light);
    opacity: 1;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* ── Botões ──────────────────────────────────────────────────────────────── */

button,
.btn {
    background: var(--primary);
    border: 0;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(215, 25, 32, .20);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    min-height: 40px;
    padding: 10px 18px;
    transition: background var(--transition), box-shadow var(--transition);
}

button:hover,
.btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(215, 25, 32, .30);
}

button:focus-visible,
.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(215, 25, 32, .30);
    outline: none;
}

/* Botão neutro (ação secundária) */
.small-action {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: none;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    text-decoration: none;
    transition: all var(--transition);
}

.small-action:hover {
    background: var(--line);
    color: var(--ink);
}

/* Botão de perigo (excluir) */
.danger-button {
    align-items: center;
    background: rgba(185,28,28,.1);
    border: 0;
    border-radius: var(--radius-sm);
    box-shadow: none;
    color: var(--danger);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    transition: background var(--transition);
}

.danger-button:hover {
    background: rgba(185,28,28,.18);
}

/* Link estilizado como botão */
.button-link {
    align-items: center;
    background: var(--primary);
    border-radius: var(--radius);
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    min-height: 40px;
    padding: 10px 16px;
    text-decoration: none;
    transition: background var(--transition);
}

.button-link:hover { background: var(--primary-dark); }

/* ── Utilidades de layout de form ────────────────────────────────────────── */

.form-pair {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
}

.form-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ── Filtros (pills de filtro) ───────────────────────────────────────────── */

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

.filters a {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    transition: all var(--transition);
}

.filters a.on,
.filters a:hover {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #fff;
}

/* ── Ações inline (dentro de tabelas) ───────────────────────────────────── */

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.actions form {
    display: inline-flex;
}
