/* ==========================================================================
   Sistema Municipal de Iluminação Pública
   Folha de estilo principal — identidade institucional, painel e área pública
   ========================================================================== */

:root {
    --ilp-primary: #0b5f8a;
    --ilp-primary-dark: #083f5c;
    --ilp-primary-soft: #e7f1f7;
    --ilp-accent: #1f9d7a;
    --ilp-bg: #f2f5f8;
    --ilp-surface: #ffffff;
    --ilp-border: #e0e7ee;
    --ilp-border-strong: #c9d5e0;
    --ilp-text: #17242f;
    --ilp-text-soft: #43566a;
    --ilp-muted: #6d7f90;
    --ilp-danger: #b4342a;
    --ilp-danger-soft: #fdecea;
    --ilp-warning: #9a6212;
    --ilp-warning-soft: #fdf3e2;
    --ilp-success: #1c7154;
    --ilp-success-soft: #e6f4ee;
    --ilp-info: #1a6285;
    --ilp-info-soft: #e8f2f8;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-xs: 0 1px 2px rgba(16, 40, 60, 0.05);
    --shadow-sm: 0 1px 3px rgba(16, 40, 60, 0.07), 0 4px 12px rgba(16, 40, 60, 0.04);
    --shadow-md: 0 8px 28px rgba(16, 40, 60, 0.1);
    --sidebar-width: 268px;
    --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--ilp-text);
    background: var(--ilp-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--ilp-text);
}

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

a:hover {
    color: var(--ilp-primary-dark);
    text-decoration: underline;
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.92em;
    letter-spacing: -0.02em;
}

.text-muted {
    color: var(--ilp-muted) !important;
}

.link-strong {
    font-weight: 600;
    color: var(--ilp-primary-dark);
}

.link-strong:hover {
    color: var(--ilp-primary);
}

.req {
    color: var(--ilp-danger);
    font-weight: 700;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 0.75rem 1.25rem;
    background: var(--ilp-primary-dark);
    color: #fff;
    border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 600;
}

.skip-link:focus {
    left: 0;
    color: #fff;
}

:focus-visible {
    outline: 3px solid rgba(11, 95, 138, 0.45);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------- botões */

.btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.btn-primary {
    --bs-btn-bg: var(--ilp-primary);
    --bs-btn-border-color: var(--ilp-primary);
    --bs-btn-hover-bg: var(--ilp-primary-dark);
    --bs-btn-hover-border-color: var(--ilp-primary-dark);
    --bs-btn-active-bg: var(--ilp-primary-dark);
    --bs-btn-active-border-color: var(--ilp-primary-dark);
    --bs-btn-disabled-bg: #7fa6bb;
    --bs-btn-disabled-border-color: #7fa6bb;
}

.btn-outline-primary {
    --bs-btn-color: var(--ilp-primary);
    --bs-btn-border-color: #b9d2e0;
    --bs-btn-hover-bg: var(--ilp-primary);
    --bs-btn-hover-border-color: var(--ilp-primary);
    --bs-btn-active-bg: var(--ilp-primary-dark);
}

.btn-outline-secondary {
    --bs-btn-color: var(--ilp-text-soft);
    --bs-btn-border-color: var(--ilp-border-strong);
    --bs-btn-hover-bg: #eef2f6;
    --bs-btn-hover-border-color: var(--ilp-border-strong);
    --bs-btn-hover-color: var(--ilp-text);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--ilp-border);
    background: #fff;
    color: var(--ilp-text-soft);
    border-radius: 10px;
}

.btn-icon:hover {
    background: #eef3f7;
    color: var(--ilp-primary-dark);
}

.btn-lg {
    padding: 0.8rem 1.35rem;
    font-size: 1rem;
}

/* ------------------------------------------------------------ estrutura */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background: linear-gradient(180deg, #0b2c3f 0%, #0a2433 60%, #081d29 100%);
    color: #d9e6ee;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1040;
}

.sidebar-brand {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1.15rem 1.1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-link {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}

.brand-link:hover {
    color: #fff;
    text-decoration: none;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 4px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0b429, #e08b1a);
    color: #3a2503;
    font-size: 1.25rem;
    flex: 0 0 auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-text strong {
    font-size: 0.86rem;
    line-height: 1.3;
    color: #fff;
    overflow-wrap: anywhere;
}

.brand-text small {
    font-size: 0.69rem;
    color: #93aec0;
    line-height: 1.35;
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

.sidebar-close {
    color: #cfe0ea;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.9rem 0.7rem 1rem;
    scrollbar-width: thin;
}

.nav-group {
    margin-bottom: 1rem;
}

.nav-group-title {
    display: block;
    padding: 0 0.65rem 0.4rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: #7e9aad;
    font-weight: 700;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    margin-bottom: 0.15rem;
    border-radius: 10px;
    color: #c6d8e4;
    font-size: 0.88rem;
    font-weight: 500;
    position: relative;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav .nav-link i {
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
    color: #8fb0c4;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    text-decoration: none;
}

.sidebar-nav .nav-link:hover i {
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(31, 157, 122, 0.22), rgba(31, 157, 122, 0.06));
    color: #fff;
    font-weight: 650;
}

.sidebar-nav .nav-link.active::before {
    content: "";
    position: absolute;
    left: -0.7rem;
    top: 0.45rem;
    bottom: 0.45rem;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #34c79b;
}

.sidebar-nav .nav-link.active i {
    color: #5fdcb6;
}

.sidebar-footer {
    padding: 0.85rem 1.1rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.76rem;
}

.sidebar-footer-link {
    color: #a9c3d3;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.sidebar-footer-link:hover {
    color: #fff;
}

.sidebar-version {
    color: #6f8ea2;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--ilp-border);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.topbar-title h1 {
    font-size: 1.12rem;
    margin: 0;
    line-height: 1.2;
}

.topbar-eyebrow {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ilp-muted);
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0.55rem 0.3rem 0.3rem;
    border: 1px solid var(--ilp-border);
    background: #fff;
    border-radius: 999px;
}

.user-menu:hover {
    background: #f5f8fa;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--ilp-primary), var(--ilp-accent));
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    flex: 0 0 auto;
}

.avatar-sm {
    width: 34px;
    height: 34px;
    font-size: 0.78rem;
}

.avatar-lg {
    width: 62px;
    height: 62px;
    font-size: 1.2rem;
}

.user-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.user-meta strong {
    font-size: 0.83rem;
}

.user-meta small {
    font-size: 0.72rem;
    color: var(--ilp-muted);
}

.app-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1480px;
    width: 100%;
    margin: 0 auto;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.5rem 1.4rem;
    font-size: 0.76rem;
    color: var(--ilp-muted);
    border-top: 1px solid var(--ilp-border);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 24, 35, 0.5);
    z-index: 1035;
    border: 0;
}

/* ----------------------------------------------------------- cabeçalho */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}

.page-title {
    font-size: 1.5rem;
    margin: 0 0 0.15rem;
}

.page-subtitle {
    margin: 0;
    color: var(--ilp-muted);
    font-size: 0.88rem;
    max-width: 72ch;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--ilp-muted);
    margin-bottom: 0.25rem;
}

.breadcrumb-line i {
    font-size: 0.65rem;
}

.breadcrumb-line a {
    color: var(--ilp-muted);
}

.breadcrumb-line a:hover {
    color: var(--ilp-primary);
}

.section-title {
    font-size: 1.02rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.8rem;
}

.subhead {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ilp-muted);
    margin: 1.4rem 0 0.7rem;
    font-weight: 700;
}

/* -------------------------------------------------------------- cartões */

.app-card {
    background: var(--ilp-surface);
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.app-card > .card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.15rem;
    background: #fff;
    border-bottom: 1px solid var(--ilp-border);
}

.app-card .card-title {
    font-size: 0.98rem;
    margin: 0;
}

.app-card .card-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.79rem;
    color: var(--ilp-muted);
}

.app-card .card-body {
    padding: 1.15rem;
}

.app-card .card-footer {
    padding: 0.9rem 1.15rem;
    background: #fbfcfd;
    border-top: 1px solid var(--ilp-border);
}

.card-badge {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--ilp-primary-dark);
    background: var(--ilp-primary-soft);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    white-space: nowrap;
}

/* ---------------------------------------------------------- indicadores */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
    gap: 0.85rem;
    margin-bottom: 0.5rem;
}

.stat-card {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--tone, var(--ilp-primary));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    background: color-mix(in srgb, var(--tone, var(--ilp-primary)) 12%, white);
    color: var(--tone, var(--ilp-primary));
    flex: 0 0 auto;
}

.stat-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ilp-text-soft);
}

.stat-hint {
    font-size: 0.72rem;
    color: var(--ilp-muted);
    margin-top: 0.1rem;
}

.stat-primary { --tone: #0b5f8a; }
.stat-info { --tone: #1a7fa8; }
.stat-success { --tone: #1c7154; }
.stat-warning { --tone: #b07a14; }
.stat-danger { --tone: #b4342a; }
.stat-muted { --tone: #7d8f9f; }

.metric-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    margin-top: 0.6rem;
    background: #f7fafc;
    border: 1px dashed var(--ilp-border-strong);
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--ilp-text-soft);
}

.metric-inline strong {
    font-size: 0.95rem;
    color: var(--ilp-primary-dark);
}

.chart-wrap {
    position: relative;
    width: 100%;
}

.chart-lg { height: 300px; }
.chart-md { height: 240px; }

/* ------------------------------------------------------------- filtros */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    margin-bottom: 1rem;
}

.filter-field {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-field input[type="date"] {
    min-width: 152px;
}

.filter-field .form-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ilp-muted);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.filter-grow {
    flex: 1 1 240px;
    min-width: 200px;
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.35rem;
    font-size: 0.82rem;
}

.filter-actions {
    display: flex;
    gap: 0.4rem;
    margin-left: auto;
    padding-bottom: 0.05rem;
}

.app-table .code-cell {
    white-space: nowrap;
}

.app-table .code-cell .link-strong {
    white-space: nowrap;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    background: #fff;
    border: 1px solid var(--ilp-border);
    color: var(--ilp-text-soft);
}

a.chip:hover {
    text-decoration: none;
    border-color: var(--ilp-primary);
    color: var(--ilp-primary);
}

.chip-success { background: var(--ilp-success-soft); border-color: #bfe3d5; color: var(--ilp-success); }
.chip-warning { background: var(--ilp-warning-soft); border-color: #efd9b4; color: var(--ilp-warning); }
.chip-danger { background: var(--ilp-danger-soft); border-color: #f3c9c5; color: var(--ilp-danger); }
.chip-info { background: var(--ilp-info-soft); border-color: #c4dcea; color: var(--ilp-info); }
.chip-muted { background: #f0f3f6; color: var(--ilp-muted); }

/* ------------------------------------------------------------- tabelas */

.table-responsive {
    border-radius: 0;
}

.app-table {
    --bs-table-bg: #fff;
    --bs-table-hover-bg: #f7fafc;
    font-size: 0.85rem;
    margin: 0;
}

.app-table > thead th {
    background: #f5f8fa;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ilp-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--ilp-border);
    padding: 0.6rem 0.85rem;
    white-space: nowrap;
}

.app-table > tbody > td,
.app-table > tbody > tr > td {
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #eef2f6;
    vertical-align: middle;
}

.app-table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.app-table-sm > tbody > tr > td {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
}

.row-overdue {
    background: #fff8f7;
}

.row-overdue > td:first-child {
    box-shadow: inset 3px 0 0 var(--ilp-danger);
}

.table-actions {
    display: inline-flex;
    gap: 0.3rem;
    justify-content: flex-end;
}

.table-actions form {
    display: inline-flex;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.85rem 1.1rem;
    border-top: 1px solid var(--ilp-border);
    background: #fbfcfd;
}

.table-count {
    margin: 0;
    font-size: 0.78rem;
    color: var(--ilp-muted);
}

.pagination {
    --bs-pagination-color: var(--ilp-text-soft);
    --bs-pagination-hover-color: var(--ilp-primary-dark);
    --bs-pagination-hover-bg: #eef3f7;
    --bs-pagination-active-bg: var(--ilp-primary);
    --bs-pagination-active-border-color: var(--ilp-primary);
    --bs-pagination-border-color: var(--ilp-border);
}

.badge-count {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--ilp-primary-soft);
    color: var(--ilp-primary-dark);
    font-weight: 700;
    font-size: 0.78rem;
}

.badge-count:hover {
    background: var(--ilp-primary);
    color: #fff;
    text-decoration: none;
}

.check-col {
    width: 44px;
    text-align: center;
}

/* -------------------------------------------------------------- badges */

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.24rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid transparent;
}

.status-aberta { background: #e8f2f8; color: #145b7d; border-color: #c3ddec; }
.status-analise { background: #eef0fb; color: #3a4b9e; border-color: #d2d7f2; }
.status-aguardando { background: #fdf3e2; color: #8a5a10; border-color: #efd9b4; }
.status-programada { background: #e9f4f0; color: #1c6b52; border-color: #c4e3d7; }
.status-manutencao { background: #fff1e3; color: #9a5312; border-color: #f3d3b3; }
.status-material { background: #f7eef8; color: #7b3a86; border-color: #e6cbea; }
.status-concluida { background: #e6f4ee; color: #1c7154; border-color: #bfe3d5; }
.status-cancelada { background: #f1f3f5; color: #6b7785; border-color: #dde2e7; }
.status-ativa { background: #e6f4ee; color: #1c7154; border-color: #bfe3d5; }
.status-inativa { background: #f1f3f5; color: #6b7785; border-color: #dde2e7; }
.status-vencida { background: var(--ilp-danger-soft); color: var(--ilp-danger); border-color: #f3c9c5; }
.status-neutro { background: #f1f3f5; color: #6b7785; }

.priority-baixa { background: #f1f3f5; color: #5c6b7a; border-color: #dde2e7; }
.priority-normal { background: #e8f2f8; color: #145b7d; border-color: #c3ddec; }
.priority-alta { background: #fdf3e2; color: #8a5a10; border-color: #efd9b4; }
.priority-urgente { background: var(--ilp-danger-soft); color: var(--ilp-danger); border-color: #f3c9c5; }

.role-badge {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #eef2f6;
    color: var(--ilp-text-soft);
}

.role-admin { background: #e7f1f7; color: #0a4e71; }
.role-attendant { background: #e9f4f0; color: #1c6b52; }
.role-viewer { background: #f1f3f5; color: #5c6b7a; }

.audit-action {
    font-weight: 600;
    font-size: 0.82rem;
}

/* -------------------------------------------------------------- detalhes */

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.9rem 1.4rem;
    margin: 0;
}

.detail-grid dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ilp-muted);
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.detail-grid dd {
    margin: 0;
    font-size: 0.88rem;
    color: var(--ilp-text);
}

.detail-stack {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 0;
}

.detail-stack dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ilp-muted);
    font-weight: 700;
}

.detail-stack dd {
    margin: 0.1rem 0 0;
    font-size: 0.88rem;
}

.note-box {
    margin-top: 1.2rem;
    padding: 0.85rem 1rem;
    background: #fbf8ef;
    border: 1px solid #eee2c6;
    border-radius: 10px;
    font-size: 0.85rem;
}

.note-box strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #6d5417;
}

.problem-banner {
    display: flex;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    background: #f7fafc;
    border: 1px solid var(--ilp-border);
    border-radius: 12px;
}

.problem-banner p {
    font-size: 0.9rem;
    color: var(--ilp-text-soft);
    margin-top: 0.3rem;
}

.problem-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #fdf3e2;
    color: #b07a14;
    font-size: 1.25rem;
}

.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.photo-thumb {
    position: relative;
    display: block;
    width: 150px;
    height: 110px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--ilp-border);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb span {
    position: absolute;
    inset: auto 0 0 0;
    padding: 0.25rem 0.4rem;
    font-size: 0.68rem;
    color: #fff;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.65));
    text-align: center;
}

.photo-thumb:hover {
    text-decoration: none;
}

/* -------------------------------------------------------------- timeline */

.timeline {
    list-style: none;
    margin: 0;
    padding: 0.2rem 0 0.2rem 0.3rem;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 0.6rem;
    bottom: 0.6rem;
    width: 2px;
    background: linear-gradient(180deg, #d8e4ec, #eef2f6);
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 0.8rem;
    padding-bottom: 1rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    border: 2px solid #cfe0ea;
    color: var(--ilp-primary);
    font-size: 0.85rem;
}

.timeline-content {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

.timeline-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.timeline-head strong {
    font-size: 0.86rem;
}

.timeline-head time {
    font-size: 0.72rem;
    color: var(--ilp-muted);
}

.timeline-note {
    margin: 0.35rem 0 0.2rem;
    font-size: 0.85rem;
    color: var(--ilp-text-soft);
    background: #f7fafc;
    border-left: 3px solid #d5e3ec;
    padding: 0.45rem 0.7rem;
    border-radius: 0 8px 8px 0;
}

/* --------------------------------------------------------------- vazios */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--ilp-muted);
}

.empty-state i {
    font-size: 2.4rem;
    color: #b9cbd8;
    display: block;
    margin-bottom: 0.6rem;
}

.empty-state h3 {
    font-size: 1.02rem;
    margin-bottom: 0.35rem;
    color: var(--ilp-text);
}

.empty-state p {
    max-width: 52ch;
    margin: 0 auto 1rem;
    font-size: 0.87rem;
}

.empty-inline {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    background: #f7fafc;
    border: 1px dashed var(--ilp-border-strong);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--ilp-muted);
}

.empty-inline i {
    font-size: 1.1rem;
    color: #9db3c2;
}

/* --------------------------------------------------------------- listas */

.recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recent-list li {
    border-bottom: 1px solid #eef2f6;
}

.recent-list li:last-child {
    border-bottom: 0;
}

.recent-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.7rem 1.15rem;
    color: inherit;
}

.recent-list a:hover {
    background: #f7fafc;
    text-decoration: none;
}

.recent-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.recent-main strong {
    font-size: 0.84rem;
    color: var(--ilp-primary-dark);
}

.recent-main small {
    font-size: 0.74rem;
    color: var(--ilp-muted);
}

.recent-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    flex: 0 0 auto;
}

.recent-side small {
    font-size: 0.7rem;
    color: var(--ilp-muted);
}

.duplicate-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.duplicate-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed #e6edf3;
}

.duplicate-list li:last-child {
    border-bottom: 0;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-cell strong {
    font-size: 0.86rem;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

/* --------------------------------------------------------------- alertas */

.flash-stack {
    margin-bottom: 1rem;
}

.app-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.86rem;
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-xs);
}

.app-alert > i {
    font-size: 1.1rem;
    margin-top: 0.05rem;
}

.app-alert-text {
    flex: 1;
    min-width: 0;
}

.app-alert .btn-close {
    padding: 0.55rem;
    margin: -0.2rem -0.35rem -0.2rem 0;
}

.alert-success { background: var(--ilp-success-soft); border-color: #bfe3d5; color: #14563f; }
.alert-danger { background: var(--ilp-danger-soft); border-color: #f3c9c5; color: #7d221a; }
.alert-warning { background: var(--ilp-warning-soft); border-color: #efd9b4; color: #6d4a0c; }
.alert-info { background: var(--ilp-info-soft); border-color: #c4dcea; color: #124d6b; }

/* -------------------------------------------------------------- formulários */

.form-label {
    font-weight: 600;
    font-size: 0.83rem;
    color: var(--ilp-text-soft);
    margin-bottom: 0.3rem;
}

.form-control,
.form-select {
    border-radius: 10px;
    border-color: var(--ilp-border-strong);
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ilp-primary);
    box-shadow: 0 0 0 3px rgba(11, 95, 138, 0.14);
}

.input-group-text {
    background: #f5f8fa;
    border-color: var(--ilp-border-strong);
    color: var(--ilp-muted);
    border-radius: 10px;
}

.form-text {
    font-size: 0.76rem;
    color: var(--ilp-muted);
}

.invalid-feedback {
    font-size: 0.78rem;
}

.form-check-input:checked {
    background-color: var(--ilp-primary);
    border-color: var(--ilp-primary);
}

.form-check-input:focus {
    border-color: var(--ilp-primary);
    box-shadow: 0 0 0 3px rgba(11, 95, 138, 0.14);
}

.form-check-label {
    font-size: 0.86rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding: 0.9rem 1.1rem;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.password-policy {
    background: #f7fafc;
    border: 1px dashed var(--ilp-border-strong);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    font-size: 0.8rem;
    color: var(--ilp-text-soft);
}

.password-policy ul {
    margin: 0.3rem 0 0;
    padding-left: 1.1rem;
}

.template-option,
.role-option {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--ilp-border);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.template-option:hover,
.role-option:hover {
    border-color: var(--ilp-primary);
    background: #f8fbfd;
}

.template-option input,
.role-option input {
    margin-top: 0.2rem;
    accent-color: var(--ilp-primary);
}

.template-option:has(input:checked),
.role-option:has(input:checked) {
    border-color: var(--ilp-primary);
    background: var(--ilp-primary-soft);
    box-shadow: inset 0 0 0 1px var(--ilp-primary);
}

.template-body,
.role-option-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.template-body strong,
.role-option-body strong {
    font-size: 0.86rem;
}

.template-body small,
.role-option-body small {
    font-size: 0.76rem;
    color: var(--ilp-muted);
}

.selection-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ilp-primary-dark);
    background: var(--ilp-primary-soft);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.custom-size-fields {
    margin-top: 0.6rem;
    padding: 0.6rem;
    background: #f7fafc;
    border: 1px dashed var(--ilp-border-strong);
    border-radius: 10px;
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ------------------------------------------------------------------ QR */

.qr-preview,
.qr-image {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--ilp-border);
    background: #fff;
    padding: 6px;
}

.qr-frame {
    display: inline-block;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.qr-frame .qr-image {
    max-width: 320px;
    border: 0;
    padding: 0;
}

.qr-data {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.2rem;
}

.qr-data-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ilp-muted);
    font-weight: 700;
}

.qr-data-value {
    font-size: 0.86rem;
    word-break: break-all;
}

.print-tips {
    padding-left: 1.2rem;
    margin: 0;
    font-size: 0.88rem;
    color: var(--ilp-text-soft);
}

.print-tips li {
    margin-bottom: 0.55rem;
}

/* ------------------------------------------------------------- relatórios */

.report-group {
    margin-bottom: 1.6rem;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.7rem;
}

.report-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 0.95rem;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: 12px;
    box-shadow: var(--shadow-xs);
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.report-card:hover {
    border-color: var(--ilp-primary);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.report-card-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--ilp-primary-soft);
    color: var(--ilp-primary);
    font-size: 1.1rem;
}

.report-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.report-card-body strong {
    font-size: 0.86rem;
}

.report-card-body small {
    font-size: 0.75rem;
    color: var(--ilp-muted);
}

.report-card-go {
    color: #b3c4d1;
}

.summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.summary-item {
    flex: 1 1 160px;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-left: 4px solid var(--ilp-primary);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
}

.summary-item span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ilp-muted);
    font-weight: 700;
}

.summary-item strong {
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

/* ------------------------------------------------------------ configurações */

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-xs);
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ilp-text-soft);
}

.settings-tab:hover {
    background: #f2f6f9;
    text-decoration: none;
    color: var(--ilp-primary-dark);
}

.settings-tab.active {
    background: var(--ilp-primary);
    color: #fff;
}

.table-group th {
    background: #eef3f7 !important;
    font-size: 0.72rem !important;
    color: var(--ilp-primary-dark) !important;
    letter-spacing: 0.06em;
}

.logo-preview {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    border: 1px dashed var(--ilp-border-strong);
    border-radius: 12px;
    padding: 0.75rem;
    background: #fbfcfd;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 2rem 1rem;
    border: 1px dashed var(--ilp-border-strong);
    border-radius: 12px;
    color: var(--ilp-muted);
    background: #fbfcfd;
}

.logo-placeholder i {
    font-size: 1.8rem;
    color: #b9cbd8;
}

/* ------------------------------------------------------------------ mapa */

.map-shell {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--ilp-border);
    box-shadow: var(--shadow-sm);
    background: #dfe8ee;
}

.map-canvas {
    height: 620px;
    width: 100%;
}

.map-view {
    height: 280px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--ilp-border);
}

.map-view-sm {
    height: 220px;
}

.map-picker {
    height: 320px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--ilp-border-strong);
    background: #e8eff4;
    cursor: crosshair;
}

.map-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.7rem;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.76rem;
    color: var(--ilp-text-soft);
}

.map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.dot-sem { background: #2f7fb0; }
.dot-aberta { background: #c0392b; }
.dot-andamento { background: #d68910; }
.dot-concluida { background: #1e8449; }
.dot-inativo { background: #83919c; }

.map-counter {
    font-size: 0.78rem;
    color: var(--ilp-text-soft);
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
}

.map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    color: var(--ilp-text-soft);
    z-index: 500;
}

/* Marcadores personalizados */
.ilp-marker {
    background: transparent;
    border: 0;
}

.ilp-marker span {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    background: #2f7fb0;
}

.ilp-marker--aberta span { background: #c0392b; }
.ilp-marker--andamento span { background: #d68910; }
.ilp-marker--concluida span { background: #1e8449; }
.ilp-marker--inativo span { background: #83919c; }

.leaflet-container {
    font-family: var(--font-sans);
    font-size: 0.8rem;
}

.leaflet-popup-content {
    margin: 0.7rem 0.85rem;
    font-size: 0.82rem;
    line-height: 1.45;
}

.map-popup strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--ilp-primary-dark);
}

.map-popup small {
    color: var(--ilp-muted);
}

.map-popup .map-popup-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.4rem;
    font-weight: 600;
}

/* ==========================================================================
   Área pública
   ========================================================================== */

.public-body {
    background: #f4f7f9;
    font-size: 1rem;
}

.public-header {
    background: #fff;
    border-bottom: 1px solid var(--ilp-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.public-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.9rem;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--ilp-text);
    text-decoration: none;
    min-width: 0;
}

.public-brand:hover {
    text-decoration: none;
    color: var(--ilp-text);
}

.public-logo {
    max-height: 44px;
    max-width: 120px;
    object-fit: contain;
}

.public-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f0b429, #e08b1a);
    color: #3a2503;
    font-size: 1.25rem;
}

.public-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.public-brand-text strong {
    font-size: 0.9rem;
}

.public-brand-text small {
    font-size: 0.72rem;
    color: var(--ilp-muted);
}

.public-header-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ilp-text-soft);
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--ilp-border);
    border-radius: 999px;
}

.public-header-link:hover {
    text-decoration: none;
    border-color: var(--ilp-primary);
    color: var(--ilp-primary);
}

.public-main {
    padding: 1.1rem 0 2.2rem;
}

.public-hero {
    background:
        radial-gradient(1200px 400px at 85% -10%, rgba(240, 180, 41, 0.22), transparent 60%),
        linear-gradient(135deg, #0a3a52 0%, #0b5f8a 55%, #0d6f7f 100%);
    color: #fff;
    padding: 2.6rem 1.1rem 2.8rem;
    margin-bottom: 1.4rem;
}

.public-hero-content {
    max-width: 760px;
    margin: 0 auto;
}

.public-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #ffd98a;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.9rem;
}

.public-hero h1 {
    color: #fff;
    font-size: clamp(1.6rem, 4.2vw, 2.5rem);
    line-height: 1.15;
    margin-bottom: 0.9rem;
}

.public-lead {
    font-size: 1.02rem;
    color: #dbeaf2;
    margin-bottom: 1.4rem;
    max-width: 62ch;
}

.public-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.public-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1rem;
}

.public-steps {
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius);
    padding: 1.4rem 1.2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.2rem;
}

.public-steps h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.step-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    counter-reset: step;
}

.step-grid li {
    position: relative;
    padding: 1rem 0.9rem 0.9rem;
    background: #f8fbfd;
    border: 1px solid var(--ilp-border);
    border-radius: 12px;
}

.step-number {
    position: absolute;
    top: -0.6rem;
    left: 0.9rem;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ilp-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.step-icon {
    font-size: 1.4rem;
    color: var(--ilp-primary);
    display: block;
    margin: 0.3rem 0 0.5rem;
}

.step-grid strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 0.2rem;
}

.step-grid p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--ilp-muted);
}

.public-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.public-info-card {
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: 12px;
    padding: 1rem;
}

.public-info-card i {
    font-size: 1.3rem;
    color: var(--ilp-accent);
}

.public-info-card h3 {
    font-size: 0.92rem;
    margin: 0.4rem 0 0.25rem;
}

.public-info-card p {
    margin: 0;
    font-size: 0.83rem;
    color: var(--ilp-muted);
}

.public-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-left: 4px solid var(--ilp-primary);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}

.public-callout h2 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.public-callout p {
    font-size: 0.86rem;
    color: var(--ilp-text-soft);
}

.public-disclaimer {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.78rem;
    color: var(--ilp-muted);
    background: #fffdf6;
    border: 1px solid #eee2c6;
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    margin: 1rem 0 0;
}

.public-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--ilp-muted);
    max-width: 760px;
    margin: 0 auto 0.7rem;
    padding: 0 0.2rem;
}

.public-breadcrumb a {
    color: var(--ilp-muted);
}

.public-breadcrumb i {
    font-size: 0.62rem;
}

/* Cartão do poste ------------------------------------------------------- */

.pole-card {
    max-width: 760px;
    margin: 0 auto 1rem;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.pole-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.2rem 0.9rem;
}

.pole-code-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ilp-muted);
    font-weight: 700;
}

.pole-code {
    font-size: 1.7rem;
    margin: 0.1rem 0 0.35rem;
    letter-spacing: -0.03em;
    color: var(--ilp-primary-dark);
}

.pole-address {
    margin: 0;
    font-size: 0.95rem;
    color: var(--ilp-text);
}

.pole-card-status {
    flex: 0 0 auto;
}

.public-map {
    height: 190px;
    width: 100%;
    border-top: 1px solid var(--ilp-border);
    border-bottom: 1px solid var(--ilp-border);
    background: #e8eff4;
}

.pole-check {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin: 0;
    padding: 0.85rem 1.2rem;
    background: #f8fbfd;
    font-size: 0.83rem;
    color: var(--ilp-text-soft);
}

.pole-check i {
    color: var(--ilp-primary);
    font-size: 1rem;
    margin-top: 0.1rem;
}

.pole-check strong {
    white-space: nowrap;
}

.pole-check .pole-check-code {
    display: inline-block;
    margin-top: 0.2rem;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    background: #e7f1f7;
    color: var(--ilp-primary-dark);
    white-space: nowrap;
}

.public-blocked {
    max-width: 760px;
    margin: 0 auto 1rem;
    background: #fff8f7;
    border: 1px solid #f3c9c5;
    border-radius: var(--radius);
    padding: 1.4rem 1.2rem;
    text-align: center;
}

.public-blocked > i {
    font-size: 2rem;
    color: var(--ilp-danger);
}

.public-blocked h2 {
    font-size: 1.15rem;
    margin: 0.5rem 0;
}

.public-blocked p {
    font-size: 0.9rem;
    color: var(--ilp-text-soft);
    max-width: 56ch;
    margin: 0 auto 1rem;
}

/* Formulário público ---------------------------------------------------- */

.public-form {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 0.4rem 1.2rem 1.3rem;
}

.form-step {
    border: 0;
    border-bottom: 1px solid #eef2f6;
    margin: 0;
    padding: 1.15rem 0;
}

.form-step:last-of-type {
    border-bottom: 0;
}

.form-step legend {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.75rem;
    float: none;
    width: auto;
}

.step-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--ilp-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.optional {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ilp-muted);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.55rem;
}

.problem-option {
    cursor: pointer;
    margin: 0;
}

.problem-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.problem-option-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    height: 100%;
    padding: 0.75rem 0.7rem;
    border: 1.5px solid var(--ilp-border);
    border-radius: 12px;
    background: #fbfcfd;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.problem-option-body i {
    font-size: 1.25rem;
    color: var(--ilp-primary);
}

.problem-option-body span {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ilp-text);
}

.problem-option:hover .problem-option-body {
    border-color: #9dc0d3;
    background: #f6fbfd;
}

.problem-option input:checked + .problem-option-body {
    border-color: var(--ilp-primary);
    background: var(--ilp-primary-soft);
    box-shadow: inset 0 0 0 1px var(--ilp-primary);
}

.problem-option input:focus-visible + .problem-option-body {
    outline: 3px solid rgba(11, 95, 138, 0.35);
    outline-offset: 2px;
}

.field-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 0.3rem;
}

.counter {
    font-size: 0.74rem;
    color: var(--ilp-muted);
    white-space: nowrap;
}

.photo-preview {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.6rem;
    padding: 0.5rem;
    border: 1px dashed var(--ilp-border-strong);
    border-radius: 10px;
    background: #fbfcfd;
}

.photo-preview img {
    width: 84px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
}

.consent-box {
    margin: 1rem 0;
    padding: 0.85rem 0.95rem;
    background: #f8fbfd;
    border: 1px solid var(--ilp-border);
    border-radius: 12px;
    font-size: 0.86rem;
}

.public-submit {
    padding: 0.85rem 1rem;
    font-size: 1.02rem;
    border-radius: 12px;
}

.public-form-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: var(--ilp-muted);
    margin: 0.7rem 0 0;
    text-align: center;
}

.public-whatsapp {
    max-width: 760px;
    margin: 1rem auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.1rem;
    background: #eefaf3;
    border: 1px solid #bfe3d5;
    border-radius: var(--radius);
}

.public-whatsapp h2 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #14563f;
}

.public-whatsapp p {
    font-size: 0.83rem;
    color: #2c5b49;
}

.captcha-input {
    max-width: 140px;
}

/* Confirmação ----------------------------------------------------------- */

.confirm-card {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem 1.4rem;
    text-align: center;
}

.confirm-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ilp-success-soft);
    color: var(--ilp-success);
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.confirm-card h1 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.confirm-lead {
    color: var(--ilp-muted);
    font-size: 0.95rem;
}

.protocol-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin: 1.2rem auto;
    padding: 1rem;
    max-width: 420px;
    background: #f8fbfd;
    border: 1px dashed var(--ilp-primary);
    border-radius: 14px;
}

.protocol-box span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ilp-muted);
    font-weight: 700;
}

.protocol-box strong {
    font-size: 1.5rem;
    color: var(--ilp-primary-dark);
    letter-spacing: -0.02em;
}

.confirm-pole {
    font-size: 0.88rem;
    color: var(--ilp-text-soft);
    margin-bottom: 1.2rem;
}

.confirm-next {
    text-align: left;
    background: #f8fbfd;
    border: 1px solid var(--ilp-border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.2rem;
}

.confirm-next h2 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.confirm-next ol {
    padding-left: 1.1rem;
    margin: 0 0 0.6rem;
    font-size: 0.86rem;
    color: var(--ilp-text-soft);
}

.confirm-next li {
    margin-bottom: 0.3rem;
}

.confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.confirm-note {
    font-size: 0.76rem;
    color: var(--ilp-muted);
    margin: 1.2rem 0 0;
}

/* Não encontrado -------------------------------------------------------- */

.notfound-card {
    max-width: 680px;
    margin: 1rem auto;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem 1.4rem;
    text-align: center;
}

.notfound-icon {
    display: inline-grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--ilp-warning-soft);
    color: var(--ilp-warning);
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

.notfound-card h1 {
    font-size: 1.5rem;
}

.notfound-card > p {
    color: var(--ilp-text-soft);
    font-size: 0.92rem;
    max-width: 54ch;
    margin: 0 auto 1rem;
}

.notfound-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.notfound-help {
    text-align: left;
    background: #f8fbfd;
    border: 1px solid var(--ilp-border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    font-size: 0.86rem;
}

.notfound-help h2 {
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
}

.notfound-help ul {
    padding-left: 1.1rem;
    margin-bottom: 0.6rem;
    color: var(--ilp-text-soft);
}

/* Documento de privacidade ---------------------------------------------- */

.public-doc {
    max-width: 780px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.8rem 1.4rem;
}

.public-doc h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.public-doc h2 {
    font-size: 1.05rem;
    margin: 1.4rem 0 0.45rem;
    color: var(--ilp-primary-dark);
}

.public-doc p,
.public-doc li {
    font-size: 0.92rem;
    color: var(--ilp-text-soft);
}

.public-doc ul {
    padding-left: 1.15rem;
}

.public-doc-lead {
    font-size: 0.98rem;
    color: var(--ilp-text);
    border-left: 3px solid var(--ilp-primary);
    padding-left: 0.9rem;
    margin-bottom: 1rem;
}

.public-doc-custom {
    font-size: 0.92rem;
    color: var(--ilp-text-soft);
}

.public-doc-foot {
    margin-top: 1.8rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--ilp-border);
    font-size: 0.78rem;
    color: var(--ilp-muted);
}

/* Rodapé público -------------------------------------------------------- */

.public-footer {
    background: #0b2c3f;
    color: #b9cfdd;
    padding: 1.8rem 0 1.2rem;
    margin-top: 2rem;
    font-size: 0.83rem;
}

.public-footer strong {
    color: #fff;
}

.public-footer a {
    color: #cfe3ef;
}

.public-footer a:hover {
    color: #fff;
}

.public-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.public-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.9rem;
    font-size: 0.76rem;
    color: #8fb0c4;
}

/* ==========================================================================
   Autenticação
   ========================================================================== */

.auth-body {
    background: #eef3f7;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

.auth-aside {
    background:
        radial-gradient(900px 420px at 15% 0%, rgba(240, 180, 41, 0.22), transparent 55%),
        linear-gradient(160deg, #08283a 0%, #0b4a6b 60%, #0c5f6d 100%);
    color: #fff;
    padding: 3rem 2.6rem;
    display: flex;
    align-items: center;
}

.auth-aside-content {
    max-width: 460px;
}

.auth-aside-badge {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #ffd98a;
    border: 1px solid rgba(255, 217, 138, 0.45);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.auth-aside h1 {
    color: #fff;
    font-size: clamp(1.7rem, 2.6vw, 2.4rem);
    line-height: 1.15;
    margin-bottom: 0.9rem;
}

.auth-aside p {
    color: #cfe3ee;
    font-size: 0.95rem;
    max-width: 44ch;
}

.auth-aside-list {
    list-style: none;
    padding: 0;
    margin: 1.6rem 0 0;
}

.auth-aside-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    font-size: 0.88rem;
    color: #dceaf3;
}

.auth-aside-list i {
    color: #5fdcb6;
    font-size: 1rem;
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.2rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.8rem 1.5rem 1.3rem;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-bottom: 1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--ilp-border);
}

.auth-logo {
    max-height: 46px;
    max-width: 110px;
    object-fit: contain;
}

.auth-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f0b429, #e08b1a);
    color: #3a2503;
    font-size: 1.3rem;
}

.auth-brand strong {
    display: block;
    font-size: 0.9rem;
    line-height: 1.2;
}

.auth-brand small {
    font-size: 0.74rem;
    color: var(--ilp-muted);
}

.auth-heading h2 {
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
}

.auth-heading p {
    font-size: 0.86rem;
    color: var(--ilp-muted);
    margin-bottom: 1.1rem;
}

.auth-hint {
    font-size: 0.76rem;
    color: var(--ilp-muted);
    margin: 0.9rem 0 0;
    display: flex;
    gap: 0.35rem;
    align-items: flex-start;
}

.auth-footer-text {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.2rem 0 0;
    font-size: 0.78rem;
    color: var(--ilp-muted);
}

/* ==========================================================================
   Páginas de erro
   ========================================================================== */

.minimal-body {
    background: #eef3f7;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.minimal-shell {
    width: 100%;
    max-width: 560px;
}

.minimal-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
    text-align: left;
}

.minimal-logo {
    max-height: 44px;
    max-width: 110px;
    object-fit: contain;
}

.minimal-brand strong {
    display: block;
    font-size: 0.88rem;
}

.minimal-brand small {
    font-size: 0.74rem;
    color: var(--ilp-muted);
}

.error-card {
    background: #fff;
    border: 1px solid var(--ilp-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem 1.5rem;
    text-align: center;
}

.error-icon {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--ilp-info-soft);
    color: var(--ilp-info);
    font-size: 1.6rem;
    margin-bottom: 0.7rem;
}

.error-code {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--ilp-muted);
}

.error-card h1 {
    font-size: 1.35rem;
    margin: 0.3rem 0 0.5rem;
}

.error-message {
    font-size: 0.9rem;
    color: var(--ilp-text-soft);
    max-width: 46ch;
    margin: 0 auto 1.2rem;
}

.error-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.error-hint {
    font-size: 0.78rem;
    color: var(--ilp-muted);
    margin: 1rem 0 0;
}

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (max-width: 1199.98px) {
    .map-canvas {
        height: 520px;
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
        width: min(86vw, 300px);
        flex-basis: auto;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block !important;
    }

    .app-content {
        padding: 1.1rem;
    }

    .app-topbar {
        padding: 0.7rem 1rem;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        display: none;
    }

    .map-canvas {
        height: 460px;
    }
}

@media (max-width: 767.98px) {
    .page-title {
        font-size: 1.28rem;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1 1 auto;
    }

    .filter-bar {
        padding: 0.75rem;
    }

    .filter-field {
        flex: 1 1 140px;
    }

    .filter-actions {
        margin-left: 0;
        width: 100%;
    }

    .filter-actions .btn {
        flex: 1 1 auto;
    }

    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.6rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .stat-hint {
        display: none;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .app-card .card-body {
        padding: 0.95rem;
    }

    .public-hero {
        padding: 2rem 1rem 2.2rem;
    }

    .public-form {
        padding: 0.2rem 0.95rem 1.1rem;
        border-radius: 12px;
    }

    .pole-card-head {
        flex-direction: column;
        gap: 0.5rem;
    }

    .pole-code {
        font-size: 1.45rem;
    }

    .problem-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .problem-option-body {
        padding: 0.65rem 0.55rem;
    }

    .problem-option-body span {
        font-size: 0.76rem;
    }

    .public-submit {
        box-shadow: 0 6px 18px rgba(11, 95, 138, 0.22);
    }

    .confirm-card,
    .notfound-card {
        padding: 1.4rem 1rem;
        border-radius: 14px;
    }

    .protocol-box strong {
        font-size: 1.25rem;
    }

    .map-canvas {
        height: 380px;
    }

    .table-footer {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .app-topbar .topbar-eyebrow {
        display: none;
    }

    .chip {
        font-size: 0.72rem;
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
