/* ============================================================================
   gewissenapp.de — App-Stylesheet
   Farben: Navy #1C2B45 · Gold #D4A574 · Sage #A8B8A8 · Cream #F5F1EC
   ============================================================================ */

:root {
    --navy:        #1C2B45;
    --navy-light:  #2A3B5C;
    --gold:        #D4A574;
    --gold-dark:   #B58858;
    --sage:        #A8B8A8;
    --cream:       #F5F1EC;
    --white:       #FFFFFF;
    --error:       #D26060;
    --success:     #6FA876;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--cream);
    color: var(--navy);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

#root { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- Auth-Screen ---- */
.auth-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
}

.auth-logo {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--gold);
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.auth-tagline {
    font-size: 0.95rem;
    color: var(--sage);
    margin: 0 0 40px;
    text-align: center;
}

.auth-card {
    background: var(--white);
    color: var(--navy);
    border-radius: 20px;
    padding: 28px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--cream);
    border-radius: 12px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px 16px;
    border: 0;
    background: transparent;
    color: var(--navy);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: var(--navy);
    color: var(--white);
}

.input-group { margin-bottom: 16px; }

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--navy);
    margin-bottom: 6px;
    font-weight: 500;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px dashed var(--sage);
    border-radius: 16px;
    background: var(--cream);
    color: var(--navy);
    font-size: 1rem;
    transition: border-color 0.2s, border-style 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}
.input-group input { -webkit-appearance: none; }
.input-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231C2B45' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 40px;
}
.input-group input:focus,
.input-group select:focus {
    outline: none;
    border: 1.5px solid var(--gold);
    background-color: var(--white);
}

.btn {
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy);
}
.btn-primary:hover { background: var(--gold-dark); color: var(--white); }
.btn-primary:disabled { background: var(--sage); cursor: not-allowed; }

.btn-secondary {
    background: transparent;
    color: var(--gold);
    border: 1.5px solid var(--gold);
}

.msg {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin: 12px 0;
}
.msg-error    { background: #FFEDED; color: var(--error); }
.msg-success  { background: #E8F5E9; color: var(--success); }

/* ---- App-Screen ---- */
.app-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 8px 24px;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
}

.user-info {
    font-size: 0.85rem;
    color: var(--sage);
}

.card {
    background: var(--white);
    border: 1.5px solid var(--gold);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(28, 43, 69, 0.06);
}

.card h2 {
    font-size: 1.1rem;
    color: var(--navy);
    margin: 0 0 12px;
}

.coming-soon {
    color: var(--sage);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.btn-link {
    background: transparent;
    border: 0;
    color: var(--gold);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 8px;
}

/* ---- Tracker-spezifisch ---- */
.balance-card {
    background: var(--navy);
    color: var(--white);
}
.balance-card h2 { color: var(--gold); }
.balance-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.balance-row > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.bal-label {
    font-size: 0.78rem;
    color: var(--sage);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bal-val {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 4px;
}
.bal-pos { color: var(--gold); }
.bal-neg { color: #FF9966; }

/* Bewertungs-Badge unter Ziel-Info */
.bewertung {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.4;
    border-left: 4px solid;
}
.bewertung.badge-ok   { background: #E8F5E9; color: #2E7D32; border-color: #6FB872; }
.bewertung.badge-warn { background: #FFEDED; color: #B23A3A; border-color: #D26060; }
.bewertung.badge-info { background: #EDF4F9; color: #1F5C8A; border-color: #5B9DD9; }

/* Tagesziel unter Macro-Row */
.balance-target {
    color: var(--sage);
    font-size: 0.88rem;
    font-weight: 600;
    margin: 12px 0 0;
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid rgba(168, 184, 168, 0.25);
}

/* Bilanz-Zelle mit Fett-Sub-Zeile */
.bal-sub {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 2px;
    opacity: 0.85;
}

/* Protein-Bilanz-Zeile (zweite balance-row, gleiche Optik wie kcal-Zeile) */
.balance-row.protein-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(168, 184, 168, 0.45);
}
.balance-row.protein-row .bal-val { font-size: 1.05rem; }

/* ===== MOOD-CARD ===== */
.mood-card h2 { margin-bottom: 4px; }
.mood-slider-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(168, 184, 168, 0.25);
}
.mood-slider-block:first-of-type {
    margin-top: 8px;
    padding-top: 0;
    border-top: none;
}
.mood-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.mood-emoji {
    font-size: 1.6rem;
    line-height: 1;
}
.mood-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.mood-label {
    font-size: 0.78rem;
    color: var(--sage);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.mood-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
}
.mood-desc {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: var(--navy);
    opacity: 0.75;
    line-height: 1.35;
}
.mood-range {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--sage) 0%, var(--gold) 100%);
    outline: none;
}
.mood-range-bipolar {
    background: linear-gradient(to right, #D26060 0%, #B8B8B8 50%, #6FB872 100%);
}
.mood-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--navy);
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    cursor: pointer;
}
.mood-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--navy);
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    cursor: pointer;
}
.mood-note {
    width: 100%;
    margin-top: 14px;
    padding: 10px 12px;
    border: 1.5px solid var(--sage);
    border-radius: 10px;
    background: var(--cream);
    color: var(--navy);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 52px;
    box-sizing: border-box;
}
.mood-logged {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: var(--sage);
    text-align: center;
    font-style: italic;
}

.macro-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(168, 184, 168, 0.3);
}
.macro-row > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.macro-label {
    font-size: 0.72rem;
    color: var(--sage);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.macro-val {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 2px;
    color: var(--white);
}

.energy-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.energy-row label {
    flex: 1;
    font-size: 0.9rem;
    color: var(--navy);
}
.energy-row input {
    width: 90px;
    padding: 8px 10px;
    border: 1.5px dashed var(--sage);
    border-radius: 10px;
    background: var(--cream);
    color: var(--navy);
    font-size: 0.95rem;
    text-align: right;
    -webkit-appearance: none;
    transition: border-color 0.2s, border-style 0.2s;
}
.energy-row input:focus {
    outline: none;
    border: 1.5px solid var(--gold);
    background: var(--white);
}
.energy-row span {
    width: 28px;
    color: var(--sage);
    font-size: 0.9rem;
}

.food-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--cream);
}
.food-row:last-child { border-bottom: 0; }
.food-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.food-info strong {
    font-size: 1.05rem;
    color: var(--navy);
}
.food-meta {
    font-size: 0.95rem;
    color: var(--navy);
    margin-top: 4px;
    font-weight: 500;
}
.food-meta-sep {
    color: var(--gold);
    margin: 0 6px;
    font-weight: 700;
}
.btn-del {
    background: transparent;
    border: 0;
    color: var(--error);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}
.btn-del:hover { color: #A04040; }

/* ---- Bottom-Navigation ---- */
.app-screen { padding-bottom: 80px; }
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--navy);
    display: flex;
    border-top: 1px solid var(--navy-light);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 100;
}
.nav-btn {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--sage);
    padding: 12px 4px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}
.nav-btn.active { color: var(--gold); font-weight: 700; }

/* ---- Datum-Navigation ---- */
.date-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 16px;
    position: relative;
}
.date-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--white);
    color: var(--navy);
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(28, 43, 69, 0.1);
}
.date-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.date-label {
    flex: 1;
    display: inline-block;
    padding: 10px 16px;
    background: var(--white);
    border-radius: 12px;
    color: var(--navy);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(28, 43, 69, 0.06);
    border: 0;
    font-size: 1rem;
    text-align: center;
    font-family: inherit;
}
.date-label:hover { background: var(--cream); }

/* date-pick liegt versteckt EXAKT über dem Label — so öffnet der Picker dort */
#date-pick {
    position: absolute;
    left: 52px;          /* nach dem ← Button (40px + 12px gap) */
    right: 52px;         /* vor dem → Button */
    top: 8px;
    bottom: 16px;
    opacity: 0;
    pointer-events: none;
    border: 0;
    background: transparent;
}

/* ---- Charts (freundlich) ---- */
:root {
    --chart-consumed:  var(--gold);   /* Aufgenommen */
    --chart-burned:    var(--navy);   /* Verbrannt */
    --chart-balance:   #2A7F8A;       /* Bilanz — türkis */
    --chart-target:    #D9534F;       /* Tagesziel — rot gestrichelt */
    --chart-weight:    #5A8A5F;       /* Gewicht — sage-grün */
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--navy);
    margin-bottom: 14px;
}
.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.dot-gold     { background: var(--chart-consumed); }
.dot-navy     { background: var(--chart-burned); }
.dot-balance  { background: var(--chart-balance); }
.dot-sage     { background: var(--chart-target); }
.dot-weight   { background: var(--chart-weight); }

/* ===== Linien-Chart (SVG) ===== */
.line-chart-wrap {
    overflow-x: auto;
    background: #FAFBFC;
    border-radius: 12px;
    border: 1px solid #ECEEF1;
    padding: 4px 0;
}
.line-chart {
    display: block;
    min-width: 100%;
    height: 240px;
    font-family: inherit;
}
.line {
    fill: none;
    stroke-width: 2.2;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.line-consumed { stroke: var(--chart-consumed); }
.line-burned   { stroke: var(--chart-burned); }
.line-balance  { stroke: var(--chart-balance); }
.line-weight   { stroke: var(--chart-weight); stroke-width: 2.4; }
.target-svg-line {
    stroke: var(--chart-target);
    stroke-width: 1.8;
    stroke-dasharray: 6 5;
    fill: none;
}
.target-label {
    fill: var(--chart-target);
    font-size: 11px;
    font-weight: 600;
}
.grid-line {
    stroke: #E5E5E5;
    stroke-width: 1;
}
.zero-line {
    stroke: #999;
    stroke-width: 1.4;
}
.y-label, .x-label {
    fill: var(--navy);
    font-size: 11px;
    font-weight: 500;
}
.dot-svg-consumed { fill: var(--chart-consumed); }
.dot-svg-burned   { fill: var(--chart-burned); }
.dot-svg-balance  { fill: var(--chart-balance); }
.dot-svg-weight   { fill: var(--chart-weight); }

.chart {
    display: flex;
    gap: 6px;
    height: 230px;
    padding: 16px 12px 8px;
    overflow-x: auto;
    background: #FAFBFC;
    border-radius: 12px;
    border: 1px solid #ECEEF1;
}
.chart-year { gap: 8px; }
.chart-col {
    flex: 1;
    min-width: 36px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.chart-col.empty { opacity: 0.4; }
.bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    position: relative;
    padding: 0 2px;
    overflow: hidden;
}
.bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    transition: opacity 0.2s, transform 0.2s;
}
.bar.zero { display: none; }

.legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    padding: 16px 8px 0;
    margin: 0 0 24px;
    font-size: 0.82rem;
}
.legal-links a {
    color: var(--sage);
    text-decoration: none;
    padding: 4px 2px;
}
.legal-links a:hover { color: var(--gold); text-decoration: underline; }

.info-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}
.info-link:hover { text-decoration: underline; }

/* Globaler Footer: erscheint auf JEDER Seite */
.app-footer {
    margin: 32px -16px 0;
    padding: 14px 16px 10px;
    background: var(--navy);
    border-top: 2px solid var(--gold);
}
.footer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.78rem;
}
a.footer-item {
    color: var(--gold);
    text-decoration: underline;
    font-weight: 500;
    padding: 2px 0;
}
a.footer-item:hover { color: #F5C896; }
.footer-copy {
    margin: 6px 0 0;
    text-align: right;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.68rem;
    letter-spacing: 0.3px;
}

/* ===== Setup-Übersicht (Account · Profil · Abo) ===== */
.setup-tiles {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 6px;
}
.setup-tile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 18px;
    background: #fff;
    border: 1.5px solid var(--sage);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, transform 0.1s;
}
.setup-tile:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}
.setup-icon {
    font-size: 1.8rem;
    line-height: 1;
}
.setup-tile-title {
    display: block;
    font-weight: 700;
    color: var(--navy);
    font-size: 1.05rem;
}
.setup-tile-sub {
    display: block;
    font-size: 0.82rem;
    color: var(--sage);
    margin-top: 2px;
}
.setup-tile-title, .setup-tile-sub { flex: 0; min-width: 0; }
.setup-tile > span:nth-child(2) { flex: 1; }

/* ===== Subscription-Status ===== */
.member-list { list-style: none; padding: 0; margin: 0; }
.member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(168,184,168,0.25);
}
.member-row:last-child { border-bottom: none; }
.member-row.member-empty .member-email { color: var(--sage); font-style: italic; }
.member-email { flex: 1; color: var(--navy); }
.member-status {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}
.member-status.ok { background: #E8F5E9; color: #2E7D32; }
.member-status.pending { background: #FFEDED; color: #B23A3A; }
.status-active    { color: #2E7D32; }
.status-pending   { color: #B23A3A; }
.status-cancelled { color: #B23A3A; }

/* ===== Plan-Auswahl ===== */
.plan-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.plan-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--sage);
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}
.plan-row:hover { border-color: var(--gold); }
.plan-row.plan-selected {
    border-color: var(--gold);
    background: rgba(212, 165, 116, 0.08);
}
.plan-row input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--gold);
    flex-shrink: 0;
}
.plan-body { flex: 1; display: flex; flex-direction: column; }
.plan-title { font-weight: 700; color: var(--navy); font-size: 1rem; }
.plan-desc  { font-size: 0.83rem; color: var(--sage); margin-top: 2px; }
.plan-price { font-weight: 700; color: var(--navy); white-space: nowrap; font-size: 0.95rem; }
.plan-row.plan-selected .plan-price { color: var(--gold); }

/* ===== Abo / Zusatzangebote ===== */
.price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}
.price {
    font-size: 1.1rem;
    color: var(--navy);
    font-weight: 600;
}
.price-total .price { font-size: 1.4rem; color: var(--gold); }

.addon-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 0;
    cursor: pointer;
}
.addon-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    margin-top: 2px;
    accent-color: var(--gold);
}
.addon-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.addon-title {
    font-weight: 700;
    color: var(--navy);
    font-size: 1rem;
}
.addon-desc {
    font-size: 0.88rem;
    color: var(--navy);
    margin-top: 4px;
    line-height: 1.45;
}
.addon-image {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 8px 0 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(28, 43, 69, 0.12);
}
.addon-more { display: block; margin-top: 8px; }
.addon-toggle {
    display: inline-block;
    margin-top: 6px;
    color: var(--gold);
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.88rem;
}
.addon-toggle:hover { color: var(--navy); }
.addon-price {
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
}
.subscription-total { background: rgba(212, 165, 116, 0.08); border: 1.5px solid var(--gold); }

/* Auth: Forgot-Password Link */
.auth-link {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}
.auth-link:hover { text-decoration: underline; }
.msg-info {
    background: rgba(212,165,116,0.12);
    color: var(--navy);
    border-left: 3px solid var(--gold);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ===== SOS Toolkit Lessons ===== */
.sos-lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 6px;
}
.sos-lesson-tile {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1.5px solid var(--sage);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    padding: 0;
    transition: border-color 0.15s, transform 0.1s;
}
.sos-lesson-tile:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}
.sos-lesson-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    background: rgba(168,184,168,0.15);
}
.sos-lesson-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}
.sos-lesson-icon {
    font-size: 1.5rem;
    line-height: 1;
}
.sos-lesson-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.sos-lesson-title {
    font-weight: 700;
    color: var(--navy);
    font-size: 1rem;
}
.sos-lesson-sub {
    font-size: 0.82rem;
    color: var(--gold);
    font-weight: 600;
    margin-top: 2px;
}

/* Hero-Bild auf der Lesson-Detail-Seite */
.sos-hero-card { padding: 0; overflow: hidden; }
.sos-hero-img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}


.sos-module-card { margin-top: 16px; }
.sos-module-desc {
    font-size: 0.88rem;
    color: var(--sage);
    margin: -4px 0 14px;
}
.sos-lesson-tile .setup-tile-sub {
    color: var(--gold);
    font-weight: 600;
}
.sos-asset {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(168, 184, 168, 0.25);
}
.sos-asset:last-child { border-bottom: none; }
.sos-asset-name {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}
.sos-asset-pending {
    background: rgba(212, 165, 116, 0.12);
    border-left: 3px solid var(--gold);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.88rem;
    color: var(--navy);
    margin: 0;
}
.sos-html-card { padding: 0; overflow: hidden; }
.sos-html-content {
    /* Custom HTML aus MT — isoliert anzeigen, eigene Style-Variablen nicht ans App-CSS durchlassen */
    all: revert;
    font-family: inherit;
    line-height: 1.6;
    padding: 16px;
}
.sos-html-content * { max-width: 100%; box-sizing: border-box; }
.sos-html-content img { display: block; max-width: 100%; height: auto; border-radius: 8px; }

.nav-btn.nav-info {
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 4px;
}
.nav-btn:disabled,
.nav-btn.nav-disabled {
    opacity: 0.32;
    cursor: not-allowed;
    filter: grayscale(0.6);
}

/* ===== INFO / CHAT ===== */
.video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 10px;
    background: #000;
}
.video-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}
.chat-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 4px;
    margin-bottom: 12px;
}
.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    line-height: 1.45;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.chat-msg.user {
    align-self: flex-end;
    background: var(--navy);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg.assistant {
    align-self: flex-start;
    background: #F1F4F1;
    color: var(--navy);
    border-bottom-left-radius: 4px;
}
.chat-msg.pending {
    opacity: 0.6;
    font-style: italic;
}
.chat-input-row {
    display: flex;
    gap: 8px;
}
.chat-input-row input {
    flex: 1;
    padding: 12px 14px;
    border: 1.5px solid var(--sage);
    border-radius: 12px;
    background: var(--cream);
    color: var(--navy);
    font-size: 1rem;
}
.chat-input-row button {
    padding: 0 18px;
    background: var(--gold);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}
.chat-input-row button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.chat-hint {
    font-size: 0.82rem;
    color: #6B7B6B;
    margin-bottom: 8px;
}
.bar:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}
.bar-gold { background: var(--chart-consumed); }
.bar-navy { background: var(--chart-burned); }
.target-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--chart-target);
    z-index: 2;
    border-radius: 1px;
    pointer-events: none;
    overflow: visible;
}
/* "Ziel"-Label nur EINMAL am Anfang, deutlich ÜBER der Linie */
.target-line::before { content: ''; }
.chart-col:first-child .target-line::before {
    content: 'Ziel';
    position: absolute;
    left: 2px;
    top: -14px;
    color: var(--chart-target);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    background: transparent;
    padding: 0;
    white-space: nowrap;
}
.chart-label {
    font-size: 0.78rem;
    color: var(--navy);
    margin-top: 8px;
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
}
