*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0; 
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1d26;
    background: #eef2f9;
}

input,
button, 
select,
textarea {
    font: inherit;
}

/* Banner */
.hero {
    position: relative;
    min-height: 220px;
    height: 30vw;
    max-height: 340px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e4a8a 0%, #2c6fbd 50%, #4a90d9 100%);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center;
    opacity: 0.94;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 40, 85, 0.75) 0%, rgba(15, 40, 85, 0.35) 55%, transparent 100%);
    pointer-events: none;
}

.hero-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem clamp(1rem, 4vw, 3rem);
    max-width: 720px;
}

.hero-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    letter-spacing: -0.02em;
}

.hero-sub {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: stretch;
    margin: -2.5rem auto 1rem;
    padding: 1rem;
    max-width: 920px;
    position: relative;
    z-index: 2;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(15, 35, 95, 0.12);
}

.search-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.98));
    z-index: -1;
}

.search-bar label:not(.sr-only) {
    width: 100%;
    margin: 0 0 -0.1rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #29436f;
}

.search-bar input[type="search"] {
    flex: 1 1 220px;
    min-width: 0;
    height: 50px;
    padding: 0 1rem;
    appearance: none;
    -webkit-appearance: none;
    background: #f8fbff;
    border: 1px solid #c7d6ee;
    border-radius: 12px;
    font-size: 1rem;
    color: #1a1d26;
    box-shadow: inset 0 1px 2px rgba(16, 34, 71, 0.05);
}

.search-bar input[type="search"]::placeholder {
    color: #7a859c;
}

.search-bar input:focus {
    outline: 2px solid #3b6fd9;
    outline-offset: 1px;
    border-color: #3b6fd9;
    background: #fff;
}

.search-bar .btn.primary {
    flex: 0 0 auto;
    min-width: 120px;
}

.search-bar .btn.ghost {
    flex: 0 0 auto;
}

.muted {
    margin: 0;
    color: #5c6478;
    font-size: 0.95rem;
}

.pad {
    padding: 1.5rem;
}

.result-meta {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: #5c6478;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(15, 35, 95, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.table-card {
    overflow: hidden;
    max-width: 1080px;
    margin: 0 auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.15rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn.primary {
    background: linear-gradient(180deg, #3b6fd9 0%, #2c58b8 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(44, 88, 184, 0.3);
}

.btn.primary:hover {
    filter: brightness(1.05);
}

.btn.ghost {
    background: #fff;
    color: #2c58b8;
    border: 1px solid #c9d4e8;
}

.btn.ghost:hover {
    background: #f0f5ff;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.alert-erro {
    background: #fff0f0;
    color: #a32020;
    border: 1px solid #f0c4c4;
}

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

table.grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

table.grid th,
table.grid td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid #e8ecf4;
    vertical-align: top;
}

table.grid th {
    background: #f4f7fd;
    font-weight: 600;
    white-space: nowrap;
}

table.grid tbody tr:hover {
    background: #fafbfd;
}

.nowrap {
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.st-ok {
    background: #e6f7ed;
    color: #0d6b3a;
}

.st-neutro {
    background: #eef1f8;
    color: #3d4a63;
}

.st-muted {
    background: #f0f0f0;
    color: #666;
}

@media (max-width: 640px) {
    .hero {
        min-height: 170px;
        height: 170px;
    }

    .page {
        padding-top: 1rem;
    }

    .search-bar {
        margin-top: -1.2rem;
        padding: 0.9rem;
        border-radius: 16px;
    }

    .search-bar .btn.primary {
        width: 100%;
    }
}
