/* Gabarito lokal eingebunden (nicht von Google-Servern geladen) – vermeidet die
   DSGVO-Problematik dynamisch nachgeladener Google Fonts (IP-Übertragung an Google). */
@font-face {
    font-family: 'Gabarito';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/gabarito-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Gabarito';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/gabarito-latin-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Gabarito';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/gabarito-latin-600-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Gabarito';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/gabarito-latin-700-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Gabarito';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/gabarito-latin-800-normal.woff2') format('woff2');
}

:root {
    --bg: #010e1a;
    --panel: #0b1622;
    --panel-2: #111d2b;
    --line: #1e2c3d;
    --text: #eef2f6;
    --muted: #8a96a8;
    --accent: #ff7400;
    --accent-hover: #ff8a26;
    --accent-text: #1a0d00;
    --danger: #ef4444;
    --ok: #22c55e;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 "Gabarito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1 { font-size: 23px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 13px; font-weight: 700; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: #fca5a5; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); padding: 10px 12px; border-radius: var(--radius); }
.ok { color: #86efac; background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); padding: 10px 12px; border-radius: var(--radius); }

/* Login / Installation */
.auth-page { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(ellipse at top, #0a1b2c 0%, var(--bg) 60%); }
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 30px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.auth-card h1 { display: flex; align-items: center; gap: 8px; }
.auth-card h1::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); display: inline-block; }

label { display: block; margin: 14px 0; font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    display: block; width: 100%; margin-top: 6px; padding: 9px 11px;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
    color: var(--text); font: inherit;
}
input[type=color] { width: 54px; height: 36px; padding: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; cursor: pointer; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(255,116,0,.45); outline-offset: 1px; border-color: var(--accent); }

.btn {
    display: inline-block; cursor: pointer; border: 0; border-radius: 8px;
    padding: 9px 16px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 700;
    transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.btn.danger { background: transparent; border: 1px solid rgba(239,68,68,.4); color: #fca5a5; }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: default; }

/* Layout */
header.topbar {
    display: flex; align-items: center; gap: 16px;
    padding: 12px 22px; background: var(--panel); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}
header.topbar .brand { font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
header.topbar .brand::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); display: inline-block; }
header.topbar nav { display: flex; gap: 16px; margin-left: auto; align-items: center; font-size: 14px; }
header.topbar nav a { color: var(--text); }
header.topbar nav a:hover { color: var(--accent); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 26px 22px 60px; }
.wrap.wide { max-width: 1400px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 700px) { .cols { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

.tour-card .thumb { aspect-ratio: 2/1; background: var(--panel-2) center/cover no-repeat; border-radius: 8px; margin-bottom: 12px; }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.badge.live { color: #86efac; border-color: rgba(34,197,94,.4); }

.scene-list { display: flex; flex-direction: column; gap: 8px; }
.scene-item { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); transition: border-color .15s; }
.scene-item.active { border-color: var(--accent); }
.scene-item img { width: 76px; height: 40px; object-fit: cover; border-radius: 5px; flex: none; background: #000; }
.scene-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#pano { width: 100%; height: 62vh; min-height: 380px; border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.editor-cols { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .editor-cols { grid-template-columns: 1fr; } }

.copybox { display: flex; gap: 8px; }
.copybox input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.placing #pano { outline: 3px solid var(--accent); cursor: crosshair; }
.thumb-preview { display: flex; align-items: center; gap: 10px; }
.thumb-preview img { height: 46px; border-radius: 6px; border: 1px solid var(--line); object-fit: cover; }
