* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f2f4f7;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #1f2937;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 32px;
    max-width: 640px;
    margin: 0 auto;
}

.card-auth {
    max-width: 420px;
    margin: 8vh auto 0;
}

.card-largo {
    max-width: 1000px;
}

.nav-app {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d1d5db;
}

.nav-app a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-app a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 1.25rem;
    margin: 0 0 4px;
    color: #4f46e5;
}

h2 {
    font-size: 1.5rem;
    margin: 0 0 24px;
}

.cabecalho-lista {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.cabecalho-lista h2 {
    margin: 0;
}

.campo {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.linha-campos {
    display: flex;
    gap: 16px;
}

.linha-campos .campo {
    flex: 1;
}

.campo label {
    font-size: 0.875rem;
    margin-bottom: 6px;
    color: #374151;
}

.campo input,
.campo textarea,
.campo select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    background: #fff;
}

.campo input:focus,
.campo textarea:focus,
.campo select:focus {
    outline: none;
    border-color: #4f46e5;
}

.subtitulo {
    margin: -12px 0 24px;
    color: #6b7280;
    font-size: 0.9rem;
}

.separador {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 32px 0 24px;
}

.erro-campo {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 4px;
}

.botao {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 8px;
    text-align: center;
    text-decoration: none;
}

.botao:hover {
    background: #4338ca;
}

.botao-link {
    width: auto;
    margin-top: 0;
    padding: 10px 18px;
}

.rodape-card {
    margin-top: 20px;
    font-size: 0.875rem;
    text-align: center;
}

.rodape-card a {
    color: #4f46e5;
}

.flash-lista {
    margin-bottom: 16px;
}

.flash {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.flash-erro {
    background: #fee2e2;
    color: #991b1b;
}

.flash-aviso {
    background: #fef3c7;
    color: #92400e;
}

.flash-sucesso {
    background: #d1fae5;
    color: #065f46;
}

.busca-form {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.busca-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}

.busca-form select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.busca-form button {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background: #4f46e5;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
}

.link-limpar {
    display: flex;
    align-items: center;
    color: #6b7280;
    font-size: 0.875rem;
    text-decoration: none;
    white-space: nowrap;
}

.link-limpar:hover {
    text-decoration: underline;
}

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

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

.tabela th,
.tabela td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
    white-space: nowrap;
}

.tabela th {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tabela a {
    color: #4f46e5;
    text-decoration: none;
}

.tabela a:hover {
    text-decoration: underline;
}

.link-perigo {
    color: #dc2626;
}

.linha-atrasada {
    background: #fef2f2;
}

.linha-atrasada td {
    color: #991b1b;
}

.etiqueta-atrasada {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
}

.acoes-detalhe {
    display: flex;
    gap: 10px;
}

.botao-perigo {
    background: #dc2626;
}

.botao-perigo:hover {
    background: #b91c1c;
}

.detalhe-lista {
    display: grid;
    grid-template-columns: 160px 1fr;
    row-gap: 14px;
    column-gap: 16px;
    margin: 0 0 24px;
}

.detalhe-lista dt {
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.detalhe-lista dd {
    margin: 0;
}

.pre-linha {
    white-space: pre-wrap;
}
