/*
 * TrainBot CRM 7.1 — Dark Performance Ledger
 * High-contrast dark training interface inspired by black steel, rubber plates
 * and illuminated gym instrumentation. This layer intentionally replaces the
 * earlier glass/neon treatment while
 * keeping the existing HTML and application behavior intact.
 */

:root {
    --paper: #080d15;
    --paper-raised: #111a27;
    --paper-soft: #182333;
    --ink: #f3f7ff;
    --ink-soft: #c2ccdc;
    --ink-muted: #9faec3;
    --steel: #34445a;
    --steel-dark: #60728d;
    --navy: #070b12;
    --navy-raised: #172235;
    --cobalt: #6388ff;
    --cobalt-dark: #9cb3ff;
    --orange: #ff7442;
    --teal: #63d8cc;
    --success: #75e4aa;
    --warning: #ffd078;
    --danger: #ff919d;
    --focus: #8da8ff;
    --line: #34445a;
    --line-soft: #263449;
    --sidebar-width: 264px;
    --mobile-nav-height: 74px;
    --font-heading: "Barlow Condensed", "Arial Narrow", sans-serif;
    --font-body: "Manrope", Arial, sans-serif;
    --font-utility: "IBM Plex Mono", ui-monospace, monospace;
    --shadow-card: 0 12px 30px rgba(0, 0, 0, .28);
    --shadow-float: 0 24px 64px rgba(0, 0, 0, .46);

    /* Compatibility with the original component tokens. */
    --bg-main: var(--paper);
    --bg-card: var(--paper-raised);
    --bg-card-hover: var(--paper-raised);
    --border-color: var(--line);
    --border-glow: var(--cobalt);
    --color-primary: var(--cobalt);
    --color-primary-light: #8ba7ff;
    --color-secondary: var(--orange);
    --color-accent: var(--teal);
    --color-success: var(--success);
    --color-warning: var(--warning);
    --color-danger: var(--danger);
    --text-main: var(--ink);
    --text-muted: var(--ink-muted);
}

html {
    color-scheme: dark;
    background: var(--paper);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    background:
        linear-gradient(90deg, rgba(133, 157, 194, .035) 1px, transparent 1px),
        linear-gradient(rgba(133, 157, 194, .035) 1px, transparent 1px),
        var(--paper);
    background-size: 32px 32px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
}

::selection {
    background: #315dcc;
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--paper-soft);
}

::-webkit-scrollbar-thumb {
    border: 2px solid var(--paper-soft);
    border-radius: 999px;
    background: #60728d;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--navy-raised);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ink);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: .01em;
    text-transform: none;
}

p,
small,
.card-subtitle {
    color: var(--ink-soft);
}

a {
    color: var(--cobalt-dark);
    text-underline-offset: 3px;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    z-index: 10000;
    top: 12px;
    left: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font-weight: 800;
    transform: translateY(-160%);
    transition: transform .16s ease;
}

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

:focus-visible {
    outline: 3px solid var(--focus) !important;
    outline-offset: 3px !important;
    border-radius: 5px;
}

#main-content:focus-visible {
    outline: none !important;
}

/* Login */
.screen:not(.active) {
    display: none !important;
}

#login-screen {
    position: fixed;
    z-index: 2000;
    inset: 0;
    width: 100%;
    min-height: 100dvh;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 75% 18%, rgba(99, 136, 255, .28), transparent 28%),
        linear-gradient(125deg, #080d15, #0e1930 56%, #122b66);
}

#login-screen::before,
#login-screen::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    border: clamp(28px, 5vw, 72px) solid rgba(255, 255, 255, .13);
}

#login-screen::before {
    width: 42vw;
    height: 42vw;
    top: -25vw;
    right: -8vw;
}

#login-screen::after {
    width: 28vw;
    height: 28vw;
    bottom: -19vw;
    left: -7vw;
}

.login-card {
    max-width: 470px;
    padding: clamp(32px, 5vw, 54px);
    border: 1px solid rgba(156, 179, 255, .44);
    border-radius: 18px;
    background: rgba(17, 26, 39, .97);
    box-shadow: 0 32px 90px rgba(0, 0, 0, .58);
    backdrop-filter: none;
}

.login-card .brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 15px;
}

.login-card .logo h1 {
    color: var(--ink);
    background: none;
    font-size: 34px;
    letter-spacing: .025em;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: currentColor;
}

.login-card .subtitle {
    margin: 10px 0 30px;
    color: var(--ink-soft);
}

.login-security-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -4px 0 22px;
    color: var(--ink-muted);
    font: 600 11px/1.45 var(--font-utility);
    letter-spacing: .02em;
}

.login-security-note span {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(117, 228, 170, .1);
}

/* Shell and navigation */
#app-shell {
    min-height: 100vh;
    background: transparent;
}

.sidebar {
    width: var(--sidebar-width);
    background:
        radial-gradient(circle at -20% 10%, rgba(49, 95, 255, .28), transparent 34%),
        var(--navy);
    border-right: 0;
    box-shadow: 12px 0 32px rgba(17, 27, 45, .08);
    backdrop-filter: none;
}

.sidebar-header {
    min-height: 96px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.sidebar-header .brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}

.sidebar-brand-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.sidebar-brand-copy .logo-text {
    color: #fff;
    background: none;
    font-family: var(--font-heading);
    font-size: 27px;
    font-weight: 800;
    letter-spacing: .045em;
    line-height: 1;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: currentColor;
}

.sidebar-brand-copy small {
    color: #b8c5d8;
    font-family: var(--font-utility);
    font-size: 8px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-nav {
    padding: 22px 14px;
    gap: 7px;
}

.sidebar .nav-item {
    position: relative;
    min-height: 50px;
    padding: 9px 13px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #c4cfdf;
    font-size: 13px;
    font-weight: 700;
    gap: 12px;
}

.sidebar .nav-item::after {
    content: "";
    position: absolute;
    inset: 7px auto 7px 0;
    width: 0;
    border-radius: 0 4px 4px 0;
    background: var(--orange);
    transition: width .16s ease;
}

.sidebar .nav-item .icon {
    width: 33px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 6px;
    color: #d3dceb;
    background: rgba(255, 255, 255, .055);
    font-size: 9px;
}

.sidebar .nav-item:hover {
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .07);
    color: #fff;
    transform: none;
}

.sidebar .nav-item.active {
    border-color: rgba(91, 128, 255, .55);
    border-left-color: rgba(91, 128, 255, .55);
    background: linear-gradient(90deg, rgba(22, 75, 255, .4), rgba(22, 75, 255, .13));
    box-shadow: none;
    color: #fff;
}

.sidebar .nav-item.active::after {
    width: 5px;
}

.sidebar .nav-item.active .icon {
    border-color: rgba(255, 255, 255, .48);
    color: #fff;
    background: rgba(255, 255, 255, .12);
}

.sidebar-footer {
    padding: 18px 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.sidebar-footer .btn-outline {
    width: 100%;
    border-color: rgba(255, 255, 255, .38);
    background: transparent;
    color: #fff;
}

.sidebar-footer .btn-outline:hover {
    border-color: var(--cobalt);
    background: var(--cobalt);
    color: #071020;
}

/* Page framing */
.main-content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    padding: 22px clamp(20px, 3vw, 52px) 64px;
    color: var(--ink);
}

.main-content > * {
    width: min(100%, 1720px);
}

.content-header {
    min-height: 76px;
    margin-bottom: 24px;
    padding: 0 0 15px;
    border-bottom: 2px solid var(--ink);
}

.page-heading {
    display: grid;
    gap: 2px;
}

.page-kicker,
.eyebrow {
    display: block;
    margin: 0 0 4px;
    color: var(--cobalt-dark);
    font-family: var(--font-utility);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.content-header h2 {
    color: var(--ink);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -.015em;
    line-height: .92;
}

.badge {
    min-height: 42px;
    border: 1px solid var(--steel-dark);
    border-radius: 8px;
    background: var(--paper-raised);
    color: var(--ink);
    box-shadow: var(--shadow-card);
    font-family: var(--font-utility);
    font-size: 10px;
    font-weight: 600;
}

.pulse-dot,
.live-signal {
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(117, 228, 170, .12);
}

.content-section {
    animation-duration: .2s;
}

/* Shared surfaces */
.glass-card,
.stat-card,
.data-view,
.form-panel,
.api-status-card,
.settings-grid,
.notes-viewer,
.notes-editor,
.program-session-panel,
.program-control-card,
.program-analysis-card,
.program-library-panel,
.program-lifecycle-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper-raised);
    box-shadow: var(--shadow-card);
    color: var(--ink);
    backdrop-filter: none;
}

.glass-card:hover,
.stat-card:hover {
    border-color: var(--steel-dark);
    background: var(--paper-raised);
    box-shadow: var(--shadow-card);
    transform: none;
}

.card-header {
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
}

.card-header h3 {
    color: var(--ink);
    font-size: 28px;
    line-height: 1;
}

.card-header h4 {
    color: var(--ink);
}

.card-subtitle,
.table-hint,
.settings-tip {
    color: var(--ink-soft);
}

/* Dashboard command board */
.command-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
    min-height: 300px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: var(--navy);
    box-shadow: var(--shadow-float);
}

.command-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 480px;
    height: 480px;
    right: 18%;
    top: -330px;
    border: 76px solid rgba(49, 95, 255, .24);
    border-radius: 50%;
}

.command-hero::after {
    content: "LOAD / RECOVER / REPEAT";
    position: absolute;
    right: 26px;
    bottom: 15px;
    color: rgba(255, 255, 255, .12);
    font-family: var(--font-utility);
    font-size: 9px;
    letter-spacing: .15em;
    pointer-events: none;
}

.command-ai {
    justify-content: center;
    padding: clamp(30px, 4vw, 54px);
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .14);
    background: transparent;
}

.command-ai-head {
    color: #c0cbdb;
    font-size: 9px;
    font-weight: 600;
}

.command-ai > strong {
    max-width: 620px;
    margin: 20px 0 8px;
    color: #fff;
    font-size: clamp(42px, 5vw, 72px);
    letter-spacing: -.025em;
    line-height: .88;
}

.command-meta {
    color: #c5cfdd;
    font-size: 10px;
}

.model-route {
    margin-top: 28px;
}

.route-node {
    border-color: rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .055);
    color: #cbd5e3;
}

.route-node.is-ready {
    color: #fff;
}

.route-node.is-active {
    border-color: #fff;
    background: #315dcc;
    color: #fff;
}

.route-link {
    color: #91a1b8;
}

.command-snapshot {
    background: rgba(255, 255, 255, .025);
}

.snapshot-cell {
    padding: clamp(24px, 3vw, 36px);
}

.snapshot-cell + .snapshot-cell {
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.snapshot-cell > span {
    color: #afbbcc;
    font-weight: 600;
}

.snapshot-cell strong {
    color: #fff;
    font-size: clamp(25px, 2.5vw, 38px);
    white-space: normal;
}

.snapshot-cell small {
    color: #c2ccda;
}

.recovery-cell strong {
    color: #70ddd2;
}

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

.stat-card {
    position: relative;
    min-height: 124px;
    padding: 20px;
    overflow: hidden;
    border-top: 4px solid var(--cobalt);
    gap: 15px;
}

.stat-card:nth-child(2) {
    border-top-color: var(--teal);
}

.stat-card:nth-child(3) {
    border-top-color: var(--orange);
}

.stat-card:nth-child(4) {
    border-top-color: var(--steel-dark);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper-soft);
    color: var(--ink);
    font-size: 20px;
}

.stat-label,
.stat-subtext {
    color: var(--ink-soft);
    font-family: var(--font-utility);
    font-size: 9px;
    font-weight: 600;
}

.stat-info h3 {
    color: var(--ink);
    font-size: 31px;
}

.stat-subtext {
    color: var(--success);
}

.stat-subtext.negative {
    color: var(--danger);
}

.body-composition-card {
    color: var(--ink);
}

.composition-heading small,
.composition-value span,
.composition-visceral {
    color: var(--ink-soft);
}

.composition-value strong {
    color: var(--ink);
}

.charts-grid {
    gap: 14px;
}

.chart-card {
    min-height: 330px;
    padding: 22px;
    border-top: 3px solid var(--line);
}

.chart-card h4 {
    color: var(--ink);
    font-size: 22px;
}

.chart-container {
    min-height: 240px;
}

/* Muscle atlas */
.muscle-map-card {
    min-height: 0;
    border-top-color: var(--cobalt);
}

.muscle-map-header {
    border-bottom-color: var(--line);
}

.muscle-map-content {
    gap: 22px;
}

.muscle-svg-container,
.muscle-details-container,
.muscle-progress-panel,
.muscle-card,
.muscle-timeline-row,
.muscle-measurement-points,
.category-summary-widgets .cat-widget,
.category-charts > div {
    border-color: var(--line) !important;
    background: var(--paper-soft) !important;
    color: var(--ink) !important;
}

.body-base {
    fill: #344158;
    stroke: #8191aa;
}

.svg-label,
.legend-text,
.muscle-card-desc,
.muscle-card-metrics,
.muscle-progress-count,
.muscle-progress-date,
.muscle-timeline-title,
.muscle-measurement-title {
    fill: var(--ink-soft);
    color: var(--ink-soft);
}

.muscle-card-name,
.muscle-active-header,
.muscle-progress-head h5,
.muscle-timeline-row strong,
.muscle-measurement-points strong,
.cat-widget strong,
.category-charts h5 {
    color: var(--ink);
}

/* Tables — training ledger treatment */
.records-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.data-view,
.form-panel {
    min-width: 0;
    padding: 22px;
}

.records-layout .form-panel {
    order: 0;
    border-left: 5px solid var(--cobalt);
}

.records-layout .form-panel form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.editor-heading p {
    color: var(--ink-soft);
}

.table-controls {
    align-items: center;
}

.table-hint {
    font-family: var(--font-utility);
    font-size: 9px;
    letter-spacing: .03em;
}

.table-wrapper {
    max-width: 100%;
    max-height: 70vh;
    overflow: auto;
    border: 1px solid var(--steel-dark);
    border-radius: 10px;
    background: var(--paper-raised);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
    scrollbar-color: #60728d var(--paper-soft);
}

.table-wrapper:focus-visible {
    outline-offset: 2px !important;
}

.records-table {
    width: max-content;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    table-layout: fixed;
}

.workouts-table {
    width: 1400px;
    min-width: 1400px;
}

.nutrition-table {
    width: 1180px;
    min-width: 1180px;
}

.metrics-table {
    width: 1280px;
    min-width: 1280px;
}

.workouts-table th:nth-child(1),
.workouts-table td:nth-child(1) {
    width: 86px;
    min-width: 86px;
    white-space: nowrap;
}

.workouts-table th:nth-child(2),
.workouts-table td:nth-child(2) {
    width: 280px;
    min-width: 280px;
}

.workouts-table th:nth-child(3),
.workouts-table td:nth-child(3) {
    width: 170px;
    min-width: 170px;
    white-space: nowrap;
}

.workouts-table th:nth-child(4),
.workouts-table td:nth-child(4),
.workouts-table th:nth-child(5),
.workouts-table td:nth-child(5) {
    width: 92px;
    min-width: 92px;
    white-space: nowrap;
}

.workouts-table th:nth-child(6),
.workouts-table td:nth-child(6) {
    width: 130px;
    min-width: 130px;
    white-space: nowrap;
}

.workouts-table th:nth-child(7),
.workouts-table td:nth-child(7) {
    width: 165px;
    min-width: 165px;
}

.workouts-table th:nth-child(8),
.workouts-table td:nth-child(8) {
    width: 250px;
    min-width: 250px;
}

.nutrition-table th:nth-child(1),
.nutrition-table td:nth-child(1) {
    width: 86px;
    min-width: 86px;
    white-space: nowrap;
}

.nutrition-table th:nth-child(2),
.nutrition-table td:nth-child(2) {
    width: 280px;
    min-width: 280px;
}

.nutrition-table th:nth-child(n+3):nth-child(-n+6),
.nutrition-table td:nth-child(n+3):nth-child(-n+6) {
    width: 110px;
    min-width: 110px;
    white-space: nowrap;
}

.nutrition-table th:nth-child(7),
.nutrition-table td:nth-child(7) {
    width: 280px;
    min-width: 280px;
}

.metrics-table th,
.metrics-table td {
    min-width: 102px;
    white-space: nowrap;
}

.metrics-table th:first-child,
.metrics-table td:first-child {
    min-width: 126px;
}

.records-table th,
.records-table td {
    padding: 13px 14px;
    text-align: left;
    vertical-align: middle;
}

.records-table thead th {
    position: sticky;
    z-index: 6;
    top: 0;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .12);
    border-bottom: 0;
    background: var(--navy);
    color: #fff;
    font-family: var(--font-utility);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.records-table thead th:first-child {
    left: 0;
    z-index: 8;
}

.records-table tbody tr.log-row td,
.records-table tbody tr:not(.date-separator) td {
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    background: var(--paper-raised);
    color: var(--ink);
    font-size: 13px;
}

.records-table tbody tr.log-row:nth-child(odd) td,
.records-table tbody tr:not(.date-separator):nth-child(odd) td {
    background: #141f2e;
}

.records-table tbody tr.log-row:hover td,
.records-table tbody tr:not(.date-separator):hover td {
    background: #1c2c4a;
}

.records-table tbody tr.log-row td:first-child,
.metrics-table tbody tr:not(.date-separator) td:first-child {
    position: sticky;
    z-index: 3;
    left: 0;
    box-shadow: 1px 0 0 var(--line);
    font-family: var(--font-utility);
    font-size: 11px;
    font-weight: 600;
}

.records-table tr.date-separator td {
    position: relative;
    z-index: 4;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #526aa8;
    background: #17284c;
    color: var(--ink);
}

.day-toggle {
    min-height: 47px;
    padding: 9px 14px 9px 17px;
    color: var(--ink);
}

.day-toggle::before {
    content: "";
    position: absolute;
    inset: 7px auto 7px 0;
    width: 5px;
    border-radius: 0 3px 3px 0;
    background: var(--cobalt);
}

.day-toggle-label strong {
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 18px;
}

.day-toggle-label span,
.day-toggle-meta,
.day-toggle-icon {
    color: var(--ink-soft);
}

.workouts-table th:nth-child(n+3):nth-child(-n+6),
.workouts-table td:nth-child(n+3):nth-child(-n+6),
.nutrition-table th:nth-child(n+3):nth-child(-n+6),
.nutrition-table td:nth-child(n+3):nth-child(-n+6),
.metrics-table th:nth-child(n+2):nth-child(-n+11),
.metrics-table td:nth-child(n+2):nth-child(-n+11) {
    text-align: right;
}

.workouts-table td:nth-child(3),
.workouts-table td:nth-child(6),
.nutrition-table td:nth-child(3),
.nutrition-table td:nth-child(6),
.metrics-table td:nth-child(2),
.metrics-table td:nth-child(8) {
    color: var(--cobalt-dark);
    font-family: var(--font-utility);
    font-weight: 600;
}

.action-btns {
    justify-content: flex-end;
}

.action-btns .btn {
    border-color: var(--line);
    background: var(--paper-raised);
    color: var(--ink);
}

/* Forms and controls */
.form-group {
    gap: 6px;
}

.form-group label,
.program-control-card > label,
.readiness-grid label,
.program-fact-set label,
.program-fact-form > label {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
textarea,
select {
    min-height: 46px;
    border: 1px solid var(--steel-dark);
    border-radius: 8px;
    background: #0c131e;
    color: var(--ink);
    box-shadow: inset 0 1px 2px rgba(17, 27, 45, .035);
    font-family: var(--font-body);
    font-size: 14px;
}

textarea {
    min-height: 92px;
}

input::placeholder,
textarea::placeholder {
    color: var(--ink-soft);
    opacity: 1;
}

input:hover,
textarea:hover,
select:hover {
    border-color: #8293ac;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--cobalt);
    background: #0c131e;
    box-shadow: 0 0 0 3px rgba(99, 136, 255, .18);
}

.btn {
    min-height: 44px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.btn-sm {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 11px;
}

.btn-primary {
    border: 1px solid var(--cobalt-dark);
    background: #426dff;
    color: #fff;
    box-shadow: none;
}

.btn-primary:hover {
    border-color: #7192ff;
    background: #557cff;
    box-shadow: 0 8px 20px rgba(99, 136, 255, .24);
}

.btn-outline {
    border: 1px solid var(--steel-dark);
    background: var(--paper-raised);
    color: var(--ink);
}

.btn-outline:hover {
    border-color: var(--cobalt);
    background: #20345e;
    color: var(--ink);
}

.btn-danger {
    border-color: #c2384d;
    background: #a92338;
    color: #fff;
}

.btn-range,
.btn-category {
    border-color: var(--steel-dark);
    background: var(--paper-raised);
    color: var(--ink);
}

.btn-range.active,
.btn-category.active {
    border-color: var(--cobalt);
    background: #284b9a;
    color: #fff;
}

.card-divider {
    border-color: var(--line);
    color: var(--ink-soft);
}

/* Schedule, recovery, notes and files */
.section-layout,
.wellness-layout {
    gap: 16px;
}

.schedule-item,
.wellness-card,
.file-card,
.backup-item {
    border-color: var(--line) !important;
    background: var(--paper-raised) !important;
    color: var(--ink) !important;
    box-shadow: none;
}

.schedule-item {
    border-left: 5px solid var(--orange) !important;
}

.schedule-date,
.wellness-score {
    border-color: var(--line);
    background: var(--paper-soft);
    color: var(--ink);
}

.schedule-title,
.wellness-title,
.file-name,
.backup-item strong {
    color: var(--ink);
}

.schedule-meta,
.wellness-meta,
.file-date,
.backup-meta {
    color: var(--ink-soft);
}

.notes-layout {
    gap: 16px;
}

.markdown-body {
    color: var(--ink);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    color: var(--ink);
    border-bottom-color: var(--line);
}

.markdown-body code,
.markdown-body pre {
    border-color: var(--line);
    background: var(--paper-soft);
    color: var(--ink);
}

.files-grid {
    gap: 14px;
}

.file-card:hover {
    border-color: var(--cobalt) !important;
}

.file-thumb {
    background: var(--paper-soft);
}

/* Settings and provider route */
.settings-heading h3 {
    color: var(--ink);
    font-size: 38px;
}

.settings-heading p {
    color: var(--ink-soft);
}

.settings-grid,
.api-status-card {
    padding: 22px;
}

.runtime-status,
.provider-card,
.provider-cooldowns {
    border-color: var(--line) !important;
    background: var(--paper-soft) !important;
    color: var(--ink) !important;
}

.provider-card {
    border-top: 4px solid var(--cobalt) !important;
}

.provider-card:nth-child(2) {
    border-top-color: var(--teal) !important;
}

.provider-card:nth-child(3) {
    border-top-color: var(--orange) !important;
}

.provider-card:nth-child(4) {
    border-top-color: var(--steel-dark) !important;
}

.provider-card:nth-child(5) {
    border-top-color: var(--warning) !important;
}

.provider-card h5,
.provider-probe strong,
.provider-metrics strong,
.runtime-status strong {
    color: var(--ink);
}

.provider-card span,
.provider-card small,
.provider-checked,
.provider-last,
.provider-billing {
    color: var(--ink-soft);
}

.provider-rank {
    border-color: var(--line);
    background: #0c131e;
    color: var(--ink);
}

.system-flight-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background:
        linear-gradient(120deg, rgba(99, 136, 255, .08), transparent 42%),
        var(--paper-raised);
    box-shadow: var(--shadow-card);
}

.system-flight-card::before {
    position: absolute;
    top: 0;
    right: 34px;
    width: 1px;
    height: 100%;
    content: "";
    background: linear-gradient(transparent, rgba(99, 136, 255, .45), transparent);
}

.system-flight-head {
    align-items: flex-start;
    margin-bottom: 22px;
}

.system-flight-head h4 {
    margin: 2px 0 3px;
    font-size: 28px;
}

.system-flight-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
}

.model-lifecycle-grid {
    position: relative;
    display: grid;
    gap: 0;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: #0b121d;
}

.model-flight-node {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 92px;
}

.model-flight-node + .model-flight-node {
    border-top: 1px solid var(--line-soft);
}

.flight-rail {
    position: relative;
    display: grid;
    place-items: center;
    color: var(--ink-muted);
    font: 600 11px var(--font-utility);
}

.flight-rail::after {
    position: absolute;
    right: 0;
    width: 1px;
    height: 100%;
    content: "";
    background: var(--line-soft);
}

.flight-rail span {
    z-index: 1;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--steel);
    border-radius: 50%;
    background: var(--paper-soft);
}

.model-flight-node.is-current .flight-rail span,
.model-flight-node.is-promoted .flight-rail span,
.model-flight-node.is-configured .flight-rail span {
    border-color: var(--success);
    color: #06150f;
    background: var(--success);
}

.flight-node-copy {
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 14px 18px;
}

.flight-node-copy > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.flight-node-copy strong {
    color: var(--ink);
    font-size: 14px;
}

.flight-node-copy b {
    color: var(--success);
    font: 600 10px var(--font-utility);
    text-transform: uppercase;
}

.model-flight-node.is-check_failed .flight-node-copy b,
.model-flight-node.is-not_configured .flight-node-copy b,
.model-flight-node.is-disabled .flight-node-copy b {
    color: var(--warning);
}

.flight-node-copy code {
    overflow: hidden;
    color: var(--cobalt-dark);
    font: 500 12px var(--font-utility);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flight-node-copy small {
    color: var(--ink-muted);
    font-size: 11px;
}

.flight-policy {
    margin: 0;
    padding: 12px 18px 12px 76px;
    border-top: 1px solid var(--line-soft);
    color: var(--ink-muted);
    font: 500 11px/1.5 var(--font-utility);
}

.auth-status-card {
    position: relative;
    min-height: 100%;
    padding: 20px;
    border: 1px solid rgba(117, 228, 170, .28);
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(117, 228, 170, .09), #0b121d 52%);
}

.auth-status-card h5 {
    margin: 2px 0 16px;
    font-size: 23px;
}

.auth-lock-mark {
    position: relative;
    display: grid;
    width: 68px;
    height: 68px;
    margin-bottom: 22px;
    place-items: center;
    border: 1px solid rgba(117, 228, 170, .35);
    border-radius: 50%;
    background: rgba(117, 228, 170, .08);
}

.auth-lock-mark::before {
    width: 24px;
    height: 19px;
    border: 2px solid var(--success);
    border-radius: 4px;
    content: "";
}

.auth-lock-mark::after {
    position: absolute;
    top: 18px;
    width: 14px;
    height: 15px;
    border: 2px solid var(--success);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    content: "";
}

.auth-status-card dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.auth-status-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}

.auth-status-card dt,
.auth-status-card dd {
    margin: 0;
    font: 500 11px var(--font-utility);
}

.auth-status-card dt {
    color: var(--ink-muted);
}

.auth-status-card dd {
    color: var(--ink);
    text-align: right;
}

/* Training program */
.program-shell {
    gap: 16px;
}

.program-command {
    min-height: 238px;
    padding: clamp(26px, 4vw, 42px);
    border: 0;
    border-radius: 16px;
    background:
        linear-gradient(105deg, rgba(11, 54, 200, .98), rgba(8, 42, 155, .98)),
        var(--cobalt-dark);
    box-shadow: var(--shadow-float);
}

.program-command::after {
    color: rgba(255, 255, 255, .12);
}

.program-title-line h3,
.program-command-copy > p,
.program-command .eyebrow {
    color: #fff;
}

.program-command-copy > p {
    opacity: .9;
}

.program-status {
    border-color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .13);
    color: #fff;
}

.program-command-stats {
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .28);
}

.program-command-stats > div {
    background: rgba(10, 31, 105, .5);
}

.program-command-stats strong {
    color: #fff;
}

.program-command-stats span {
    color: #dce5ff;
}

.program-relay-node {
    border-color: var(--line);
    background: var(--paper-raised);
    color: var(--ink);
    box-shadow: var(--shadow-card);
}

.program-relay-node::before {
    width: 5px;
    background: var(--teal);
}

.program-relay-node.is-brain::before {
    background: var(--cobalt);
}

.program-relay-node.is-visual::before {
    background: var(--orange);
}

.program-relay-node span,
.program-relay-node small {
    color: var(--ink-soft);
}

.program-relay-node strong,
.program-relay-node.is-brain strong,
.program-relay-node.is-visual strong {
    color: var(--ink);
}

.program-relay-arrow {
    color: var(--ink-soft);
}

.program-lifecycle-card {
    min-height: 218px;
    border-top: 4px solid var(--steel-dark);
}

.program-version-line > strong,
.program-progress-score > strong,
.program-lifecycle-card h4 {
    color: var(--ink);
}

.program-version-line > span {
    border-color: #c9862f;
    background: #3a2a11;
    color: #ffd078;
}

.program-lifecycle-card > p,
.program-lifecycle-card > small {
    color: var(--ink-soft);
}

.program-budget,
.readiness-result {
    border-color: var(--line);
    background: var(--paper-soft);
    color: var(--ink-soft);
}

.program-budget strong {
    color: var(--cobalt-dark);
}

.program-calendar-day,
.program-progress-decisions span {
    border-color: var(--line);
    background: var(--paper-soft);
}

.program-calendar-day time,
.program-calendar-day span {
    color: var(--ink-soft);
}

.program-calendar-day strong,
.program-progress-decisions span {
    color: var(--ink);
}

.program-session-panel,
.program-library-panel {
    padding: 24px;
}

.program-session-panel {
    border-top: 5px solid var(--cobalt);
}

.program-control-card {
    border-top: 4px solid var(--teal);
}

.program-panel-head h4,
.program-control-card h4,
.program-analysis-card h4 {
    color: var(--ink);
}

.program-week-control {
    color: var(--ink-soft);
}

.program-session-tab {
    border-color: var(--line);
    background: var(--paper-soft);
    color: var(--ink-soft);
}

.program-session-tab:hover,
.program-session-tab.active {
    border-color: var(--cobalt);
    background: #20345e;
}

.program-session-tab span,
.program-session-tab small {
    color: var(--ink-soft);
}

.program-session-tab strong,
.program-session-tab.active span,
.program-session-tab.active strong {
    color: var(--ink);
}

.program-session-tab.active {
    box-shadow: inset 0 -4px 0 var(--cobalt);
}

.program-exercise {
    grid-template-columns: 44px 178px minmax(0, 1fr);
    min-height: 166px;
    padding: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--steel);
    background: var(--paper-raised);
}

.program-exercise:hover {
    border-left-color: var(--cobalt);
    background: #152238;
}

.program-exercise-number {
    color: var(--ink-muted);
}

.program-exercise-image {
    width: 178px;
    height: 134px;
    padding: 6px;
    border-color: var(--line);
    background: #e7ebf0;
    object-fit: contain;
}

.program-exercise-head > div > span,
.program-exercise-copy > p,
.program-alternatives small {
    color: var(--ink-soft);
}

.program-exercise-head h5 {
    color: var(--ink);
    font-size: 23px;
}

.program-exercise-head > strong {
    color: #ff9b77;
}

.program-prescription > *,
.program-set-targets span {
    border-color: var(--line);
    background: var(--paper-soft);
    color: var(--ink);
}

.program-prescription b,
.program-set-targets b {
    color: var(--teal);
}

.program-alt {
    border-left-color: var(--cobalt);
    background: #1b2d50;
    color: var(--ink);
}

.program-fact-form {
    border-color: #526aa8;
    background: #121f36;
}

.program-fact-exercise h5 {
    color: var(--ink);
}

.program-fact-set {
    border-color: var(--line);
    background: #0c131e;
}

.program-fact-set > strong {
    color: var(--cobalt-dark);
}

.readiness-result.is-green {
    color: var(--success);
    border-color: #3e8963;
    background: #10291e;
}

.readiness-result.is-yellow {
    color: var(--warning);
    border-color: #9d7437;
    background: #30240f;
}

.readiness-result.is-red {
    color: var(--danger);
    border-color: #9c5861;
    background: #32171d;
}

.program-analysis-card {
    border-top: 5px solid var(--teal);
}

.program-analysis-card.is-growth {
    border-top-color: var(--orange);
}

.program-analysis-list article {
    border-color: var(--line);
    background: var(--paper-soft);
}

.program-analysis-list strong,
.program-analysis-list span {
    color: var(--ink);
}

.program-analysis-list p {
    color: var(--ink-soft);
}

.equipment-card {
    min-height: 132px;
    border: 1px solid var(--line);
    background: var(--paper-raised);
}

.equipment-card:hover {
    border-color: var(--cobalt);
}

.equipment-card img {
    width: 118px;
    height: 106px;
    padding: 5px;
    border: 1px solid var(--line-soft);
    background: #e7ebf0;
    object-fit: contain;
}

.equipment-card span,
.equipment-card small {
    color: var(--ink-soft);
}

.equipment-card h5 {
    color: var(--ink);
}

.equipment-card p {
    color: var(--ink-soft);
}

/* Feedback */
.empty-state {
    border: 1px dashed var(--steel-dark);
    border-radius: 10px;
    background: var(--paper-soft);
    color: var(--ink-soft);
}

.error-msg {
    color: var(--danger);
    font-weight: 700;
}

.toast {
    border: 1px solid var(--ink);
    background: var(--navy);
    color: #fff;
    box-shadow: var(--shadow-float);
}

.toast-success {
    border-color: #4ba979;
}

.toast-error {
    border-color: #e46873;
}

/* Responsive */
@media (max-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .program-main-grid {
        grid-template-columns: 1fr;
    }

    .program-control-stack {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 980px) {
    :root {
        --sidebar-width: 228px;
    }

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

    .command-ai {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .14);
    }

    .command-snapshot {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .snapshot-cell + .snapshot-cell {
        border-top: 0;
        border-left: 1px solid rgba(255, 255, 255, .14);
    }

    .program-command,
    .program-lifecycle-grid {
        grid-template-columns: 1fr;
    }

    .program-command-stats {
        min-width: 0;
    }

    .program-lifecycle-card:last-child {
        grid-column: auto;
    }

    .system-flight-layout {
        grid-template-columns: 1fr;
    }

    .auth-status-card {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
        background-size: 24px 24px;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 18px 14px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 24px);
    }

    .content-header {
        min-height: 62px;
        margin-bottom: 16px;
    }

    .page-kicker {
        font-size: 8px;
    }

    .content-header h2 {
        font-size: 34px;
    }

    .system-flight-card {
        padding: 18px;
    }

    .system-flight-head {
        display: grid;
        gap: 14px;
    }

    .system-flight-head .btn {
        width: 100%;
    }

    .model-flight-node {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .flight-node-copy {
        padding-inline: 12px;
    }

    .flight-node-copy > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .flight-policy {
        padding-left: 58px;
    }

    .badge {
        max-width: 45vw;
        padding: 8px 10px;
    }

    #coach-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .command-hero {
        min-height: 0;
        border-radius: 13px;
    }

    .command-ai {
        padding: 28px 22px;
    }

    .command-ai > strong {
        font-size: 45px;
    }

    .command-snapshot {
        grid-template-columns: 1fr;
    }

    .snapshot-cell + .snapshot-cell {
        border-top: 1px solid rgba(255, 255, 255, .14);
        border-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 102px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .muscle-map-content {
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
    }

    .muscle-svg-container,
    .muscle-details-container,
    .muscle-legend {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .muscle-legend {
        flex-wrap: wrap;
    }

    .chart-card {
        min-height: 300px;
        padding: 17px;
    }

    .glass-card,
    .data-view,
    .form-panel,
    .api-status-card,
    .settings-grid {
        padding: 17px;
    }

    .records-layout .form-panel form {
        display: block;
    }

    .records-layout .form-panel form .form-group {
        margin-bottom: 13px;
    }

    .table-wrapper {
        max-height: 65vh;
        border-radius: 8px;
    }

    .records-table th,
    .records-table td {
        padding: 11px 12px;
    }

    .mobile-nav {
        display: flex;
        align-items: stretch;
        gap: 4px;
        height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
        padding: 7px 7px env(safe-area-inset-bottom, 0px);
        overflow-x: auto;
        border-top: 1px solid rgba(255, 255, 255, .16);
        background: rgba(17, 27, 45, .98);
        box-shadow: 0 -12px 32px rgba(17, 27, 45, .18);
        scrollbar-width: none;
    }

    .mobile-nav::-webkit-scrollbar {
        display: none;
    }

    .mobile-nav .nav-item {
        flex: 0 0 70px;
        min-width: 70px;
        min-height: 57px;
        padding: 6px 4px;
        border: 1px solid transparent;
        border-radius: 8px;
        color: #c4cfdf;
        font-size: 9px;
        gap: 2px;
        text-align: center;
    }

    .mobile-nav .nav-item .icon {
        color: #dce4ef;
        font-size: 8px;
    }

    .mobile-nav .nav-item.active {
        border-color: rgba(255, 255, 255, .35);
        background: #315dcc;
        color: #fff;
    }

    .mobile-nav .label {
        display: block;
    }

    .program-command {
        padding: 24px 20px;
    }

    .program-command-stats {
        grid-template-columns: 1fr;
    }

    .program-relay,
    .program-session-tabs,
    .program-analysis-grid,
    .program-control-stack {
        grid-template-columns: 1fr;
    }

    .program-relay-arrow {
        display: none;
    }

    .program-session-panel,
    .program-library-panel {
        padding: 16px;
    }

    .program-exercise {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .program-exercise-image {
        grid-column: 2;
        width: 100%;
        height: 180px;
    }

    .program-exercise-copy {
        grid-column: 2;
    }

    .program-exercise-head {
        flex-direction: column;
        gap: 6px;
    }

    .equipment-results {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 22px;
    }

    .login-card .logo {
        flex-direction: column;
    }

    .content-header {
        align-items: flex-end;
    }

    .stats-grid {
        gap: 10px;
    }

    .card-header,
    .program-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .table-controls,
    .provider-actions,
    .header-btns {
        align-items: stretch;
        width: 100%;
    }

    .table-controls .btn,
    .provider-actions .btn,
    .header-btns .btn {
        width: 100%;
    }

    .program-calendar {
        grid-template-columns: 1fr 1fr;
    }

    .program-fact-set {
        grid-template-columns: 1fr 1fr;
    }

    .program-fact-set > strong {
        grid-column: 1 / -1;
    }

    .equipment-card {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .equipment-card img {
        width: 104px;
        height: 100px;
    }
}

/* Mobile ledger: turn wide rows into consistent, readable record cards. */
@media (max-width: 768px) {
    .table-wrapper {
        max-height: none;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .table-wrapper .records-table,
    .table-wrapper .records-table tbody,
    .table-wrapper .records-table tr,
    .table-wrapper .records-table td {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .table-wrapper .records-table {
        min-width: 0;
    }

    .table-wrapper .records-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .table-wrapper .records-table tbody tr:not(.date-separator) {
        margin: 0 0 12px;
        padding: 5px 13px;
        overflow: hidden;
        border: 1px solid var(--line);
        border-left: 5px solid var(--cobalt);
        border-radius: 11px;
        background: var(--paper-raised);
        box-shadow: var(--shadow-card);
    }

    .table-wrapper .records-table tbody tr:not(.date-separator) td,
    .table-wrapper .records-table tbody tr:not(.date-separator):nth-child(odd) td,
    .table-wrapper .records-table tbody tr:not(.date-separator):hover td {
        position: static;
        display: grid;
        grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
        align-items: start;
        gap: 12px;
        width: auto;
        min-width: 0;
        padding: 10px 0;
        border: 0;
        border-bottom: 1px solid var(--line-soft);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: var(--ink);
        text-align: left;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .table-wrapper .records-table tbody tr:not(.date-separator) td:last-child {
        border-bottom: 0;
    }

    .table-wrapper .records-table td::before {
        content: attr(data-label);
        max-width: none;
        color: var(--ink-soft);
        font-family: var(--font-utility);
        font-size: 9px;
        font-weight: 700;
        letter-spacing: .055em;
        line-height: 1.35;
        text-align: left;
        text-transform: uppercase;
    }

    .table-wrapper .records-table td[data-label=""] {
        display: block;
        padding-top: 12px;
    }

    .table-wrapper .records-table td[data-label=""]::before {
        display: none;
    }

    .table-wrapper .records-table .action-btns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .table-wrapper .records-table .action-btns .btn {
        width: 100%;
        min-height: 42px;
    }

    .table-wrapper .records-table tr.date-separator {
        display: block !important;
        margin: 18px 0 9px !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    .table-wrapper .records-table tr.date-separator:first-child {
        margin-top: 0 !important;
    }

    .table-wrapper .records-table tr.date-separator td {
        position: static;
        display: block !important;
        padding: 0 !important;
        border: 1px solid #526aa8 !important;
        border-radius: 10px !important;
        background: #17284c !important;
        color: var(--ink) !important;
    }

    .table-wrapper .records-table tr.date-separator td::before {
        display: none;
    }

    .table-wrapper .records-table .day-toggle {
        min-height: 52px;
        padding: 9px 12px 9px 16px;
    }

    .table-wrapper .records-table .day-toggle-label {
        min-width: 0;
        flex-wrap: wrap;
        gap: 2px 7px;
    }

    .table-wrapper .records-table .day-toggle-label strong {
        font-size: 19px;
    }

    .table-wrapper .records-table .day-toggle-meta {
        margin-left: auto;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (forced-colors: active) {
    .sidebar .nav-item.active::after,
    .day-toggle::before {
        background: Highlight;
    }

    .btn,
    input,
    textarea,
    select,
    .glass-card,
    .stat-card {
        border: 1px solid CanvasText;
    }
}
