﻿:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --ink: #1f2a44;
    --muted: #6b7890;
    --line: #d8e0ec;
    --brand: #0f766e;
    --brand-deep: #134e4a;
    --brand-soft: #e6fffa;
    --warning: #b45309;
    --warning-soft: #fff7ed;
    --danger: #b91c1c;
    --danger-soft: #fef2f2;
    --success: #047857;
    --success-soft: #ecfdf5;
    --shadow: 0 16px 40px rgba(31, 42, 68, 0.08);
    --radius: 20px;
    --radius-sm: 12px;
    --font-main: "Segoe UI", Tahoma, Arial, sans-serif;
    --sidebar-width: 264px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-main);
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    max-width: 100%;
}

body {
    text-align: start;
    min-width: 0;
}

form {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    grid-template-areas: "sidebar main";
    align-items: start;
    direction: ltr;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

[dir="rtl"] .app-shell {
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
    grid-template-areas: "main sidebar";
}

.app-shell > * {
    min-width: 0;
    max-width: 100%;
}

.sidebar {
    grid-area: sidebar;
    width: 100%;
    max-width: var(--sidebar-width);
    min-width: 0;
    padding: 24px 18px;
    background: linear-gradient(180deg, var(--brand-deep) 0%, #0b2f3e 100%);
    color: #f9fdff;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    align-self: start;
    justify-self: stretch;
    z-index: 2;
}

[dir="rtl"] .sidebar,
[dir="rtl"] .main-panel {
    direction: rtl;
}

[dir="ltr"] .sidebar,
[dir="ltr"] .main-panel {
    direction: ltr;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.16);
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.language-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.language-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
}

.language-link:hover,
.language-link:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.24);
}

.language-link.is-active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.nav-toggle {
    display: none;
    width: 100%;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #f9fdff;
    font: inherit;
    font-weight: 700;
    text-align: start;
    cursor: pointer;
}

.sidebar-nav {
    display: block;
    min-width: 0;
}

.nav-group {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    min-width: 0;
}

.nav-group-title {
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

[dir="rtl"] .nav-group-title {
    letter-spacing: normal;
}

.nav-link {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid transparent;
    background: transparent;
    line-height: 1.4;
    text-align: start;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(-3px);
}

[dir="rtl"] .nav-link:hover,
[dir="rtl"] .nav-link:focus-visible {
    transform: translateX(3px);
}

.nav-link.is-active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.nav-placeholder {
    color: rgba(255, 255, 255, 0.74);
    cursor: default;
}

.nav-placeholder:hover,
.nav-placeholder:focus-visible {
    transform: none;
    background: rgba(255, 255, 255, 0.08);
}

.nav-soon {
    display: inline-flex;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.main-panel {
    grid-area: main;
    width: 100%;
    padding: 24px;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.page-title {
    margin: 0 0 6px;
    font-size: 2rem;
}

.page-subtitle {
    color: var(--muted);
}

.topbar-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-chip {
    min-width: 130px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(216, 224, 236, 0.9);
    border-radius: 14px;
    backdrop-filter: blur(10px);
}

.meta-label {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.meta-value {
    display: block;
    margin-top: 4px;
    font-weight: 700;
}

.auth-chip {
    display: grid;
    gap: 4px;
}

.logout-link {
    color: var(--brand-deep);
    font-size: 0.82rem;
    font-weight: 700;
}

.login-page {
    min-height: 100vh;
}

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

.login-card {
    width: min(100%, 420px);
    display: grid;
    gap: 18px;
    padding: 28px;
    border: 1px solid rgba(216, 224, 236, 0.7);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-brand h1 {
    margin: 0;
    font-size: 1.3rem;
}

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

.login-alert {
    margin: 0;
}

.login-remember {
    justify-self: start;
}

.login-button {
    width: 100%;
}

.page-content {
    display: grid;
    gap: 18px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.page-content > * {
    min-width: 0;
    max-width: 100%;
}

.filter-card,
.panel-card {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(216, 224, 236, 0.55);
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.panel-header h2,
.panel-header h3 {
    margin: 0;
    font-size: 1.15rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

.field-block {
    display: grid;
    gap: 8px;
}

.field-block label {
    color: var(--muted);
    font-size: 0.92rem;
}

.action-block {
    align-self: end;
}

.input-control,
input[type="text"],
input[type="date"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fbfdff;
    font-size: 0.97rem;
    color: var(--ink);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), #159e92);
    color: #fff;
}

.btn-secondary {
    background: #e8eef8;
    color: var(--ink);
}

.btn-danger {
    background: #fee2e2;
    color: var(--danger);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.kpi-card {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(216, 224, 236, 0.6);
}

.kpi-card span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.kpi-card strong {
    font-size: 1.55rem;
    line-height: 1.2;
}

.accent-red {
    background: linear-gradient(180deg, #fff 0%, #fff5f5 100%);
}

.accent-green {
    background: linear-gradient(180deg, #fff 0%, #f1fffb 100%);
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    line-height: 1.6;
}

.alert-info {
    color: var(--ink);
    background: #eff6ff;
    border-color: #bfdbfe;
}

.alert-warning {
    color: var(--warning);
    background: var(--warning-soft);
    border-color: #fed7aa;
}

.alert-danger {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #fecaca;
}

.alert-success {
    color: var(--success);
    background: var(--success-soft);
    border-color: #bbf7d0;
}

.chart-canvas {
    width: 100%;
    min-height: 320px;
    max-height: 420px;
    display: block;
    max-width: 100%;
}

.table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}

.table-scroll .data-grid {
    width: max(100%, 720px);
    min-width: max(100%, 720px);
}

.table-scroll .data-grid th,
.table-scroll .data-grid td {
    white-space: nowrap;
}

.data-grid {
    width: 100%;
    border-collapse: collapse;
    max-width: 100%;
}

.data-grid th,
.data-grid td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    text-align: start;
    vertical-align: top;
}

.data-grid th {
    font-size: 0.9rem;
    color: var(--muted);
    background: #fbfdff;
}

.data-grid tr:hover td {
    background: #f8fafc;
}

.two-column {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
    min-width: 0;
    max-width: 100%;
}

.three-column {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    min-width: 0;
    max-width: 100%;
}

.two-column > *,
.three-column > *,
.filter-grid > *,
.kpi-grid > *,
.status-grid > *,
.mapping-grid > *,
.grid-stack > *,
.ai-lab-shell > *,
.ai-lab-hero > *,
.topbar > *,
.topbar-meta > * {
    min-width: 0;
    max-width: 100%;
}

.compact-note {
    color: var(--muted);
    font-size: 0.92rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--brand-soft);
    color: var(--brand-deep);
    font-size: 0.86rem;
    font-weight: 700;
}

.table-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}

.empty-state {
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #fbfdff;
    color: var(--muted);
}

.mapping-grid {
    display: grid;
    gap: 12px;
}

.status-panel {
    display: grid;
    gap: 14px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.status-card {
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 14px;
    background: #fbfdff;
    display: grid;
    gap: 10px;
}

.status-topline {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.status-link-row a {
    color: var(--brand-deep);
    font-weight: 700;
}

.tag-good {
    background: var(--success-soft);
    color: var(--success);
}

.tag-bad {
    background: var(--danger-soft);
    color: var(--danger);
}

.mapping-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 0.7fr;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    background: #fcfdff;
    min-width: 0;
    max-width: 100%;
}

.mapping-label strong {
    display: block;
}

.mapping-label span {
    color: var(--muted);
    font-size: 0.9rem;
}

.grid-stack {
    display: grid;
    gap: 18px;
}

.compact-panel {
    margin-bottom: 0;
}

.totals-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.diagnostics-toggle summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--brand-deep);
    margin-bottom: 16px;
}

.diagnostics-stack {
    margin-top: 16px;
    min-width: 0;
    max-width: 100%;
}

.inner-panel {
    padding: 16px;
    box-shadow: none;
    border: 1px solid #edf2f7;
    background: #fbfdff;
    min-width: 0;
    max-width: 100%;
}

.tb-group-row td {
    color: #c00000;
    font-weight: 700;
    background: #f5fbff;
}

.detail-row td {
    font-weight: 400;
}

.ai-lab-note {
    margin-bottom: 16px;
}

.ai-lab-shell {
    display: grid;
    gap: 18px;
}

.ai-lab-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
    gap: 18px;
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 34%),
        linear-gradient(135deg, #f9fcff 0%, #eef6ff 48%, #f7fffd 100%);
}

.ai-lab-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    color: var(--brand-deep);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ai-lab-hero-copy h1 {
    margin: 14px 0 10px;
    font-size: 2rem;
    line-height: 1.1;
}

.ai-lab-subtitle {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

.ai-lab-hero-tags {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.ai-lab-hero-tags .tag {
    justify-content: center;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(191, 219, 254, 0.9);
}

.ai-lab-form-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.98) 100%);
}

.ai-lab-form-header {
    margin-bottom: 12px;
}

.ai-lab-filter-grid {
    align-items: stretch;
}

.ai-lab-request-block {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fbfdff;
}

.ai-request-box {
    min-height: 146px;
    border-color: #cbd5e1;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(255, 255, 255, 1) 100%);
}

.ai-request-box:focus,
.input-control:focus,
input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.2);
}

.ai-lab-primary-action {
    min-width: 170px;
}

.ai-lab-example-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.ai-lab-example {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #dbe7f3;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 600;
}

.ai-lab-clarification {
    margin-top: -4px;
}

.ai-lab-section {
    overflow: visible;
    min-width: 0;
}

.ai-lab-section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.ai-lab-section-header h2,
.ai-lab-section-header h3 {
    margin: 4px 0 0;
}

.ai-lab-section-kicker {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ai-lab-kpi-grid .kpi-card {
    background:
        linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
    border-color: rgba(191, 219, 254, 0.8);
}

.ai-lab-kpi-grid .kpi-card strong {
    color: #0f172a;
}

.ai-lab-results-header {
    margin-bottom: 14px;
}

.ai-lab-data-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fbff;
}

.ai-lab-data-grid td {
    font-size: 0.95rem;
}

.ai-lab-diagnostics-card {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
}

.ai-lab-save-actions {
    margin-bottom: 16px;
}

.ai-lab-save-form {
    display: grid;
    gap: 16px;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.diagnostics-json {
    margin: 16px 0;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.btn-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 12px;
    font-size: 0.88rem;
    line-height: 1.2;
    text-align: center;
}

.fiscal-years-card,
.fiscal-years-form-card {
    display: grid;
    gap: 18px;
}

.fiscal-years-header {
    align-items: start;
    margin-bottom: 0;
}

.fiscal-years-header-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.fiscal-years-subtitle {
    margin: 8px 0 0;
    max-width: 860px;
    line-height: 1.7;
}

.fiscal-years-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.fiscal-years-summary-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid #d9e3f0;
    background: linear-gradient(180deg, #fbfdff 0%, #f4fbff 100%);
}

.fiscal-years-summary-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fiscal-years-summary-card strong {
    font-size: 1.05rem;
    line-height: 1.4;
}

.fiscal-years-table-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    overflow-x: auto;
    background: #fff;
}

.fiscal-years-table {
    min-width: 1080px;
}

.fiscal-years-table th {
    background: #f7fbff;
    font-weight: 700;
}

.fiscal-years-table td {
    vertical-align: middle;
}

.fiscal-years-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

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

.fiscal-actions .btn {
    margin: 0;
}

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

.fiscal-form-section {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fbfdff;
}

.fiscal-form-section h3 {
    margin: 0;
    font-size: 1rem;
}

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

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

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

.fiscal-flag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.fiscal-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
}

.fiscal-form-actions .btn {
    min-width: 150px;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "sidebar"
            "main";
    }

    .sidebar {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        position: relative;
        padding: 20px 18px;
    }

    .nav-toggle {
        display: block;
    }

    body.nav-collapsible .sidebar-nav {
        display: none;
    }

    body.nav-collapsible .sidebar-nav.is-open {
        display: block;
    }

    .two-column,
    .three-column,
    .mapping-row {
        grid-template-columns: 1fr;
    }

    .ai-lab-hero {
        grid-template-columns: 1fr;
    }

    .ai-lab-hero-tags {
        justify-items: start;
    }

    .main-panel {
        padding: 18px;
    }

    .topbar {
        align-items: flex-start;
    }

    .fiscal-years-header-tags {
        justify-content: flex-start;
    }

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

    .fiscal-form-actions .btn {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 720px) {
    .fiscal-years-table {
        min-width: 0;
        border-collapse: separate;
    }

    .fiscal-years-table thead {
        display: none;
    }

    .fiscal-years-table,
    .fiscal-years-table tbody,
    .fiscal-years-table tr,
    .fiscal-years-table td {
        display: block;
        width: 100%;
    }

    .fiscal-years-table tr {
        padding: 16px;
        border-bottom: 1px solid #e2e8f0;
        background: #fff;
    }

    .fiscal-years-table td {
        display: grid;
        grid-template-columns: minmax(120px, 40%) minmax(0, 1fr);
        gap: 10px;
        padding: 8px 0;
        border: 0;
        text-align: start;
    }

    .fiscal-years-table td::before {
        color: var(--muted);
        font-size: 0.82rem;
        font-weight: 700;
    }

    .fiscal-years-table td:nth-child(1)::before { content: "Fiscal Year"; }
    .fiscal-years-table td:nth-child(2)::before { content: "Display Name"; }
    .fiscal-years-table td:nth-child(3)::before { content: "Server"; }
    .fiscal-years-table td:nth-child(4)::before { content: "Database"; }
    .fiscal-years-table td:nth-child(5)::before { content: "Start Date"; }
    .fiscal-years-table td:nth-child(6)::before { content: "End Date"; }
    .fiscal-years-table td:nth-child(7)::before { content: "Active"; }
    .fiscal-years-table td:nth-child(8)::before { content: "Latest"; }
    .fiscal-years-table td:nth-child(9)::before { content: "Actions"; }

    .fiscal-actions {
        justify-content: flex-start;
    }
}
