:root {
    --bg: #f3f6f8;
    --surface: rgba(255,255,255,.94);
    --surface-border: rgba(18, 57, 82, .08);
    --brand: #0f5d75;
    --brand-strong: #0a4354;
    --accent: #d6851f;
    --text: #173042;
    --muted: #69808f;
    --shadow: 0 20px 45px rgba(17, 42, 58, .08);
}
html { font-size: 15px; }
body { margin: 0; font-family: "Segoe UI", "Trebuchet MS", sans-serif; color: var(--text); background: radial-gradient(circle at top left, rgba(15,93,117,.15), transparent 30%), linear-gradient(180deg, #edf3f6 0%, #f7fafb 100%); }
a { text-decoration: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 300px 1fr; }
.sidebar { background: linear-gradient(180deg, #0e3341 0%, #12374c 100%); color: #f7fbfc; padding: 2rem; display: flex; flex-direction: column; }
.brand-mark { display: inline-flex; padding: .35rem .65rem; border-radius: 999px; background: rgba(255,255,255,.12); font-weight: 700; letter-spacing: .08em; }
.sidebar h2 { margin: 1rem 0 .35rem; }
.sidebar p { color: rgba(255,255,255,.72); }
.sidebar .nav-link { color: #eff7fa; padding: .9rem 1rem; border-radius: 14px; background: rgba(255,255,255,.05); }
.sidebar .nav-link:hover { background: rgba(255,255,255,.12); }
.content-area { padding: 2rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.topbar span { display: block; color: var(--muted); }
.hero-panel, .surface-card, .filter-panel, .stat-card { background: var(--surface); border: 1px solid var(--surface-border); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.hero-panel { border-radius: 28px; padding: 2rem; display: flex; justify-content: space-between; gap: 1rem; align-items: end; background: linear-gradient(135deg, rgba(15,93,117,.95), rgba(18,55,76,.93)); color: white; }
.hero-panel p { max-width: 760px; color: rgba(255,255,255,.82); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; color: var(--accent); }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.page-header h1, .hero-panel h1 { margin: .4rem 0 0; font-size: 2rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.stat-card { border-radius: 22px; padding: 1.4rem; }
.stat-card span { color: var(--muted); display: block; margin-bottom: .7rem; }
.stat-card strong { font-size: 2rem; }
.stat-card.accent { background: linear-gradient(135deg, #d6851f, #bd6f11); color: white; }
.stat-card.accent span { color: rgba(255,255,255,.82); }
.dashboard-grid, .details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.surface-card, .filter-panel { border-radius: 24px; padding: 1.5rem; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; font-size: 1.15rem; }
.section-heading span, .section-heading a { color: var(--muted); }
.metric-list, .timeline-list { list-style: none; padding: 0; margin: 0; }
.metric-list li, .timeline-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid rgba(17,42,58,.08); }
.timeline-list li { flex-direction: column; }
.timeline-list small { color: var(--muted); }
.btn-brand { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: white; border: none; padding: .8rem 1.2rem; border-radius: 14px; }
.btn-brand:hover { color: white; opacity: .95; }
.btn,
.btn[class*="btn-outline-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 44px;
    line-height: 1.2;
    padding: 10px 16px;
    vertical-align: middle;
}

.btn-sm,
.btn-sm[class*="btn-outline-"] {
    min-height: 34px;
    padding: 6px 10px;
}
.status-pill { display: inline-flex; align-items: center; padding: .35rem .7rem; border-radius: 999px; background: rgba(15,93,117,.1); color: var(--brand-strong); font-weight: 600; }
.app-table thead th { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.app-table tbody td { padding-top: 1rem; padding-bottom: 1rem; }
.filter-panel .form-control, .filter-panel .form-select, .form-shell .form-control, .form-shell .form-select, .public-form-shell .form-control, .public-form-shell .form-select { border-radius: 14px; border-color: rgba(18,57,82,.12); min-height: 46px; }
.form-shell input[type="file"],
.public-form-shell input[type="file"] {
    min-height: 46px;
    line-height: 1.4;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.form-shell input[type="file"]::file-selector-button,
.public-form-shell input[type="file"]::file-selector-button {
    height: 46px;
    margin: 0 12px 0 0;
    padding: 0 14px;
    border: 0;
    border-right: 1px solid #d6e2ea;
    background: #eef2f5;
    color: #243746;
    cursor: pointer;
}

.form-shell input[type="file"]::-webkit-file-upload-button,
.public-form-shell input[type="file"]::-webkit-file-upload-button {
    height: 46px;
    margin: 0 12px 0 0;
    padding: 0 14px;
    border: 0;
    border-right: 1px solid #d6e2ea;
    background: #eef2f5;
    color: #243746;
    cursor: pointer;
}
.form-shell .surface-card + .surface-card { margin-top: 1.25rem; }
.form-actions { margin-top: 1.5rem; display: flex; justify-content: flex-end; gap: .75rem; }
.detail-list { display: grid; grid-template-columns: 180px 1fr; gap: .75rem 1rem; margin: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; }
.pagination-bar { margin-top: 1rem; display: flex; justify-content: space-between; align-items: center; }
.pagination-actions { display: flex; gap: .75rem; }
@media (max-width: 1100px) { .app-shell { grid-template-columns: 1fr; } .sidebar { padding: 1.5rem; } .stats-grid, .dashboard-grid, .details-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .content-area { padding: 1rem; } .hero-panel, .page-header, .topbar { flex-direction: column; align-items: start; } .detail-list { grid-template-columns: 1fr; } }
.user-panel { display: flex; align-items: center; gap: 1rem; }
.user-panel span { font-size: .9rem; }
.login-shell { min-height: calc(100vh - 120px); display: grid; place-items: center; }
.login-card { width: min(100%, 480px); background: rgba(255,255,255,.95); border: 1px solid rgba(18,57,82,.08); box-shadow: var(--shadow); border-radius: 28px; padding: 2rem; }
.login-card h1 { margin: .5rem 0 1rem; }
.login-card p { color: var(--muted); margin-bottom: 1.5rem; }
.login-help { margin-top: 1.5rem; display: flex; flex-direction: column; gap: .35rem; color: var(--muted); }
.login-help code { background: rgba(15,93,117,.08); color: var(--brand-strong); padding: .2rem .35rem; border-radius: 8px; }
.stats-grid-wide { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat-card.warning { background: linear-gradient(135deg, #f4efe6, #fff8ef); }
.dashboard-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bar-list { display: flex; flex-direction: column; gap: 1rem; }
.bar-row { display: flex; flex-direction: column; gap: .45rem; }
.bar-label { display: flex; justify-content: space-between; gap: 1rem; }
.bar-track { width: 100%; height: 10px; border-radius: 999px; background: rgba(15,93,117,.08); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0f5d75, #1f809d); }
.bar-fill.alt { background: linear-gradient(90deg, #d6851f, #efab49); }
.mini-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .9rem; align-items: end; min-height: 210px; }
.mini-bar-col { display: flex; flex-direction: column; align-items: center; justify-content: end; gap: .45rem; }
.mini-bar { width: 100%; max-width: 38px; border-radius: 12px 12px 4px 4px; background: linear-gradient(180deg, #0f5d75, #0a4354); box-shadow: inset 0 -6px 12px rgba(255,255,255,.08); }
.mini-bar-col strong { font-size: .95rem; }
.mini-bar-col span { color: var(--muted); font-size: .82rem; }
@media (max-width: 1400px) { .stats-grid-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dashboard-grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .stats-grid-wide { grid-template-columns: 1fr; } .mini-chart { grid-template-columns: repeat(7, minmax(34px, 1fr)); overflow-x: auto; padding-bottom: .5rem; } }
.sla-pill { display: inline-flex; align-items: center; padding: .35rem .7rem; border-radius: 999px; font-weight: 600; }
.sla-pill.ok { background: rgba(43,127,90,.12); color: #24694b; }
.sla-pill.warning { background: rgba(214,133,31,.16); color: #9a5d12; }
.sla-pill.danger { background: rgba(177,57,46,.12); color: #9c3028; }

.profile-grid { align-items: start; }

.audit-details { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: Consolas, 'Courier New', monospace; font-size: .82rem; max-width: 420px; }

.sla-settings-list { display: flex; flex-direction: column; gap: 1rem; }
.sla-setting-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(17,42,58,.08); }
.sla-setting-form { display: flex; align-items: center; gap: .75rem; min-width: 260px; }

.public-body { min-height: 100vh; background: linear-gradient(180deg, #eff4f6 0%, #f7fafb 100%); }
.public-shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 3rem; }
.public-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); gap: 1.25rem; align-items: stretch; margin-bottom: 1.5rem; }
.public-hero > div, .public-hero-badge, .public-confirmation-card { background: rgba(255,255,255,.95); border: 1px solid rgba(18,57,82,.08); box-shadow: var(--shadow); border-radius: 28px; padding: 2rem; }
.public-hero h1, .public-confirmation-card h1 { margin: .5rem 0 1rem; font-size: clamp(2rem, 4vw, 3rem); }
.public-hero p, .public-hero-badge span, .public-confirmation-card p { color: var(--muted); }
.public-hero-badge { background: linear-gradient(135deg, rgba(15,93,117,.96), rgba(18,55,76,.94)); color: white; display: flex; flex-direction: column; justify-content: end; }
.public-hero-badge span { color: rgba(255,255,255,.82); }
.public-form-shell { margin-bottom: 1rem; }
.public-card { padding: 1.75rem; }
.public-check { background: rgba(15,93,117,.05); border: 1px solid rgba(15,93,117,.09); border-radius: 16px; padding: .95rem 1rem; width: 100%; }
#occurrence-address-card.is-muted { opacity: .72; }
.public-actions { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.public-confirmation-card { width: min(760px, 100%); margin: 3rem auto; }
.protocol-highlight { margin: 1.5rem 0; padding: 1.15rem 1.5rem; border-radius: 22px; background: linear-gradient(135deg, #0f5d75, #0a4354); color: white; font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: .08em; text-align: center; }
.public-summary-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1.5rem; }
.public-summary-list div { padding: 1rem 1.1rem; border-radius: 18px; background: rgba(15,93,117,.05); }
.public-summary-list dt { color: var(--muted); margin-bottom: .35rem; }
.public-summary-list dd { margin: 0; font-weight: 600; }
.public-alert { border-radius: 18px; }
@media (max-width: 900px) { .public-hero { grid-template-columns: 1fr; } .public-summary-list { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .public-shell { width: min(100%, calc(100% - 1rem)); padding-top: 1rem; } .public-hero > div, .public-hero-badge, .public-confirmation-card { padding: 1.5rem; } .public-actions { flex-direction: column; } .public-actions .btn { width: 100%; } }

.public-hero-compact { margin-bottom: 1rem; }
.public-tracking-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.public-summary-list-single { grid-template-columns: 1fr; }
.public-description { margin: 0; line-height: 1.7; color: var(--text); }
.public-response-card { margin-top: 1.25rem; padding: 1rem 1.15rem; border-radius: 18px; background: rgba(15,93,117,.06); }
.public-response-card p { margin: .5rem 0 0; }
.public-timeline li { align-items: start; }
.public-timeline .status-pill { width: fit-content; }
@media (max-width: 900px) { .public-tracking-grid { grid-template-columns: 1fr; } }

.public-guidance-card { margin-top: 1rem; padding: 1rem 1.15rem; border-radius: 18px; border: 1px solid transparent; }
.public-guidance-card p { margin: .5rem 0 0; }
.public-guidance-card.ok { background: rgba(43,127,90,.08); border-color: rgba(43,127,90,.16); }
.public-guidance-card.warning { background: rgba(214,133,31,.10); border-color: rgba(214,133,31,.2); }
.public-guidance-card.danger { background: rgba(177,57,46,.08); border-color: rgba(177,57,46,.18); }

.public-progress-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.public-progress-step { position: relative; padding: 1.2rem; border-radius: 20px; background: rgba(15,93,117,.04); border: 1px solid rgba(15,93,117,.08); min-height: 160px; }
.public-progress-step strong { display: block; margin: .85rem 0 .45rem; font-size: 1rem; }
.public-progress-step p { margin: 0; color: var(--muted); line-height: 1.55; }
.public-progress-step.done { background: rgba(15,93,117,.08); border-color: rgba(15,93,117,.14); }
.public-progress-step.current { background: linear-gradient(135deg, rgba(15,93,117,.96), rgba(18,55,76,.94)); color: white; border-color: transparent; box-shadow: var(--shadow); }
.public-progress-step.current p { color: rgba(255,255,255,.84); }
.public-progress-index { display: inline-flex; width: 38px; height: 38px; border-radius: 999px; align-items: center; justify-content: center; background: white; color: var(--brand-strong); font-weight: 700; box-shadow: 0 10px 18px rgba(17,42,58,.08); }
.public-progress-step.current .public-progress-index { background: rgba(255,255,255,.14); color: white; box-shadow: none; border: 1px solid rgba(255,255,255,.22); }
.public-timeline-visual { list-style: none; margin: 0; padding: .5rem 0 0; position: relative; }
.public-timeline-entry { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 1rem; padding: 0 0 1.25rem; }
.public-timeline-entry:last-child { padding-bottom: 0; }
.public-timeline-entry::before { content: ''; position: absolute; left: 8px; top: 20px; bottom: -8px; width: 2px; background: rgba(15,93,117,.12); }
.public-timeline-entry:last-child::before { display: none; }
.public-timeline-dot { width: 18px; height: 18px; border-radius: 999px; background: linear-gradient(135deg, #0f5d75, #0a4354); margin-top: .2rem; box-shadow: 0 0 0 6px rgba(15,93,117,.08); }
.public-timeline-content { padding: .1rem 0 0; }
.public-timeline-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.public-timeline-content small { color: var(--muted); }
@media (max-width: 1100px) { .public-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .public-progress-grid { grid-template-columns: 1fr; } .public-timeline-topline { flex-direction: column; align-items: start; } }

.captcha-shell { display: flex; justify-content: center; padding: .5rem 0; }
.public-form-error.validation-summary-valid { display: none; }


.sidebar-brand { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-logo { width: 100%; max-width: 220px; height: auto; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,.12)); }
.sidebar-brand h2 { margin: 0; }

.login-logo { width: 100%; max-width: 280px; height: auto; display: block; margin: 0 auto 1rem; }

.public-brandbar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: rgba(247,250,251,.88); border-bottom: 1px solid rgba(18,57,82,.08); }
.public-brandbar-inner { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 1rem 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.public-brand-link { display: inline-flex; align-items: center; }
.public-logo { width: min(100%, 280px); height: auto; display: block; }
.public-brand-copy { display: flex; flex-direction: column; align-items: end; gap: .2rem; }
.public-brand-copy strong { font-size: 1rem; }
.public-brand-copy span { color: var(--muted); font-size: .92rem; }

@media (max-width: 768px) {
    .sidebar-logo { max-width: 180px; }
    .login-logo { max-width: 220px; }
    .public-brandbar-inner { width: min(100%, calc(100% - 1rem)); padding: .85rem 0; flex-direction: column; align-items: start; }
    .public-logo { width: min(100%, 220px); }
    .public-brand-copy { align-items: start; }
}

.public-hero-badge {
    position: relative;
    overflow: hidden;
    gap: 1rem;
    min-height: 100%;
    padding: 2rem;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.14), transparent 28%),
        linear-gradient(145deg, #0f5d75 0%, #0a4354 52%, #0f6f48 100%);
}
.public-hero-badge::after {
    content: '';
    position: absolute;
    inset: auto -30px -30px auto;
    width: 170px;
    height: 170px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    box-shadow: 0 0 0 28px rgba(255,255,255,.04);
}
.public-badge-kicker {
    display: inline-flex;
    align-self: flex-start;
    padding: .4rem .7rem;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: rgba(255,255,255,.92);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.public-hero-badge strong {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 1.5rem;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,.05);
}
.public-hero-badge p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255,255,255,.88);
    line-height: 1.7;
}
.public-badge-list {
    position: relative;
    z-index: 1;
    list-style: none;
    padding: 0;
    margin: .25rem 0 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.public-badge-list li {
    display: flex;
    align-items: start;
    gap: .65rem;
    color: rgba(255,255,255,.92);
    line-height: 1.5;
}
.public-badge-list li::before {
    content: '';
    width: 10px;
    height: 10px;
    margin-top: .4rem;
    flex: 0 0 10px;
    border-radius: 999px;
    background: #f0b24a;
    box-shadow: 0 0 0 4px rgba(240,178,74,.18);
}
.section-heading-stack { align-items: start; }
.section-heading-stack > div { display: flex; flex-direction: column; gap: .25rem; }

.same-address-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d6e2ea;
    border-radius: 16px;
    background: #f8fbfc;
    cursor: pointer;
    transition: all .2s ease;
}

.same-address-option:hover {
    border-color: #8fb8c8;
    background: #f3f9fb;
}

.same-address-option.is-active {
    border-color: #0f5f73;
    background: #eef8fb;
    box-shadow: 0 0 0 3px rgba(15, 95, 115, .08);
}

.same-address-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.same-address-check {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    flex: 0 0 22px;
    border-radius: 8px;
    border: 1.5px solid #a6bcc8;
    background: #fff;
    position: relative;
    transition: all .2s ease;
}

.same-address-option.is-active .same-address-check {
    background: linear-gradient(135deg, #0f5d75, #0a4354);
    border-color: #0f5d75;
    box-shadow: 0 6px 16px rgba(15, 93, 117, .18);
}

.same-address-input:checked + .same-address-check {
    background: linear-gradient(135deg, #0f5d75, #0a4354);
    border-color: #0f5d75;
    box-shadow: 0 6px 16px rgba(15, 93, 117, .18);
}

.same-address-option.is-active .same-address-check::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.same-address-input:checked + .same-address-check::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.same-address-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.same-address-content strong {
    color: #123047;
    font-weight: 700;
}

.same-address-content small {
    color: #607586;
    line-height: 1.35;
}

.occurrence-address-section {
    transition: opacity .2s ease, transform .2s ease;
}

.occurrence-address-section.is-hidden {
    display: none;
}
