@import url("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css");

:root {
    --app-font: Inter, "Segoe UI", Arial, sans-serif;
    --base-font-size: 15px;
    --title-font-size: 26px;
    --primary: #127c72;
    --accent: #0e70d1;
    --bg: #f4f7f9;
    --surface: #ffffff;
    --surface-2: #edf3f5;
    --text: #17202a;
    --muted: #647381;
    --border: #dce5e9;
    --shadow: 0 18px 45px rgba(27, 42, 55, .08);
    --radius: 8px;
    --logo-width: 170px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--app-font);
    font-size: var(--base-font-size);
    color: var(--text);
    background: var(--bg);
    letter-spacing: 0;
    overflow-x: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

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

img {
    max-width: 100%;
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

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

.app-shell-reception {
    display: block;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    background: #ffffff;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand,
.login-brand,
.installer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand img,
.login-brand img,
.reception-logo img {
    width: var(--logo-width);
    max-height: 92px;
    object-fit: contain;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: inline-grid;
    place-items: center;
    background: var(--primary);
    color: #ffffff;
    font-weight: 900;
}

.side-nav {
    display: grid;
    gap: 8px;
}

.side-nav a,
.logout-link,
.reception-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: #42505c;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.side-nav a:hover,
.side-nav a.active,
.reception-nav a:hover,
.reception-nav a.active {
    background: color-mix(in srgb, var(--primary) 12%, #ffffff);
    color: var(--primary);
}

.logout-link {
    margin-top: auto;
    color: #b3261e;
}

.main-content {
    min-width: 0;
    padding: 28px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.page-header h1,
.reception-welcome h1 {
    margin: 0;
    font-size: var(--title-font-size);
    line-height: 1.15;
}

.page-kicker {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.user-chip,
.pill,
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    min-height: 28px;
    padding: 5px 10px;
    background: var(--surface-2);
    color: #42505c;
    font-size: 13px;
    white-space: nowrap;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.content-grid {
    display: grid;
    gap: 20px;
}

.two-columns {
    grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr);
}

.section-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.section-title.compact {
    margin-top: 20px;
}

.section-title .icon {
    width: 30px;
    height: 30px;
    color: var(--primary);
}

.section-title h2,
.chart-header h2 {
    margin: 0;
    font-size: 18px;
}

.section-title p,
.chart-header span,
.hint,
small {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.stack-form,
.form-grid {
    display: grid;
    gap: 14px;
}

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

.span-2 {
    grid-column: span 2;
}

label span {
    display: block;
    margin-bottom: 6px;
    color: #33414d;
    font-size: 13px;
    font-weight: 700;
}

.stack-form > label,
.form-grid > label,
.login-panel,
.installer-panel {
    min-width: 0;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 42px;
    padding: 10px 12px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.check-row input {
    width: 18px;
    min-height: 18px;
}

.check-row span {
    margin: 0;
}

.inline-check {
    min-height: 42px;
}

.btn,
.icon-btn,
.mini-card-actions a,
.mini-card-actions button {
    border: 0;
    border-radius: var(--radius);
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn:hover,
.icon-btn:hover,
.mini-card-actions a:hover,
.mini-card-actions button:hover {
    transform: translateY(-1px);
}

.btn-primary,
.icon-btn.primary {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 25%, transparent);
}

.btn-light,
.icon-btn {
    color: #2c3a45;
    background: var(--surface-2);
}

.button-row,
.drawer-actions,
.actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.address-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.address-tools .btn {
    flex: 0 0 auto;
    min-height: 36px;
}

.address-preview {
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.icon-btn {
    width: 40px;
    padding: 0;
}

.inline-form,
.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
    max-width: 230px;
}

.filter-bar input:first-child {
    max-width: 360px;
    flex: 1 1 260px;
}

.alert {
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-success,
.pill-success {
    background: #e6f7ef;
    color: #11703f;
    border-color: #bce8d1;
}

.alert-danger {
    background: #fff0ef;
    color: #b3261e;
    border-color: #ffc9c5;
}

.alert-info {
    background: #eaf4ff;
    color: #0e5797;
    border-color: #c7e1ff;
}

.pill-muted {
    background: #edf1f3;
    color: #6b7884;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 13px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

th {
    color: #50606d;
    font-size: 12px;
    text-transform: uppercase;
}

td small {
    display: block;
}

.empty-cell,
.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 24px;
}

.status-chip {
    font-weight: 800;
}

.status-nova {
    background: #e8f2ff;
    color: #0e5797;
}

.status-em_analise {
    background: #fff6d6;
    color: #8a6400;
}

.status-em_execucao {
    background: #e7f6f4;
    color: #126b64;
}

.status-concluida {
    background: #e6f7ef;
    color: #11703f;
}

.status-indeferida {
    background: #fff0ef;
    color: #b3261e;
}

.status-arquivada {
    background: #e8ebee;
    color: #5b6670;
}

.status-chip {
    --status-color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--status-color) 35%, #ffffff);
    background: color-mix(in srgb, var(--status-color) 14%, #ffffff);
    color: color-mix(in srgb, var(--status-color) 72%, #17202a);
}

.status-pulse {
    animation: statusPulse 1.35s ease-in-out infinite;
}

.status-select {
    --status-color: var(--accent);
    min-width: 168px;
    max-width: 220px;
    padding-left: 14px;
    border-color: color-mix(in srgb, var(--status-color) 38%, var(--border));
    box-shadow: inset 5px 0 0 var(--status-color);
    font-weight: 800;
}

.requests-table tr.row-archived {
    opacity: .58;
}

.status-create-form {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) 72px 90px auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.status-admin-table input[type="text"],
.status-admin-table input[name="label"] {
    min-width: 180px;
}

.status-admin-table input[type="color"] {
    width: 52px;
    padding: 4px;
}

.status-admin-table input[type="number"] {
    width: 82px;
}

.status-options-cell {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.reception-body {
    background:
        linear-gradient(135deg, rgba(18, 124, 114, .08), transparent 38%),
        linear-gradient(45deg, rgba(14, 112, 209, .08), transparent 42%),
        #f6f9fa;
}

.reception-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 28px;
    margin: -28px -28px 26px;
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.reception-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.reception-logo img {
    width: var(--logo-width);
}

.reception-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reception-hero {
    display: flex;
    justify-content: center;
    margin: 18px auto 26px;
}

.reception-welcome {
    text-align: center;
    max-width: 720px;
}

.reception-welcome p {
    color: var(--muted);
    margin: 8px 0 0;
}

.demand-card-grid {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.demand-card {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius);
    min-height: 190px;
    padding: 22px;
    color: var(--card-text);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--card-color) 88%, #ffffff), var(--card-color));
    text-align: left;
    cursor: pointer;
    box-shadow: 0 20px 42px color-mix(in srgb, var(--card-color) 28%, transparent);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    isolation: isolate;
    transform: translateY(0);
    animation: cardRise .5s ease both;
}

.demand-card:nth-child(2) {
    animation-delay: .06s;
}

.demand-card:nth-child(3) {
    animation-delay: .12s;
}

.demand-card:hover {
    transform: translateY(-4px);
}

.card-shine {
    position: absolute;
    inset: -35% auto auto -30%;
    width: 70%;
    height: 140%;
    background: rgba(255, 255, 255, .15);
    transform: rotate(18deg);
    transition: transform .3s ease;
    z-index: -1;
}

.demand-card:hover .card-shine {
    transform: translateX(120%) rotate(18deg);
}

.card-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .18);
}

.card-icon .icon {
    width: 31px;
    height: 31px;
}

.card-title {
    font-size: 24px;
    font-weight: 900;
    line-height: 1.12;
}

.card-action {
    font-size: 13px;
    font-weight: 800;
    opacity: .88;
}

.drawer-backdrop,
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(16, 29, 40, .28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 40;
}

.drawer-backdrop.open,
.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.request-drawer,
.message-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: min(620px, 100%);
    height: 100vh;
    padding: 22px;
    background: #ffffff;
    box-shadow: -20px 0 55px rgba(21, 35, 47, .18);
    transform: translateX(105%);
    transition: transform .24s ease;
    z-index: 50;
    overflow-y: auto;
}

.message-modal {
    width: min(500px, 100%);
}

.request-drawer.open,
.message-modal.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.drawer-header h2 {
    margin: 0;
}

.drawer-header p {
    margin: 4px 0 0;
    color: var(--muted);
}

.map-picker {
    position: relative;
    min-height: 230px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(30deg, rgba(18, 124, 114, .15), transparent 35%),
        linear-gradient(120deg, rgba(14, 112, 209, .12), transparent 42%),
        #eaf1f4;
    overflow: hidden;
}

.leaflet-map-picker {
    min-height: 320px;
}

.map-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.map-fallback {
    cursor: crosshair;
}

.map-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .8) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .8) 1px, transparent 1px),
        linear-gradient(35deg, transparent 46%, rgba(18, 124, 114, .2) 47%, rgba(18, 124, 114, .2) 49%, transparent 50%);
    background-size: 38px 38px, 38px 38px, 130px 130px;
}

.map-pin {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50% 50% 50% 0;
    background: #d9362b;
    transform: translate(-50%, -100%) rotate(-45deg);
    display: none;
    box-shadow: 0 10px 22px rgba(217, 54, 43, .28);
}

.map-pin::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    top: 9px;
    left: 9px;
}

.map-pin.active {
    display: block;
    animation: pinDrop .24s ease;
}

.map-copy {
    position: absolute;
    left: 16px;
    bottom: 16px;
    max-width: 310px;
    padding: 12px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 8px 24px rgba(25, 43, 54, .12);
    z-index: 500;
    pointer-events: none;
}

.map-copy strong,
.map-copy span {
    display: block;
}

.map-copy span {
    color: var(--muted);
    margin-top: 4px;
    font-size: 13px;
}

.toast-panel {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: min(360px, calc(100% - 44px));
    padding: 16px;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 60;
    animation: toastIn .25s ease;
}

.toast-panel strong,
.toast-panel span,
.toast-panel a {
    display: block;
}

.toast-panel span {
    margin: 5px 0 10px;
    color: var(--muted);
}

.toast-panel a {
    color: var(--accent);
    font-weight: 900;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(220px, .65fr) minmax(420px, 1.35fr);
    gap: 20px;
    margin-bottom: 20px;
}

.metric-card,
.chart-panel,
.contact-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

.metric-card span,
.metric-card small {
    color: var(--muted);
    display: block;
}

.metric-card strong {
    display: block;
    font-size: 38px;
    margin: 8px 0 5px;
}

.metric-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #0e70d1);
    border-color: transparent;
}

.metric-primary span,
.metric-primary small {
    color: rgba(255, 255, 255, .86);
}

.chart-panel:first-of-type {
    grid-row: span 2;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.bar-chart {
    display: grid;
    gap: 12px;
}

.bar-row {
    display: grid;
    grid-template-columns: minmax(90px, 150px) 1fr 42px;
    gap: 10px;
    align-items: center;
}

.bar-track {
    height: 11px;
    border-radius: 999px;
    background: #e8eef1;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--accent);
    transition: width .55s ease;
}

.timeline-list {
    display: grid;
    gap: 10px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fbfcfd;
}

.timeline-dot {
    --status-color: var(--accent);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--status-color);
}

.timeline-item p {
    margin: 3px 0 0;
    color: var(--muted);
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.contact-grid,
.demand-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.contact-card {
    display: grid;
    gap: 12px;
}

.contact-card strong,
.contact-card span,
.contact-card small {
    display: block;
}

.mini-demand-card {
    min-height: 150px;
    border-radius: var(--radius);
    padding: 16px;
    color: var(--card-text);
    background: var(--card-color);
    display: grid;
    gap: 10px;
}

.mini-demand-card .icon {
    width: 28px;
    height: 28px;
}

.mini-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.mini-card-actions a,
.mini-card-actions button {
    min-height: 32px;
    padding: 6px 9px;
    background: rgba(255, 255, 255, .2);
    color: inherit;
}

.mini-card-actions form {
    margin: 0;
}

.login-body,
.installer-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 26px;
    background:
        linear-gradient(140deg, rgba(18, 124, 114, .1), transparent 40%),
        linear-gradient(40deg, rgba(226, 161, 0, .11), transparent 38%),
        #f6f9fa;
}

.login-screen {
    width: min(980px, calc(100vw - 52px));
    min-height: 570px;
    display: grid;
    grid-template-columns: 1fr 440px;
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.login-visual {
    position: relative;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(18, 124, 114, .92), rgba(14, 112, 209, .86)),
        #127c72;
}

.pulse-ring {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 38px solid rgba(255, 255, 255, .14);
    animation: softPulse 2.8s ease infinite;
}

.login-card-preview {
    position: absolute;
    display: grid;
    gap: 12px;
}

.login-card-preview span {
    width: 250px;
    height: 64px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .28);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
}

.login-panel,
.installer-panel {
    padding: 34px;
    display: grid;
    align-content: center;
    gap: 22px;
}

.login-brand h1,
.installer-brand h1 {
    margin: 0;
    font-size: 25px;
}

.login-brand p,
.installer-brand p {
    margin: 4px 0 0;
    color: var(--muted);
}

.installer {
    width: min(620px, calc(100vw - 52px));
}

.installer-panel {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.api-docs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.api-docs h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

.api-docs p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.api-docs pre {
    margin: 0;
    padding: 12px;
    border-radius: var(--radius);
    background: #101d28;
    color: #e7f6f4;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.45;
}

.integration-api-form {
    max-width: 680px;
}

.baixa-panel-wrap {
    width: min(720px, calc(100vw - 52px));
}

.baixa-panel {
    align-content: start;
}

.baixa-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 8px 0 14px;
}

.baixa-summary div {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: #fbfcfd;
}

.baixa-summary span,
.baixa-summary strong {
    display: block;
}

.baixa-summary span {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.baixa-address {
    margin: 0 0 16px;
    color: var(--muted);
}

.provider-identified,
.module-permissions-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: #fbfcfd;
}

.provider-identified span,
.provider-identified strong {
    display: block;
}

.provider-identified span {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.module-permissions-box strong,
.module-permissions-box p {
    display: block;
    margin: 0 0 8px;
}

.module-permissions-box p,
.muted-text {
    color: var(--muted);
    font-size: 13px;
}

.service-update-mini {
    display: grid;
    gap: 4px;
    max-width: 220px;
}

.service-update-mini strong,
.service-update-mini small {
    display: block;
}

.service-update-mini p {
    margin: 2px 0;
    color: #33414d;
    font-size: 13px;
}

.service-update-mini img {
    width: 82px;
    height: 62px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(11, 23, 31, .58);
    backdrop-filter: blur(2px);
}

.upload-overlay.is-visible {
    display: grid;
}

.upload-dialog {
    width: min(100%, 340px);
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 26px 22px;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .25);
    text-align: center;
}

.upload-dialog strong {
    color: var(--text);
    font-size: 18px;
}

.upload-dialog p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.upload-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(18, 124, 114, .16);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: uploadSpin .8s linear infinite;
}

@keyframes uploadSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes cardRise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pinDrop {
    from {
        opacity: 0;
        transform: translate(-50%, -130%) rotate(-45deg) scale(.82);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -100%) rotate(-45deg) scale(1);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes statusPulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-color) 0%, transparent);
        filter: saturate(1);
    }
    50% {
        box-shadow: 0 0 0 5px color-mix(in srgb, var(--status-color) 22%, transparent);
        filter: saturate(1.22);
    }
}

@keyframes softPulse {
    0%,
    100% {
        transform: scale(.94);
    }
    50% {
        transform: scale(1);
    }
}

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

@media (max-width: 1020px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
    }

    .side-nav {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
    }

    .logout-link {
        margin-left: auto;
        margin-top: 0;
    }

    .two-columns,
    .dashboard-grid,
    .login-screen {
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: 220px;
    }
}

@media (max-width: 720px) {
    .login-body,
    .installer-body {
        padding: 14px;
    }

    .main-content {
        padding: 18px;
    }

    .reception-topbar {
        margin: -18px -18px 20px;
        padding: 14px 18px;
        align-items: flex-start;
        flex-direction: column;
    }

    .reception-nav a {
        min-height: 38px;
        padding: 8px 10px;
    }

    .form-grid,
    .span-2 {
        grid-template-columns: 1fr;
        grid-column: auto;
    }

    .filter-bar input,
    .filter-bar select,
    .filter-bar .btn {
        max-width: none;
        width: 100%;
    }

    .status-select {
        width: 100%;
        max-width: none;
    }

    .status-create-form {
        grid-template-columns: 1fr;
    }

    .status-create-form .btn {
        width: 100%;
    }

    .address-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .address-tools .btn {
        width: 100%;
    }

    .leaflet-map-picker {
        min-height: 280px;
    }

    .map-copy {
        right: 12px;
        left: 12px;
        bottom: 12px;
        max-width: none;
    }

    .dashboard-grid {
        display: grid;
    }

    .bar-row {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        grid-template-columns: 14px 1fr;
    }

    .timeline-item .status-chip {
        grid-column: 2;
        justify-self: flex-start;
    }

    .login-panel,
    .installer-panel {
        padding: 18px;
    }

    .login-screen,
    .installer {
        width: min(100%, calc(100vw - 72px));
    }

    .login-brand,
    .installer-brand {
        align-items: flex-start;
    }

    .login-brand h1,
    .installer-brand h1 {
        font-size: 22px;
    }
}
