:root {
  color-scheme: dark;
  --page: #07111f;
  --page-rgb: 7, 17, 31;
  --surface: rgba(13, 30, 51, .68);
  --surface-strong: rgba(17, 39, 65, .86);
  --text: #eff8ff;
  --muted: #a8b9c9;
  --line: rgba(161, 226, 255, .16);
  --cyan: #4be1ff;
  --cyan-dark: #009fc7;
  --green: #5ee7a5;
  --yellow: #ffd36a;
  --red: #ff8b9b;
  --shadow: 0 18px 55px rgba(0, 0, 0, .26);
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #edf5fa;
  --page-rgb: 237, 245, 250;
  --surface: rgba(255, 255, 255, .72);
  --surface-strong: rgba(255, 255, 255, .92);
  --text: #11263c;
  --muted: #597086;
  --line: rgba(31, 97, 135, .16);
  --cyan: #008fb5;
  --cyan-dark: #006f90;
  --green: #16895c;
  --yellow: #986600;
  --red: #ca3651;
  --shadow: 0 18px 55px rgba(39, 74, 103, .14);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--page); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: var(--cyan); text-decoration: none; } a:hover { text-decoration: underline; }
.orb { position: fixed; z-index: -1; width: 30rem; height: 30rem; border-radius: 50%; filter: blur(38px); opacity: .2; pointer-events: none; }
.orb-one { background: #01c9ff; top: -14rem; right: -6rem; }.orb-two { background: #3f6dff; bottom: -17rem; left: -11rem; }
.glass { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.nav { width: min(1150px, calc(100% - 2rem)); margin: 1.1rem auto 0; min-height: 4.5rem; padding: .7rem 1rem .7rem 1.2rem; border-radius: 1.1rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 750; letter-spacing: -.02em; text-decoration: none; }.brand:hover { text-decoration: none; }
.brand-mark { display: inline-block; width: 1.05rem; height: 1.05rem; border: .19rem solid var(--cyan); border-radius: 50%; box-shadow: 0 0 22px rgba(75, 225, 255, .8); }
nav { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; justify-content: flex-end; } nav a { padding: .48rem .65rem; color: var(--muted); font-size: .92rem; } nav a:hover { color: var(--text); text-decoration: none; }
.nav-logout { display: inline; margin: 0; }.nav-logout input { display: none; }.nav-button { min-height: auto; padding: .48rem .65rem; color: var(--muted); border: 1px solid var(--line); border-radius: .6rem; background: transparent; font-size: .92rem; font-weight: 400; }.nav-button:hover { color: var(--text); background: transparent; }
.container { width: min(1000px, calc(100% - 2rem)); margin: 3.8rem auto; }.auth-card { width: min(440px, 100%); margin: 6vh auto; padding: 2rem; border-radius: 1.25rem; }.hero { padding: 2rem; border-radius: 1.25rem; display: flex; align-items: start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.1rem; }
h1, h2, p { margin-top: 0; }h1 { font-size: clamp(1.65rem, 3vw, 2.3rem); line-height: 1.16; letter-spacing: -.04em; margin-bottom: .8rem; }h2 { font-size: 1.15rem; letter-spacing: -.02em; margin-bottom: .75rem; }.eyebrow { text-transform: uppercase; letter-spacing: .11em; font-size: .72rem; font-weight: 750; color: var(--cyan); margin-bottom: .55rem; }.muted, small { color: var(--muted); font-size: .82rem; }
form { display: grid; gap: 1rem; margin-top: 1.35rem; }label { display: grid; gap: .38rem; font-size: .91rem; font-weight: 650; color: var(--text); }input, select { width: 100%; min-height: 2.7rem; border: 1px solid var(--line); border-radius: .65rem; background: rgba(var(--page-rgb), .24); color: var(--text); font: inherit; padding: .55rem .7rem; outline: none; }input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(75, 225, 255, .16); }
button, .button { display: inline-flex; width: fit-content; min-height: 2.7rem; justify-content: center; align-items: center; border: 0; border-radius: .65rem; background: var(--cyan); color: #002233; font: inherit; font-weight: 750; cursor: pointer; padding: .55rem .95rem; text-decoration: none; }button:hover, .button:hover { background: #86eaff; text-decoration: none; }button.secondary, .secondary { color: var(--text); background: transparent; border: 1px solid var(--line); }button.small { min-height: 2.2rem; font-size: .8rem; padding: .35rem .55rem; }
.form-link { margin: 1.2rem 0 0; font-size: .92rem; }.flash { width: min(720px, 100%); margin: 0 auto 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface-strong); }.flash.error { border-color: color-mix(in srgb, var(--red), transparent 45%); }.flash.success { border-color: color-mix(in srgb, var(--green), transparent 45%); }
.grid-two { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; margin-bottom: 1.1rem; }.panel { padding: 1.35rem; border-radius: 1.1rem; margin-bottom: 1.1rem; }.status-chip { display: inline-flex; max-width: 15rem; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; font-weight: 700; }.status-chip.active { color: var(--green); border-color: color-mix(in srgb, var(--green), transparent 50%); }.status-chip.pending { color: var(--yellow); border-color: color-mix(in srgb, var(--yellow), transparent 50%); }.notice { color: var(--muted); font-size: .9rem; }dl { border-top: 1px solid var(--line); padding-top: .75rem; margin: 1.2rem 0 .8rem; }dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }dd { margin: .25rem 0 0; font-size: .93rem; }.activity { display: grid; gap: .6rem; }.activity div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--line); padding-bottom: .6rem; font-size: .86rem; }.activity span { color: var(--muted); }.secret { display: block; overflow-wrap: anywhere; padding: .75rem; border: 1px dashed var(--cyan); border-radius: .65rem; color: var(--cyan); background: rgba(var(--page-rgb), .25); }
.table-wrap { overflow-x: auto; }table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: .86rem; }th, td { border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; padding: .72rem .55rem; }th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }td small { display: block; margin-top: .18rem; }.inline-form { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin: 0; }.inline-form input, .inline-form select { width: auto; min-height: 2.2rem; padding: .32rem .45rem; font-size: .8rem; }
footer { width: min(1000px, calc(100% - 2rem)); margin: 0 auto 2rem; color: var(--muted); font-size: .78rem; text-align: center; }
@media (max-width: 700px) { .nav { align-items: flex-start; flex-direction: column; }.container { margin-top: 2rem; }.auth-card { margin-top: 2.5rem; }.hero, .grid-two { grid-template-columns: 1fr; flex-direction: column; }.status-chip { max-width: none; }.inline-form input, .inline-form select { width: 100%; } }

/* Individuelle Stream-Steuerungsrechte */
.permissions-card {
  margin: .75rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(var(--page-rgb), .24);
}
.permissions-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  cursor: pointer;
  list-style: none;
}
.permissions-card summary::-webkit-details-marker { display: none; }
.permissions-card summary span { color: var(--muted); font-size: .9rem; }
.permissions-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  padding: .95rem 1rem 1rem;
  border-top: 1px solid var(--line);
}
.permission-toggle {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: 0;
  padding: .65rem .7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  font-size: .9rem;
}
.permission-toggle input { width: auto; min-height: 0; margin-top: .15rem; accent-color: var(--cyan); }
.permissions-form button { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 760px) {
  .permissions-form { grid-template-columns: 1fr; }
  .permissions-card summary { align-items: flex-start; flex-direction: column; gap: .25rem; }
}

/* Google-Authenticator-Einrichtung und Wiederherstellung */
.totp-qr {
  display: block;
  width: min(248px, 100%);
  margin: 1.1rem auto;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  image-rendering: pixelated;
}
.totp-manual { margin: 1rem 0; padding: .8rem; border: 1px solid var(--line); border-radius: .75rem; }
.totp-manual summary { color: var(--muted); cursor: pointer; font-weight: 650; }
.totp-manual .secret { margin-top: .75rem; }
.totp-manual small { display: block; margin-top: .55rem; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 1.25rem 0; }
.recovery-codes code { display: block; padding: .65rem; border: 1px dashed var(--cyan); border-radius: .6rem; color: var(--cyan); background: rgba(var(--page-rgb), .25); font-size: 1rem; font-weight: 750; letter-spacing: .05em; text-align: center; }
@media (max-width: 430px) { .recovery-codes { grid-template-columns: 1fr; } }
