/* ============================================================
   GLOBAL
============================================================ */
:root {
    /* LIGHT */
    --bg-main: #f4f6fa;
    --bg-surface: #ffffff;
    --bg-surface-2: #f0f2f6;

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;

    --border-subtle: rgba(0,0,0,0.08);
}
html.dark {
    --bg-app: #0b0f15;
    --bg-shell: #0f1420;
    --bg-card: #121826;
    --bg-card-soft: #161c2d;
    --bg-input: #0f172a;

    --text-main: #e5e7eb;
    --text-soft: #cbd5e1;

    --border-soft: rgba(255,255,255,0.08);
}




*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    overflow-x: hidden !important;
}

body {
    background: var(--bg-main);
}


/* DARK MODE BODY */
html.dark {
    background: linear-gradient(180deg, #0b0f15, #0a0d13);
    color: #e5e7eb;
}



.hidden { display: none !important; }


/* ============================================================
   LAYOUT
============================================================ */

.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;   /* WICHTIG */
}

html.dark .app-layout {
    background: var(--bg-app);

}

/* ============================================================
   NAVBAR
============================================================ */

.top-nav {
    position: sticky;
    top: 0;
    height: 64px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
}

html.dark .top-nav {
    background: var(--bg-shell);
    border-bottom: 1px solid var(--border-soft);
}


.nav-left {
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 17px;
}

.brand-dot {
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    padding-bottom: 4px;
    transition: 0.2s ease;
}
.nav-link:hover { color: #222; }
.nav-link.is-active {
    color: var(--text-primary);
    border-bottom: 2px solid var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-toggle-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

/* ============================================================
   DASHBOARD – CHIP CARDS
============================================================ */

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
}

.chip-card {
    background: var(--bg-surface);
    padding: 20px 28px;
    border-radius: 14px;
    box-shadow: 0 6px 20px var(--shadow-soft);
    flex: 1;
    min-width: 220px;
}

html.dark .chip-card {
    background: var(--bg-card);
    box-shadow: none;
}

.chip-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chip-values {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.chip-value {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chip-value-big {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

html.dark .chip-value-big { color: var(--text-main); }

.chip-value-label {
    font-size: 12px;
}


/* ============================================================
   DASHBOARD – CHART CARD
============================================================ */

.chart-box {
    width: 100%;
    background: var(--bg-surface);
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 14px var(--shadow-soft);
    margin-bottom: 40px;
    box-sizing: border-box;
}

html.dark .chart-box {
    background: var(--bg-card);
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.chart-container {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
}

.chart-container canvas {
    width: 100% !important;
    height: 280px !important;
    display: block !important;
    max-width: 100% !important;
}


/* ============================================================
   CHAT SIDEBAR (Right Panel)
============================================================ */

.chat-sidebar {
    position: fixed;
    top: 64px; /* unter Navbar */
    right: 0;
    width: 320px;
    height: calc(100vh - 64px);
    background: #fff;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;

    transform: translateX(100%);
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
    opacity: 0;
}

.chat-sidebar.open {
    transform: translateX(0);
    pointer-events: auto;
    opacity: 1;
}

/* Header */
.chat-header {
    padding: 16px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Body */
.chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

/* Input Row */
.chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px;
}

.chat-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 14px;
}

.chat-send-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: #111;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

/* ============================================================
   TRAINING – SESSION HEADER
============================================================ */

.session-header-card {
    background: #fff;
    padding: 18px 22px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 20px !important;
}

.session-header-card .left {
    display: flex;
    gap: 14px;
}

.stat-divider {
    font-size: 16px;
    display: inline-flex; 
    align-items: center;
}




/* ============================================================
   TRAINING – NOTES
============================================================ */

/* Last Session Summary */
.exercise-last-info {
    background: #eef0f3;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #444;
    width: fit-content;
    margin-bottom: 6px;
}

.workout-card.is-active {
    border: 1px solid #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.w-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wc-load {
    font-size: 13px;
    color: #444;
}

/* Action buttons (open/delete) */
.wc-open-btn {
    border: none;
    background: #fff;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: 0.2s ease;
}

.wc-open-btn:hover { background: #e5e7ff; }
.wc-delete-btn { color: #bb3333; }
.wc-delete-btn:hover { background: #ffe5e5; }


/* ============================================================
   TRAINING – SESSION FOOTER
============================================================ */

.session-footer {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #555;
}


/* ============================================================
   TABLE CARD WRAPPER
============================================================ */

.table-card,
.wide-card,
.import-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px 26px;
    box-shadow: 0 2px 10px #00000015;
    border: 1px solid #e5e5e5;
}


.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.card-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #222;
}

.primary-button {
    padding: 8px 14px;
    background: #007aff;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}
.primary-button:hover { background: #0066d6; }


/* ============================================================
   TABLE WRAPPER
============================================================ */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

html.dark .table-wrapper {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
}

.table-card {
    max-width: 1100px;
    margin: 0 auto;
    width: 90%;
}

.icon-button {
    padding: 4px 8px;
    border-radius: 6px;
    background: #efefef;
    font-size: 13px;
}
.icon-button:hover {
    background: #e2e2e2;
}


/* ============================================================
   ACTION BUTTONS (delete, edit, add)
============================================================ */

.action-col {
    width: 90px;
    text-align: right;
    opacity: 0;
    transition: 0.2s ease;
}
tr:hover .action-col { opacity: 1; }

.act-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 17px;
    padding: 3px 6px;
    margin-left: 3px;
    transition: 0.15s ease;
}

.act-btn:hover {
    transform: scale(1.2);
}

.act-btn.edit   { color: #2980b9; }
.act-btn.delete { color: #c0392b; }
.act-btn.add    { color: #27ae60; }


/* ============================================================
   TABLE LAYOUT – RIGHT SIDE
============================================================ */

.table-right-layout {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.table-right-layout .table-card {
    width: 50% !important;
    max-width: 50% !important;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 10px #00000015;
    border: 1px solid #e5e5e5;
}


/* ============================================================
   IMPORT / CSV SUCCESS BANNER
============================================================ */

.success-banner {
    background: #e8fbe8;
    color: #117a26;
    padding: 12px 18px;
    border-radius: 10px;
    margin-top: 14px;
    margin-bottom: 20px;
    border: 1px solid #b8e6bd;
    font-weight: 500;
}

/* ============================================================
   BUTTONS
============================================================ */

.primary-btn,
.primary-button {
    padding: 10px 18px;
    background: #007aff;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn:hover,
.primary-button:hover {
    background: #0066d6;
}

.secondary-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}

.secondary-btn:hover {
    background: #f7f7f7;
}


/* ============================================================
   STATUS LABELS
============================================================ */

.save-status {
    font-size: 13px;
    color: #666;
}

.save-status.error {
    color: #b91c1c;
}


/* ============================================================
   FORM LAYOUT
============================================================ */

.form-vertical {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.form-label {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 6px;
}


/* ============================================================
   INPUT STYLING (All inputs unified)
============================================================ */

input,
textarea,
select {
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    color: var(--text-primary);
}

html.dark input,
html.dark textarea,
html.dark select {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text-main);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 1px var(--accent-blue) inset;
}

html.dark input:focus,
html.dark textarea:focus,
html.dark select:focus {
    background: var(--bg-input);
    border-color: var(--accent-blue);
}


/* Overrides for very small numeric table inputs */
input.edit-input {
    width: 70px;
}


/* ============================================================
   FILE INPUT
============================================================ */

.file-input {
    padding: 10px 12px;
    border: 1px solid #cccccc;
    border-radius: 10px;
    background: #fafafa;
    font-size: 15px;
    color: #333;
    cursor: pointer;
}

.file-input:hover {
    background: #f3f3f3;
}


/* ============================================================
   HELPER TEXT
============================================================ */

.helper-text {
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.helper-text code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 13px;
}


/* ============================================================
   SMALL ADD-ROW FORM (import table)
============================================================ */

.add-row-form {
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.add-row-form.hidden { display: none; }

.add-row-form input {
    margin-right: 8px;
    padding: 5px;
}

#addRowBtn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 8px;
    background: #3a7afe;
    color: white;
    border: none;
    cursor: pointer;
}

#addRowBtn:hover {
    background: #2d67e8;
}


/* ============================================================
   DANGER BUTTON (delete)
============================================================ */

button.danger {
    background: #ffebee;
    border: 1px solid #e53935;
    color: #b71c1c;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

button.danger:hover {
    background: #ffd6d9;
}

/* ============================================================
   HEADINGS
============================================================ */

h2 {
    font-size: 26px;
    margin: 0 0 24px 0;
    font-weight: 600;
    color: #111;
}


/* ============================================================
   TEXT UTILITIES
============================================================ */

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.text-muted  { color: #777; }
.text-small  { font-size: 12px; }
.text-large  { font-size: 18px; }


/* ============================================================
   SPACING UTILITIES
============================================================ */

.mt-0  { margin-top: 0; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.p-0   { padding: 0; }
.p-4   { padding: 4px; }
.p-8   { padding: 8px; }
.p-12  { padding: 12px; }
.p-16  { padding: 16px; }
.p-20  { padding: 20px; }
.p-24  { padding: 24px; }


/* ============================================================
   DISPLAY UTILITIES
============================================================ */

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.flex-row    { flex-direction: row; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; justify-content: space-between; }
.flex-end    { display: flex; justify-content: flex-end; }

.grid        { display: grid; }


/* ============================================================
   WIDTH UTILITIES
============================================================ */

.w-100 { width: 100%; }
.w-50  { width: 50%; }
.w-33  { width: 33.33%; }
.w-25  { width: 25%; }

.max-w-400 { max-width: 400px; }
.max-w-600 { max-width: 600px; }
.max-w-800 { max-width: 800px; }
.max-w-1000 { max-width: 1000px; }


/* ============================================================
   MISC
============================================================ */

/* Entfernt unsichtbare Balken / Chrome selection bugs */
.autocomplete-wrapper input {
    border-radius: 12px !important;
    padding: 10px 14px !important;
    background: #fafafa !important;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.autocomplete-wrapper {
    position: relative;                  /* wichtig, damit die Liste sich relativ hierzu positioniert */
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

.autocomplete-item:hover {
    background: #f3f4f6;
}

.autocomplete-list {
    position: absolute;
    top: 100%;                           /* direkt unter dem Input */
    left: 0;
    right: 0;

    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;

    max-height: 200px;
    overflow-y: auto;

    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    z-index: 2000;                       /* damit es über ALLEM liegt */

    padding: 4px 0;

    /* !!! verhindert Verschiebung des Layouts !!! */
    pointer-events: auto;
}

.exercise-name-input,
.exercise-variation-input {
    border: 1px solid #e0e0e0;
    background: #fafafa;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
}

.autocomplete-list:empty {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    border: none !important;
}


/* Prevent overflow layout shifts */
img, canvas, video {
    max-width: 100%;
    display: block;
}

/* Smooth transitions for UI elements */
button,
input,
textarea,
select {
    transition: 0.15s ease;
}

.hidden {
    display: none !important;
}

.edit-input {
    width: 85px;
    padding: 4px 6px;
}

.table-btn {
    padding: 4px 12px;
    background: #f3f3f3;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.table-btn:hover {
    background: #e6e6e6;
}

.table-btn.danger {
    background: #ffe0e0;
    border-color: #ffb3b3;
}

.table-btn.danger:hover {
    background: #ffcccc;
}

.delete-btn:hover {
    background: #ffcccc;
}


/************ TABLE LAYOUT ************/
#nutritionTable {
    table-layout: fixed;
    width: 100%;
}

#nutritionTable th,
#nutritionTable td {
    text-align: center;
    vertical-align: middle;
    padding: 8px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 38px !important;
    line-height: 38px !important;
}

/* Datum etwas schmaler */
#nutritionTable th:nth-child(1),
#nutritionTable td:nth-child(1) {
    width: 90px;
}

/* Aktionen-Spalte */
.actions-col {
    width: 95px !important;
    padding: 0 !important;
    text-align: center !important;
}

html.dark .actions-col {
    border-left: 1px solid rgba(255,255,255,0.05);
}


.actions-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 100%;
}

/* =========================================
   ICON BUTTONS (Chat & Settings)
   ========================================= */

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    border-radius: 10px;
    color: #6b7280;
    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.icon-btn:hover {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.icon-btn:active {
    transform: scale(0.92);
}


.icon-btn.danger {
    background: #ffe8e8;
    border-color: #ffb3b3;
}

/* SVG Style */
.icon-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: var(--text-main);
    stroke-width: 1.6;
    margin: 0;
}

html.dark .icon-btn {
    background: var(--bg-card-soft);
    border-color: var(--border-soft);
}

.icon-btn.danger svg {
    stroke: #d11;
}

/* Zeilen minimal höher */
#nutritionTable td,
#nutritionTable th {
    padding: 8px 6px !important;   /* vorher 6px → jetzt 8px */
    height: 18px !important;       /* vorher ~32px → jetzt 38px */
    line-height: 18px !important;
}


/* Aktionen-Spalte bleibt stabil */
.actions-col {
    width: 95px !important;
    min-width: 95px !important;
    padding: 0 !important;
}


.icon-btn svg {
    width: 14px;
    height: 14px;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #666;
    padding: 8px;
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-icon:hover {
    background: rgba(0,0,0,0.06);
    color: #111;
}



/*************************************************
 * ICON BUTTONS – feste Größe, verhindern Verrutschen
 *************************************************/
.icon-btn {
    width: 26px !important;
    height: 26px !important;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
    background: #f7f7f7;
    padding: 0 !important;

    display: flex;
    justify-content: center;
    align-items: center;

    transition: 0.15s ease-in-out;
}

.icon-btn svg {
    width: 14px !important;
    height: 14px !important;
    stroke-width: 1.8;
    stroke: #444;
    margin: 0 !important;
}

/* Danger Button */
.icon-btn.danger {
    background: #ffe8e8;
    border-color: #ffb3b3;
}

.icon-btn.danger svg {
    stroke: #d11;
}

/*************************************************
 * Aktionen-Spalte: perfekte Zentrierung
 *************************************************/
.actions-col {
    width: 95px !important;
    min-width: 95px !important;
    max-width: 95px !important;

    padding: 0 !important;
    text-align: center !important;
}

.actions-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 100%;
}

.icon-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #f7f7f7;
    border: 1px solid #d0d0d0;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 0;
    margin: 0;
    transition: 0.15s ease;
}

.icon-btn svg {
    width: 14px;
    height: 14px;
    stroke: #444;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    fill: none;
}

.icon-btn.danger {
    background: #ffe8e8;
    border-color: #ffb3b3;
}

.icon-btn.danger svg {
    stroke: #d11;
}

.actions-col {
    width: 95px !important;
    min-width: 95px !important;
    max-width: 95px !important;

    text-align: center !important;
    padding: 0 !important;
}

.actions-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 100%;
}

/* Einheitliche kompakte Inputs – für neue Zeilen & Edit-Zeilen */
#nutritionTable td input {
    width: 100%;
    height: 24px;            /* kompakte Höhe */
    padding: 2px 4px;        /* klein und sauber */
    margin: 0;

    border: 1px solid #d0d0d0;
    border-radius: 6px;

    font-size: 14px;
    text-align: center;

    box-sizing: border-box;
    line-height: 20px;       /* Text perfekt mittig */

    background: #ffffff;
}

.cancel-edit svg {
    transform: translateX(4px) translateY(1px) !important;
}


.actions-cell.editing .actions-flex {
    flex-direction: row !important;
}

/* ============================================================
   MOBILE NAVIGATION – APPLE-LIKE DRAWER (Only <600px)
============================================================ */

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
}

.mobile-menu-btn svg {
    width: 26px;
    height: 26px;
    stroke: #111;
}

/* Drawer – Start off-screen */
.mobile-nav {
    position: fixed;
    top: 64px;
    right: 0;
    width: 75%;
    max-width: 260px;
    height: calc(100vh - 64px);

    background: #fff;
    border-left: 1px solid #ddd;
    box-shadow: -6px 0 22px rgba(0,0,0,0.18);

    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.25,.46,.45,.94);
    opacity: 1;

    display: none; /* default: hidden on PC */
    flex-direction: column;
    text-align: right;
    padding: 18px;
    z-index: 5000;
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav-link {
    padding: 14px 0;
    font-size: 18px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.mobile-nav-link:hover {
    background: #f4f4f6;
}

/* Show Drawer only on phones */
@media (max-width: 600px) {
    .mobile-menu-btn {
        display: block;
    }
    .mobile-nav {
        display: flex;
    }
    .nav-links {
        display: none !important;
    }
}

/* Hide burger on iPad + Desktop */
@media (min-width: 601px) {
    .mobile-menu-btn {
        display: none !important;
    }
    .mobile-nav {
        display: none !important;
    }
}

/* ============================================================
   MODAL / NOTES / EXERCISE
============================================================ */
#modal-body textarea {
    height: auto;
    min-height: 40px;
    max-height: 200px;
    overflow-y: auto;
    resize: vertical;
}

#modal-body .notes {
    padding: 8px 12px;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    white-space: pre-wrap;
}

#mobile-nav {
    position: fixed;
    top: 56px;
    right: 12px;

    width: 180px;          /* <- px war der Grund warum nix passiert ist */
    max-width: 65vw;
    height: auto;
    max-height: none;

    background: #fff;
    border-radius: 16px;
    padding: 8px;

    border: 1px solid #eee;
    box-shadow:
        0 16px 40px rgba(0,0,0,0.18),
        0 2px 6px rgba(0,0,0,0.08);

    transform-origin: top right;
    transform: scale(0.92) translateY(-8px);
    opacity: 0;
    pointer-events: none;

    transition:
        transform 0.22s cubic-bezier(.25,.8,.25,1),
        opacity 0.18s ease;

    z-index: 2000;
}

#mobile-nav.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

#mobile-nav .mobile-nav-link {
    display: flex;         /* nötig für ::before spacing */
    align-items: center;

    padding: 10px 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #222;
    margin: 2px 0;
    text-decoration: none;
}

#mobile-nav .mobile-nav-link:hover {
    background: #f2f3f7;
}

#mobile-nav .mobile-nav-link.active {
    background: #f1f3ff;
    color: #2f3cff;
    font-weight: 600;
}

#mobile-nav .mobile-nav-link.active::before {
    content: "";
    width: 4px;
    height: 18px;
    background: #3a4cff;
    border-radius: 4px;
    margin-right: 8px;
    flex: 0 0 auto;
}

@media (max-width: 600px) {

    /* ===============================
       NUTRITION TABLE – ULTRA COMPACT
    =============================== */

    #nutritionTable {
        font-size: 11.5px !important;
    }

    #nutritionTable th,
    #nutritionTable td {
        padding: 2px 2px !important;     /* MAXIMAL eng */
        height: 22px !important;
        line-height: 22px !important;
        white-space: nowrap !important;
    }

    #nutritionTable th {
        font-size: 10px !important;
        font-weight: 600;
    }

    /* Zahlen optisch dichter */
    #nutritionTable td {
        letter-spacing: -0.2px;
    }

    /* Aktionen-Spalte ultrakompakt */
    #nutritionTable .actions-col {
        width: 64px !important;
        min-width: 64px !important;
        max-width: 64px !important;
        padding: 0 !important;
    }

    #nutritionTable .icon-btn {
        width: 20px !important;
        height: 20px !important;
        border-radius: 5px;
    }

    #nutritionTable .icon-btn svg {
        width: 12px !important;
        height: 12px !important;
    }

    /* Card selbst flacher */
    .wide-card {
        padding: 6px !important;
    }

    .card-header {
        margin-bottom: 8px;
    }

    .card-header h2 {
        font-size: 15px !important;
    }

    /* CSV Import auf Handy aus */
    .card-header a[href*="import"] {
        display: none !important;
    }
}

@media (max-width: 600px) {

    /* rechter Header minimal nach innen */
    .card-header > div {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        padding-right: 10px;   /* ← etwas Luft nach rechts */
    }

    /* + Button */
    #addRowBtn {
        width: 32px !important;
        min-width: 32px !important;
        height: 23px !important;          /* ← niedriger */
        padding: 0 !important;

        border-radius: 8px;
        background: #007aff;

        display: flex;
        align-items: center;
        justify-content: center;

        font-size: 0 !important;          /* ← WICHTIG: Text komplett killen */
        line-height: 0 !important;

        position: relative;
    }

    /* echtes + sauber zentriert */
    #addRowBtn::after {
        content: "+";
        font-size: 18px;
        font-weight: 600;
        line-height: 1;
        color: #fff;

        position: relative;
        top: -1px;   /* ← minimal nach unten korrigiert */
    }

    /* Sicherheit: kein Rest-Text */
    #addRowBtn * {
        display: none !important;
    }
}



/* ===============================
   HARD RESET: Nutrition Table
   (fixes shifted columns)
================================ */

.nutrition-table {
    display: table !important;
    table-layout: fixed;
    width: 100%;
}

.nutrition-table thead {
    display: table-header-group !important;
}

.nutrition-table tbody {
    display: table-row-group !important;
}

.nutrition-table tr {
    display: table-row !important;
}

.nutrition-table th,
.nutrition-table td {
    display: table-cell !important;
    box-sizing: content-box;
}

/* ===============================
   DATA TABLE – FINAL DESKTOP
================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 14px;
}

/* Header */
.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;

    background: var(--bg-surface-2);
    color: var(--text-primary);
    font-weight: 600;

    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 6px;
    text-align: center;
}

html.dark .data-table thead th {
    background: var(--bg-card-soft);
    color: var(--text-main);
    border-bottom: 1px solid var(--border-soft);
}



.data-table tbody tr:nth-child(odd),
.data-table tbody tr:nth-child(even) {
    background: transparent;
}

html.dark .data-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}



/* Hover */
.data-table tbody tr:hover {
    background: rgba(99,102,241,0.08);
}

html.dark .data-table tbody tr:hover {
    background: rgba(255,255,255,0.04);
}

/* Cells */
.data-table td {
    padding: 7px 6px;
    text-align: center;
    white-space: nowrap;
}

/* LIGHT */
.data-table td {
    border-bottom: 1px solid var(--border-subtle);
}

/* DARK */
html.dark .data-table td {
    border-bottom: 1px solid var(--border-soft);
}


/* ========= NUTRITION ========= */
#nutritionTable th:nth-child(1),
#nutritionTable td:nth-child(1) {
    width: 90px;
}

.actions-col {
    width: 95px;
}

/* ========= RUNS ========= */
.runs-table th,
.runs-table td {
    text-align: center;
}


@media (max-width: 600px) {

  .table-wrapper{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  table.data-table.runs-table{
    min-width: 460px !important;
    font-size: 10.8px !important;
    table-layout: fixed !important;
  }

  table.data-table.runs-table th,
  table.data-table.runs-table td{
    padding: 3px 3px !important;   /* <- überschreibt safe */
    line-height: 1.1 !important;
    white-space: nowrap !important;
    letter-spacing: -0.35px;
    text-align: center !important;
  }

  /* optional: spalten enger */
  table.data-table.runs-table th:nth-child(1),
  table.data-table.runs-table td:nth-child(1){ width: 74px !important; }
  table.data-table.runs-table th:nth-child(2),
  table.data-table.runs-table td:nth-child(2){ width: 56px !important; }
  table.data-table.runs-table th:nth-child(3),
  table.data-table.runs-table td:nth-child(3){ width: 58px !important; }
  table.data-table.runs-table th:nth-child(4),
  table.data-table.runs-table td:nth-child(4){ width: 56px !important; }
  table.data-table.runs-table th:nth-child(5),
  table.data-table.runs-table td:nth-child(5){ width: 48px !important; }

  .card-header h2 {
        padding-left: 8px;
    }
}

.wc-details {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.4s cubic-bezier(.2,.8,.2,1),
        opacity 0.25s ease;
}

.workout-card.open .wc-details {
    max-height: 2000px;
    opacity: 1;
}

.training-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.training-layout,
.training-history {
    height: auto;
    min-height: 0;
}


/* static/css/style.css
   ============================================================
   TRAINING – BULLETPROOF LAYOUT (ERSATZBLOCK)
   -> Ersetze deinen gesamten TRAINING/CARD/SET/HISTORY Bereich
      durch diesen Block. (Du kannst alles außerhalb davon lassen.)
   ============================================================ */

/* ====== CONTAINER ====== */
#training-ui {
    width: 100%;
}

/* ====== MAIN SPLIT (LOGGING + HISTORY) ====== */
.training-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;  /* rechts fix, links flexibel */
    gap: 22px;
    width: 100%;
    align-items: start;
}

/* Left column */
.training-left {
    min-width: 0; /* WICHTIG für Grid: verhindert Overflow/Abschneiden */
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Right column */
.training-right {
    width: 360px;
    max-width: 360px;
    min-width: 360px;
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    height: calc(100vh - 180px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

html.dark .training-right {
    background: var(--bg-card);
}

/* ====== SESSION HEADER ====== */
.session-header-card {
    background: var(--bg-surface);
    padding: 16px 18px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    margin-bottom: 0 !important;
}

.session-header-card .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
}

.session-header-card .left {
    display: flex;
    gap: 14px;
    align-items: end;
    flex-wrap: wrap;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.field-group label {
    color: #666;
    font-size: 12px;
}

.field-group input {
    width: 170px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fafafa;
    padding: 8px 12px;
    font-size: 14px;
}

.session-header-card .right {
    display: flex;
    gap: 28px;
    align-items: center;
}

.stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    min-width: 60px;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
}

.stat-label {
    font-size: 11px;
}

/* ====== EXERCISE CARD ====== */
.exercise-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    margin-bottom: 14px;
}

.exercise-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto; /* links flexibel, rechts fix */
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.exercise-header-left {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    flex-wrap: nowrap;
}

.exercise-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

/* Inputs (Name / Variation) */
.exercise-name-input,
.exercise-variation-input {
    height: 36px !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    border: 1px solid #e0e0e0 !important;
    background: #fafafa !important;
    font-size: 14px;
    min-width: 0;
}

.exercise-name-input {
    width: clamp(160px, 24vw, 280px);
}

.exercise-variation-input {
    width: clamp(110px, 16vw, 190px);
}

/* Chips – stabil, NIE mehr “arsch” */
.exercise-header-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.exercise-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #e2e2e8;
    background: #f4f4f8;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.exercise-chip strong {
    font-weight: 700;
}


/* ====== EXERCISE BODY GRID: SETS | NOTES ====== */
.exercise-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px; /* NOTES ist bewusst schmaler */
    gap: 14px;
    align-items: start;
}

.exercise-left-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exercise-right-col {
    min-width: 0;
}

.exercise-notes {
    width: 100%;
    min-height: 84px;
    max-height: 140px;
    resize: vertical;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 13px;
}

/* ====== SETS: BULLETPROOF GRID (last-set-info bekommt immer Platz) ====== */
.sets-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Spalten: idx | reps | kg | rpe | x | last */
.set-row {
    display: grid;
    grid-template-columns: 30px 74px 86px 74px 36px minmax(140px, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

/* Index */
.set-index {
    font-weight: 700;
    font-size: 12px;
    width: 30px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(120,120,120,0.10);
    color: #444;
}

/* Up/Down/Same states */
.set-index.up   { background: rgba(40,180,90,0.16);  color: #1d8f4d; }
.set-index.down { background: rgba(230,60,60,0.16);  color: #d33; }
.set-index.same { background: rgba(120,120,120,0.12); color: #444; }

.set-input {
    height: 34px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 14px;
    min-width: 0;
}



/* last-set-info: NIE mehr versteckt */
.last-set-info {
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    color: #2b2b2b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* + Satz */
.add-set-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: #2563eb;
    cursor: pointer;
    width: fit-content;
}
.add-set-btn:hover { text-decoration: underline; }

/* ====== SESSION FOOTER ====== */
.session-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.session-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.save-status {
    font-size: 13px;
    color: #666;
}

/* ====== HISTORY PANEL ====== */
.history-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 10px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.workout-card {
    position: relative;
    background: #f8f8fb;
    border: 1px solid #e5e5ea;
    border-radius: 14px;
    padding: 12px 44px 12px 14px; /* Platz rechts für X */
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: 0.18s ease;
}

.workout-card:hover {
    background: #fff;
    transform: translateY(-1px);
}

.workout-card.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.wc-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.wc-left { min-width: 0; }
.wc-name {
    font-size: 14px;
    font-weight: 800;
    margin: 0;
}
.wc-date {
    font-size: 12px;
}

.wc-stats {
    font-size: 12px;
    color: #444;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.wc-stats .dot { color: #bbb; }

/* =========================================
   UNIVERSAL DELETE BUTTON (FINAL)
   ========================================= */

.delete-btn,
.exercise-delete-btn,
.set-delete-btn {
    all: unset;
    cursor: pointer;

    width: 28px;
    height: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    line-height: 1;
    font-weight: 500;

    color: #dc2626;
    border-radius: 999px;

    transition:
        background-color 0.18s cubic-bezier(.25,.8,.25,1),
        box-shadow 0.18s cubic-bezier(.25,.8,.25,1),
        transform 0.12s ease,
        opacity 0.12s ease;
}

/* Hover */
.delete-btn:hover,
.exercise-delete-btn:hover,
.set-delete-btn:hover {
    background: rgba(220, 38, 38, 0.12);
    box-shadow:
        0 0 0 6px rgba(220, 38, 38, 0.06);
}

/* Active */
.delete-btn:active,
.exercise-delete-btn:active,
.set-delete-btn:active {
    transform: scale(0.88);
    opacity: 0.85;
}

.delete-btn,
.exercise-delete-btn,
.set-delete-btn {
    opacity: 0.9;
}

.wc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wc-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Delete Button NICHT umbrechen */
.wc-right .delete-btn {
    flex-shrink: 0;
    align-self: center;
}


.workout-card {
    position: relative; /* WICHTIG */
}

/* Button immer oben rechts */
.workout-card .delete-btn {
    position: absolute;
    top: 14px;
    right: 14px;

    z-index: 5;
}

/* Platz schaffen, damit Text nicht drunter läuft */
.wc-right {
    padding-right: 36px;
}


/* =========================================================
   iPad / Tablet – BLEIBT GENAU WIE JETZT (NICHT ANFASSEN)
   ========================================================= */
@media (min-width: 768px) and (max-width: 1024px) and (pointer: coarse) {

    .main-content {
        padding: 18px !important;
    }

    .training-split {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 16px;
    }

    .training-right {
        width: 340px;
        min-width: 340px;
        max-width: 340px;
        padding: 14px;
    }

    .exercise-grid {
        grid-template-columns: minmax(0, 1fr) 130px;
        gap: 10px;
    }

    .exercise-notes {
        min-height: 64px;
        max-height: 96px;
        font-size: 12.5px;
        padding: 6px;
    }

    .last-set-info {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        line-height: 1.15;
    }

    .set-row {
        grid-template-columns: 30px 74px 86px 74px 36px minmax(170px, 1fr);
    }

    .dashboard-layout,
    .training-split {
        padding-left: 12px;
        padding-right: 12px;
    }

    .training-split {
        box-sizing: border-box;
    }
}

/* =========================================================
   PC / DESKTOP – WIEDER WIE FRÜHER
   ========================================================= */
@media (min-width: 1025px) and (pointer: fine) {

    .main-content {
        padding: 32px;
    }

    .training-split {
        grid-template-columns: minmax(0, 1fr) 720px;
        gap: 36px;
    }

    .training-right {
        width: 720px;
        min-width: 720px;
        max-width: 720px;
        padding: 24px;
    }

    /* Notes wieder breiter wie früher */
    .exercise-grid {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 20px;
    }

    .exercise-notes {
        min-height: 96px;
        max-height: 160px;
        font-size: 14px;
        padding: 10px;
    }

    /* last-set-info wieder EINZEILIG wie vorher */
    .last-set-info {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .set-row {
        grid-template-columns: 30px 80px 90px 80px 40px minmax(220px, 1fr);
    }
}

/* =========================================================
   PHONE – UNVERÄNDERT
   ========================================================= */
@media (max-width: 600px) {
    .training-split {
        display: block !important;
    }

    .training-right {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
    }

    .training-left {
        display: none !important;
    }

    .dashboard-layout,
    .training-split {
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
    }

    #new-session-btn,
    #session-workout-id {
        display: none !important;
    }
}

/* =========================================================
   BASE (NICHT GERÄTESPEZIFISCH)
   ========================================================= */
.main-area {
    display: flex;
    min-height: calc(100vh - 64px);
    overflow: visible;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

html.dark .main-content {
    background: transparent;
}


.training-split {
    display: grid;
    width: 100%;
    align-items: flex-start;
}

.maintenance-card {
    max-width: 520px;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 1000;
}

.main-area,
.main-content {
    padding-top: 64px;
}

/* =========================================================
   GLOBAL TOUCH DEVICES – RANDABSTAND FIX
   ========================================================= */
@media (pointer: coarse) {

    .main-area {
        padding-left: 25px;
        padding-right: 25px;
        box-sizing: border-box;
    }

    .main-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

.card {
    background: var(--bg-surface);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

html.dark .card {
    background: linear-gradient(180deg, #141922, #10141c);
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.08);
}


.card + .card {
    margin-top: 24px;
}

.card.danger {
    border: 1px solid #fecaca;
    background: #fff5f5;
}

.card.muted {
    opacity: 0.7;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.plain-list {
    list-style: none;
    padding: 0;
    margin-top: 12px;
}

.plain-list li {
    margin-bottom: 6px;
}

.settings-section {
    margin-top: 24px;
}

.settings-card {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    max-width: 520px;
}

html.dark .settings-card {
    background: var(--bg-card);
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
}

.settings-toggle input {
    transform: scale(1.2);
}

.pi-stats {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pi-stats li {
    margin-bottom: 6px;
}

.settings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.settings-list li {
    padding: 6px 0;
    font-size: 14px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.card,
.settings-card,
.table-card,
.wide-card,
.chip-card,
.session-header-card {
    background: var(--bg-surface);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

html.dark .card,
html.dark .settings-card,
html.dark .table-card,
html.dark .wide-card,
html.dark .chip-card,
html.dark .session-header-card,
html.dark .exercise-card,
html.dark .workout-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    box-shadow: none;
}

html.dark .main-content {
    background: var(--bg-app);
}

/* =========================================================
   DARK MODE – TEXT FINAL OVERRIDE (WICHTIG)
========================================================= */

html.dark {
    color: var(--text-main);
}

html.dark p,
html.dark label,
html.dark li,
html.dark small {
    color: var(--text-muted);
}


html.dark .text-muted,
html.dark .chip-title,
html.dark .chip-value-label,
html.dark .wc-date,
html.dark .stat-label,
html.dark small {
    color: var(--text-muted) !important;
}

.chip-title,
.chip-value-label,
.stat-label,
.wc-date {
    color: var(--text-muted);
}
