/* ==========================================================================
   VOYANE Connect – Seiten auf connect.voyane.com (Paket C3)
   Anmeldung, Freigabe, Terminal, Geräte, Sitzungen. Ausgeliefert vom Connect-Dienst (src/terminal/index.ts).

   Gleiche Regeln wie im Studio (assets/css/studio.css, «Freundlich und klar»):
   Marine #00003d, helles Blau als Begleiter, Manrope. Rundungen genau 6 / 8 / 12 px, keine Pillen.
   Bedienhöhe 40 px (klein 34), Text 15 px, Nebentext 14, Beschriftung 13. Abstände im 4er-Raster.
   Normale Schreibweise, keine Versalien, kein Leuchten, keine Verläufe. Schatten nur als Hauch an Karten.
   Das Terminal selbst ist dunkel (wie die Bühne im Studio), alles drumherum hell.
   ========================================================================== */

@font-face {
    font-family: 'Manrope';
    src: url('fonts/Manrope.woff2') format('woff2');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary:     #00003d;
    --bg:          #ffffff;
    --side-bg:     #f7f8fb;
    --hover:       #f1f3f8;
    --line:        #e6e8ef;
    --line-2:      #d5d8e2;
    --line-soft:   #eef0f5;
    --ink:         var(--primary);
    --ink-2:       #2b2c50;
    --muted:       #5a5d72;
    --accent-dark: #092c87;
    --accent-soft: #e5ecfa;
    --accent-mist: #f3f6fd;
    --accent-line: #d6e0f6;
    --ok:          #1f7a43;
    --ok-soft:     #e4f3ea;
    --live:        #24a35a;
    --off:         #b4b7c6;
    --danger:      #b23a26;
    --danger-soft: #fbeeeb;
    --warn:        #8a5a00;
    --stage:       #0b0b10;
    --r-sm:        6px;
    --r:           8px;
    --r-lg:        12px;
    --shadow-card: 0 1px 2px rgba(0, 0, 61, .04);
    --font: 'Manrope', 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    --code: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
    font: 15px/1.5 var(--font);
    color: var(--ink);
    background: var(--side-bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-dark); }

/* --- Kopf ------------------------------------------------------------------ */
.kopf {
    height: 60px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 40px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.marke {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
}
.marke span { font-weight: 500; color: var(--muted); }
.nav { display: flex; gap: 4px; }
.nav a {
    height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: var(--r);
    color: var(--ink-2);
    font-weight: 600;
    text-decoration: none;
}
.nav a:hover { background: var(--hover); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--primary); }
.wer {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--muted);
}
.wer b { color: var(--ink); }
.wer form { margin: 0; }

/* --- Inhalt ----------------------------------------------------------------- */
.inhalt { max-width: 1200px; margin: 0 auto; padding: 40px; }
body.schmal .inhalt { max-width: 520px; padding-top: 64px; }

h1 { font-size: 28px; font-weight: 700; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 18px; font-weight: 700; margin: 0 0 16px; }
h3 { font-size: 16px; font-weight: 700; margin: 0; }
p { margin: 12px 0 0; }
.neben { color: var(--muted); font-size: 14px; }
code { font-family: var(--code); font-size: 13px; overflow-wrap: anywhere; }

.karte {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
}
.abschnitt { margin-top: 40px; }
.abschnitt .karte + .karte { margin-top: 16px; }

.angaben {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 4px 16px;
    margin: 16px 0 0;
    font-size: 14px;
}
.angaben dt { color: var(--muted); }
.angaben dd { margin: 0; font-weight: 600; min-width: 0; }

/* --- Formulare und Knöpfe --------------------------------------------------- */
.formular { display: grid; gap: 16px; margin-top: 20px; }
.formular.zeile { grid-template-columns: minmax(160px, 220px) auto; align-items: end; justify-content: start; }
.formular label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input {
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
}
input:focus { outline: 2px solid var(--accent-line); outline-offset: 1px; border-color: var(--primary); }

.knopf {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.knopf:hover { background: var(--hover); }
.knopf.haupt { background: var(--primary); border-color: var(--primary); color: #fff; }
.knopf.haupt:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.knopf.klein { height: 34px; padding: 0 12px; font-size: 14px; border-radius: var(--r-sm); }
.knopf:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }

/* --- Meldungen -------------------------------------------------------------- */
.meldung { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--r); font-weight: 500; }
.meldung.fehler { background: var(--danger-soft); color: var(--danger); }
.meldung.ok { background: var(--ok-soft); color: var(--ok); }
.hinweis {
    margin: 20px 0 0;
    padding: 12px 16px;
    border: 1px solid var(--accent-line);
    border-radius: var(--r);
    background: var(--accent-mist);
    color: var(--ink-2);
    font-size: 14px;
}

/* --- Tabellen ----------------------------------------------------------------- */
.tabelle-rahmen {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    overflow-x: auto;
    margin-top: 16px;
}
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.tabelle td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.rechts { text-align: right; }

.punkt {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--off);
    vertical-align: middle;
}
.punkt.an { background: var(--live); }

/* --- Terminal ----------------------------------------------------------------- */
body.terminal-seite .inhalt {
    max-width: none;
    height: calc(100vh - 60px);
    padding: 20px 40px 24px;
    display: flex;
    overflow: hidden;
}
/* min-width 0: sonst wächst der Kasten mit der Breite von xterm, und «fit» misst ihn immer breiter */
.terminal-rahmen { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.leiste { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.leiste .titel { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.leiste h1 { font-size: 18px; margin: 0; }
.stand {
    margin-left: auto;
    height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg);
    color: var(--ink-2);
    font-size: 14px;
}
.stand[data-stufe="verbinde"] .punkt { background: var(--warn); }
.stand[data-stufe="verbunden"] .punkt { background: var(--live); }
.stand[data-stufe="getrennt"] { color: var(--ink); }
.stand[data-stufe="getrennt"] .punkt { background: var(--off); }
.terminal {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 12px;
    border-radius: var(--r-lg);
    background: var(--stage);
    overflow: hidden;
}
.terminal .xterm { height: 100%; }
/* xterm 6 blättert mit eigener Leiste; die native von .xterm-viewport (xterm.css: overflow-y: scroll) wäre ein heller
   Streifen. Drei Klassen, weil xterm.css nach dieser Datei kommt. */
.terminal .xterm .xterm-viewport { background-color: var(--stage); scrollbar-width: none; }
.terminal .xterm .xterm-viewport::-webkit-scrollbar { display: none; }
.fuss { margin: 0; }

@media (max-width: 760px) {
    .kopf { padding: 0 16px; gap: 12px; }
    .nav, .wer span { display: none; }
    .inhalt, body.terminal-seite .inhalt { padding: 24px 16px; }
    body.schmal .inhalt { padding-top: 32px; }
    .formular.zeile { grid-template-columns: 1fr; }
}
