:root {
    --app-navy: #122238;
    --app-blue: #2357d9;
    --app-bg: #f3f5f8;
    --app-border: #dfe4ea;
    --app-text: #1b2737;
}

body {
    background: var(--app-bg);
    color: var(--app-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container { max-width: 1480px; }
.app-navbar { background: var(--app-navy); min-height: 70px; }
.navbar-brand { line-height: 1.05; }
.navbar-brand small { font-size: .7rem; font-weight: 400; color: rgba(255,255,255,.58); margin-top: .2rem; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #fff; color: var(--app-navy); font-size: .85rem; font-weight: 800; letter-spacing: .04em; }

main { flex: 1; }
.eyebrow, .section-label { color: #5c6b7c; font-size: .73rem; font-weight: 800; letter-spacing: .11em; }
.page-title { font-weight: 750; letter-spacing: -.025em; }
.panel { background: #fff; border: 1px solid var(--app-border); border-radius: 14px; padding: 1.25rem; box-shadow: 0 4px 18px rgba(18,34,56,.045); }

.metric-card { height: 100%; background: #fff; border: 1px solid var(--app-border); border-left: 4px solid var(--app-blue); border-radius: 12px; padding: 1.1rem 1.25rem; }
.metric-card span { display: block; color: #697586; font-size: .82rem; font-weight: 650; }
.metric-card strong { display: block; font-size: 1.9rem; line-height: 1.15; margin-top: .2rem; }
.metric-success { border-left-color: #198754; }
.metric-muted { border-left-color: #85909e; }

.form-label { font-size: .84rem; font-weight: 700; }
.form-control, .form-select { border-color: #ccd3dc; }
.form-control:focus, .form-select:focus { border-color: #6b8fe8; box-shadow: 0 0 0 .2rem rgba(35,87,217,.12); }
.btn-primary { --bs-btn-bg: var(--app-blue); --bs-btn-border-color: var(--app-blue); --bs-btn-hover-bg: #1948bd; --bs-btn-hover-border-color: #1948bd; }

.table-heading { padding: 1rem 1.25rem; border-bottom: 1px solid var(--app-border); }
.table-heading span { color: #6b7583; font-size: .84rem; }
.operational-table thead th { background: #f7f8fa; color: #5d6978; border-bottom-width: 1px; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; padding: .85rem 1rem; }
.operational-table tbody td { border-color: #edf0f3; font-size: .87rem; padding: .85rem 1rem; }
.operational-table tbody tr:last-child td { border-bottom: 0; }
.status-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .3rem .65rem; font-size: .75rem; font-weight: 750; }
.status-active { background: #dff5e8; color: #12633a; }
.status-inactive { background: #e9ecef; color: #53606e; }
.empty-state { text-align: center; padding: 4rem 1rem; }

.form-shell { max-width: 980px; margin-inline: auto; }
.form-panel { padding: 1.5rem; }
.section-label { border-bottom: 1px solid #e7eaf0; padding-bottom: .55rem; margin-bottom: .9rem; }
.back-link { color: #526174; font-size: .86rem; font-weight: 650; text-decoration: none; }
.back-link:hover { color: var(--app-blue); }
.error-panel { max-width: 540px; background: #fff; border: 1px solid var(--app-border); border-radius: 16px; padding: 3rem 2rem; margin-top: 3rem; }
.error-code { color: var(--app-blue); font-weight: 800; letter-spacing: .08em; margin-bottom: .5rem; }
.app-footer { color: #7b8592; font-size: .78rem; padding: 1rem 0 1.5rem; }
.campaign-form-shell { max-width: 1120px; }
.selection-summary { background: #eef3ff; border: 1px solid #d4e0ff; border-radius: 10px; color: #244a9f; font-weight: 700; padding: .9rem 1rem; }
.manual-selection { border-top: 1px solid var(--app-border); margin-top: 1rem; padding-top: 1rem; }
.provider-grid { border: 1px solid var(--app-border); border-radius: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 390px; overflow-y: auto; }
.provider-option { align-items: flex-start; border-bottom: 1px solid #edf0f3; cursor: pointer; display: flex; gap: .7rem; padding: .75rem .9rem; }
.provider-option:nth-child(odd) { border-right: 1px solid #edf0f3; }
.provider-option:hover { background: #f7f9fc; }
.provider-option strong, .provider-option small { display: block; }
.provider-option strong { font-size: .82rem; }
.provider-option small { color: #6b7583; margin-top: .12rem; }
.operation-date { background: #f7f8fa; border: 1px solid var(--app-border); border-radius: 10px; padding: .9rem 1rem; }
.operation-date strong, .operation-date span { display: block; }
.operation-date span { color: #66717f; font-size: .82rem; margin-top: .2rem; }
.campaign-provider-list { max-height: 520px; }
.confirmation-total { font-size: 1.65rem; letter-spacing: -.02em; }
.status-pending { background: #fff1cc; color: #795600; }
.dashboard-context { background: #eaf0fa; border-left: 4px solid var(--app-blue); border-radius: 8px; color: #536276; font-size: .83rem; padding: .75rem 1rem; }
.metric-card small { color: #7a8491; display: block; font-size: .72rem; margin-top: .15rem; }
.metric-danger { border-left-color: #dc3545; }
.metric-warning { border-left-color: #d89b00; }
.metric-pending { border-left-color: #d3a62b; }
.dashboard-table { min-width: 1280px; }

@media (max-width: 767.98px) {
    .app-navbar { min-height: 62px; }
    .page-title { font-size: 1.7rem; }
    .panel { border-radius: 11px; }
    .form-panel { padding: 1rem; }
    .operational-table { min-width: 980px; }
    .provider-grid { grid-template-columns: 1fr; }
    .provider-option:nth-child(odd) { border-right: 0; }
}

/* Acesso publico, prioritariamente para celular. */
.public-body { background: #eef2f6; min-height: 100vh; }
.public-container { margin-inline: auto; max-width: 760px; padding-inline: 1rem; width: 100%; }
.public-header { background: var(--app-navy); color: #fff; padding: .9rem 0; }
.public-header strong, .public-header small { display: block; }
.public-header strong { font-size: .95rem; }
.public-header small { color: rgba(255,255,255,.62); font-size: .7rem; margin-top: .1rem; }
.public-main { flex: 1; padding-block: 2rem; }
.public-card { background: #fff; border: 1px solid var(--app-border); border-radius: 16px; box-shadow: 0 8px 28px rgba(18,34,56,.07); padding: 1.4rem; }
.identity-card { margin: 5vh auto 0; max-width: 520px; padding: 2rem; }
.public-step { color: #59708e; font-size: .72rem; font-weight: 800; letter-spacing: .11em; margin-bottom: .5rem; }
.public-card h1, .public-welcome h1 { font-size: 1.75rem; font-weight: 760; letter-spacing: -.025em; }
.public-lead { color: #647184; }
.public-phone-input { font-size: 1.2rem; min-height: 56px; }
.public-primary-button { font-size: 1.1rem; font-weight: 700; min-height: 54px; }
.public-help { color: #6f7a88; font-size: .82rem; margin: 1rem auto 0; max-width: 520px; text-align: center; }
.public-footer { color: #7d8794; font-size: .72rem; padding-bottom: 1.5rem; text-align: center; }
.campaign-public-card h2 { font-size: 1.18rem; font-weight: 750; }
.deadline-label { color: #6a7583; font-size: .73rem; text-align: right; }
.public-date-list { border: 1px solid var(--app-border); border-radius: 12px; overflow: hidden; }
.public-date-row { align-items: center; display: flex; gap: .8rem; padding: .85rem; }
.public-date-row + .public-date-row { border-top: 1px solid var(--app-border); }
.public-date-row .flex-grow-1 strong, .public-date-row .flex-grow-1 span { display: block; }
.public-date-row .flex-grow-1 span { color: #6c7785; font-size: .8rem; margin-top: .1rem; }
.date-calendar { background: #edf3ff; border-radius: 9px; color: #214da9; min-width: 58px; padding: .45rem; text-align: center; }
.date-calendar strong, .date-calendar span { display: block; }
.date-calendar strong { font-size: 1.15rem; line-height: 1; }
.date-calendar span { font-size: .66rem; margin-top: .2rem; }
.public-next-step { background: #f5f7fa; border-radius: 9px; color: #687483; font-size: .78rem; padding: .75rem; }
.empty-icon { background: #def5e7; border-radius: 50%; color: #197448; display: grid; font-size: 1.25rem; height: 48px; margin: auto; place-items: center; width: 48px; }
.public-response-block + .public-response-block { border-top: 1px solid var(--app-border); }
.public-response-block .public-date-row { border: 0; }
.response-options { display: grid; gap: .55rem; grid-template-columns: repeat(3, 1fr); padding: 0 .85rem .9rem; }
.response-button { border: 2px solid #d5dbe3; border-radius: 10px; color: #445064; cursor: pointer; font-size: .86rem; font-weight: 800; padding: .75rem .35rem; text-align: center; transition: all .15s ease; }
.response-button:hover { background: #f5f7fa; }
.btn-check:focus + .response-button { box-shadow: 0 0 0 .2rem rgba(35,87,217,.14); }
.btn-check:checked + .response-button-sim { background: #dcf5e6; border-color: #198754; color: #12643b; }
.btn-check:checked + .response-button-nao { background: #fde3e5; border-color: #dc3545; color: #9b2330; }
.btn-check:checked + .response-button-talvez { background: #fff0c7; border-color: #d89b00; color: #795600; }
.response-sim { background: #dcf5e6; color: #12643b; }
.response-nao { background: #fde3e5; color: #9b2330; }
.response-talvez { background: #fff0c7; color: #795600; }
.response-help { color: #747f8d; font-size: .73rem; text-align: center; }

@media (max-width: 575.98px) {
    .public-main { padding-block: 1.25rem; }
    .identity-card { margin-top: 2vh; padding: 1.35rem; }
    .public-card h1, .public-welcome h1 { font-size: 1.45rem; }
    .public-card { border-radius: 13px; padding: 1rem; }
    .deadline-label { text-align: left; }
    .public-date-row { padding: .75rem .65rem; }
    .response-options { padding-inline: .65rem; }
    .response-button { min-height: 48px; padding-top: .7rem; }
}
