@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-400.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-500.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-600.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-700.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-800.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-primary: #146c94;
    --color-primary-dark: #0f4f6d;
    --color-accent: #2f9e44;
    --color-ink: #14213d;
    --color-muted: #5f6c7b;
    --color-border: #d9e2ec;
    --color-bg: #f7fafc;
    --color-surface: #ffffff;
    --shadow-soft: 0 14px 34px rgba(20, 33, 61, 0.08);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: #eef6f8;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    color: var(--color-ink);
    background: var(--color-bg);
}

main {
    flex: 1 0 auto;
    min-height: 0;
}

a {
    color: inherit;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.container > *,
.hero-grid > *,
.auth-grid > *,
.admin-profile-page > *,
.dashboard-grid > *,
.detail-layout > *,
.form-grid > *,
.feature-grid > *,
.mini-announcement-grid > *,
.admin-charts > * {
    min-width: 0;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    min-height: 64px;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
}

.brand-logo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 14px;
    min-width: 0;
    color: var(--color-muted);
    font-size: 14px;
    white-space: nowrap;
}

.nav-links a {
    text-decoration: none;
    overflow-wrap: normal;
}

.nav-form {
    margin: 0;
}

.nav-form button {
    padding: 0;
    border: 0;
    color: var(--color-muted);
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.flash {
    margin-top: 10px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.flash.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.flash-success {
    color: #1b5e20;
    background: #e8f5e9;
    border-color: #b7dfbc;
}

.flash-error {
    color: #ffffff;
    background: #c92a2a;
    border-color: #9f1f1f;
    box-shadow: 0 8px 20px rgba(201, 42, 42, 0.18);
}

.flash-modal-source {
    display: none;
}

.popup-message {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(8, 27, 50, 0.48);
}

.popup-message-box {
    width: min(420px, 100%);
    padding: 24px;
    border: 1px solid #ffc6bd;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 24px 60px rgba(8, 27, 50, 0.28);
}

.popup-message-box h2 {
    margin: 0 0 10px;
    color: #c92a2a;
    font-size: 24px;
}

.popup-message-box p {
    margin: 0 0 18px;
    color: var(--color-ink);
    font-weight: 700;
}

.site-modal,
.publish-type-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(8, 27, 50, 0.58);
}

.site-modal-box,
.publish-type-modal-box {
    position: relative;
    width: min(480px, 100%);
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(8, 27, 50, 0.3);
}

.site-modal-box h2,
.publish-type-modal-box h2 {
    margin: 0 0 10px;
    color: var(--color-primary-dark);
    font-size: 24px;
    line-height: 1.2;
}

.site-modal-box p,
.publish-type-modal-box p {
    margin: 0;
    color: var(--color-muted);
    font-weight: 700;
    line-height: 1.55;
}

.site-modal-actions,
.publish-type-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.site-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    color: var(--color-muted);
    background: #eef4f7;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.site-modal-close:hover {
    color: var(--color-ink);
    background: #e0edf2;
}

.hero {
    padding: 18px 0 30px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 32px;
    align-items: center;
}

.hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero p {
    margin: 14px 0 0;
    max-width: 650px;
    color: var(--color-muted);
    font-size: 18px;
    line-height: 1.7;
}

.lead {
    max-width: 620px;
    color: var(--color-muted);
    font-size: 18px;
    line-height: 1.7;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.search-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.search-actions .button {
    width: auto;
    min-width: 112px;
    min-height: 38px;
    padding-inline: 14px;
    flex: 0 0 auto;
}

.contact-inline {
    color: var(--color-ink);
    font-weight: 800;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.button-primary {
    color: #ffffff;
    background: var(--color-primary);
}

.button-secondary {
    color: var(--color-primary-dark);
    background: #e7f5ff;
    border-color: #b6e0fe;
}

.button-danger {
    color: #ffffff;
    background: #c92a2a;
    border-color: #c92a2a;
}

.button-lost {
    color: #ffffff;
    background: #c92a2a;
}

.button-found {
    color: #ffffff;
    background: var(--color-accent);
}

.quick-search {
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.75fr);
    gap: 32px;
    align-items: flex-start;
}

.form-panel {
    display: grid;
    gap: 14px;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.form-note {
    margin: 4px 0 0;
    color: var(--color-muted);
    font-size: 14px;
}

.form-note a {
    color: var(--color-primary-dark);
    font-weight: 700;
}

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

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.user-dashboard-summary {
    grid-template-columns: minmax(0, 1fr);
}

.user-summary-card {
    display: grid;
    min-height: 0;
    padding: 16px 20px;
    border-left: 4px solid var(--color-primary);
}

.user-summary-card h3 {
    margin-bottom: 6px;
}

.user-summary-card p {
    font-size: 17px;
    line-height: 1.4;
}

.admin-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    position: relative;
    margin-bottom: 18px;
}

.admin-heading .page-heading {
    margin-bottom: 0;
}

.admin-profile-menu {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
}

.admin-profile-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 5px 14px 5px 6px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    color: var(--color-primary-dark);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.admin-profile-menu summary::-webkit-details-marker {
    display: none;
}

.admin-menu-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border-radius: 50%;
    color: #ffffff;
    background: var(--color-primary);
    font-weight: 800;
}

.admin-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-profile-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 22px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 0 24px 60px rgba(20, 33, 61, 0.18);
}

.chart-panel {
    padding: 22px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.admin-profile-panel h2,
.chart-panel h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.admin-profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-profile-head p {
    margin: 0 0 8px;
    color: var(--color-muted);
}

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

.admin-avatar {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    overflow: hidden;
    border: 3px solid #b6e0fe;
    border-radius: 50%;
    background: #e7f5ff;
    color: var(--color-primary-dark);
    font-size: 34px;
    font-weight: 800;
}

.admin-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.profile-divider {
    height: 1px;
    margin: 20px 0;
    background: var(--color-border);
}

.admin-profile-details h2 {
    margin-bottom: 14px;
}

.admin-profile-details dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.admin-profile-details div {
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #f8fafc;
}

.admin-profile-details dt {
    margin-bottom: 5px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-profile-details dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.admin-profile-page {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 18px;
    align-items: start;
}

.profile-page-panel {
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
}

.profile-edit-panel.is-hidden {
    display: none;
}

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

.admin-metric-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.admin-metric-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--stat-color) 24%, #ffffff);
    border-left: 4px solid var(--stat-color);
    border-radius: 8px;
}

.admin-metric-item span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-metric-item strong {
    color: var(--stat-color);
    font-size: 22px;
    line-height: 1;
}

.stat-card {
    min-height: 132px;
    border-left: 5px solid var(--stat-color);
}

.stat-card h3 {
    color: var(--stat-color);
}

.stat-card p {
    color: var(--color-ink);
    font-size: 17px;
    font-weight: 800;
}

.stat-blue {
    --stat-color: #146c94;
    background: #eef8fc;
}

.stat-green {
    --stat-color: #2f9e44;
    background: #ebfbee;
}

.stat-purple {
    --stat-color: #6741d9;
    background: #f3f0ff;
}

.stat-teal {
    --stat-color: #0ca678;
    background: #e6fcf5;
}

.stat-orange {
    --stat-color: #f08c00;
    background: #fff4e6;
}

.stat-red {
    --stat-color: #c92a2a;
    background: #fff5f5;
}

.stat-slate {
    --stat-color: #495057;
    background: #f1f3f5;
}

.admin-management-grid {
    gap: 10px;
    margin: 14px 0 16px;
}

.admin-link-section {
    margin: 14px 0 18px;
}

.admin-link-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.admin-link-section-head h2 {
    margin: 0;
    font-size: 20px;
}

.admin-link-section-head p {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    text-align: right;
}

.admin-management-card {
    display: grid;
    gap: 8px;
    align-content: start;
    min-height: 118px;
    padding: 14px;
}

.admin-management-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-management-head h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
}

.management-count-bubble {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--stat-color);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.admin-management-card p {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
}

.admin-management-card .button {
    min-height: 36px;
    padding: 0 12px;
    justify-self: start;
    font-size: 13px;
}

.admin-content-section {
    padding: 14px;
    border: 1px solid #cfe8f3;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
}

.admin-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}

.admin-content-card {
    border: 1px solid #b8dce9;
    background: #ffffff;
    box-shadow: none;
}

.admin-content-card .button {
    color: var(--color-primary-dark);
    border-color: #9bd1e5;
    background: #e9f7fc;
}

.admin-charts {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
    margin-top: 14px;
}

.traffic-summary {
    margin-top: 12px;
}

.traffic-panel {
    padding: 16px;
}

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

.traffic-panel-head h2,
.traffic-panel-head p {
    margin: 0;
}

.traffic-panel-head p {
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.35;
}

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

.traffic-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

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

.traffic-compact-table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
}

.traffic-compact-table th,
.traffic-compact-table td {
    padding: 10px 12px;
    border-right: 1px solid var(--color-border);
    text-align: center;
}

.traffic-compact-table th:last-child,
.traffic-compact-table td:last-child {
    border-right: 0;
}

.traffic-compact-table th {
    color: var(--color-muted);
    background: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.traffic-compact-table td {
    color: var(--color-primary-dark);
    font-size: 22px;
    font-weight: 800;
}

.traffic-details-button {
    white-space: nowrap;
}

.traffic-details {
    margin-top: 12px;
}

.traffic-details-table {
    min-width: 760px;
}

.traffic-details-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
    background: #f8fafc;
}

.traffic-year-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.traffic-year-form label {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.traffic-year-form select {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #ffffff;
}

.traffic-year-form .button {
    min-height: 38px;
    padding: 0 12px;
}

.traffic-item {
    display: grid;
    gap: 6px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--stat-color) 24%, #ffffff);
    border-left: 4px solid var(--stat-color);
    border-radius: 8px;
}

.traffic-item span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.traffic-item strong {
    color: var(--stat-color);
    font-size: 26px;
    line-height: 1;
}

.donut-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.donut-chart {
    display: grid;
    place-items: center;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    position: relative;
}

.donut-chart::after {
    content: "";
    position: absolute;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: var(--color-surface);
}

.donut-chart span {
    position: relative;
    z-index: 1;
    color: var(--color-ink);
    font-size: 28px;
    font-weight: 800;
}

.chart-legend {
    display: grid;
    gap: 8px;
}

.chart-legend p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--color-muted);
}

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

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

.bar-row {
    display: grid;
    gap: 7px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

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

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

.bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.quick-search h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.search-form {
    display: grid;
    gap: 12px;
}

.field {
    display: grid;
    gap: 6px;
}

.field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-muted);
}

.required-mark {
    color: #c92a2a;
    font-weight: 900;
}

.form-required-note {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.optional-label {
    color: var(--color-muted);
    font-weight: 600;
}

.field-feedback {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.field-feedback.is-invalid {
    color: #c92a2a;
}

.field-feedback.is-valid {
    color: #1f9d45;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--color-ink);
    font-size: 15px;
    font-family: inherit;
}

.admin-search-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin: 0 0 14px;
    padding: 12px;
}

.admin-search-form .actions {
    margin: 0;
    flex-wrap: nowrap;
}

.admin-search-form .button {
    min-height: 44px;
}

.password-input-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.password-input-wrap input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.password-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: #e7f5ff;
    color: var(--color-primary-dark);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.password-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle:hover,
.password-toggle:focus {
    background: #d5eefc;
}

.field textarea {
    resize: vertical;
}

.photo-upload {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(260px, 1fr);
    gap: 14px;
    align-items: flex-start;
}

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

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(5, 72px);
    gap: 8px;
    min-height: 72px;
}

.photo-preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #e7f5ff;
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.photo-preview-item button {
    position: absolute;
    top: 4px;
    right: 4px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(20, 33, 61, 0.78);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
}

.photo-count {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.photo-count-full {
    color: var(--color-accent);
}

.page-heading {
    margin-bottom: 14px;
}

.page-heading h1 {
    margin: 0 0 8px;
}

.page-heading .lead {
    max-width: min(100%, 980px);
    margin: 0;
}

.publish-form {
    gap: 20px;
}

.form-step {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0 0 18px;
    border: 0;
    border-bottom: 1px solid var(--color-border);
}

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

.form-step legend {
    padding: 0;
    margin-bottom: 4px;
    font-weight: 800;
    font-size: 18px;
}

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

.form-grid .field-full {
    grid-column: 1 / -1;
}

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

.segmented label {
    cursor: pointer;
}

.segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
    font-weight: 800;
}

.segmented input:checked + span {
    color: #ffffff;
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.type-segmented label:first-child span {
    color: #ffffff;
    border-color: #c92a2a;
    background: #c92a2a;
}

.type-segmented label:last-child span {
    color: #ffffff;
    border-color: var(--color-accent);
    background: var(--color-accent);
}

.type-segmented input:not(:checked) + span {
    opacity: 0.86;
}

.type-segmented input:checked + span {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(20, 108, 148, 0.18);
}

.type-segmented label:first-child input:checked + span {
    border-color: #c92a2a;
    background: #c92a2a;
}

.type-segmented label:last-child input:checked + span {
    border-color: var(--color-accent);
    background: var(--color-accent);
}

.reward-field[hidden] {
    display: none !important;
}

.section {
    padding: 10px 0 44px;
}

.section-title {
    margin: 0 0 18px;
    font-size: 28px;
}

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

.section-heading .section-title {
    margin-bottom: 0;
}

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

.feature-card {
    min-height: 160px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
}

.feature-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.feature-card p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.6;
}

.feature-card.user-summary-card {
    align-content: start;
    gap: 4px;
    min-height: 0;
    padding: 14px 18px;
}

.feature-card.user-summary-card h3 {
    margin: 0;
}

.feature-card.user-summary-card p {
    line-height: 1.35;
}

.dashboard .user-dashboard-summary {
    margin-top: 10px;
}

.dashboard .dashboard-section {
    margin-top: 22px;
}

.mini-announcement-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.mini-announcement-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
}

.mini-announcement-media {
    display: grid;
    place-items: center;
    height: clamp(96px, 12vw, 138px);
    overflow: hidden;
    background: #e7f5ff;
    color: var(--color-primary-dark);
    text-decoration: none;
    font-size: 42px;
    font-weight: 800;
}

.mini-announcement-media img {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100% - 16px);
    max-height: calc(100% - 16px);
    object-fit: contain;
}

.mini-announcement-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.mini-announcement-body h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
}

.mini-announcement-body h3 a {
    text-decoration: none;
}

.mini-announcement-body .meta-line {
    margin: 0;
}

.results-heading {
    margin: 28px 0 14px;
}

.results-heading h2 {
    margin: 0;
    font-size: 22px;
}

.checkbox-field {
    align-content: center;
    gap: 10px;
}

.checkbox-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-ink);
}

.checkbox-field input {
    width: auto;
    min-height: auto;
}

.result-list {
    display: grid;
    gap: 14px;
}

.result-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
}

.result-media {
    display: grid;
    place-items: center;
    min-height: 96px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: #e7f5ff;
    color: var(--color-primary-dark);
    font-size: 40px;
    font-weight: 800;
}

.result-media img {
    width: auto;
    height: auto;
    max-width: calc(100% - 12px);
    max-height: calc(100% - 12px);
    object-fit: contain;
}

.image-gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.result-body h3 {
    margin: 8px 0;
    font-size: 21px;
}

.result-body h3 a {
    text-decoration: none;
}

.result-body p {
    margin: 0 0 12px;
    color: var(--color-muted);
    line-height: 1.6;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--color-primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-muted {
    color: var(--color-primary-dark);
    background: #e7f5ff;
}

.badge.badge-lost {
    background: #c92a2a;
}

.badge.badge-found {
    background: var(--color-accent);
}

.dashboard-type-badge.badge-lost {
    color: #b42318;
    border: 1px solid #f1aeb5;
    background: #fff5f5;
}

.dashboard-type-badge.badge-found {
    color: #1f7a3a;
    border: 1px solid #b7e4c7;
    background: #ebfbee;
}

.badge-urgent {
    background: #c92a2a;
}

.meta-line {
    color: var(--color-muted);
    font-size: 14px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.pagination a {
    display: grid;
    place-items: center;
    min-width: 38px;
    min-height: 38px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
    text-decoration: none;
    font-weight: 800;
}

.pagination a.active {
    color: #ffffff;
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.empty-state {
    padding: 28px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: flex-start;
}

.detail-main,
.detail-side {
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
}

.detail-main h1 {
    margin: 14px 0 20px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.08;
}

.detail-main h2,
.detail-side h2 {
    margin: 22px 0 12px;
    font-size: 22px;
}

.detail-description {
    color: var(--color-muted);
    line-height: 1.75;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 140px));
    gap: 10px;
    align-items: start;
    margin-bottom: 18px;
}

.image-thumb {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: #ffffff;
    cursor: zoom-in;
}

.image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.image-thumb:hover img {
    filter: brightness(0.96);
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 33, 61, 0.84);
}

.image-lightbox.is-open {
    display: flex;
}

.image-lightbox img {
    max-width: min(100%, 1120px);
    max-height: 86vh;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
    object-fit: contain;
}

.image-lightbox button {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    color: #ffffff;
    background: rgba(20, 33, 61, 0.78);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.detail-side dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.detail-side dt {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.detail-side dd {
    margin: 0 0 8px;
}

.dashboard-section {
    margin-top: 32px;
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
}

.data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--color-muted);
    font-size: 13px;
    text-transform: uppercase;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.data-table span {
    color: var(--color-muted);
    font-size: 13px;
}

.user-announcements-table {
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}

.user-announcements-table thead th {
    background: #f8fafc;
    color: #42526b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.user-announcements-table th,
.user-announcements-table td {
    padding: 16px 20px;
}

.user-announcements-table tbody tr {
    transition: background-color 0.18s ease;
}

.user-announcements-table tbody tr:nth-child(even) {
    background: #fbfdff;
}

.user-announcements-table tbody tr:hover {
    background: #f1f8fc;
}

.user-announcements-table td:first-child a,
.user-announcements-table td:first-child strong {
    color: var(--color-primary-dark);
    font-weight: 800;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.user-announcements-table td:nth-child(1) {
    width: 30%;
}

.user-announcements-table td:nth-child(2) {
    width: 11%;
}

.user-announcements-table td:nth-child(3) {
    width: 16%;
}

.user-announcements-table td:nth-child(4) {
    width: 14%;
}

.user-announcements-table td:nth-child(5) {
    width: 29%;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid #d9e2ec;
    border-radius: 999px;
    color: #334e68;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 800;
}

.user-announcement-actions-cell {
    vertical-align: middle;
}

.user-announcement-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(86px, 1fr));
    gap: 8px;
    align-items: stretch;
}

.user-announcement-actions .inline-form,
.user-announcement-actions .button {
    width: 100%;
    margin: 0;
}

.user-announcement-actions .inline-form {
    display: flex;
}

.user-announcement-actions .button {
    min-width: 0;
    min-height: 38px;
    padding-inline: 10px;
    font-size: 14px;
}

.inline-form {
    display: inline-flex;
    margin: 0 6px 6px 0;
}

.inline-form .button {
    min-height: 36px;
    padding: 0 12px;
}

.admin-users-table {
    table-layout: fixed;
    min-width: 0;
}

.admin-users-table th:nth-child(1),
.admin-users-table td:nth-child(1) {
    width: 27%;
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2),
.admin-users-table th:nth-child(3),
.admin-users-table td:nth-child(3) {
    width: 7%;
}

.admin-users-table th:nth-child(4),
.admin-users-table td:nth-child(4) {
    width: 6%;
}

.admin-users-table th:last-child,
.admin-users-table td:last-child {
    width: 53%;
}

.admin-users-table th,
.admin-users-table td {
    padding: 10px 8px;
}

.admin-user-action-cell {
    vertical-align: middle;
}

.admin-user-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    white-space: nowrap;
}

.admin-user-actions .inline-form {
    align-items: center;
    margin: 0;
}

.admin-user-actions select,
.admin-user-actions input {
    min-height: 34px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--color-ink);
    font: inherit;
}

.admin-user-actions select {
    width: 86px;
    padding: 0 8px;
}

.admin-user-password-form input {
    width: 150px;
    padding: 0 10px;
}

.admin-user-actions .button {
    min-width: auto;
    min-height: 34px;
    padding: 0 9px;
    font-size: 14px;
}

.admin-announcements-table {
    min-width: 1180px;
}

.admin-pending-announcements-table {
    min-width: 1040px;
}

.admin-announcements-table th:last-child,
.admin-announcements-table td:last-child,
.admin-pending-announcements-table th:last-child,
.admin-pending-announcements-table td:last-child {
    width: 290px;
}

.admin-table-action-cell {
    vertical-align: middle;
}

.admin-table-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(104px, 1fr));
    gap: 8px;
    align-items: stretch;
    max-width: 256px;
}

.admin-table-actions .button,
.admin-table-actions .inline-form,
.admin-table-actions .inline-form .button {
    width: 100%;
}

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

.admin-table-actions .button {
    min-height: 42px;
    padding: 0 10px;
}

.admin-locations-table,
.admin-categories-table,
.admin-reports-table,
.admin-partners-table,
.admin-matches-table {
    min-width: 860px;
}

.admin-locations-table th:last-child,
.admin-locations-table td:last-child,
.admin-categories-table th:last-child,
.admin-categories-table td:last-child,
.admin-reports-table th:last-child,
.admin-reports-table td:last-child,
.admin-partners-table th:last-child,
.admin-partners-table td:last-child,
.admin-matches-table th:last-child,
.admin-matches-table td:last-child {
    width: 150px;
}

.data-table .button {
    white-space: nowrap;
    word-break: keep-all;
}

.claim-summary {
    margin-top: 20px;
}

.conversation-list {
    display: grid;
    gap: 16px;
}

.report-panel {
    margin-top: 18px;
}

.report-panel details {
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
}

.report-panel summary {
    cursor: pointer;
    color: var(--color-muted);
    font-weight: 800;
}

.report-panel .form-panel {
    margin-top: 16px;
    box-shadow: none;
}

.share-box {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.share-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-footer {
    flex-shrink: 0;
    padding: 18px 0;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    background: #eef6f8;
    font-size: 14px;
}

.footer-inner {
    display: grid;
    justify-items: center;
    gap: 4px;
    text-align: center;
}

.footer-inner strong {
    color: var(--color-ink);
    font-size: 16px;
}

.footer-inner p {
    max-width: 560px;
    margin: 0;
    line-height: 1.35;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    font-weight: 700;
}

.footer-links a {
    color: var(--color-primary-dark);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-inner span {
    color: #6b7785;
    font-size: 13px;
}

.legal-content,
.contact-layout {
    display: grid;
    gap: 14px;
}

.legal-card,
.contact-card {
    min-height: auto;
}

.legal-card h2,
.contact-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.contact-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.contact-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.contact-list div {
    display: grid;
    gap: 3px;
}

.contact-list dt {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.contact-list dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.contact-topics {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 18px;
}

.legal-update {
    margin: 2px 0 0;
    text-align: center;
}

@media (max-width: 820px) {
    .nav {
        align-items: flex-start;
        flex-direction: column;
        min-height: auto;
        padding: 10px 0;
        gap: 8px;
    }

    .brand {
        flex: 0 0 auto;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
        object-fit: contain;
    }

    .brand-name {
        font-size: 20px;
    }

    .nav-links {
        flex: 0 0 auto;
        width: 100%;
        justify-content: flex-start;
        gap: 10px 14px;
        overflow: visible;
        flex-wrap: wrap;
    }


    .hero-grid,
    .auth-grid,
    .admin-charts,
    .admin-profile-page,
    .dashboard-grid,
    .detail-layout,
    .form-grid,
    .photo-upload,
    .segmented,
    .contact-layout,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .photo-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    }

    .photo-preview-item {
        width: 100%;
        aspect-ratio: 1;
        height: auto;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-link-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .admin-link-section-head p {
        text-align: left;
    }

    .admin-stat-grid {
        grid-template-columns: 1fr;
    }

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

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

    .traffic-summary-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .traffic-details-button {
        justify-self: start;
    }

    .donut-row {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .admin-heading {
        flex-direction: column;
    }

    .admin-profile-menu {
        width: 100%;
    }

    .admin-profile-menu summary {
        width: 100%;
        justify-content: center;
    }

    .admin-profile-panel {
        position: static;
        width: 100%;
        max-height: none;
        margin-top: 10px;
    }

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

    .result-card {
        grid-template-columns: 1fr;
    }

    .mini-announcement-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .hero {
        padding-top: 12px;
    }
}

@media (max-width: 560px) {
    .container {
        width: 100%;
        padding-inline: 10px;
    }

    .site-modal-box,
    .publish-type-modal-box {
        padding: 20px;
    }

    .site-modal-actions,
    .publish-type-modal-actions {
        flex-direction: column-reverse;
    }

    .site-modal-actions .button,
    .publish-type-modal-actions .button {
        width: 100%;
    }

    main,
    .section,
    .hero,
    .quick-search,
    .form-panel,
    .detail-main,
    .detail-side,
    .page-heading {
        max-width: 100%;
        overflow-x: hidden;
    }

    .quick-search *,
    .form-panel *,
    .detail-main *,
    .detail-side *,
    .page-heading *,
    .hero * {
        overflow-wrap: anywhere;
    }

    .hero p,
    .lead {
        font-size: 16px;
        line-height: 1.55;
    }

    .hero h1,
    .detail-main h1,
    .page-heading h1 {
        max-width: 100%;
        overflow-wrap: anywhere;
        font-size: 28px;
        line-height: 1.12;
    }

    .hero p,
    .lead,
    .detail-description,
    .detail-main p,
    .detail-side,
    .contact-inline {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .quick-search,
    .form-panel,
    .feature-card,
    .result-card,
    .chart-panel,
    .admin-profile-panel,
    .profile-page-panel {
        padding: 14px;
    }

    .admin-management-grid {
        gap: 8px;
        margin: 8px 0 12px;
    }

    .admin-link-section {
        margin: 10px 0 14px;
    }

    .admin-link-section-head h2 {
        font-size: 19px;
        line-height: 1.2;
    }

    .admin-link-section-head p {
        font-size: 13px;
        line-height: 1.35;
    }

    .admin-management-card {
        min-height: 0;
        padding: 10px 12px;
        gap: 6px;
        border-left-width: 4px;
    }

    .admin-management-head {
        align-items: center;
        gap: 8px;
    }

    .admin-management-head h3 {
        font-size: 16px;
        line-height: 1.15;
    }

    .management-count-bubble {
        min-width: 28px;
        height: 28px;
        padding: 0 8px;
        font-size: 12px;
    }

    .admin-management-card p {
        font-size: 12.5px;
        line-height: 1.3;
    }

    .admin-management-card .button {
        min-height: 30px;
        width: auto;
        padding: 0 10px;
        border-radius: 7px;
        font-size: 12px;
        line-height: 1;
    }

    .admin-content-section {
        padding: 10px;
    }

    .admin-search-form {
        grid-template-columns: 1fr;
    }

    .admin-search-form .actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .admin-search-form .button,
    .page-heading .actions .button {
        min-height: 34px;
        padding-inline: 10px;
        font-size: 13px;
    }

    .page-heading .actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .page-heading .actions .button {
        width: auto;
        min-width: 0;
    }

    .actions {
        align-items: stretch;
        width: 100%;
    }

    .actions .button,
    .admin-profile-actions .button,
    .share-links .button {
        flex: 1 1 100%;
        width: 100%;
    }

    .search-actions .button {
        flex: 0 0 auto;
        width: auto;
        min-width: 96px;
        min-height: 36px;
        padding-inline: 10px;
        font-size: 13px;
    }

    .nav {
        gap: 12px;
    }

    .nav-links {
        gap: 8px 14px;
        font-size: 13px;
    }

    .admin-metric-strip,
    .traffic-grid,
    .admin-profile-details dl {
        grid-template-columns: 1fr;
    }

    .traffic-panel-head {
        display: grid;
    }

    .traffic-compact-table {
        min-width: 360px;
    }

    .traffic-details-toolbar,
    .traffic-year-form {
        align-items: stretch;
        flex-direction: column;
    }

    .traffic-year-form .button,
    .traffic-year-form select {
        width: 100%;
    }

    .donut-chart {
        width: 150px;
        height: 150px;
    }

    .donut-chart::after {
        width: 86px;
        height: 86px;
    }

    .table-wrap {
        width: 100%;
        margin-inline: 0;
        padding-inline: 0;
        overflow: visible;
    }

    .admin-announcements-table,
    .admin-pending-announcements-table,
    .user-announcements-table,
    .admin-users-table,
    .admin-locations-table,
    .admin-categories-table,
    .admin-reports-table,
    .admin-partners-table,
    .admin-matches-table,
    .traffic-details-table {
        display: block;
        min-width: 0;
        width: 100%;
        border: 0;
        background: transparent;
    }

    .admin-announcements-table thead,
    .admin-pending-announcements-table thead,
    .user-announcements-table thead,
    .admin-users-table thead,
    .admin-locations-table thead,
    .admin-categories-table thead,
    .admin-reports-table thead,
    .admin-partners-table thead,
    .admin-matches-table thead,
    .traffic-details-table thead {
        display: none;
    }

    .admin-announcements-table tbody,
    .admin-pending-announcements-table tbody,
    .user-announcements-table tbody,
    .admin-users-table tbody,
    .admin-locations-table tbody,
    .admin-categories-table tbody,
    .admin-reports-table tbody,
    .admin-partners-table tbody,
    .admin-matches-table tbody,
    .traffic-details-table tbody {
        display: grid;
        gap: 10px;
    }

    .admin-announcements-table tr,
    .admin-pending-announcements-table tr,
    .user-announcements-table tr,
    .admin-users-table tr,
    .admin-locations-table tr,
    .admin-categories-table tr,
    .admin-reports-table tr,
    .admin-partners-table tr,
    .admin-matches-table tr,
    .traffic-details-table tr {
        display: grid;
        gap: 0;
        padding: 10px;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: var(--color-surface);
    }

    .admin-announcements-table td,
    .admin-pending-announcements-table td,
    .user-announcements-table td,
    .admin-users-table td,
    .admin-locations-table td,
    .admin-categories-table td,
    .admin-reports-table td,
    .admin-partners-table td,
    .admin-matches-table td,
    .traffic-details-table td {
        display: grid;
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 8px;
        padding: 6px 0;
        border-bottom: 1px solid #eef2f5;
        overflow-wrap: anywhere;
        font-size: 13px;
        line-height: 1.35;
    }

    .admin-announcements-table td::before,
    .admin-pending-announcements-table td::before,
    .user-announcements-table td::before,
    .admin-users-table td::before,
    .admin-locations-table td::before,
    .admin-categories-table td::before,
    .admin-reports-table td::before,
    .admin-partners-table td::before,
    .admin-matches-table td::before,
    .traffic-details-table td::before {
        color: var(--color-muted);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    .admin-announcements-table td:nth-child(1)::before,
    .admin-pending-announcements-table td:nth-child(1)::before,
    .user-announcements-table td:nth-child(1)::before {
        content: "Annonce";
    }

    .admin-announcements-table td:nth-child(2)::before,
    .admin-pending-announcements-table td:nth-child(2)::before,
    .user-announcements-table td:nth-child(2)::before {
        content: "Type";
    }

    .admin-announcements-table td:nth-child(3)::before,
    .admin-pending-announcements-table td:nth-child(3)::before,
    .user-announcements-table td:nth-child(3)::before {
        content: "Lieu";
    }

    .admin-announcements-table td:nth-child(4)::before,
    .admin-pending-announcements-table td:nth-child(4)::before,
    .user-announcements-table td:nth-child(4)::before {
        content: "Statut";
    }

    .admin-announcements-table td:nth-child(5)::before,
    .admin-pending-announcements-table td:nth-child(5)::before {
        content: "Auteur";
    }

    .admin-announcements-table td:nth-child(6)::before,
    .admin-pending-announcements-table td:nth-child(6)::before,
    .user-announcements-table td:nth-child(5)::before,
    .admin-users-table td:nth-child(5)::before,
    .admin-locations-table td:nth-child(6)::before,
    .admin-categories-table td:nth-child(5)::before,
    .admin-reports-table td:nth-child(5)::before,
    .admin-partners-table td:nth-child(5)::before,
    .admin-matches-table td:nth-child(4)::before {
        content: "Action";
    }

    .admin-users-table td:nth-child(1)::before { content: "Utilisateur"; }
    .admin-users-table td:nth-child(2)::before { content: "Role"; }
    .admin-users-table td:nth-child(3)::before { content: "Statut"; }
    .admin-users-table td:nth-child(4)::before { content: "Annonces"; }
    .admin-locations-table td:nth-child(1)::before { content: "Ville"; }
    .admin-locations-table td:nth-child(2)::before { content: "Commune"; }
    .admin-locations-table td:nth-child(3)::before { content: "Quartier"; }
    .admin-locations-table td:nth-child(4)::before { content: "Occurrences"; }
    .admin-locations-table td:nth-child(5)::before { content: "Annonces"; }
    .admin-categories-table td:nth-child(1)::before { content: "Categorie"; }
    .admin-categories-table td:nth-child(2)::before { content: "Parent"; }
    .admin-categories-table td:nth-child(3)::before { content: "Sensible"; }
    .admin-categories-table td:nth-child(4)::before { content: "Annonces"; }
    .admin-reports-table td:nth-child(1)::before { content: "Annonce"; }
    .admin-reports-table td:nth-child(2)::before { content: "Motif"; }
    .admin-reports-table td:nth-child(3)::before { content: "Auteur"; }
    .admin-reports-table td:nth-child(4)::before { content: "Date"; }
    .admin-partners-table td:nth-child(1)::before { content: "Partenaire"; }
    .admin-partners-table td:nth-child(2)::before { content: "Type"; }
    .admin-partners-table td:nth-child(3)::before { content: "Ville"; }
    .admin-partners-table td:nth-child(4)::before { content: "Statut"; }
    .admin-matches-table td:nth-child(1)::before { content: "Objet perdu"; }
    .admin-matches-table td:nth-child(2)::before { content: "Objet trouve"; }
    .admin-matches-table td:nth-child(3)::before { content: "Score"; }
    .traffic-details-table td:nth-child(1)::before { content: "Pays"; }
    .traffic-details-table td:nth-child(2)::before { content: "IP"; }
    .traffic-details-table td:nth-child(3)::before { content: "Device"; }
    .traffic-details-table td:nth-child(4)::before { content: "Page"; }
    .traffic-details-table td:nth-child(5)::before { content: "Date"; }

    .admin-announcements-table td:last-child,
    .admin-pending-announcements-table td:last-child,
    .user-announcements-table td:last-child,
    .admin-users-table td:last-child,
    .admin-locations-table td:last-child,
    .admin-categories-table td:last-child,
    .admin-reports-table td:last-child,
    .admin-partners-table td:last-child,
    .admin-matches-table td:last-child,
    .traffic-details-table td:last-child {
        border-bottom: 0;
    }

    .admin-table-action-cell,
    .user-announcement-actions-cell,
    .admin-user-action-cell {
        display: block !important;
    }

    .admin-table-action-cell::before,
    .user-announcement-actions-cell::before,
    .admin-user-action-cell::before {
        display: block;
        margin-bottom: 6px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }

    .data-table .button {
        min-width: 98px;
        min-height: 38px;
        padding-inline: 10px;
        overflow-wrap: normal;
        word-break: keep-all;
        white-space: nowrap;
    }

    .data-table .inline-form {
        display: inline-flex;
        width: auto;
        margin: 0;
    }

    .user-summary-card {
        padding: 14px;
    }

    .user-announcements-table td:nth-child(n) {
        width: auto;
    }

    .user-announcement-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .user-announcement-actions .button {
        min-height: 34px;
        padding-inline: 8px;
        font-size: 13px;
    }

    .admin-announcements-table td,
    .admin-pending-announcements-table td,
    .user-announcements-table td,
    .admin-users-table td,
    .admin-locations-table td,
    .admin-categories-table td,
    .admin-reports-table td,
    .admin-partners-table td,
    .admin-matches-table td,
    .traffic-details-table td {
        padding: 6px 0;
    }

    .admin-table-actions,
    .admin-user-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        max-width: none;
        white-space: normal;
    }

    .admin-table-actions .button,
    .admin-user-actions .button,
    .admin-user-actions select,
    .admin-user-actions input {
        width: 100%;
        min-width: 0;
        min-height: 32px;
        padding-inline: 8px;
        font-size: 12px;
    }

    .admin-table-actions .inline-form,
    .admin-user-actions .inline-form {
        display: flex;
        width: 100%;
        min-width: 0;
    }

    .admin-user-actions .inline-form:first-child,
    .admin-user-password-form {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .admin-user-delete-form {
        grid-column: auto;
    }

    .mini-announcement-grid,
    .result-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .mini-announcement-body,
    .result-card {
        padding: 6px;
    }

    .mini-announcement-media,
    .result-media {
        min-height: 0;
        font-size: 18px;
    }

    .mini-announcement-media {
        height: 76px;
    }

    .result-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mini-announcement-body h3,
    .result-body h3 {
        display: -webkit-box;
        margin: 0;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 11px;
        line-height: 1.15;
    }

    .result-body p,
    .mini-announcement-body .meta-line,
    .result-body .meta-line {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 10px;
        line-height: 1.2;
    }

    .badges {
        gap: 3px;
    }

    .badge {
        min-height: 18px;
        padding: 0 4px;
        font-size: 8px;
    }
}

@media (max-width: 380px) {
    .brand-logo {
        width: 40px;
        height: 40px;
    }

    .brand-name {
        font-size: 18px;
    }

    .nav-links {
        gap: 8px 12px;
        font-size: 13px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .button {
        padding-inline: 12px;
    }

    .mini-announcement-grid,
    .result-list {
        gap: 5px;
    }

    .mini-announcement-body,
    .result-card {
        padding: 5px;
    }
}

@media (max-width: 560px) {
    .mini-announcement-card .mini-announcement-media {
        height: 74px;
    }

    .mini-announcement-card .mini-announcement-media img {
        max-width: calc(100% - 8px);
        max-height: calc(100% - 8px);
    }
}

/* Mobile-first finishing pass */
html,
body {
    width: 100%;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

.site-header,
main,
.site-footer {
    width: 100%;
    overflow-x: clip;
}

.nav-links a,
.nav-form button {
    line-height: 1.25;
}

.result-list {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.result-card {
    grid-template-columns: 1fr;
    gap: 10px;
}

.result-media {
    min-height: 0;
    height: 126px;
    aspect-ratio: auto;
}

.mini-announcement-media img,
.result-media img {
    width: auto;
    height: auto;
    max-width: calc(100% - 12px);
    max-height: calc(100% - 12px);
    object-fit: contain;
}

@media (max-width: 820px) {
    .admin-management-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .admin-management-card {
        min-height: 0;
    }

    .admin-management-card .button {
        justify-self: stretch;
    }
}

@media (max-width: 560px) {
    .section {
        padding: 8px 0 28px;
    }

    .hero {
        padding: 10px 0 24px;
    }

    .page-heading {
        margin-bottom: 10px;
    }

    .dashboard .dashboard-section,
    .dashboard-section {
        margin-top: 16px;
    }

    .nav {
        padding: 8px 0;
        gap: 7px;
    }

    .brand-logo {
        width: 40px;
    }

    .nav-links {
        gap: 7px 12px;
        font-size: 12.5px;
    }

    .nav-links a,
    .nav-form button {
        padding: 2px 0;
    }

    .feature-card.user-summary-card {
        padding: 12px;
    }

    .feature-card.user-summary-card p {
        font-size: 15px;
    }

    .admin-management-grid,
    .admin-content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .admin-management-card {
        padding: 9px;
    }

    .admin-management-head h3 {
        font-size: 14px;
    }

    .admin-management-card p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        min-height: 32px;
    }

    .admin-management-card .button {
        min-height: 30px;
        font-size: 12px;
    }

    .table-wrap {
        border: 0;
        background: transparent;
    }

    .admin-announcements-table td,
    .admin-pending-announcements-table td,
    .user-announcements-table td,
    .admin-users-table td,
    .admin-locations-table td,
    .admin-categories-table td,
    .admin-reports-table td,
    .admin-partners-table td,
    .admin-matches-table td,
    .traffic-details-table td {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 7px;
    }

    .data-table .button {
        min-width: 0;
    }

    .admin-table-actions,
    .admin-user-actions,
    .user-announcement-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-user-actions .inline-form:first-child,
    .admin-user-password-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .mini-announcement-grid,
    .result-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .mini-announcement-media,
    .result-media {
        height: 72px;
        min-height: 0;
    }

    .mini-announcement-card,
    .result-card {
        border-radius: 7px;
    }

    .mini-announcement-body,
    .result-card {
        padding: 6px;
    }

    .footer-inner {
        gap: 3px;
    }

    .site-footer {
        padding: 12px 0;
    }
}

@media (max-width: 380px) {
    .nav-links {
        gap: 6px 10px;
        font-size: 12px;
    }

    .admin-management-grid,
    .admin-content-grid {
        gap: 6px;
    }

    .admin-management-card {
        padding: 8px;
    }

    .admin-management-head h3 {
        font-size: 13px;
    }

    .mini-announcement-grid,
    .result-list {
        gap: 5px;
    }

    .mini-announcement-media,
    .result-media {
        height: 66px;
    }
}
.pwa-install-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid #9bd1e5;
    border-radius: 8px;
    color: var(--color-primary-dark);
    background: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.pwa-install-button:hover {
    background: #e9f7fc;
}

.pwa-install-button[hidden] {
    display: none !important;
}

@media (max-width: 560px) {
    .pwa-install-button {
        width: 100%;
        min-height: 36px;
    }
}