:root {
    --bg: #eef3f7;
    --panel: #ffffff;
    --ink: #132238;
    --muted: #5e6e80;
    --line: #d5e0e8;
    --primary: #0f766e;
    --primary-dark: #0b5364;
    --primary-light: #0891b2;
    --accent: #a86f12;
    --warn: #fff5d8;
    --shadow-sm: 0 1px 2px rgba(15, 35, 55, 0.04), 0 6px 18px rgba(15, 35, 55, 0.05);
    --shadow-md: 0 20px 48px rgba(15, 35, 55, 0.13);
    --radius-sm: 10px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 92% 4%, rgba(8, 145, 178, 0.13), transparent 30rem),
        linear-gradient(180deg, #f8fafc 0, var(--bg) 28rem);
    color: var(--ink);
    font-family: "Segoe UI Variable", "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

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

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: var(--shadow-md);
    color: var(--primary-dark);
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform 0.18s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid rgba(8, 145, 178, 0.4);
    outline-offset: 3px;
}

.menu-toggle,
.menu-backdrop {
    display: none;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: 272px;
    flex-direction: column;
    overflow-y: auto;
    padding: 24px 16px 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 8% -4%, rgba(14, 165, 233, 0.24), transparent 19rem),
        linear-gradient(155deg, #0f172a 0%, #12344a 54%, #0b2738 100%);
    color: #fff;
    box-shadow: 12px 0 34px rgba(15, 35, 55, 0.14);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 4px 24px;
    color: #fff;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0.01em;
}

.brand small {
    margin-top: 3px;
    color: #9fc4d5;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.menu {
    display: grid;
    gap: 12px;
}

.menu-group {
    display: grid;
    gap: 3px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.menu-group h2 {
    margin: 0 7px 5px;
    color: #92bdd0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.menu-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 9px 11px;
    border-radius: 10px;
    color: #edf6f2;
    font-size: 14px;
    font-weight: 550;
    line-height: 1.25;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.menu-link:active {
    transform: translateY(1px);
}

.menu-link.is-active {
    background: linear-gradient(115deg, rgba(14, 165, 233, 0.25), rgba(45, 212, 191, 0.14));
    box-shadow: inset 3px 0 0 #5eead4;
    color: #fff;
    font-weight: 700;
}

.menu-home {
    margin: 0 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
}

.menu-disclosure summary {
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

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

.menu-chevron {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-right: 2px solid #92bdd0;
    border-bottom: 2px solid #92bdd0;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.menu-disclosure[open] .menu-chevron {
    transform: rotate(225deg) translate(-2px, -1px);
}

.menu-disclosure.has-active-link > summary {
    color: #fff;
    font-weight: 700;
}

.menu-submenu {
    display: grid;
    gap: 2px;
    margin: 2px 0 5px 11px;
    padding-left: 9px;
    border-left: 1px solid rgba(94, 234, 212, 0.38);
}

.menu-sub-link {
    min-height: 44px;
    padding: 7px 9px;
    color: #c7dfeb;
    font-size: 13px;
}

.menu-logout-form {
    margin: 0;
}

.menu-logout {
    width: 100%;
    min-height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 550;
    line-height: 1.25;
    text-align: left;
}

.main {
    margin-left: 272px;
    padding: 34px 36px 82px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(8, 145, 178, 0.15);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
}

h1 {
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

h2 {
    margin-bottom: 14px;
    font-size: 18px;
}

.session {
    display: flex;
    align-items: center;
    gap: 12px;
}

.session-status {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-sm);
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.session-status > span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.13);
}

.link-button {
    border: 0;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
}

.table-action {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.table-action:hover {
    border-color: var(--primary);
}

.stats-grid,
.panel-grid,
.detail-grid,
.report-grid {
    display: grid;
    gap: 16px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

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

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

.stat,
.panel,
.report-card,
.form-panel,
.login-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.stat {
    position: relative;
    overflow: hidden;
    padding: 18px;
}

.stat::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    content: "";
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.stat strong {
    display: block;
    margin-top: 8px;
    color: var(--primary-dark);
    font-size: 36px;
    letter-spacing: -0.035em;
}

.stat.warning {
    background: linear-gradient(145deg, #fffdf7, var(--warn));
}

.stat.warning::before {
    background: linear-gradient(90deg, #b47c1d, #dfb85e);
}

.report-card {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 20px;
    color: var(--ink);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.report-card:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 28px rgba(15, 35, 55, 0.11);
    transform: translateY(-2px);
}

.report-card span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.report-card strong {
    font-size: 20px;
}

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

.report-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.report-table {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.report-table tr:hover td {
    background: #f8fbf6;
}

.report-table td {
    color: var(--ink);
}

.report-table td:nth-child(3) {
    color: var(--muted);
}

.report-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #edf5ef;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.small-button {
    min-height: 44px;
    padding: 0 12px;
    white-space: nowrap;
}

.report-intro {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
    gap: 34px;
    overflow: hidden;
    margin-bottom: 18px;
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid rgba(8, 145, 178, 0.2);
    border-radius: 22px;
    background:
        radial-gradient(circle at 85% 10%, rgba(14, 165, 233, 0.2), transparent 19rem),
        linear-gradient(135deg, #ffffff 0%, #eaf5f8 100%);
    box-shadow: var(--shadow-md);
}

.report-intro::after {
    position: absolute;
    right: -70px;
    bottom: -100px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(8, 145, 178, 0.14);
    border-radius: 50%;
    content: "";
}

.report-intro-copy {
    position: relative;
    z-index: 1;
    align-self: center;
}

.section-kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.report-intro h2 {
    max-width: 650px;
    margin-bottom: 12px;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.report-intro p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.report-menu-preview {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    align-self: center;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 17px;
    background: linear-gradient(155deg, #123c57, #0f172a);
    box-shadow: 0 16px 30px rgba(15, 35, 55, 0.24);
    color: #fff;
    transform: rotate(1.5deg);
}

.report-menu-preview span {
    color: #9fc4d5;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.report-menu-preview strong {
    margin-bottom: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 15px;
}

.report-menu-preview i {
    padding: 7px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: #d8eaf2;
    font-size: 12px;
    font-style: normal;
}

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

.report-category-grid article {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-sm);
}

.report-category-grid span {
    display: grid;
    width: 34px;
    height: 34px;
    margin-bottom: 20px;
    place-items: center;
    border-radius: 10px;
    background: #e4f3f6;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.report-category-grid h3 {
    margin: 0 0 7px;
    font-size: 17px;
}

.report-category-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.grouped-report {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.filter-bar label {
    flex: 1 1 180px;
    width: auto;
    min-width: 0;
}

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

.report-section-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.report-section-heading span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #edf5ef;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

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

.table-scroll table {
    width: 100%;
    min-width: 720px;
}

.panel,
.form-panel {
    min-width: 0;
    padding: 20px;
}

.empty-value {
    color: var(--muted);
    font-style: italic;
    font-weight: 450;
}

.report-detail-list {
    display: grid;
    gap: 0;
}

.report-detail-item {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.report-detail-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.report-detail-item > strong {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.report-detail-item p,
.report-detail-content p {
    overflow-wrap: anywhere;
    margin: 6px 0 0;
    line-height: 1.7;
}

.report-detail-content + .report-detail-content {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.report-detail-lines {
    margin-top: 16px;
}

.actions,
.page-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.primary,
.secondary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    box-shadow: 0 7px 16px rgba(8, 112, 136, 0.2);
    color: #fff;
}

.primary:hover {
    background: linear-gradient(135deg, #0aa3be, #09495a);
    box-shadow: 0 10px 22px rgba(8, 112, 136, 0.28);
    transform: translateY(-1px);
}

.secondary {
    border-color: var(--line);
    background: #fff;
    color: var(--primary);
}

.secondary:hover {
    border-color: rgba(8, 145, 178, 0.48);
    background: #f5fafc;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

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

th {
    background: #f6f9f7;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

tbody tr:hover td {
    background: #f8fbf9;
}

.row-warning {
    background: var(--warn);
}

.item-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.item-list li {
    display: grid;
    gap: 4px;
}

.item-list span,
.photo-card span {
    color: var(--muted);
    font-size: 13px;
}

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

label {
    display: grid;
    align-content: start;
    gap: 7px;
    font-weight: 700;
}

label span {
    font-size: 14px;
}

.field,
input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.field:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.14);
}

textarea {
    min-height: 96px;
}

.form-image-preview {
    display: block;
    width: 140px;
    height: 105px;
    max-width: 140px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
}

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

.photo-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.photo-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.photo-card div {
    padding: 14px;
}

.photo-meta,
.photo-title {
    display: block;
}

.photo-title {
    margin-top: 4px;
}

.detail-photo {
    width: 100%;
    max-width: 260px;
    border-radius: 8px;
}

.messages {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #bde4e8;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #eefbfb, #e3f3f7);
}

.calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
}

.calendar-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.calendar-header h2 {
    margin-bottom: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
    border-bottom: 1px solid var(--line);
    background: #f8fbf6;
}

.calendar-weekdays span {
    padding: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.calendar-day {
    min-height: 128px;
    padding: 8px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.calendar-day:nth-child(7n) {
    border-right: 0;
}

.calendar-day.is-empty {
    background: #f7f9f5;
}

.calendar-day.is-today {
    background: #fff8e8;
}

.calendar-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.calendar-day.is-today .calendar-number {
    background: var(--primary);
    color: #fff;
}

.calendar-events {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.calendar-event {
    display: grid;
    gap: 2px;
    padding: 7px;
    border-radius: 7px;
    background: #edf5ef;
    color: var(--primary-dark);
}

.calendar-event span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-event strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event.completado {
    background: #eef0ee;
    color: var(--muted);
    text-decoration: line-through;
}

.weather-table table {
    min-width: 1540px;
}

.weather-hourly-table table {
    min-width: 1540px;
}

.section-title {
    margin: 24px 0 14px;
}

.weather-recommendation {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #edf5ef;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.weather-recommendation.warning {
    background: var(--warn);
    color: #7a4a12;
}

.app-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 272px;
    z-index: 20;
    padding: 12px 20px;
    border-top: 1px solid rgba(8, 145, 178, 0.14);
    background: rgba(244, 247, 245, 0.92);
    backdrop-filter: blur(10px);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at 15% 10%, rgba(45, 212, 191, 0.2), transparent 28rem),
        linear-gradient(145deg, #0f172a, #0f6074 58%, #0b2738);
}

.login-card {
    width: min(420px, 100%);
    padding: 34px;
    box-shadow: 0 28px 65px rgba(4, 31, 25, 0.28);
}

.login-card h1 {
    margin-bottom: 20px;
}

.login-card .primary {
    justify-content: center;
    margin-top: 6px;
}

@media (max-width: 900px) {
    body.menu-open {
        overflow: hidden;
    }

.menu-toggle {
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 60;
        display: grid;
        gap: 4px;
        width: 44px;
        height: 44px;
        place-content: center;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 8px 22px rgba(15, 35, 55, 0.18);
        backdrop-filter: blur(10px);
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: var(--primary-dark);
    }

    .menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        display: block;
        pointer-events: none;
        background: rgba(0, 0, 0, 0);
        transition: background 0.2s ease;
    }

    body.menu-open .menu-backdrop {
        pointer-events: auto;
        background: rgba(0, 0, 0, 0.38);
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(86vw, 320px);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.2);
    }

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

    .sidebar nav {
        grid-template-columns: 1fr;
    }

    .main {
        margin-left: 0;
        overflow-x: hidden;
        padding: 78px 20px 76px;
    }

    .app-footer {
        left: 0;
    }

    .topbar,
    .session,
    .report-section-heading,
    .filter-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-bar {
        gap: 12px;
    }

    .filter-bar label {
        flex: 0 0 auto;
        width: 100%;
    }

    .stats-grid,
    .panel-grid,
    .detail-grid,
    .form-grid,
    .photo-grid,
    .report-grid,
    .calendar-layout,
    .report-category-grid,
    .report-intro {
        grid-template-columns: 1fr;
    }

    .report-intro {
        gap: 24px;
        border-radius: 18px;
    }

    .report-menu-preview {
        transform: none;
    }

    .calendar-panel {
        overflow-x: auto;
    }

    .calendar-weeks,
    .calendar-weekdays {
        min-width: 720px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .table-scroll table {
        display: table;
    }
}

@media (max-width: 560px) {
    .main {
        padding-right: 15px;
        padding-left: 15px;
    }

    .topbar {
        gap: 12px;
    }

    .filter-bar {
        padding: 12px;
    }

    .session-status {
        min-height: 32px;
    }

    .report-intro {
        padding: 23px;
    }

    .app-footer {
        padding-right: 12px;
        padding-left: 12px;
        font-size: 11px;
    }
}

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