@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-ThinItalic.ttf') format('truetype');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-ExtraLightItalic.ttf') format('truetype');
    font-weight: 200;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-MediumItalic.ttf') format('truetype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-SemiBoldItalic.ttf') format('truetype');
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-ExtraBoldItalic.ttf') format('truetype');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'FC Vision';
    src: url('./assets/fonts/FCVision-BlackItalic.ttf') format('truetype');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}
/* Custom styles */
:root {
    --font-ui: 'FC Vision', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body {
    --page-bg: #111827;
    --main-bg: #111827;
    --sidebar-bg: #1F2937;
    --header-bg: rgba(17, 24, 39, 0.5);
    --card-bg: #1F2937;
    --card-panel-bg: rgba(17, 24, 39, 0.5);
    --modal-bg: #1F2937;
    --surface-muted: #374151;
    --surface-soft: #4B5563;
    --border-color: rgba(55, 65, 81, 0.7);
    --text-main: #F9FAFB;
    --text-strong: #FFFFFF;
    --text-muted: #9CA3AF;
    --text-soft: #A7B0C0;
    --accent-primary: #3B82F6;
    --accent-secondary: #10B981;
    --decor-strip: transparent;
    --decor-accent: transparent;
    --chart-grid: #374151;
    --chart-tick: #9CA3AF;
    --chart-empty: #374151;
    font-family: var(--font-ui);
    font-weight: 400;
    background-color: var(--page-bg);
    color: var(--text-main);
}
body[data-theme="nesdc-light"] {
    --page-bg: #F7F7F5;
    --main-bg: #F7F7F5;
    --sidebar-bg: #FFFFFF;
    --header-bg: rgba(247, 247, 245, 0.9);
    --card-bg: #FFFFFF;
    --card-panel-bg: rgba(23, 37, 167, 0.045);
    --modal-bg: #FFFFFF;
    --surface-muted: #E9ECFF;
    --surface-soft: #DCE3FF;
    --border-color: rgba(23, 37, 167, 0.16);
    --text-main: #1725A7;
    --text-strong: #111F9E;
    --text-muted: #3344AF;
    --text-soft: #2A3AA5;
    --accent-primary: #1725A7;
    --accent-secondary: #7DD6CF;
    --decor-strip: #1725A7;
    --decor-accent: #7DD6CF;
    --chart-grid: rgba(23, 37, 167, 0.16);
    --chart-tick: #1725A7;
    --chart-empty: rgba(23, 37, 167, 0.15);
}

button,
input,
select,
textarea {
    font-family: var(--font-ui);
}
#main-title,
#sidebar h1,
#milestone-nav .font-bold,
.home-goal-card h3 {
    font-weight: 900;
}
.card h4,
.card .text-4xl,
.card .text-5xl,
.home-goal-card .text-2xl {
    font-weight: 800;
}
#main-subtitle,
.card p,
footer {
    font-weight: 300;
}
.card {
    background-color: var(--card-bg);
    border-radius: 0.75rem; /* rounded-xl */
    padding: 1.5rem; /* p-6 */
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.chart-container {
    position: relative;
    flex-grow: 1;
    min-height: 200px;
    min-width: 0;
}
.home-goal-card {
    --goal-vivid: #3B82F6;
    --goal-faint: rgba(59, 130, 246, 0.18);
    --goal-light: rgba(59, 130, 246, 0.08);
    --goal-blue: rgba(59, 130, 246, 0.18);
    --goal-glow: rgba(59, 130, 246, 0.22);
    --goal-sheen: rgba(255, 255, 255, 0.06);
    --goal-border: rgba(59, 130, 246, 0.48);
    --goal-shadow: rgba(59, 130, 246, 0.18);
    --goal-panel-bg: rgba(17, 24, 39, 0.5);
    --goal-panel-border: rgba(59, 130, 246, 0.36);
    --goal-strong-text: var(--text-strong);
    --goal-muted-text: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.16);
    overflow: hidden;
    position: relative;
}
.home-goal-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 8% 0%, var(--goal-glow) 0, transparent 42%),
        linear-gradient(135deg, var(--goal-sheen) 0%, transparent 52%);
    opacity: 0.96;
}
.home-goal-card > * {
    position: relative;
    z-index: 1;
}
.home-goal-card > .save-card-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
}
.home-goal-chart {
    min-height: 220px;
}
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}
.home-admin-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-left: 0.5rem;
    vertical-align: baseline;
}
.home-admin-action {
    padding: 0;
    border: 0;
    background: transparent;
    color: #60A5FA;
    font-size: 0.875rem;
    line-height: 1.25rem;
    cursor: pointer;
}
.home-admin-action:hover,
.home-admin-action:focus-visible {
    text-decoration: underline;
    outline: none;
}
.home-monitor-action {
    color: #2DD4BF;
}
.indicator-monitor-modal {
    position: relative;
    z-index: 1;
    width: min(96vw, 1180px);
    max-height: min(92vh, 860px);
    margin: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--modal-bg);
    color: var(--text-main);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.46);
}
.indicator-monitor-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background:
        linear-gradient(135deg, rgba(45, 212, 191, 0.14), rgba(96, 165, 250, 0.1)),
        var(--modal-bg);
}
.indicator-monitor-kicker {
    margin: 0 0 0.25rem;
    color: #2DD4BF;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
.indicator-monitor-header h3 {
    margin: 0;
    color: var(--text-strong);
    font-size: clamp(1.45rem, 2.2vw, 2.15rem);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: 0;
}
.indicator-monitor-header p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}
.indicator-monitor-close {
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-strong);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}
.indicator-monitor-close:hover,
.indicator-monitor-close:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    outline: none;
}
.indicator-monitor-close svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.indicator-monitor-body {
    overflow-y: auto;
    padding: 1rem;
}
.indicator-monitor-kpis,
.indicator-monitor-policy-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}
.indicator-monitor-kpi,
.indicator-monitor-policy,
.indicator-monitor-section,
.indicator-monitor-policy-bucket,
.indicator-monitor-row {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-panel-bg);
}
.indicator-monitor-kpi {
    min-width: 0;
    padding: 0.9rem;
    border-left: 4px solid #64748B;
}
.indicator-monitor-kpi--risk,
.indicator-monitor-row--risk,
.indicator-monitor-policy-bucket--risk {
    border-left-color: #EF4444;
}
.indicator-monitor-kpi--warning,
.indicator-monitor-row--warning,
.indicator-monitor-policy-bucket--warning {
    border-left-color: #F59E0B;
}
.indicator-monitor-kpi--good,
.indicator-monitor-row--achieved,
.indicator-monitor-policy-bucket--good {
    border-left-color: #22C55E;
}
.indicator-monitor-kpi--info,
.indicator-monitor-row--no-target,
.indicator-monitor-row--missing-data,
.indicator-monitor-policy-bucket--info {
    border-left-color: #38BDF8;
}
.indicator-monitor-kpi-title,
.indicator-monitor-policy-title {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 700;
}
.indicator-monitor-kpi-value {
    margin: 0.25rem 0;
    color: var(--text-strong);
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 900;
}
.indicator-monitor-kpi-detail,
.indicator-monitor-policy-detail {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.82rem;
    line-height: 1.35;
}
.indicator-monitor-policy {
    margin-top: 1rem;
    padding: 1rem;
}
.indicator-monitor-policy-grid {
    margin-top: 0.75rem;
}
.indicator-monitor-policy-bucket {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.85rem;
    border-left-width: 4px;
}
.indicator-monitor-policy-bucket span {
    flex: 0 0 auto;
    color: var(--text-strong);
    font-size: 1.45rem;
    font-weight: 900;
}
.indicator-monitor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.indicator-monitor-section {
    min-width: 0;
    padding: 1rem;
}
.indicator-monitor-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.indicator-monitor-section-heading h4 {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0;
}
.indicator-monitor-section-heading span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: right;
}
.indicator-monitor-list {
    display: grid;
    gap: 0.65rem;
}
.indicator-monitor-row {
    min-width: 0;
    padding: 0.85rem;
    border-left-width: 4px;
}
.indicator-monitor-row-main {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}
.indicator-monitor-rank {
    width: 1.9rem;
    height: 1.9rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #0F172A;
    background: #7DD6CF;
    font-weight: 900;
}
.indicator-monitor-row-title {
    min-width: 0;
    flex: 1 1 auto;
}
.indicator-monitor-row-title h5 {
    margin: 0;
    color: var(--text-strong);
    font-size: 0.98rem;
    line-height: 1.25;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.indicator-monitor-row-title p {
    margin: 0.2rem 0 0;
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.25;
}
.indicator-monitor-score {
    flex: 0 0 auto;
    min-width: 4.2rem;
    text-align: right;
}
.indicator-monitor-score strong {
    display: block;
    color: var(--text-strong);
    font-size: 1rem;
    line-height: 1;
    font-weight: 900;
}
.indicator-monitor-score span {
    color: var(--text-muted);
    font-size: 0.72rem;
}
.indicator-monitor-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    margin-top: 0.65rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}
.indicator-monitor-row-meta strong {
    color: var(--text-strong);
    font-weight: 800;
}
.indicator-monitor-scorebar {
    height: 0.35rem;
    margin-top: 0.75rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
}
.indicator-monitor-scorebar span {
    display: block;
    width: var(--score-width);
    height: 100%;
    border-radius: inherit;
    background: #38BDF8;
}
.indicator-monitor-row--risk .indicator-monitor-scorebar span {
    background: #EF4444;
}
.indicator-monitor-row--warning .indicator-monitor-scorebar span {
    background: #F59E0B;
}
.indicator-monitor-row--achieved .indicator-monitor-scorebar span {
    background: #22C55E;
}
.indicator-monitor-empty {
    margin: 0;
    padding: 0.85rem;
    border: 1px dashed var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-muted);
    text-align: center;
}
body[data-theme="nesdc-light"] .home-admin-action {
    color: #1725A7;
}
body[data-theme="nesdc-light"] .home-monitor-action {
    color: #047A73;
}
body[data-theme="nesdc-light"] .indicator-monitor-close {
    background: rgba(23, 37, 167, 0.06);
}
body[data-theme="nesdc-light"] .indicator-monitor-close:hover,
body[data-theme="nesdc-light"] .indicator-monitor-close:focus-visible {
    background: rgba(23, 37, 167, 0.12);
}
@media (max-width: 900px) {
    .indicator-monitor-kpis,
    .indicator-monitor-policy-grid,
    .indicator-monitor-grid {
        grid-template-columns: 1fr;
    }
    .indicator-monitor-header {
        padding: 1rem;
    }
    .indicator-monitor-row-main {
        flex-wrap: wrap;
    }
    .indicator-monitor-score {
        width: 100%;
        text-align: left;
    }
}
.copyright-modal-panel {
    position: relative;
    width: min(92vw, 920px);
    min-height: min(74vh, 560px);
    margin: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid rgba(125, 214, 207, 0.42);
    background:
        linear-gradient(180deg, rgba(125, 214, 207, 0.18) 0 10px, transparent 10px 100%),
        linear-gradient(135deg, rgba(17, 24, 39, 0.98) 0%, rgba(31, 41, 55, 0.98) 100%);
    color: #FFFFFF;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.46);
}
.copyright-modal-content {
    width: 100%;
    padding: 5rem 3rem 4.5rem;
    text-align: center;
}
.copyright-modal-kicker {
    margin: 0 0 1.25rem;
    color: var(--accent-secondary);
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}
.copyright-modal-content h3 {
    margin: 0;
    color: inherit;
    font-size: 4.75rem;
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}
.copyright-modal-year {
    margin: 1.35rem 0 0;
    color: var(--accent-secondary);
    font-size: 3.35rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}
.copyright-modal-note {
    margin: 1.5rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.15rem;
    font-weight: 500;
}
.copyright-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: inherit;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: background-color 0.18s ease, transform 0.18s ease;
}
.copyright-modal-close:hover,
.copyright-modal-close:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
    outline: none;
}
body[data-theme="nesdc-light"] .copyright-modal-panel {
    border-color: rgba(23, 37, 167, 0.22);
    background:
        linear-gradient(180deg, var(--decor-accent) 0 10px, transparent 10px 100%),
        linear-gradient(135deg, #FFFFFF 0%, #F3F6FF 100%);
    color: var(--text-strong);
    box-shadow: 0 30px 80px rgba(23, 37, 167, 0.24);
}
body[data-theme="nesdc-light"] .copyright-modal-note {
    color: var(--text-muted);
}
body[data-theme="nesdc-light"] .copyright-modal-close {
    background: rgba(23, 37, 167, 0.08);
    border-color: rgba(23, 37, 167, 0.16);
}
body[data-theme="nesdc-light"] .copyright-modal-close:hover,
body[data-theme="nesdc-light"] .copyright-modal-close:focus-visible {
    background: rgba(23, 37, 167, 0.14);
}
#toast-container {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
.toast-success { background-color: #16A34A; }
.toast-error { background-color: #DC2626; }
.toast-info { background-color: #2563EB; }
#theme-switcher {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    width: 3.25rem;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
#theme-switcher:hover, #theme-switcher:focus-within {
    width: 6rem;
}
body[data-theme="nesdc-light"] #theme-switcher {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(23, 37, 167, 0.18);
    box-shadow: 0 14px 34px rgba(23, 37, 167, 0.18);
}
.theme-option {
    width: 2.15rem;
    height: 2.15rem;
    flex-shrink: 0;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    order: 2;
}
.theme-option:hover {
    transform: translateY(-2px) scale(1.04);
}
.theme-option[aria-pressed="true"] {
    order: 1;
    border-color: #FFFFFF;
    box-shadow: 0 0 0 3px var(--accent-secondary), inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}
.theme-option[data-theme-value="classic"] {
    background: conic-gradient(from 45deg, #111827 0 45%, #1F2937 45% 72%, #10B981 72% 100%);
}
.theme-option[data-theme-value="nesdc-light"] {
    background: conic-gradient(from 45deg, #F7F7F5 0 45%, #1725A7 45% 72%, #7DD6CF 72% 100%);
}

body[data-theme] .flex.h-screen {
    background: var(--page-bg) !important;
    color: var(--text-main);
}
body[data-theme] main {
    position: relative;
    isolation: isolate;
    background: var(--main-bg);
    color: var(--text-main);
}
body[data-theme] main > header,
body[data-theme] main > div,
body[data-theme] main > footer {
    position: relative;
    z-index: 1;
}
body[data-theme^="nesdc-"] main::before,
body[data-theme^="nesdc-"] main::after {
    content: "";
    position: absolute;
    top: 0;
    pointer-events: none;
    z-index: 0;
}
body[data-theme^="nesdc-"] main::before {
    left: 0;
    right: 0;
    height: 22px;
    background: var(--decor-strip);
}
body[data-theme^="nesdc-"] main::after {
    right: -2rem;
    width: min(50vw, 560px);
    height: 56px;
    background: var(--decor-accent);
    clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%);
    top: 22px;
    opacity: 0.96;
}
body[data-theme^="nesdc-"] #main-header {
    padding-top: 2.35rem !important;
    background: linear-gradient(to bottom, var(--decor-strip) 0 22px, var(--header-bg) 22px 100%) !important;
}
body[data-theme] #sidebar {
    background: var(--sidebar-bg) !important;
    color: var(--text-main) !important;
    border-right: 1px solid var(--border-color);
}
body[data-theme] #main-header {
    background: var(--header-bg) !important;
    color: var(--text-main) !important;
}
body[data-theme^="nesdc-"] #main-header {
    background: linear-gradient(to bottom, var(--decor-strip) 0 22px, var(--header-bg) 22px 100%) !important;
}
body[data-theme] footer {
    color: var(--text-soft) !important;
}
.footer-credit {
    min-height: 42px;
}
.footer-logo-link {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    max-width: 9rem;
    min-width: 0;
}
.footer-logo {
    display: block;
    width: auto;
    height: 24px;
    max-width: 132px;
    object-fit: contain;
}
.footer-logo-blue {
    display: none;
}
.footer-logo-white {
    display: block;
}
body[data-theme="nesdc-light"] .footer-logo-blue {
    display: block;
}
body[data-theme="nesdc-light"] .footer-logo-white {
    display: none;
}
@media (max-width: 640px) {
    .copyright-modal-panel {
        width: calc(100vw - 1.5rem);
        min-height: 360px;
        margin: 0.75rem;
    }
    .copyright-modal-content {
        padding: 4.5rem 1.25rem 3rem;
    }
    .copyright-modal-content h3 {
        font-size: 2.75rem;
        line-height: 1;
    }
    .copyright-modal-year {
        font-size: 2.35rem;
    }
    .copyright-modal-note {
        font-size: 1rem;
    }
    .footer-credit {
        min-height: 42px;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-top: 0.45rem !important;
        padding-bottom: 0.45rem !important;
    }
    .footer-logo-link {
        left: 0.75rem;
        max-width: 4rem;
    }
    .footer-logo {
        height: 18px;
        max-width: 64px;
    }
}
body[data-theme] .card {
    background: var(--card-bg);
    color: var(--text-main);
}
body[data-theme^="nesdc-"] .card {
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
}
body[data-theme="nesdc-light"] .card {
    box-shadow: 0 18px 42px rgba(23, 37, 167, 0.08);
}
body[data-theme] .home-goal-card,
body[data-theme] .card .rounded-lg {
    border-color: var(--border-color) !important;
}
body[data-theme] .home-goal-card .bg-gray-900\/50,
body[data-theme] .card .bg-gray-900\/50 {
    background: var(--card-panel-bg) !important;
}
body[data-theme] .home-goal-card {
    border-color: var(--goal-border) !important;
}
body[data-theme="classic"] .home-goal-card {
    --goal-strong-text: #FFFFFF;
    --goal-muted-text: rgba(226, 232, 240, 0.86);
    --goal-panel-bg: rgba(15, 23, 42, 0.64);
    background:
        linear-gradient(135deg, var(--goal-faint) 0%, rgba(31, 41, 55, 0.98) 42%, rgba(17, 24, 39, 0.96) 100%);
    box-shadow: 0 18px 48px var(--goal-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
body[data-theme="nesdc-light"] .home-goal-card {
    --goal-strong-text: #07179E;
    --goal-muted-text: #2539A4;
    --goal-panel-bg: var(--goal-light);
    background:
        linear-gradient(135deg, #FFFFFF 0%, var(--goal-light) 54%, #FFFFFF 100%);
    box-shadow: 0 20px 48px var(--goal-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body[data-theme] .home-goal-card .bg-gray-900\/50 {
    background: var(--goal-panel-bg) !important;
    border-color: var(--goal-panel-border) !important;
}
body[data-theme] .home-goal-card .text-gray-300,
body[data-theme] .home-goal-card .text-gray-400,
body[data-theme] .home-goal-card .text-gray-500 {
    color: var(--goal-muted-text) !important;
}
body[data-theme] .home-goal-card h3,
body[data-theme] .home-goal-card .text-white {
    color: var(--goal-strong-text) !important;
}
.home-goal-value {
    color: var(--goal-vivid) !important;
}
body[data-theme="nesdc-light"] .home-goal-value {
    color: var(--goal-readable) !important;
}
body[data-theme="nesdc-light"] .text-green-400 {
    color: #118A3D !important;
}
body[data-theme="nesdc-light"] .text-red-500 {
    color: #B4232A !important;
}
body[data-theme] .bg-gray-800,
body[data-theme] .bg-gray-800\/40 {
    background-color: var(--modal-bg) !important;
}
body[data-theme] .bg-gray-700,
body[data-theme] .bg-gray-700\/50 {
    background-color: var(--surface-muted) !important;
}
body[data-theme] .bg-gray-600 {
    background-color: var(--surface-soft) !important;
}
body[data-theme] .border-gray-600,
body[data-theme] .border-gray-700,
body[data-theme] .border-gray-700\/50,
body[data-theme] .border-gray-700\/70 {
    border-color: var(--border-color) !important;
}
body[data-theme] #main-title,
body[data-theme] #sidebar h1,
body[data-theme] #dashboard-content h3.text-white,
body[data-theme] .card h3,
body[data-theme] .card h4,
body[data-theme] .card .text-white,
body[data-theme] #main-header .text-white,
body[data-theme] #milestone-nav .text-white,
body[data-theme] .text-gray-200 {
    color: var(--text-strong) !important;
}
body[data-theme] #main-subtitle,
body[data-theme] .text-gray-300,
body[data-theme] .text-gray-400 {
    color: var(--text-muted) !important;
}
body[data-theme] .text-gray-500 {
    color: var(--text-soft) !important;
}
body[data-theme] input,
body[data-theme] textarea,
body[data-theme] select {
    color: var(--text-main);
    background-color: var(--card-panel-bg) !important;
    border-color: var(--border-color) !important;
}
body[data-theme="nesdc-light"] .hover\:bg-gray-700:hover,
body[data-theme="nesdc-light"] #milestone-nav a.bg-gray-700 {
    background-color: rgba(23, 37, 167, 0.1) !important;
}

.sortable-ghost {
    opacity: 0.4;
    background: #2d3748;
}
.drag-handle {
    cursor: grab;
}
.target-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Auto-collapsing header for mobile screens */
@media (max-width: 768px) {
    #main-header {
        transition: padding 0.3s ease, min-height 0.3s ease, background-color 0.3s ease;
    }
    #main-header .header-title-container {
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin 0.3s ease;
        max-height: 250px;
        opacity: 1;
        overflow: hidden;
    }
    #main-header.header-collapsed {
        min-height: 0 !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    body[data-theme^="nesdc-"] #main-header.header-collapsed {
        padding-top: calc(22px + 0.4rem) !important;
    }
    #main-header.header-collapsed .header-title-container {
        max-height: 0 !important;
        opacity: 0 !important;
        margin: 0 !important;
        pointer-events: none;
    }
}

/* --- AI Side Drawer Styles --- */
.indicator-monitor-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 450px;
    max-width: 100%;
    background: var(--modal-bg);
    border-left: 1px solid var(--border-color);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
    z-index: 40;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.indicator-monitor-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(96, 165, 250, 0.05));
}

.drawer-header-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.drawer-sparkle {
    font-size: 1.5rem;
    animation: drawer-sparkle-pulse 2s infinite ease-in-out;
}

@keyframes drawer-sparkle-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; filter: drop-shadow(0 0 4px #2DD4BF); }
}

.drawer-header h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-strong);
}

.drawer-header p {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.drawer-close {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-strong);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.05);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    color: var(--text-main);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* AI Analyzing Row Button */
.ai-analyze-row-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #2DD4BF;
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.ai-analyze-row-btn:hover {
    background: rgba(45, 212, 191, 0.2);
    border-color: rgba(45, 212, 191, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.15);
}

.ai-sparkle-icon {
    display: inline-block;
    animation: sparkle-spin 3s infinite linear;
}

@keyframes sparkle-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* AI Markdown Styles in Drawer */
.ai-drawer-h1, .ai-drawer-h2, .ai-drawer-h3 {
    color: var(--text-strong);
    font-weight: 800;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.25rem;
}
.ai-drawer-h1 { font-size: 1.25rem; }
.ai-drawer-h2 { font-size: 1.15rem; color: #2DD4BF; }
.ai-drawer-h3 { font-size: 1.05rem; color: #60A5FA; }

.ai-drawer-list {
    margin: 0.5rem 0 1rem 1.25rem;
    list-style-type: disc;
}

.ai-drawer-list li {
    margin-bottom: 0.35rem;
}

.drawer-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

.drawer-empty-state p {
    margin: 0;
}

/* Skeleton Loading styles */
.ai-skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: ai-pulse 1.5s infinite ease-in-out;
}

@keyframes ai-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.ai-skeleton-line {
    height: 1rem;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 4px;
}

.ai-skeleton-line--short { width: 40%; }
.ai-skeleton-line--medium { width: 70%; }
.ai-skeleton-line--long { width: 90%; }
.ai-skeleton-line--header {
    height: 1.5rem;
    background: rgba(45, 212, 191, 0.15);
    width: 60%;
}



