/* ==================================================================
   DATO-IT Onboarding — App-Shell
   Eine Datei für Tokens, Gerüst und Komponenten. Modulspezifisches
   steht daneben (landing/assets/style.css, ticket/, kamera, ds-).
   Eingebunden per absolutem /assets/base.css, damit auch /kamera/
   aus seinem Unterverzeichnis dieselbe Quelle nutzt.
================================================================== */

:root {
    /* Marke */
    --dt-primary:       #1f6feb;
    --dt-primary-dark:  #1956b8;
    --dt-accent:        #f39321;

    /* Seitenleiste */
    --dt-nav-bg:        #0e1f38;
    --dt-nav-line:      rgba(255, 255, 255, 0.09);
    --dt-nav-text:      #9fb0c6;
    --dt-nav-text-dim:  #6c7f98;
    --dt-nav-hover:     rgba(255, 255, 255, 0.06);
    --dt-nav-active:    rgba(255, 255, 255, 0.10);

    /* Inhaltsfläche */
    --dt-bg:            #ffffff;
    --dt-soft:          #f6f8fb;
    --dt-border:        #e4e9f0;
    --dt-text:          #16202e;
    --dt-muted:         #5a6a7d;

    /* Status */
    --dt-success-bg:     #e9f6ee;
    --dt-success-border: #2d9c5a;
    --dt-error-bg:       #fdeeee;
    --dt-error-border:   #c92a2a;

    /* Form */
    --dt-radius:        10px;
    --dt-radius-field:  8px;
    --dt-nav-w:         272px;
    --dt-font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;

    /* Typo-Skala */
    --dt-fs-title:   34px;
    --dt-fs-section: 17px;
    --dt-fs-lead:    17px;
    --dt-fs-body:    15px;
    --dt-fs-label:   14px;
    --dt-fs-small:   13px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    background: var(--dt-bg);
    color: var(--dt-text);
    font: var(--dt-font);
    -webkit-font-smoothing: antialiased;
}

.app-skip {
    position: absolute;
    left: -9999px;
}
.app-skip:focus {
    left: 8px; top: 8px; z-index: 100;
    background: #fff; padding: 10px 14px; border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

/* ------------------------------------------------------------------
   Gerüst
------------------------------------------------------------------ */

.app {
    display: grid;
    grid-template-columns: var(--dt-nav-w) minmax(0, 1fr);
    min-height: 100vh;
}

/* --- Seitenleiste ------------------------------------------------ */

.app-nav {
    background: var(--dt-nav-bg);
    color: var(--dt-nav-text);
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow-y: auto;
    padding: 26px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.app-brand {
    display: block;
    padding: 0 22px;
    text-decoration: none;
    color: #fff;
}
.app-brand img {
    display: block;
    width: 132px;
    height: auto;
    margin-bottom: 10px;
}
.app-brand span {
    display: block;
    font-size: var(--dt-fs-small);
    color: var(--dt-nav-text-dim);
    letter-spacing: 0.02em;
}

.app-nav-group + .app-nav-group { margin-top: -8px; }

.app-nav-label {
    padding: 0 22px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dt-nav-text-dim);
}

.app-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.app-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 22px;
    color: var(--dt-nav-text);
    text-decoration: none;
    font-size: var(--dt-fs-label);
    line-height: 1.35;
    border-left: 3px solid transparent;
    transition: background-color .12s, color .12s;
}
.app-nav a:hover { background: var(--dt-nav-hover); color: #fff; }
.app-nav a.is-active {
    background: var(--dt-nav-active);
    color: #fff;
    font-weight: 600;
    border-left-color: var(--dt-accent);
}

.app-nav-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: var(--dt-accent);
    display: flex;
}
.app-nav-icon svg { width: 20px; height: 20px; }
.app-nav a:hover .app-nav-icon,
.app-nav a.is-active .app-nav-icon { color: var(--dt-accent); }

.app-nav-foot {
    margin-top: auto;
    padding: 16px 22px 0;
    border-top: 1px solid var(--dt-nav-line);
    font-size: var(--dt-fs-small);
}
.app-nav-foot a { color: var(--dt-nav-text-dim); text-decoration: none; }
.app-nav-foot a:hover { color: #fff; }

/* --- Umschalter für schmale Schirme ------------------------------ */

.app-nav-bar { display: none; }
.app-nav-toggle { display: none; }

/* --- Inhaltsbereich ---------------------------------------------- */

.app-main {
    padding: 46px clamp(24px, 4vw, 64px) 72px;
    min-width: 0;
}

.app-head { margin-bottom: 34px; }

.app-crumb {
    margin: 0 0 10px;
    font-size: var(--dt-fs-small);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dt-muted);
}
.app-crumb span { color: var(--dt-border); margin: 0 2px; }

.app-title {
    margin: 0;
    font-size: var(--dt-fs-title);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.app-lead {
    margin: 12px 0 0;
    font-size: var(--dt-fs-lead);
    color: var(--dt-muted);
    max-width: 62ch;
}

/* ------------------------------------------------------------------
   Inhalt: Abschnitte stehen direkt auf der Fläche, keine Karte mehr
------------------------------------------------------------------ */

.app-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
    gap: 0 56px;
    border-top: 1px solid var(--dt-border);
}

.app-sections > .lp-section {
    padding: 26px 0 30px;
    border-bottom: 1px solid var(--dt-border);
    max-width: 64ch;
}

.lp-section-title,
.app-help h2,
.tk-section h2,
.ko-section h2,
.ds-sec-head {
    font-size: var(--dt-fs-section);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.005em;
    color: var(--dt-text);
    margin: 0 0 10px;
}

.lp-section p,
.lp-step-body,
.app-help p,
.ko-hint,
.tk-hint {
    font-size: var(--dt-fs-body);
    line-height: 1.65;
    color: var(--dt-text);
}
.lp-section p { margin: 0 0 9px; }
.lp-section p:last-child, .lp-step-body p:last-child { margin-bottom: 0; }
.lp-section strong, .lp-step-body strong, .lp-callout strong { font-weight: 600; }

.lp-section ul, .lp-section ol,
.lp-step-body ul, .lp-step-body ol,
.tk-alert ul, .ko-alert ul, .lp-callout ul {
    margin: 0 0 9px;
    padding-left: 18px;
    font-size: var(--dt-fs-body);
    line-height: 1.65;
}
.lp-section li, .lp-step-body li, .tk-alert li, .ko-alert li { margin-bottom: 5px; }
.lp-section ul:last-child, .lp-section li:last-child { margin-bottom: 0; }

.lp-section a, .lp-step-body a, .app-help a, .lp-callout a {
    color: var(--dt-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    text-decoration-color: rgba(31, 111, 235, 0.4);
}
.lp-section a:hover, .lp-step-body a:hover, .app-help a:hover { text-decoration-color: currentColor; }

/* Hinweisbox */
.lp-callout {
    margin-top: 14px;
    padding: 13px 15px;
    background: var(--dt-soft);
    border-left: 3px solid var(--dt-accent);
    border-radius: 0 8px 8px 0;
    font-size: var(--dt-fs-label);
    line-height: 1.6;
}
.lp-callout > strong:first-child { display: block; margin-bottom: 3px; }

/* Schritt-Anleitungen laufen im selben Raster wie die Abschnitte */
.app-sections > .lp-steps { display: contents; }
.app-sections { counter-reset: lpstep; }
.app-sections > .lp-steps > .lp-step {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 0 12px;
    align-items: start;
    padding: 26px 0 30px;
    border-bottom: 1px solid var(--dt-border);
    max-width: 64ch;
}
.lp-step-num {
    counter-increment: lpstep;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--dt-soft);
    border: 1px solid var(--dt-border);
    color: var(--dt-text);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px;
}
.lp-step-num::before { content: counter(lpstep); }
.lp-step-title {
    font-size: var(--dt-fs-section);
    font-weight: 700;
    line-height: 1.35;
    margin: 2px 0 8px;
}
.lp-step-body code, .lp-section code {
    background: var(--dt-soft);
    border: 1px solid var(--dt-border);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 13px;
}
.lp-step-image {
    margin-top: 10px;
    max-width: 100%;
    border: 1px solid var(--dt-border);
    border-radius: 8px;
    display: block;
}

/* ------------------------------------------------------------------
   Formular
------------------------------------------------------------------ */

.tk-form label, .ko-form label, .ds-form-card form label {
    display: block;
    font-size: var(--dt-fs-label);
    font-weight: 600;
    color: var(--dt-text);
}
.ds-form-card form label small, .tk-form label small, .ko-form label small {
    display: block;
    font-weight: 400;
    color: var(--dt-muted);
    font-size: var(--dt-fs-small);
    margin: 2px 0 4px;
}

.tk-form input[type="text"], .tk-form input[type="email"],
.tk-form select, .tk-form textarea,
.ko-form input[type="text"], .ko-form input[type="email"], .ko-form textarea,
.ds-form-card input[type="text"], .ds-form-card textarea, .ds-form-card select {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 9px 12px;
    border: 1px solid var(--dt-border);
    border-radius: var(--dt-radius-field);
    font: inherit;
    font-size: var(--dt-fs-label);
    font-weight: 400;   /* Felder liegen im <label> und erben sonst dessen 600 */
    background: #fff;
    color: var(--dt-text);
}
.tk-form textarea, .ko-form textarea, .ds-form-card textarea {
    resize: vertical;
    line-height: 1.55;
}
.tk-form input:focus, .tk-form select:focus, .tk-form textarea:focus,
.ko-form input:focus, .ko-form textarea:focus,
.ds-form-card input:focus, .ds-form-card textarea:focus {
    outline: none;
    border-color: var(--dt-primary);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.tk-checkbox, .ko-checkbox, .ko-radio-group label {
    font-weight: 400;
    font-size: var(--dt-fs-label);
    line-height: 1.5;
}

.tk-btn, .ko-btn, .ds-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--dt-radius-field);
    border: 1px solid transparent;
    font: inherit;
    font-size: var(--dt-fs-label);
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.tk-btn-primary, .ko-btn-primary, .ds-btn-primary { background: var(--dt-primary); color: #fff; }
.tk-btn-primary:hover, .ko-btn-primary:hover, .ds-btn-primary:hover { background: var(--dt-primary-dark); }
.ko-btn-secondary { background: #fff; color: var(--dt-primary); border-color: var(--dt-border); }
.ko-btn-secondary:hover { border-color: var(--dt-primary); }

.tk-alert, .ko-alert {
    padding: 14px 16px;
    border-radius: var(--dt-radius);
    border: 1px solid transparent;
    margin: 0 0 20px;
    font-size: var(--dt-fs-body);
    line-height: 1.6;
}
.tk-alert-success, .ko-alert-success { background: var(--dt-success-bg); border-color: var(--dt-success-border); }
.tk-alert-error, .ko-alert-error { background: var(--dt-error-bg); border-color: var(--dt-error-border); }

/* ------------------------------------------------------------------
   Fuß
------------------------------------------------------------------ */

.app-help {
    margin-top: 44px;
    padding: 22px 24px;
    background: var(--dt-soft);
    border-radius: var(--dt-radius);
    max-width: 62ch;
}
.app-help h2 { margin: 0 0 5px; }
.app-help p { margin: 0; color: var(--dt-muted); }

.app-foot {
    margin-top: 28px;
    color: var(--dt-muted);
    font-size: var(--dt-fs-small);
}
.app-foot a { color: var(--dt-muted); }

/* ------------------------------------------------------------------
   Schmale Schirme: Leiste klappt weg
------------------------------------------------------------------ */

@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }

    .app-nav-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 20px;
        background: var(--dt-nav-bg);
        color: #fff;
        font-weight: 600;
        font-size: var(--dt-fs-label);
        cursor: pointer;
        position: sticky;
        top: 0;
        z-index: 20;
    }
    .app-nav-burger { display: grid; gap: 4px; }
    .app-nav-burger span {
        display: block; width: 18px; height: 2px;
        background: currentColor; border-radius: 2px;
    }

    .app-nav {
        display: none;
        position: static;
        height: auto;
        padding-top: 14px;
    }
    .app-nav-toggle:checked ~ .app-nav { display: flex; }
    .app-brand { display: none; }

    .app-main { padding: 28px 20px 56px; }
    .app-title { font-size: 26px; }
    .app-sections { gap: 0; }
}
