/* Vovado Remote Desktop – Design nach vovado.de */
@font-face { font-family: "Inter"; font-weight: 400; src: url(/fonts/Inter-Regular.otf) format("opentype"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 500; src: url(/fonts/Inter-Medium.otf) format("opentype"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 600; src: url(/fonts/Inter-SemiBold.otf) format("opentype"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 700; src: url(/fonts/Inter-Bold.otf) format("opentype"); font-display: swap; }

:root {
  --tief-900: #050a16; --tief-800: #08101f; --tief-700: #0c1628; --tief-600: #142138; --tief-500: #1e3356;
  --hell-100: #e8ecf4; --hell-300: #a8b0c0; --hell-500: #6b7488;
  --marke-400: #a06bff; --marke-500: #8545fd; --marke-600: #5c6ffc;
  --verlauf: linear-gradient(90deg, #A855F7, #2E90FA);
  --rot: #f04438;
  --bar-h: 44px;
  --titlebar-reserve: 0px; /* Platz für Fenster-Knöpfe in der Windows-App */
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--tief-900);
  color: var(--hell-100);
  font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; }
svg { flex: none; }

/* ---------- Hintergrund ---------- */
.view { position: fixed; inset: 0; }
.backdrop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(60% 60% at 18% 12%, rgba(133, 69, 253, .30), transparent 70%),
    radial-gradient(60% 60% at 85% 92%, rgba(46, 144, 250, .22), transparent 70%),
    linear-gradient(180deg, var(--tief-800), var(--tief-900));
  overflow: auto;
}
.backdrop::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(30, 51, 86, .35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 51, 86, .35) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000 20%, transparent 100%);
}

/* ---------- Karten ---------- */
.card {
  position: relative; width: 100%; max-width: 410px;
  background: rgba(12, 22, 40, .88);
  border: 1px solid var(--tief-500);
  border-radius: 18px;
  padding: 34px 32px 28px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(133, 69, 253, .06);
  backdrop-filter: blur(12px);
}
.card.center { text-align: center; }
.card.small { max-width: 470px; }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.brand-mark { width: 46px; height: 46px; }
.brand-mark.big { width: 64px; height: 64px; margin-bottom: 10px; }
.wordmark { font-weight: 700; font-size: 22px; letter-spacing: .28em; line-height: 1.1; }
.brand-sub { color: var(--hell-500); font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; margin-top: 3px; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 700; }
h2 { font-size: 20px; margin: 0 0 6px; font-weight: 700; }
.lead { color: var(--hell-300); margin: 0 0 22px; }
.hint { color: var(--hell-500); font-size: 13px; margin: 18px 0 0; }

/* ---------- Formular ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--hell-300); margin: 0 0 6px; }
input {
  width: 100%; height: 44px; margin: 0 0 16px; padding: 0 14px;
  background: var(--tief-800); color: var(--hell-100);
  border: 1px solid var(--tief-500); border-radius: 10px;
  font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--hell-500); }
input:focus { border-color: var(--marke-500); box-shadow: 0 0 0 3px rgba(133, 69, 253, .25); }
.error {
  margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px;
  background: rgba(240, 68, 56, .12); border: 1px solid rgba(240, 68, 56, .4); color: #ffb4ad; font-size: 14px;
}

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--tief-500); background: var(--tief-600); color: var(--hell-100);
  font-weight: 600; transition: filter .15s, background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn.block { width: 100%; }
.btn.primary { background: var(--verlauf); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.primary:disabled { filter: grayscale(.6) brightness(.8); cursor: progress; }
.btn.ghost:hover { background: var(--tief-500); }
.btn.danger { background: var(--rot); border-color: transparent; color: #fff; }
.btn.danger:hover { filter: brightness(1.1); }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.linkbtn { margin-top: 16px; background: none; border: 0; color: var(--hell-500); cursor: pointer; font-size: 13px; text-decoration: underline; }
.linkbtn:hover { color: var(--hell-300); }

.login-foot {
  position: relative; display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap;
  margin-top: 22px; color: var(--hell-500); font-size: 13px;
}
.login-foot svg { width: 16px; height: 16px; vertical-align: -3px; }
.dl { color: var(--hell-100); text-decoration: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--tief-500); background: rgba(12, 22, 40, .7); display: inline-flex; gap: 8px; align-items: center; }
.dl:hover { border-color: var(--marke-500); }
.foot-brand { display: inline-flex; gap: 6px; align-items: center; }

.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.94); } }

/* ---------- Desktop ---------- */
.desk { display: flex; flex-direction: column; background: #000; }
.bar {
  height: var(--bar-h); flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 calc(10px + var(--titlebar-reserve)) 0 14px;
  background: var(--tief-800); border-bottom: 1px solid var(--tief-600);
  user-select: none; z-index: 10;
}
.bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar-mark { width: 22px; height: 22px; }
.bar-word { font-weight: 700; font-size: 13px; letter-spacing: .24em; }
.bar-sep { width: 1px; height: 18px; background: var(--tief-500); }
.bar-user { color: var(--hell-300); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 3px rgba(18, 183, 106, .18); }
.status-dot.warn { background: #f5a524; box-shadow: 0 0 0 3px rgba(245, 165, 36, .18); }
.bar-actions { display: flex; align-items: center; gap: 4px; }
.tbtn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  color: var(--hell-300); cursor: pointer; font-size: 13px; font-weight: 500;
}
.tbtn svg { width: 17px; height: 17px; }
.tbtn:hover { background: var(--tief-600); border-color: var(--tief-500); color: var(--hell-100); }
.tbtn.danger:hover { background: rgba(240, 68, 56, .15); border-color: rgba(240, 68, 56, .45); color: #ffb4ad; }
.tbtn.active { background: var(--tief-500); color: var(--hell-100); }
.only-full { display: none; }

.screen { position: relative; flex: 1; min-height: 0; overflow: hidden; outline: none; background: var(--tief-900); }
.screen > div { margin: 0 auto; }
.bar-hotzone { display: none; }

/* Vollbild: Leiste versteckt sich wie bei Remotedesktop – oben einblenden per Maus */
.desk.full .bar {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, calc(-100% + 5px));
  width: min(760px, calc(100vw - 24px)); border: 1px solid var(--tief-500); border-top: 0;
  border-radius: 0 0 14px 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  transition: transform .18s ease; padding-right: 10px;
}
.desk.full .bar::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 44px; height: 3px; margin-left: -22px;
  border-radius: 3px; background: var(--verlauf); opacity: .9;
}
.desk.full.bar-open .bar, .desk.full.bar-pinned .bar { transform: translate(-50%, 0); }
.desk.full .bar-hotzone { display: block; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 9; }
.desk.full .only-full { display: inline-flex; }
.desk.full.bar-pinned #btn-pin { background: var(--tief-500); color: var(--hell-100); }

/* ---------- Dialog ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 10, 22, .72); backdrop-filter: blur(4px); }

/* ---------- Windows-App ---------- */
body.is-app .bar { -webkit-app-region: drag; }
body.is-app .bar button { -webkit-app-region: no-drag; }
body.is-app .desk.full .bar { -webkit-app-region: no-drag; }
body.is-app { --titlebar-reserve: 138px; }

@media (max-width: 640px) {
  .tbtn span { display: none; }
  .bar-word, .bar-sep { display: none; }
  .card { padding: 26px 20px 22px; }
}

/* ---------- Download-Seite ---------- */
.card.wide { max-width: 520px; }
.app-icon { display: block; margin: 0 auto 14px; border-radius: 22px; }
.center-w { text-align: center; }
.mt { margin-top: 22px; }
.btn.big { height: 52px; padding: 0 28px; font-size: 16px; text-decoration: none; }
.steps { text-align: left; color: var(--hell-300); font-size: 14px; margin: 22px 0 0; padding: 16px 18px 16px 36px; background: var(--tief-800); border: 1px solid var(--tief-600); border-radius: 12px; }
.steps li { margin: 4px 0; }
.steps b { color: var(--hell-100); font-weight: 600; }

/* Kein Webseiten-Verhalten */
body { user-select: none; -webkit-user-select: none; touch-action: none; }
input { user-select: text; -webkit-user-select: text; }

/* Fenster verschieben (Windows-App) außerhalb der Desktop-Ansicht */
.app-drag { display: none; }
body.is-app:not(.in-desk) .app-drag {
  display: block; position: fixed; top: 0; left: 0; right: var(--titlebar-reserve); height: var(--bar-h);
  -webkit-app-region: drag; z-index: 40;
}
