:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #657184;
    --line: #d9dee7;
    --brand: #155e75;
    --brand-2: #0f766e;
    --danger: #b91c1c;
    --ok: #166534;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.topbar-inner,
.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
}

.brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.container {
    padding: 24px 0 48px;
}

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

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}

.button.secondary {
    background: #ffffff;
    color: var(--brand);
}

.button:hover,
button:hover {
    text-decoration: none;
    filter: brightness(0.96);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 18px;
}

.page-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.2;
}

h1 {
    font-size: 26px;
}

h2 {
    font-size: 18px;
    margin-bottom: 14px;
}

h3 {
    font-size: 15px;
    margin: 18px 0 8px;
}

.muted {
    color: var(--muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }

label span,
.field-label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 700;
    font-size: 13px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cfd6e0;
    border-radius: 6px;
    padding: 9px 10px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
}

textarea {
    resize: vertical;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
}

.option input {
    width: auto;
    min-height: auto;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 11px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #eef6f7;
    color: #164e63;
    font-size: 13px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 12px;
    font-weight: 700;
}

.badge.urgente {
    background: #fee2e2;
    color: var(--danger);
}

.alert {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #7f1d1d;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: var(--ok);
}

.detail-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 10px 16px;
}

.detail-grid dt {
    color: var(--muted);
    font-weight: 700;
}

.detail-grid dd {
    margin: 0;
    white-space: pre-wrap;
}

.empty {
    color: var(--muted);
    padding: 20px;
    text-align: center;
}

@media (max-width: 760px) {
    .topbar-inner,
    .page-title {
        flex-direction: column;
        align-items: stretch;
    }

    .col-3,
    .col-4,
    .col-6 {
        grid-column: span 12;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

