* { box-sizing: border-box; }
:root {
    --blue: #1351b4;
    --blue-dark: #0c326f;
    --blue-soft: #e8f0ff;
    --bg: #f4f6fb;
    --text: #1f2937;
    --muted: #5b6573;
    --border: #dbe4f0;
    --success: #168821;
    --warning: #ffcd07;
    --danger: #c92a2a;
}
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Rawline', Arial, sans-serif;
    background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 220px, var(--bg) 100%);
    color: var(--text);
}
h1, h2, h3, h4 { font-family: 'Raleway', 'Rawline', Arial, sans-serif; margin-top: 0; }
a { color: inherit; }
.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}
.page-content { padding-bottom: 84px; }
.topbar {
    background: linear-gradient(90deg, var(--blue-dark), var(--blue));
    color: #fff;
    padding: 16px 0;
    box-shadow: 0 12px 32px rgba(19,81,180,.18);
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.brand-wrap { display: flex; align-items: center; gap: 14px; }
.brand-mark {
    width: 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
}
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .84; }
.topbar h1 { font-size: 24px; margin-bottom: 0; color: #fff; }
.main-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.topbar a {
    color: #fff; text-decoration: none; padding: 10px 12px; border-radius: 10px;
}
.topbar a:hover { background: rgba(255,255,255,.12); }
.hero, .card {
    background: rgba(255,255,255,.94);
    border-radius: 20px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 12px 30px rgba(17,24,39,.08);
    border: 1px solid rgba(219,228,240,.9);
}
.hero-gov {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    align-items: stretch;
}
.hero-copy h2 { font-size: 40px; line-height: 1.08; margin-bottom: 12px; }
.hero-copy p { color: var(--muted); font-size: 18px; }
.hero-side { margin: 0; }
.soft-card { background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%); }
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--blue-soft); color: var(--blue-dark);
    border: 1px solid #bfd2ff; border-radius: 999px; padding: 8px 12px;
    font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
}
.success-badge { background: #e7f7ea; color: #116329; border-color: #b8e3c3; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--blue); color: #fff; padding: 12px 18px;
    border: none; border-radius: 12px; text-decoration: none; cursor: pointer;
    font-weight: 700; transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 8px 20px rgba(19,81,180,.18);
}
.btn:hover { transform: translateY(-1px); }
.btn-outline {
    background: #fff;
    border: 1px solid var(--blue);
    color: var(--blue);
    box-shadow: none;
}
.btn-sm { padding: 8px 12px; font-size: 12px; border-radius: 10px; }
.btn-inline { min-width: 148px; white-space: nowrap; }
.btn-block { width: 100%; margin-top: 18px; }
label { display: block; font-weight: 700; margin: 12px 0 6px; }
input, select, textarea {
    width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 12px; font-size: 15px;
    background: #fff;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(19,81,180,.10);
}
.grid-2, .detail-grid, .stats-grid, .feature-grid {
    display: grid; gap: 16px;
}
.grid-2 { grid-template-columns: 1fr 1fr; }
.detail-grid { grid-template-columns: 2fr 1fr; }
.dashboard-grid { align-items: start; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.table {
    width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden;
}
.table th, .table td {
    border-bottom: 1px solid #e5e7eb; padding: 12px 10px; text-align: left; vertical-align: middle;
}
.table th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.alert {
    padding: 14px 16px; border-radius: 12px; margin: 16px 0; font-weight: 600;
}
.alert.error { background: #ffe3e3; color: var(--danger); border: 1px solid #ffc9c9; }
.alert.success { background: #d3f9d8; color: #2b8a3e; border: 1px solid #b2f2bb; }
.mt { margin-top: 20px; }
.map-box {
    width: 100%; height: 320px; border-radius: 16px; overflow: hidden; margin-top: 12px; border: 1px solid var(--border);
}
.large-map { height: 420px; }
.extra-large-map { height: 640px; }
.actions-row { margin-top: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.sticky-actions { position: sticky; top: 8px; z-index: 10; }
.inline-actions { display: flex; gap: 10px; align-items: center; }
.compact-grid input { font-family: monospace; }
.help-text { color: var(--muted); font-size: 14px; margin-bottom: 0; }
.preview-image { max-width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
.stat-card { padding: 20px; }
.stat-card span { display: block; color: var(--muted); margin-bottom: 8px; }
.stat-card strong { font-size: 30px; }
.page-header { margin-top: 28px; }
.page-header p, .steps-list, .hero-checklist, .detail-list p { color: var(--muted); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-badge {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .03em;
    border: 1px solid transparent;
}
.status-aberta, .status-recebida { background: #e7f0ff; color: #174ea6; border-color: #bfd2ff; }
.status-em-analise, .status-encaminhada { background: #fff7d6; color: #8f6400; border-color: #ffe066; }
.status-em-atendimento { background: #f3e8ff; color: #6b21a8; border-color: #d8b4fe; }
.status-concluida { background: #e7f7ea; color: #116329; border-color: #b8e3c3; }
.status-nao-procede, .status-duplicada { background: #ffe8e8; color: #a61e1e; border-color: #ffc9c9; }
.result-header {
    display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 12px;
}
.protocol-highlight {
    font-size: 28px; letter-spacing: .04em; color: var(--blue-dark);
}
.checkbox-inline { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.checkbox-inline input { width: auto; }
hr { border: 0; border-top: 1px solid #e5e7eb; margin: 24px 0; }
.hero-checklist { margin: 20px 0 0; padding-left: 18px; }
.steps-list { margin: 0; padding-left: 20px; }
.form-card { overflow: visible; }
.success-card { text-align: center; }
.floating-cta {
    position: fixed; right: 18px; bottom: 18px; z-index: 99;
    background: var(--blue); color: #fff; text-decoration: none;
    border-radius: 999px; padding: 14px 18px; font-weight: 700;
    box-shadow: 0 18px 38px rgba(19,81,180,.28);
}
.leaflet-popup-content-wrapper { border-radius: 14px; }
@media (max-width: 980px) {
    .hero-gov, .feature-grid, .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .topbar-inner { flex-direction: column; align-items: flex-start; }
    .main-nav { width: 100%; }
    .grid-2, .detail-grid, .inline-actions { grid-template-columns: 1fr; display: grid; }
    .hero-copy h2 { font-size: 30px; }
    .map-box, .large-map { height: 320px; }
    .extra-large-map { height: 420px; }
    .floating-cta { left: 12px; right: 12px; text-align: center; }
    .responsive-table { display: block; overflow-x: auto; white-space: nowrap; }
}


.category-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid rgba(19,81,180,.2);font-size:12px;font-weight:700;white-space:nowrap;}
.map-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:18px;align-items:start;}
.map-layout-stacked{grid-template-columns:1fr;}
.map-legend{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:16px;}
.dashboard-map-legend{margin-top:16px;}
.map-legend h4{margin:0 0 12px;font-size:16px;}
.map-legend ul{list-style:none;padding:0;margin:0;display:grid;gap:10px;}
.map-legend li{display:flex;align-items:center;gap:10px;font-size:14px;}
.legend-swatch{width:16px;height:16px;border-radius:50%;display:inline-block;border:2px solid #fff;box-shadow:0 0 0 1px rgba(15,23,42,.12);}
.muted{color:#64748b;}
.custom-category-marker{background:transparent;border:none;}
.custom-category-marker span{display:block;width:20px;height:20px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);border:2px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.25);}
@media (max-width: 960px){.map-layout{grid-template-columns:1fr;}}

/* V1.3.0 mobile app experience */
.app-shell { padding-bottom: 96px; }
.brand-link { text-decoration: none; color: inherit; }
.app-header { position: sticky; top: 0; z-index: 120; }
.app-main { padding-top: 18px; }
.install-banner {
    position: sticky; top: 78px; z-index: 118;
    background: linear-gradient(135deg, #f7fbff, #e9f2ff);
    border-bottom: 1px solid #cddcf8;
    box-shadow: 0 10px 30px rgba(19,81,180,.10);
}
.install-banner.hidden { display: none; }
.install-banner-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0;
}
.install-banner strong { display: block; margin-bottom: 4px; }
.install-banner p { margin: 0; color: var(--muted); }
.install-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-large { min-height: 52px; font-size: 16px; border-radius: 14px; }
.btn-secondary {
    background: #0ea5e9;
    color: #fff;
    box-shadow: 0 8px 20px rgba(14,165,233,.18);
}
.hero-mobile-app { padding: 18px; overflow: hidden; }
.hero-actions-stack { align-items: stretch; }
.phone-card { display: flex; align-items: center; justify-content: center; }
.phone-frame {
    width: 100%; max-width: 280px; background: #0f172a; border-radius: 28px; padding: 12px;
    box-shadow: 0 24px 60px rgba(15,23,42,.28);
}
.phone-notch { width: 96px; height: 16px; border-radius: 999px; background: #111827; margin: 0 auto 10px; }
.phone-screen {
    min-height: 430px; border-radius: 24px; background: linear-gradient(180deg, #ffffff, #edf4ff);
    padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.mini-status {
    align-self: flex-start; background: #e7f0ff; color: #174ea6; padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: 12px;
}
.mini-map {
    height: 170px; border-radius: 18px; background: linear-gradient(135deg, #bfdbfe, #dbeafe 45%, #d1fae5 46%, #dcfce7);
    position: relative; overflow: hidden;
}
.mini-map:before, .mini-map:after {
    content: ''; position: absolute; background: rgba(255,255,255,.65); border-radius: 999px;
}
.mini-map:before { width: 170px; height: 18px; transform: rotate(-25deg); top: 64px; left: -20px; }
.mini-map:after { width: 210px; height: 18px; transform: rotate(35deg); top: 88px; right: -40px; }
.mini-card {
    background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 10px 24px rgba(15,23,42,.08);
}
.mini-card p { color: var(--muted); margin-bottom: 10px; }
.mini-chip {
    display: inline-block; background: #fff7d6; color: #8f6400; padding: 8px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.steps-card { padding-top: 18px; }
.steps-rail {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px;
}
.step-item {
    border: 1px solid var(--border); border-radius: 18px; padding: 18px; background: linear-gradient(180deg, #fff, #f8fbff);
}
.step-item span {
    width: 36px; height: 36px; border-radius: 12px; background: var(--blue); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px;
}
.mobile-bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 121; display: none;
    background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-top: 1px solid rgba(148,163,184,.25);
    box-shadow: 0 -10px 26px rgba(15,23,42,.08);
}
.mobile-bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 10px 6px 12px; text-decoration: none; color: #334155; font-weight: 700; font-size: 11px;
}
.mobile-bottom-nav span { font-size: 18px; }
.mobile-bottom-nav small { font-size: 11px; }
.citizen-app-form { padding: 18px; }
.field-group { margin-bottom: 4px; }
.app-map-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 10px; }
.app-map { height: 360px; border-radius: 20px; }
.coords-card { margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: #fbfdff; }
.mobile-page-header { margin-top: 10px; }
.app-checkbox { background: #f8fbff; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); }
.app-feature-grid > div,
.gov-section.app-feature-grid > div { background: #fff; border-radius: 18px; padding: 18px; border: 1px solid var(--border); }
@media (max-width: 980px) {
    .install-banner { top: 72px; }
    .install-banner-inner, .steps-rail { grid-template-columns: 1fr; display: grid; }
}
@media (max-width: 768px) {
    .container { width: min(100%, 94%); }
    .desktop-nav { display: none; }
    .topbar { padding: 12px 0; }
    .brand-mark { width: 42px; height: 42px; }
    .topbar h1 { font-size: 20px; }
    .hero, .card { border-radius: 18px; padding: 18px; margin: 16px 0; }
    .hero-copy h2 { font-size: 28px; }
    .hero-copy p { font-size: 16px; }
    .hero-actions-stack { display: grid; grid-template-columns: 1fr; }
    .floating-cta { display: none; }
    .mobile-bottom-nav { display: flex; }
    .page-content { padding-bottom: 96px; }
    .mobile-grid-single { grid-template-columns: 1fr; }
    .app-map-toolbar { display: grid; grid-template-columns: 1fr; }
    .btn-inline, .btn-block, .btn-large { width: 100%; }
    .install-banner { top: 66px; }
    .install-banner-inner { padding: 14px 0 16px; }
    .install-banner-actions { display: grid; grid-template-columns: 1fr; }
}


.small-text { font-size: 12px; }
.sla-badge {
    display:inline-flex; align-items:center; justify-content:center;
    padding:7px 10px; border-radius:999px; font-size:12px; font-weight:700; letter-spacing:.03em;
    border:1px solid transparent;
}
.sla-badge-ok { background:#e7f7ea; color:#116329; border-color:#b8e3c3; }
.sla-badge-danger { background:#ffe8e8; color:#a61e1e; border-color:#ffc9c9; }
.sla-card-ok { background: linear-gradient(180deg, #ffffff 0%, #eefbf0 100%); }
.sla-card-danger { background: linear-gradient(180deg, #ffffff 0%, #fff1f1 100%); }
.sla-card-neutral { background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%); }


.small-text{font-size:12px;}
.page-header-flex{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;}
.dashboard-toolbar{display:flex;flex-direction:column;align-items:flex-end;gap:6px;}
.executive-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));}
.stat-card small{display:block;margin-top:8px;line-height:1.4;}
.stat-card-primary{background:linear-gradient(180deg,#ffffff,#eef4ff);border-color:#cfe0ff;}
.stat-card-info{background:linear-gradient(180deg,#ffffff,#eef8ff);border-color:#d7ecff;}
.stat-card-danger{background:linear-gradient(180deg,#fff7f7,#fff1f1);border-color:#ffd7d7;}
.stat-card-warning{background:linear-gradient(180deg,#fffdf4,#fff8df);border-color:#ffe8a6;}
.stat-card-success{background:linear-gradient(180deg,#f7fff8,#effbf1);border-color:#caefcf;}
.dashboard-panels-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:16px;align-items:start;}
.sla-overview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin-top:10px;}
.sla-tile{border-radius:16px;padding:16px;border:1px solid var(--border);background:#fff;display:flex;flex-direction:column;gap:4px;}
.sla-tile strong{font-size:28px;line-height:1;}
.sla-tile span{color:var(--muted);font-weight:700;font-size:13px;}
.sla-tile-danger{background:#fff5f5;border-color:#ffc9c9;}
.sla-tile-warning{background:#fff9db;border-color:#ffe066;}
.sla-tile-alert{background:#fff4e6;border-color:#ffd8a8;}
.sla-tile-ok{background:#ebfbee;border-color:#b2f2bb;}
.sla-tile-neutral{background:#f8fafc;border-color:#dbe4f0;}
.deadline-bars{margin-top:20px;display:grid;gap:12px;}
.deadline-bar-row{display:grid;gap:8px;}
.deadline-bar-meta{display:flex;justify-content:space-between;align-items:center;font-size:14px;}
.deadline-bar-track{height:10px;background:#eef2f7;border-radius:999px;overflow:hidden;}
.deadline-bar-fill{height:100%;border-radius:999px;}
.deadline-bar-atrasadas{background:#e03131;}
.deadline-bar-vence-hoje{background:#f08c00;}
.deadline-bar-1-dia{background:#fab005;}
.deadline-bar-2-a-3-dias{background:#4c6ef5;}
.deadline-bar-4-mais-dias{background:#2b8a3e;}
.deadline-bar-finalizadas{background:#6c757d;}
.service-ranking-list{display:grid;gap:14px;}
.service-ranking-item{display:grid;gap:8px;}
.service-ranking-head{display:flex;justify-content:space-between;align-items:center;gap:10px;}
.service-ranking-track{height:12px;background:#edf2f7;border-radius:999px;overflow:hidden;}
.service-ranking-fill{height:100%;border-radius:999px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.12);}
.sla-badge{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.04em;border:1px solid transparent;white-space:nowrap;}
.sla-badge-ok,.sla-badge-no-prazo{background:#e7f7ea;color:#116329;border-color:#b8e3c3;}
.sla-badge-alerta{background:#fff4e6;color:#9c5d00;border-color:#ffd8a8;}
.sla-badge-warning,.sla-badge-vence-hoje{background:#fff7d6;color:#8f6400;border-color:#ffe066;}
.sla-badge-danger,.sla-badge-atrasado{background:#ffe8e8;color:#a61e1e;border-color:#ffc9c9;}
.sla-badge-finalizada{background:#eef2f7;color:#475569;border-color:#dbe4f0;}
.row-sla-atrasado td:first-child,.row-sla-vence-hoje td:first-child,.row-sla-alerta td:first-child{border-left:4px solid transparent;}
.row-sla-atrasado td:first-child{border-left-color:#e03131;}
.row-sla-vence-hoje td:first-child{border-left-color:#f08c00;}
.row-sla-alerta td:first-child{border-left-color:#fab005;}
.row-sla-atrasado{background:rgba(224,49,49,.03);}
.row-sla-vence-hoje{background:rgba(240,140,0,.04);}
.row-sla-alerta{background:rgba(250,176,5,.05);}
@media (max-width:980px){.dashboard-panels-grid{grid-template-columns:1fr;}.dashboard-toolbar{align-items:flex-start;}}
