*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--font-size-base);
}

body.no-zoom {
    touch-action: manipulation;
}

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

img {
    display: block;
    max-width: 100%;
}

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

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d9e2df;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 16px;
    outline: none;
    padding: 11px 12px;
}

textarea {
    min-height: 104px;
    resize: vertical;
}

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

label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-weight: 700;
}

label span,
small,
.helper-text {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: clamp(1.55rem, 2vw, 2rem);
    line-height: 1.18;
}

h2 {
    font-size: 1.05rem;
    line-height: 1.3;
}

h3 {
    font-size: 0.95rem;
}

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
    padding: 11px 15px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 22%, transparent);
}

.btn.subtle {
    background: #eef4f1;
    color: var(--text);
    border-color: #d8e6e0;
}

.btn.ghost {
    background: transparent;
    color: var(--primary);
    border-color: #cfe3da;
}

.btn.danger {
    background: var(--danger);
    color: #fff;
}

.btn.small {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 0.82rem;
}

.btn.wide {
    width: 100%;
}

.brand-mark {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}

.brand-mark.large {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    font-size: 2.2rem;
}

.notice {
    border: 1px solid #dbe7e3;
    border-left-width: 4px;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    margin-bottom: 16px;
    padding: 12px 14px;
}

.notice.success {
    border-left-color: var(--primary);
}

.notice.warning {
    border-left-color: var(--accent);
}

.notice.danger {
    border-left-color: var(--danger);
}

.installer-body,
.login-body {
    min-height: 100vh;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent 42%),
        var(--bg);
}

.installer-shell,
.login-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.installer-panel,
.login-card {
    width: min(100%, 520px);
    border: 1px solid #dce7e2;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(31, 41, 51, 0.12);
    padding: 28px;
}

.installer-panel {
    width: min(100%, 760px);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.brand-lockup p,
.login-card p {
    color: var(--muted);
    margin-top: 5px;
}

.login-card {
    text-align: center;
}

.login-logo {
    display: grid;
    min-height: 94px;
    place-items: center;
    margin-bottom: 12px;
}

.login-logo img {
    max-width: 148px;
    max-height: 92px;
    object-fit: contain;
}

.login-form,
.installer-form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
    text-align: left;
}

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

.form-grid h2,
.form-grid h3,
.installer-form h2 {
    margin-top: 8px;
    padding-top: 8px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.check-row input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--primary);
}

.admin-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 280px 1fr;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid #dce7e2;
    background: #fff;
    padding: 22px 18px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    margin-bottom: 22px;
}

.admin-brand img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.admin-brand strong,
.admin-brand small {
    display: block;
    max-width: 178px;
    overflow-wrap: anywhere;
}

.admin-nav {
    display: grid;
    gap: 6px;
}

.admin-nav a {
    border-radius: 8px;
    color: #46545f;
    font-weight: 800;
    padding: 12px 13px;
}

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

.admin-main {
    min-width: 0;
    padding: 24px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.admin-topbar p {
    color: var(--muted);
    margin-top: 4px;
}

.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.stat-card,
.panel,
.mobile-panel,
.inspection-card,
.shortcut-card {
    border: 1px solid #dce7e2;
    border-radius: 8px;
    background: var(--surface);
}

.stat-card {
    display: grid;
    gap: 7px;
    min-height: 128px;
    padding: 18px;
}

.stat-card span {
    color: var(--muted);
    font-weight: 800;
}

.stat-card strong {
    font-size: 2rem;
    line-height: 1;
}

.stat-card.warning {
    border-color: color-mix(in srgb, var(--accent) 55%, #dce7e2);
}

.content-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.content-grid.two {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel {
    padding: 18px;
}

.panel + .panel,
.panel + .content-grid,
.content-grid + .panel {
    margin-top: 16px;
}

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

.panel-head p {
    color: var(--muted);
    margin-top: 4px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

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

th,
td {
    border-bottom: 1px solid #e5eeea;
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.82rem;
}

.compact th,
.compact td {
    padding: 10px 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #e9f4ef;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
    padding: 6px 9px;
    white-space: nowrap;
}

.badge.notificada,
.badge.em_andamento {
    background: #fff2d9;
    color: #8a5a00;
}

.badge.resolvida {
    background: #e6f7ea;
    color: #18733d;
}

.badge.arquivada {
    background: #eef1f4;
    color: #59636d;
}

.detail-grid,
.settings-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.detail-grid p {
    color: #394650;
    margin-top: 7px;
}

.map-frame {
    height: 280px;
    overflow: hidden;
    border: 1px solid #dce7e2;
    border-radius: 8px;
    margin-top: 18px;
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.photo-grid img,
.photo-grid video {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: #111827;
    object-fit: cover;
}

.status-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.permission-list {
    display: grid;
    gap: 9px;
    border: 1px solid #dce7e2;
    border-radius: 8px;
    padding: 12px;
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 14px;
}

.table-action {
    display: flex;
    justify-content: flex-end;
}

.switch {
    position: relative;
    display: inline-flex;
    width: 48px;
    height: 26px;
}

.switch input {
    position: absolute;
    opacity: 0;
}

.switch span {
    width: 100%;
    border-radius: 999px;
    background: #cbd5d1;
    cursor: pointer;
}

.switch span::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.16s ease;
}

.switch input:checked + span {
    background: var(--primary);
}

.switch input:checked + span::after {
    transform: translateX(22px);
}

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

.shortcut-preview {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid #dce7e2;
    border-radius: 8px;
    padding: 12px;
}

.shortcut-preview > span {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    background: var(--shortcut-color);
    color: #fff;
    font-weight: 900;
}

.settings-form {
    display: grid;
    gap: 18px;
}

.gallery-admin-grid {
    display: grid;
    gap: 12px;
}

.gallery-admin-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 14px;
    border: 1px solid #dce7e2;
    border-radius: 8px;
    padding: 12px;
}

.gallery-admin-card > img {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
}

.gallery-admin-card.no-photo {
    grid-template-columns: 1fr;
}

.gallery-admin-card p {
    color: #43515c;
    margin-top: 5px;
}

.gallery-admin-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 7px;
    margin-top: 10px;
}

.gallery-admin-photos img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
}

.cache-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.bar-chart {
    width: 100%;
    max-width: 100%;
}

.mobile-body {
    background: #dfe8e4;
}

.mobile-app {
    position: relative;
    width: min(100%, 480px);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    background: var(--bg);
    box-shadow: 0 0 0 1px rgba(31, 41, 51, 0.06);
}

.mobile-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #dce7e2;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(14px);
    padding: 12px 16px;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 900;
}

.mobile-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.mobile-brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar-pill {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 999px;
    background: #eef4f1;
    color: var(--primary);
    font-weight: 900;
}

.mobile-main {
    padding: 16px 14px 96px;
}

.mobile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.mobile-hero span {
    color: var(--muted);
    font-weight: 800;
}

.mobile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.mobile-stats article {
    display: grid;
    gap: 7px;
    border: 1px solid #dce7e2;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.mobile-stats span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.mobile-stats strong {
    font-size: 1.55rem;
}

.mobile-panel {
    padding: 16px;
    margin-bottom: 12px;
}

.mobile-panel h1 {
    font-size: 1.35rem;
}

.mobile-panel h2,
.mobile-form h2 {
    margin: 18px 0 10px;
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.shortcut-card {
    display: grid;
    gap: 12px;
    min-height: 110px;
    padding: 14px;
}

.shortcut-card span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: var(--shortcut-color);
    color: #fff;
    font-weight: 900;
}

.shortcut-card strong {
    overflow-wrap: anywhere;
}

.mobile-form {
    display: grid;
    gap: 13px;
}

.form-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 6px;
}

.step-pill {
    display: grid;
    min-height: 58px;
    justify-items: center;
    gap: 5px;
    border: 1px solid #dce7e2;
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 8px 4px;
}

.step-pill span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: #eef4f1;
    color: var(--muted);
    font-size: 0.78rem;
}

.step-pill.active {
    border-color: color-mix(in srgb, var(--primary) 55%, #dce7e2);
    background: color-mix(in srgb, var(--primary) 9%, #fff);
    color: var(--primary);
}

.step-pill.active span {
    background: var(--primary);
    color: #fff;
}

.step-pill.done span {
    background: color-mix(in srgb, var(--primary) 16%, #eef4f1);
    color: var(--primary);
}

.form-step {
    display: none;
    gap: 13px;
}

.form-step.active {
    display: grid;
}

.form-step h2 {
    margin: 8px 0 2px;
}

.step-actions {
    display: grid;
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
    gap: 10px;
    margin-top: 6px;
}

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

.split-row {
    display: grid;
    grid-template-columns: minmax(0, 0.45fr) minmax(0, 0.55fr);
    gap: 10px;
}

.select-plus {
    display: grid;
    grid-template-columns: 1fr 46px;
    gap: 8px;
}

.icon-button {
    display: grid;
    width: 46px;
    min-height: 46px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 900;
}

.photo-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.photo-preview img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
}

.photo-slots {
    display: grid;
    gap: 10px;
}

.photo-slots-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.photo-slots-head span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.photo-slot {
    display: none;
    border: 1px dashed #b9c9c3;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.photo-slot.active {
    display: grid;
}

.photo-slot.filled {
    border-style: solid;
    border-color: color-mix(in srgb, var(--primary) 40%, #dce7e2);
}

.photo-slot input {
    margin-top: 8px;
}

.photo-slot img {
    width: 100%;
    max-height: 180px;
    border-radius: 8px;
    margin-top: 10px;
    object-fit: cover;
}

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

.media-slot {
    display: grid;
    gap: 10px;
    border: 1px solid #dce7e2;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.media-slot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text);
    font-weight: 900;
}

.media-slot-header small {
    color: var(--muted);
    font-weight: 800;
}

.media-slot-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.media-icon-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #dce7e2;
    border-radius: 8px;
    background: #eef4f1;
    color: var(--primary);
    cursor: pointer;
    font-weight: 900;
}

.media-icon-button svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}

.media-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.media-preview img,
.media-preview video {
    width: 100%;
    max-height: 220px;
    border-radius: 8px;
    background: #111827;
    object-fit: cover;
}

.media-preview:empty {
    display: none;
}

.media-add-button {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 1.7rem;
    font-weight: 900;
    justify-self: center;
}

.mobile-map {
    display: grid;
    height: 260px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #dce7e2;
    border-radius: 8px;
    background: #e7efeb;
    color: var(--muted);
    font-weight: 800;
}

.mobile-map .leaflet-control-container {
    font-size: 12px;
}

.sticky-submit {
    position: sticky;
    bottom: 78px;
    z-index: 10;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: end center;
    background: rgba(18, 28, 36, 0.44);
    padding: 16px;
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal {
    width: min(100%, 448px);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}

.modal form {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mobile-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

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

.inspection-card {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 12px;
    overflow: hidden;
    padding: 10px;
}

.inspection-card > img,
.inspection-card > video {
    width: 94px;
    height: 94px;
    border-radius: 8px;
    background: #111827;
    object-fit: cover;
}

.inspection-card.no-photo {
    grid-template-columns: 1fr;
}

.inspection-card h2 {
    margin: 8px 0 5px;
    overflow-wrap: anywhere;
}

.inspection-detail {
    display: grid;
    gap: 14px;
}

.detail-list {
    display: grid;
    gap: 7px;
}

.detail-list h2 {
    margin-top: 12px;
}

.locked-fields-note {
    border: 1px solid #dce7e2;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: #fff;
    color: #43515c;
    font-weight: 700;
    line-height: 1.35;
    padding: 12px;
}

.detail-photos {
    margin-top: 4px;
}

.gallery-filter {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 12px;
}

.geo-readout {
    border: 1px dashed #b9c9c3;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 800;
    padding: 12px;
}

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

.gallery-folder {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    border: 1px solid #dce7e2;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    padding: 10px;
}

.gallery-folder > img {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    object-fit: cover;
}

.gallery-folder.no-photo {
    grid-template-columns: 1fr;
}

.gallery-add-photos {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.inspection-card p {
    color: #43515c;
    font-size: 0.92rem;
    line-height: 1.35;
}

.empty-state {
    border: 1px dashed #b9c9c3;
    border-radius: 8px;
    color: var(--muted);
    padding: 22px;
    text-align: center;
}

.profile-panel {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.mobile-tabbar {
    position: fixed;
    right: 50%;
    bottom: 0;
    z-index: 30;
    display: grid;
    width: min(100%, 480px);
    grid-template-columns: repeat(5, 1fr);
    transform: translateX(50%);
    border-top: 1px solid #dce7e2;
    background: color-mix(in srgb, #fff 96%, transparent);
    backdrop-filter: blur(14px);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.56);
    padding: 24px;
}

.loading-overlay[hidden] {
    display: none !important;
}

.loading-box {
    display: grid;
    width: min(100%, 300px);
    justify-items: center;
    gap: 10px;
    border-radius: 8px;
    background: #fff;
    padding: 24px;
    text-align: center;
}

.spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #dce7e2;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

@media print {
    .mobile-header,
    .mobile-tabbar,
    .print-hidden,
    .loading-overlay {
        display: none !important;
    }

    .mobile-app {
        width: 100%;
        box-shadow: none;
    }

    .mobile-main {
        padding: 0;
    }
}

.mobile-tabbar a {
    display: grid;
    gap: 3px;
    justify-items: center;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.mobile-tabbar span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    font-size: 1rem;
}

.mobile-tabbar a.active {
    color: var(--primary);
}

.mobile-tabbar a.active span {
    background: color-mix(in srgb, var(--primary) 12%, transparent);
}

@media (max-width: 1100px) {
    .stat-grid,
    .detail-grid,
    .settings-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid.two {
        grid-template-columns: 1fr;
    }
}

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

    .admin-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid #dce7e2;
    }

    .admin-nav {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .admin-topbar,
    .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

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

    .stat-grid,
    .detail-grid,
    .settings-columns {
        grid-template-columns: 1fr;
    }

    .admin-main {
        padding: 16px;
    }

    .inline-form,
    .split-row,
    .gallery-filter,
    .gallery-admin-card {
        grid-template-columns: 1fr;
    }

    .mobile-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
