:root {
    --accent: #18B76A;
    --accent-strong: #0E9F5C;
    --accent-soft: #E9F9F1;
    --ink: #101828;
    --muted: #667085;
    --line: #E7EDF3;
    --surface: #FFFFFF;
    --surface-soft: #F6F8FB;
    --blue: #2563EB;
    --blue-soft: #EAF1FF;
    --violet: #7C3AED;
    --violet-soft: #F1E9FF;
    --orange: #F97316;
    --orange-soft: #FFF3E8;
    --red: #EF4444;
    --red-soft: #FEECEC;
    --yellow: #F59E0B;
    --yellow-soft: #FFF7DF;
    --shadow: 0 18px 50px rgba(16, 24, 40, 0.07);
    --shadow-soft: 0 10px 30px rgba(16, 24, 40, 0.05);
    --radius: 20px;
    --radius-sm: 14px;
}

html {
    letter-spacing: 0;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    color: var(--ink);
    background: var(--surface-soft);
    letter-spacing: 0;
}

body[data-theme="dark"] {
    --ink: #F8FAFC;
    --muted: #A8B3C7;
    --line: #233044;
    --surface: #101827;
    --surface-soft: #0B1220;
    --accent-soft: rgba(24, 183, 106, 0.13);
    --blue-soft: rgba(37, 99, 235, 0.16);
    --violet-soft: rgba(124, 58, 237, 0.16);
    --orange-soft: rgba(249, 115, 22, 0.15);
    --red-soft: rgba(239, 68, 68, 0.15);
    --yellow-soft: rgba(245, 158, 11, 0.15);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.18);
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    color: var(--muted);
    line-height: 1.65;
}

.btn {
    border-radius: 12px;
    font-weight: 750;
    padding: 0.72rem 1rem;
}

.btn-success {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-strong);
    --bs-btn-hover-border-color: var(--accent-strong);
}

.btn-outline-dark {
    --bs-btn-color: var(--ink);
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-bg: var(--ink);
    --bs-btn-hover-border-color: var(--ink);
    --bs-btn-hover-color: var(--surface);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.72rem;
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--ink);
}

.brand span span {
    color: var(--accent);
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--accent);
    border-radius: 12px;
    font-size: 1.35rem;
    box-shadow: 0 10px 24px rgba(24, 183, 106, 0.24);
}

.landing-body {
    background: #fff;
}

body[data-theme="dark"].landing-body {
    background: var(--surface-soft);
}

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 76px;
    padding: 1rem 4vw;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

body[data-theme="dark"] .landing-nav {
    background: rgba(16, 24, 39, 0.86);
}

.landing-nav nav {
    display: flex;
    gap: 1.25rem;
    font-weight: 700;
    color: var(--muted);
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
    align-items: center;
    gap: 3rem;
    min-height: calc(100vh - 76px);
    padding: 5rem 4vw 4rem;
    overflow: hidden;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.page-heading span,
.section-heading span,
.landing-cta span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    font-weight: 800;
    font-size: 0.84rem;
}

.hero-copy h1 {
    margin: 1.2rem 0 1.15rem;
    font-size: 4.6rem;
    line-height: 1.02;
    font-weight: 900;
}

.hero-copy p {
    max-width: 680px;
    font-size: 1.18rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.8rem;
}

.hero-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    color: var(--muted);
    font-weight: 650;
}

.hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.hero-trust i {
    color: var(--accent);
}

.hero-visual {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 0.72rem;
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translateX(1.5rem);
}

.hero-visual img {
    display: block;
    width: 100%;
    min-height: 420px;
    object-fit: cover;
    border-radius: 22px;
}

.landing-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    padding: 0 4vw 4rem;
}

.landing-stats article,
.metric-card,
.panel,
.module-card,
.quick-card,
.score-card,
.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.landing-stats article {
    display: grid;
    gap: 0.35rem;
    padding: 1.35rem;
}

.landing-stats i {
    color: var(--accent);
    font-size: 1.45rem;
}

.landing-stats strong {
    font-size: 2rem;
    line-height: 1;
}

.landing-stats span {
    font-weight: 800;
}

.landing-stats small {
    color: var(--muted);
}

.landing-modules,
.landing-cta {
    padding: 4rem 4vw;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 1.5rem;
}

.section-heading h2,
.landing-cta h2 {
    margin-top: 1rem;
    font-size: 2.55rem;
    line-height: 1.12;
    font-weight: 900;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.module-card {
    padding: 1.35rem;
}

.module-card > span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.3rem;
}

.module-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.08rem;
    font-weight: 850;
}

.module-card p {
    margin: 0;
}

.landing-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin: 0 4vw 4rem;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

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

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    padding: 1.25rem;
    background: var(--surface);
    border-right: 1px solid var(--line);
}

.side-nav {
    overflow: auto;
    padding-right: 0.25rem;
}

.nav-group + .nav-group {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

.nav-label {
    margin: 0 0 0.45rem 0.6rem;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}

.side-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0.12rem 0;
    padding: 0.78rem 0.85rem;
    color: #344054;
    border-radius: 12px;
    font-weight: 750;
}

body[data-theme="dark"] .side-nav .nav-link {
    color: var(--muted);
}

.side-nav .nav-link:hover,
.side-nav .nav-link.active {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.pro-card {
    margin-top: auto;
    padding: 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.pro-title {
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 900;
}

.pro-card p {
    margin: 0.35rem 0 1rem;
    font-size: 0.86rem;
}

.main-shell {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 74px;
    padding: 0.85rem 1.4rem;
    background: rgba(246, 248, 251, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

body[data-theme="dark"] .topbar {
    background: rgba(11, 18, 32, 0.86);
}

.search-box {
    flex: 1;
    max-width: 640px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.72rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.04);
}

.search-box input,
.search-card input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}

.search-box kbd {
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    box-shadow: none;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
}

.icon-button {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: var(--surface);
}

.notification {
    position: relative;
}

.notification span {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 0.25rem;
    color: #fff;
    background: var(--red);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.35rem 0.6rem 0.35rem 0.35rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-weight: 900;
}

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

.user-chip strong,
.user-chip small {
    display: block;
    line-height: 1.18;
}

.user-chip small {
    color: var(--muted);
    font-size: 0.75rem;
}

.content-area {
    padding: 1.4rem;
}

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

.page-heading.compact {
    align-items: center;
}

.page-heading h1 {
    margin: 0.75rem 0 0.35rem;
    font-size: 2.2rem;
    line-height: 1.1;
    font-weight: 900;
}

.page-heading p {
    max-width: 760px;
    margin: 0;
}

.score-card {
    min-width: 170px;
    padding: 1.1rem;
}

.score-card small,
.metric-card small,
.institution-card small {
    color: var(--muted);
    font-weight: 750;
}

.score-card strong {
    display: block;
    margin: 0.15rem 0;
    font-size: 2.2rem;
    line-height: 1;
}

.score-card span {
    color: var(--accent);
    font-weight: 800;
}

.quick-grid,
.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.quick-card {
    display: grid;
    gap: 0.35rem;
    min-height: 116px;
    padding: 1rem;
}

.quick-card span,
.metric-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-size: 1.25rem;
}

.quick-card strong {
    font-weight: 850;
}

.quick-card small {
    color: var(--muted);
}

.tone-green,
.metric-icon.green {
    background: var(--accent);
}

.tone-blue,
.metric-icon.blue {
    background: var(--blue);
}

.tone-violet {
    background: var(--violet);
}

.tone-orange {
    background: var(--orange);
}

.tone-blue-soft {
    color: var(--blue) !important;
    background: var(--blue-soft) !important;
}

.metric-icon.red {
    background: var(--red);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }

.panel {
    padding: 1.15rem;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel h2,
.panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 850;
}

.panel-head a,
.link-arrow {
    color: var(--accent-strong);
    font-weight: 800;
    font-size: 0.86rem;
}

.signal-list {
    display: grid;
    gap: 0.2rem;
}

.signal-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

.signal-row:last-child {
    border-bottom: 0;
}

.signal-row strong,
.signal-row small {
    display: block;
}

.signal-row small {
    margin-top: 0.15rem;
    color: var(--muted);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.success,
.map-legend .success { background: var(--accent); }
.status-dot.warning,
.map-legend .warning { background: var(--yellow); }
.status-dot.danger,
.map-legend .danger { background: var(--red); }

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 850;
    white-space: nowrap;
}

.status-pill.success {
    color: #0F7C45;
    background: var(--accent-soft);
}

.status-pill.warning {
    color: #9A5B00;
    background: var(--yellow-soft);
}

.status-pill.danger {
    color: #B42318;
    background: var(--red-soft);
}

.map-surface {
    width: 100%;
    height: 310px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #EAF3EF;
}

.map-surface.tall {
    height: 620px;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

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

.map-legend b {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.deadline-list {
    display: grid;
    gap: 0.8rem;
}

.deadline-list div {
    display: grid;
    gap: 0.18rem;
}

.deadline-list span {
    color: var(--muted);
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem;
}

.metric-card strong,
.metric-card em {
    display: block;
}

.metric-card strong {
    font-size: 1.8rem;
    line-height: 1.1;
}

.metric-card em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.84rem;
}

.mini-chat,
.ai-result,
.document-preview {
    display: grid;
    gap: 0.65rem;
}

.bubble {
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
}

.bubble.user {
    justify-self: end;
    color: #0B4C2D;
    background: var(--accent-soft);
}

.bubble.bot {
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.chat-inline,
.chat-composer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.chat-inline input,
.chat-composer textarea,
.stack-form input,
.stack-form select,
.stack-form textarea,
.filter-bar select,
.search-card {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: var(--surface);
}

.chat-inline input,
.stack-form input,
.stack-form select,
.filter-bar select {
    min-height: 46px;
    padding: 0.72rem 0.85rem;
}

.chat-inline button,
.chat-composer button {
    width: 46px;
    min-width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
}

.ranking-list {
    display: grid;
    gap: 0.72rem;
}

.ranking-list div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
}

.ranking-list span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 0.78rem;
    font-weight: 900;
}

.ranking-list small {
    color: var(--muted);
    font-weight: 800;
}

.qr-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.qr-faux {
    display: grid;
    place-items: center;
    gap: 0.35rem;
    min-height: 96px;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
    text-align: center;
}

.qr-faux i {
    font-size: 2rem;
}

.two-column,
.assistant-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
    gap: 1rem;
}

.stack-form {
    display: grid;
    gap: 0.95rem;
}

.stack-form label {
    display: grid;
    gap: 0.4rem;
    color: var(--ink);
    font-weight: 800;
}

.stack-form textarea,
.chat-composer textarea {
    min-height: 132px;
    padding: 0.85rem;
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.gps-row,
.action-row,
.download-row,
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gps-row span {
    color: var(--muted);
    font-weight: 700;
}

.document-preview {
    min-height: 260px;
    padding: 1rem;
    white-space: pre-wrap;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
    color: var(--ink);
}

.delivery-box,
.delivery-proof {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
}

.delivery-box p,
.delivery-proof p {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
}

.check-row,
.delivery-options label {
    display: flex !important;
    align-items: center;
    gap: 0.55rem !important;
    font-weight: 750 !important;
}

.check-row input,
.delivery-options input {
    width: auto !important;
}

.delivery-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.delivery-options label {
    min-height: 46px;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.delivery-proof {
    margin-top: 1rem;
}

.delivery-proof h3 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 850;
}

.proof-grid {
    display: grid;
    gap: 0.5rem;
}

.proof-grid div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
}

.proof-grid div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.proof-grid dt {
    color: var(--muted);
    font-weight: 800;
}

.proof-grid dd {
    margin: 0;
    word-break: break-word;
}

.chat-panel {
    min-height: 650px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

.chat-thread {
    display: grid;
    align-content: start;
    gap: 1rem;
    overflow: auto;
    padding-right: 0.3rem;
}

.assistant-message,
.citizen-message {
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.assistant-message p,
.citizen-message p {
    margin: 0;
    padding: 0.82rem 0.95rem;
    border-radius: 16px;
}

.assistant-message p {
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.citizen-message {
    justify-content: end;
}

.citizen-message p {
    color: #0B4C2D;
    background: var(--accent-soft);
}

.institution-grid,
.qr-grid,
.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.institution-card {
    display: grid;
    gap: 1rem;
}

.institution-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 14px;
    font-size: 1.35rem;
}

.institution-card h2,
.qr-card h2 {
    margin: 0.15rem 0 0.4rem;
    font-size: 1.15rem;
    font-weight: 850;
}

.institution-card dl {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.institution-card dl div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0.8rem;
}

.institution-card dt {
    color: var(--muted);
    font-weight: 750;
}

.institution-card dd {
    margin: 0;
}

.filter-bar {
    margin-bottom: 1rem;
}

.filter-bar select {
    max-width: 240px;
}

.tracking-card {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
}

.timeline {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    display: grid;
    gap: 0.2rem;
    padding-left: 1.8rem;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px var(--accent-soft);
}

.timeline span {
    color: var(--muted);
}

.search-card {
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
}

.handbook-card small {
    color: var(--accent);
    font-weight: 850;
}

.template-list {
    display: grid;
}

.template-list button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    min-height: 48px;
    padding: 0.65rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    background: transparent;
    text-align: left;
    font-weight: 750;
}

.template-list button:last-child {
    border-bottom: 0;
}

.template-list button:hover {
    color: var(--accent);
}

.qr-card {
    display: grid;
    justify-items: center;
    gap: 0.6rem;
    text-align: center;
}

.qr-card img {
    width: 148px;
    height: 148px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.qr-card a {
    color: var(--accent-strong);
    word-break: break-all;
    font-size: 0.86rem;
}

.transparency-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ink);
    --bs-table-border-color: var(--line);
}

.table-note {
    margin: 0.6rem 0 0;
    font-size: 0.9rem;
}

.settings-list,
.achievement-list,
.petition-list {
    display: grid;
    gap: 0.75rem;
}

.settings-list label,
.achievement-list span {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink);
    font-weight: 750;
}

.petition-list article {
    display: grid;
    gap: 0.6rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
}

.petition-list strong,
.petition-list span {
    display: block;
}

.petition-list span {
    color: var(--muted);
    font-size: 0.88rem;
}

.progress {
    height: 10px;
    background: var(--surface-soft);
}

.progress-bar {
    background: var(--accent);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--surface-soft);
}

.auth-card {
    width: min(100%, 430px);
    padding: 1.45rem;
}

.auth-card h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 900;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.auth-links a {
    color: var(--accent-strong);
    font-weight: 800;
}

.toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 100;
    display: grid;
    gap: 0.7rem;
}

.app-toast {
    width: min(360px, calc(100vw - 2rem));
    padding: 0.85rem 1rem;
    color: #fff;
    background: #111827;
    border-radius: 14px;
    box-shadow: var(--shadow);
    font-weight: 800;
}

.leaflet-container {
    font-family: Inter, Arial, sans-serif;
}

.leaflet-popup-content {
    margin: 0.75rem;
}

@media (max-width: 1280px) {
    .quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .span-2,
    .span-3,
    .span-4,
    .span-6 {
        grid-column: span 6;
    }

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

@media (max-width: 992px) {
    .landing-nav nav {
        display: none;
    }

    .hero-section {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 3rem;
    }

    .hero-copy h1 {
        font-size: 3.35rem;
    }

    .hero-visual {
        transform: none;
    }

    .landing-stats,
    .module-grid,
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: min(310px, 86vw);
        transform: translateX(-105%);
        transition: transform 0.2s ease;
    }

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

    .two-column,
    .assistant-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .landing-nav {
        flex-wrap: wrap;
    }

    .landing-nav .btn-outline-dark {
        display: none;
    }

    .hero-copy h1,
    .section-heading h2,
    .landing-cta h2 {
        font-size: 2.45rem;
    }

    .hero-visual img {
        min-height: 260px;
    }

    .landing-stats,
    .module-grid,
    .quick-grid,
    .stat-grid,
    .institution-grid,
    .qr-grid,
    .admin-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .landing-cta,
    .page-heading {
        display: grid;
    }

    .topbar {
        flex-wrap: wrap;
    }

    .search-box {
        order: 3;
        flex-basis: 100%;
    }

    .content-area {
        padding: 1rem;
    }

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

    .span-2,
    .span-3,
    .span-4,
    .span-6 {
        grid-column: auto;
    }

    .signal-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .signal-row .status-pill {
        grid-column: 2;
        justify-self: start;
    }

    .filter-bar select {
        max-width: none;
    }

    .delivery-options {
        grid-template-columns: 1fr;
    }

    .proof-grid div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .map-surface.tall {
        height: 460px;
    }
}
