/* mylingo Design-System – angelehnt an das visuelle Erscheinungsbild von spirto.de
   (Ivory/Petrol/Warm-Palette, Source Sans 3, weiche Panels, Pill-Buttons). */

@font-face {
    font-family: "Source Sans 3 Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 200 900;
    src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: "Source Sans 3 Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 200 900;
    src: url("../fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
    font-family: "Source Sans 3 Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 200 900;
    src: url("../fonts/source-sans-3-greek-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}
@font-face {
    font-family: "Source Sans 3 Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 200 900;
    src: url("../fonts/source-sans-3-greek-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+1F00-1FFF;
}

:root {
    --color-ivory: #f7f4ee;
    --color-surface: #ece6da;
    --color-surface-strong: #e1d7c5;
    --color-graphite: #222325;
    --color-muted: #5f615d;
    --color-line: #d7d0c2;
    --color-petrol: #1e6468;
    --color-petrol-strong: #174e52;
    --color-petrol-soft: #e4eeee;
    --color-warm: #b68657;
    --color-warm-soft: #f4e9db;
    --color-success: #1e7e34;
    --color-success-soft: #e6f4ea;
    --color-danger: #b3261e;
    --color-danger-soft: #fdecea;
    --font-sans: "Source Sans 3 Variable", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --radius-panel: 1.25rem;
    --radius-pill: 999px;
    --shadow-panel: 0 12px 30px rgba(34, 35, 37, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--color-ivory);
    color: var(--color-graphite);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 620; letter-spacing: -0.01em; margin: 0 0 .5rem; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.2rem; }
p { margin: 0 0 .75rem; }

/* Links: nie "nackt" – entweder als Button oder als markierter Text-Link */
a { color: var(--color-petrol); text-decoration: none; }
a:hover { color: var(--color-petrol-strong); }

.link {
    color: var(--color-petrol);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}
.link:hover { color: var(--color-petrol-strong); text-decoration: underline; }
.link-muted { color: var(--color-muted); font-weight: 500; }
.link-muted:hover { color: var(--color-graphite); }

/* Layout */
.page-shell { max-width: 640px; margin: 0 auto; padding: 1.75rem 1rem 3rem; }
.page-shell-wide { max-width: 1100px; margin: 0 auto; padding: 1.75rem 1.5rem 3rem; }

.topbar {
    background: rgba(247, 244, 238, .92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--color-line);
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar-row {
    max-width: 640px;
    margin: 0 auto;
    padding: .85rem 1rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.page-shell-wide + .topbar-row,
.topbar-row-wide { max-width: 1100px; padding: .85rem 1.5rem; }

.brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-graphite);
    margin-right: auto;
    text-decoration: none;
}
.brand:hover { color: var(--color-graphite); }

.topnav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.topnav a {
    font-size: .92rem;
    font-weight: 560;
    color: var(--color-muted);
}
.topnav a:hover { color: var(--color-graphite); }
.topnav a.active { color: var(--color-petrol); }

/* Panels / Cards */
.card {
    background: rgba(255, 255, 255, .8);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-panel);
    box-shadow: var(--shadow-panel);
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.card:first-of-type { margin-top: 2rem; }
.card h1, .card h2 { margin-top: 0; }

.panel-muted {
    background: color-mix(in srgb, var(--color-surface) 74%, white);
    border: 1px solid color-mix(in srgb, var(--color-petrol) 12%, transparent);
    border-radius: var(--radius-panel);
    padding: 1.25rem 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 0;
    border-radius: var(--radius-pill);
    padding: .65rem 1.4rem;
    font-size: .92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--color-petrol); color: #fff; }
.btn-primary:hover { background: var(--color-petrol-strong); color: #fff; }
.btn-secondary { background: rgba(255,255,255,.7); color: var(--color-graphite); border: 1px solid color-mix(in srgb, var(--color-petrol) 20%, transparent); }
.btn-secondary:hover { border-color: var(--color-petrol); color: var(--color-petrol); }
.btn-danger { background: var(--color-danger-soft); color: var(--color-danger); }
.btn-danger:hover { background: var(--color-danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: .4rem .9rem; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

form.inline { display: inline; }

/* Formulare */
label { display: block; margin-top: 1rem; font-size: .85rem; color: var(--color-muted); font-weight: 560; }
input, select, textarea {
    width: 100%;
    padding: .65rem .8rem;
    margin-top: .3rem;
    border: 1px solid var(--color-line);
    border-radius: .7rem;
    background: #fff;
    font: inherit;
    color: var(--color-graphite);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-petrol);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-petrol) 15%, transparent);
}
input[type=checkbox] { width: auto; margin: 0; accent-color: var(--color-petrol); }

/* Flash-Meldungen */
.flash { padding: .8rem 1.1rem; border-radius: .9rem; margin-bottom: 1rem; font-size: .9rem; }
.flash-success { background: var(--color-success-soft); color: var(--color-success); }
.flash-error { background: var(--color-danger-soft); color: var(--color-danger); }
.flash-link { background: var(--color-petrol-soft); color: var(--color-petrol-strong); }
.flash-link a { color: var(--color-petrol-strong); font-weight: 700; }

/* Badges / Pills */
.pill {
    display: inline-block;
    padding: .15rem .65rem;
    border-radius: var(--radius-pill);
    font-size: .72rem;
    font-weight: 600;
    background: var(--color-surface);
    color: var(--color-muted);
}
.pill-warm { background: var(--color-warm-soft); color: var(--color-warm); }
.pill-petrol { background: var(--color-petrol-soft); color: var(--color-petrol-strong); }
.pill-success { background: var(--color-success-soft); color: var(--color-success); }

/* Statistik-Kacheln */
.stats-row { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1rem; }
.stat .n { font-size: 1.5rem; font-weight: 700; display: block; color: var(--color-graphite); }
.stat .l { font-size: .78rem; color: var(--color-muted); }

/* Fortschrittsbalken */
.progress-row { margin-top: .85rem; }
.progress-label { display: flex; justify-content: space-between; font-size: .82rem; color: var(--color-muted); margin-bottom: .3rem; }
.progress-track { background: var(--color-surface); border-radius: var(--radius-pill); height: 8px; overflow: hidden; }
.progress-fill { background: var(--color-petrol); height: 100%; border-radius: var(--radius-pill); }

/* Tabellen (Admin) */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .75rem; font-size: .88rem; }
thead th { color: var(--color-muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--color-line); }
tbody tr { border-bottom: 1px solid var(--color-line); }
tbody tr:last-child { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.filters { display: flex; gap: .85rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.25rem; }
.filters > div { min-width: 150px; }

.row-actions { display: flex; gap: .4rem; flex-wrap: nowrap; }

.badge-list { display: flex; flex-direction: column; gap: .6rem; }
.badge-item { display: flex; align-items: center; gap: .7rem; }
.badge-icon { font-size: 1.3rem; }
.badge-item.locked { opacity: .4; }
