/* frontend/css/style.css
   Tablet/iPad-Optik für den Unternehmens-Simulator.
   Dunkles, warmes Tech-Theme – kein Standard-AI-Look. */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Spline+Sans+Mono:wght@400;500&display=swap');

:root {
  --bg-0: #0b1020;
  --bg-1: #121a33;
  --panel: rgba(22, 31, 58, 0.78);
  --panel-solid: #161f3a;
  --stroke: rgba(140, 170, 255, 0.14);
  --text: #eaf0ff;
  --muted: #91a0c8;
  --accent: #ff7a45;       /* warmes Orange */
  --accent-2: #36d6c3;     /* Teal */
  --good: #45e08a;
  --bad: #ff5b6e;
  --warn: #ffcf5c;
  --radius: 22px;
  --font: 'Sora', system-ui, sans-serif;
  --mono: 'Spline Sans Mono', monospace;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 12% -10%, #1d2c5e 0%, transparent 60%),
    radial-gradient(900px 600px at 110% 10%, #3a1f4d 0%, transparent 55%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ---------- Das Tablet-Gehäuse ---------- */
.tablet {
  width: min(1100px, 96vw);
  height: min(760px, 92vh);
  background: linear-gradient(180deg, #0d1428, #0a0f1f);
  border-radius: 36px;
  padding: 16px;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px rgba(255, 255, 255, 0.04),
    inset 0 0 0 9px #05080f;
  position: relative;
  display: flex;
  flex-direction: column;
}
.tablet::after { /* Kamera-Punkt */
  content: '';
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: #14203f;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.05);
}

.screen {
  flex: 1;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(170deg, #0e1630, #0b1124);
}

/* Statusleiste */
.statusbar {
  height: 34px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  font-size: 13px; color: var(--muted);
  font-family: var(--mono);
  border-bottom: 1px solid var(--stroke);
}
.statusbar .right { display: flex; gap: 14px; align-items: center; }

/* ---------- Views ---------- */
.view { display: none; height: calc(100% - 34px); }
.view.active { display: block; }
.scroll { height: 100%; overflow-y: auto; padding: 26px; }
.scroll::-webkit-scrollbar { width: 8px; }
.scroll::-webkit-scrollbar-thumb { background: var(--stroke); border-radius: 8px; }

/* ---------- Auth / Onboarding ---------- */
.center-card {
  height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 30px;
  backdrop-filter: blur(14px);
}
.card h1 { font-size: 26px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.5px; }
.card .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.brand-dot { color: var(--accent); }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input, select {
  width: 100%; padding: 12px 14px;
  background: rgba(8, 13, 28, 0.7);
  border: 1px solid var(--stroke);
  border-radius: 12px; color: var(--text);
  font-family: var(--font); font-size: 15px;
  transition: border 0.2s;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }

.btn {
  width: 100%; margin-top: 20px; padding: 13px;
  background: linear-gradient(135deg, var(--accent), #ff9b6b);
  color: #1a0e08; font-weight: 700; font-size: 15px;
  border: none; border-radius: 12px; cursor: pointer;
  transition: transform 0.12s, filter 0.2s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }
.btn.secondary { background: transparent; color: var(--muted); border: 1px solid var(--stroke); }
.btn.small { width: auto; margin: 0; padding: 8px 14px; font-size: 13px; }
.btn.ghost { background: rgba(255,255,255,0.05); color: var(--text); }

.switch-line { text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.switch-line a { color: var(--accent); cursor: pointer; }
.msg { font-size: 13px; margin-top: 12px; min-height: 18px; }
.msg.error { color: var(--bad); }
.msg.ok { color: var(--good); }

/* Spezialisierungs-Karten */
.spec-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 8px; }
.spec {
  border: 1px solid var(--stroke); border-radius: 14px; padding: 14px 10px;
  text-align: center; cursor: pointer; transition: all 0.18s; background: rgba(8,13,28,0.5);
}
.spec:hover { border-color: var(--accent-2); }
.spec.selected { border-color: var(--accent); background: rgba(255,122,69,0.12); }
.spec .ico { font-size: 22px; }
.spec .name { font-size: 12px; font-weight: 600; margin-top: 6px; }
.spec .bonus { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ---------- Homescreen ---------- */
.home-head { padding: 22px 26px 10px; }
.home-head .greet { font-size: 22px; font-weight: 700; }
.home-head .stats { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.pill {
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-family: var(--mono);
  display: flex; gap: 7px; align-items: center;
}
.pill b { color: var(--accent-2); }

.app-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px 14px;
  padding: 22px 26px;
}
@media (max-width: 720px) { .app-grid { grid-template-columns: repeat(4, 1fr); } }
.app-icon { text-align: center; cursor: pointer; }
.app-icon .glyph {
  width: 64px; height: 64px; margin: 0 auto;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: linear-gradient(145deg, #1c294f, #141d38);
  border: 1px solid var(--stroke);
  box-shadow: 0 8px 18px rgba(0,0,0,0.4);
  transition: transform 0.15s;
}
.app-icon:hover .glyph { transform: translateY(-3px); }
.app-icon:active .glyph { transform: scale(0.92); }
.app-icon .lbl { font-size: 11px; color: var(--muted); margin-top: 8px; }

.dock {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 16px; padding: 12px 18px;
  background: var(--panel); border: 1px solid var(--stroke);
  border-radius: 22px; backdrop-filter: blur(14px);
}
.dock .glyph { width: 50px; height: 50px; font-size: 22px; }

/* ---------- App-Fenster ---------- */
.app-window { height: 100%; display: flex; flex-direction: column; }
.app-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--stroke);
}
.app-bar h2 { font-size: 18px; font-weight: 700; }
.back-btn {
  width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04); color: var(--text); cursor: pointer; font-size: 16px;
}
.app-body { flex: 1; overflow-y: auto; padding: 20px; }
.app-body::-webkit-scrollbar { width: 8px; }
.app-body::-webkit-scrollbar-thumb { background: var(--stroke); border-radius: 8px; }

/* Generische UI-Bausteine */
.panel {
  background: var(--panel); border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
}
.panel h3 { font-size: 15px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi { background: rgba(8,13,28,0.5); border:1px solid var(--stroke); border-radius: 14px; padding: 14px; }
.kpi .v { font-size: 22px; font-weight: 800; font-family: var(--mono); }
.kpi .k { font-size: 11px; color: var(--muted); margin-top: 3px; }
.kpi .v.good { color: var(--good); } .kpi .v.bad { color: var(--bad); }

.list-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--stroke); font-size: 14px;
}
.list-row:last-child { border-bottom: none; }
.list-row .meta { font-size: 12px; color: var(--muted); }
.tag { font-size: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(54,214,195,0.15); color: var(--accent-2); }
.tag.bad { background: rgba(255,91,110,0.15); color: var(--bad); }
.tag.warn { background: rgba(255,207,92,0.15); color: var(--warn); }

.empty { text-align: center; color: var(--muted); padding: 30px; font-size: 14px; }
.row-inline { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row-inline > div { flex: 1; min-width: 120px; }
.checkbox-row { display: flex; gap: 16px; margin-top: 10px; }
.checkbox-row label { display: flex; align-items: center; gap: 6px; margin: 0; }
.checkbox-row input { width: auto; }

.toast {
  position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--panel-solid); border: 1px solid var(--stroke);
  padding: 12px 20px; border-radius: 14px; font-size: 14px;
  opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }
.toast.good { border-color: var(--good); }
.toast.bad { border-color: var(--bad); }

.hidden { display: none !important; }
