/*
 * ZeitRaum – Stylesheet der Anmeldeseite
 * Zusammengeführt am 2026-11-03 aus: test-login.css, minimal-login.css, login-theme.css, theme-switch.css, design-system.css.
 * Die Abschnittskommentare zeigen die Herkunft. Reihenfolge = frühere Ladereihenfolge (die Kaskade hängt davon ab).
 */
/*  ===== Abschnitt aus test-login.css =====  */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px system-ui,
    sans-serif;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  outline-offset: 3px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.auth-layout {
  grid-template-columns: 44% 56%;
}
.auth-intro {
  flex-direction: column;
  top: 0;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-weight: 750;
}
.brand > span {
  display: grid;
  place-items: center;
  width: 37px;
  height: 40px;
  background: var(--accent);
  color: white;
  border-radius: 14px 14px 6px 14px;
  font-size: 27px;
}
h1 {
  font:
    clamp(36px, 3.7vw, 57px) / 1.15 Georgia,
    serif;
  margin: 22px 0;
}
.auth-main {
  align-items: center;
  justify-content: center;
}
.auth-card {
  width: 100%;
}
h2 {
  font-weight: 400;
}
.lead {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 26px;
}
.auth-tabs {
  display: flex;
  gap: 4px;
}
.auth-tabs button {
  flex: 1;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}
.auth-tabs button.active {
  color: var(--accent);
  font-weight: 650;
}
form label {
  display: block;
  font-size: 12px;
  margin: 17px 0;
  color: var(--ink);
}
label > input:not([type='checkbox']) {
  display: block;
  width: 100%;
  border: 1px solid #dfcfc2;
  margin-top: 7px;
  font-size: 13px;
}
label small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.6;
}
.check {
  display: flex;
  gap: 9px;
  align-items: start;
  font-size: 11px;
  line-height: 1.7;
}
.check input {
  accent-color: var(--accent);
  margin-top: 4px;
}
.primary {
  width: 100%;
  border: 0;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 550;
  margin-top: 24px;
}
.message {
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.message:empty {
  display: none;
}
.existing {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.existing h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px;
}
.help {
  line-height: 1.7;
  color: var(--muted);
}
.secondary-link {
  color: var(--accent);
  text-underline-offset: 3px;
}
.secondary-link {
  font-size: 12px;
}
/* Already signed in: account card instead of the form (login.js, showSession). */
#loginContent.has-session > :is(.auth-tabs, form) {
  display: none;
}
.current-account {
  display: grid;
  gap: 12px;
}
.current-account-person {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}
.current-account-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
  font-size: 18px;
  font-weight: 650;
}
.current-account-person > div {
  display: grid;
  min-width: 0;
}
.current-account-person small {
  color: var(--muted);
  font-size: 12px;
}
.current-account-person strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.current-account-person span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-layout .current-account-continue {
  margin-top: 4px;
  text-decoration: none;
}
@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-intro {
    position: static;
    height: auto;
    padding: 26px 7%;
  }
  .auth-main {
    padding: 35px 7% 45px;
  }
  .auth-card {
    max-width: 540px;
  }
  h2 {
    font-size: 29px;
  }
}
/*  ===== Abschnitt aus minimal-login.css =====  */
.auth-layout {
  display: block;
  max-width: 440px;
  min-height: 0;
  margin: 0 auto;
  padding: 45px 24px;
}
.auth-intro {
  position: static;
  height: auto;
  padding: 0;
  background: none;
  display: block;
}
.brand {
  font-size: 24px;
  letter-spacing: -0.6px;
  gap: 11px;
}
.brand img {
  display: block;
}
.auth-main {
  padding: 32px 0 0;
  display: block;
}
.auth-card {
  max-width: none;
}
h2 {
  font:
    600 23px/1.3 system-ui,
    sans-serif;
  margin: 0 0 22px;
}
.auth-tabs {
  background: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  margin-bottom: 22px;
}
.auth-tabs button {
  border-radius: 0;
  padding: 11px;
  background: none;
}
.auth-tabs button.active {
  background: none;
  box-shadow: none;
  border-bottom: 2px solid var(--accent);
}
.primary {
  border-radius: 7px;
}
label > input:not([type='checkbox']) {
  border-radius: 7px;
  padding: 12px;
}
.existing {
  margin-top: 25px;
}
.help {
  font-size: 10px;
}
.auth-card .lead {
  font-size: 12px;
}
button,
input {
  accent-color: var(--accent);
}
@media (max-width: 600px) {
  .auth-layout {
    padding: 28px 20px;
  }
  .auth-main {
    padding: 28px 0 0;
  }
}
/*  ===== Abschnitt aus login-theme.css =====  */
:root {
  color-scheme: light;
}
:root[data-theme='dark'] {
  color-scheme: dark;
}
label > input:not([type='checkbox']) {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  line-height: 1.3;
  background: var(--accent);
  color: #fff;
}
.primary:hover {
  filter: brightness(0.92);
  background: var(--accent);
}
.auth-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}
.message {
  color: #c73c25;
}
[data-theme='dark'] .message {
  color: #ffa38d;
}
a {
  overflow-wrap: anywhere;
}
/*  ===== Abschnitt aus theme-switch.css =====  */
.theme-switch {
  position: relative;
  display: inline-block !important;
  flex: none;
  width: 44px;
  height: 25px;
  min-height: 25px;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
}
.theme-switch > input {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
/*  ===== Abschnitt aus design-system.css =====  */
/* Shared visual language for every served page, dialog and dynamic view. */
:root {
  --paper: #f6f7f9;
  --surface: #fff;
  --surface-raised: #f0f2f5;
  --ink: #252a32;
  --muted: #737b87;
  --line: #dfe3e9;
  --accent: #f46b13;
  --accent-ink: #28150b;
  --tint: #fff1e8;
  --ui-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
:root[data-theme='dark'] {
  --paper: #181a1e;
  --surface: #22252a;
  --surface-raised: #292c32;
  --ink: #eceef3;
  --muted: #a2a8b3;
  --line: #353940;
  --accent: #ff843d;
  --accent-ink: #24150e;
  --tint: #3c2c23;
}
body {
  font-family: var(--ui-font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
}
/* Installierte App ohne Titelleiste (manifest: window-controls-overlay): Platz für die Fensterknöpfe oben,
   der Streifen dient zum Verschieben des Fensters. */
@media (display-mode: window-controls-overlay) {
  body {
    padding-top: env(titlebar-area-height, 0px);
  }
  body::before {
    content: '';
    position: fixed;
    top: env(titlebar-area-y, 0);
    left: env(titlebar-area-x, 0);
    width: env(titlebar-area-width, 100%);
    height: env(titlebar-area-height, 0);
    app-region: drag;
    -webkit-app-region: drag;
  }
}
button,
input,
select,
textarea,
summary {
  font-family: var(--ui-font);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
h4 {
  font-family: var(--ui-font);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.auth-card h2 {
  font-size: 24px;
  font-weight: 650;
}
.dialog-topbar h2 {
  font-size: 18px;
  font-weight: 650;
}
.settings-pane h3 {
  font-size: 16px;
  font-weight: 600;
}
button:not(.event):not(.home-stat),
select,
input,
textarea {
  line-height: 1.4;
}
button:focus-visible,
summary:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--muted) !important;
  outline-offset: 2px;
}
.ui-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
.dialog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-size: 14px;
}
button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 550;
}
button.primary:hover {
  filter: brightness(1.06);
}
/* Destructive actions: red text and outline, filled only on hover. */
button:is(.task-remove, #deletePersonalEvent, #deleteTargetGoal, #deleteRoutineFromForm) {
  background: transparent !important;
  color: var(--danger, #b52d26) !important;
  border-color: color-mix(in srgb, var(--danger, #b52d26) 40%, var(--line)) !important;
}
button:is(.task-remove, #deletePersonalEvent, #deleteTargetGoal, #deleteRoutineFromForm):hover {
  background: color-mix(in srgb, var(--danger, #b52d26) 10%, transparent) !important;
}
:is(.field > select, .field > input:not([type='checkbox']):not([type='radio'])) {
  box-sizing: border-box;
  font-size: 14px;
}
select option {
  background: var(--surface-raised);
  color: var(--ink);
}
/* Date and view use the exact same field geometry, including native control margins. */
/* Authentication shares the application's surfaces, type and control sizes. */
.auth-layout:has(#registerForm:not([hidden])) {
  max-width: 640px;
}
.auth-card #registerForm h3 {
  margin: 22px 0 4px;
  font-size: 16px;
  font-weight: 650;
}
.auth-card #registerForm h3:first-child {
  margin-top: 0;
}
.auth-layout button.auth-text-button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  text-align: center;
}
.auth-layout button.auth-text-button:hover {
  text-decoration: underline;
}
.auth-layout .auth-intro {
  border-right: 1px solid var(--line);
}
.auth-layout .auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.auth-layout .auth-tabs {
  background: var(--surface-raised);
  border: 1px solid var(--line);
}
.auth-layout .auth-tabs button {
  font-size: 14px;
  border-radius: 8px;
}
.auth-layout .auth-tabs button.active {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
}
.auth-layout :is(input:not([type='checkbox']), select) {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font: 14px var(--ui-font);
}
.auth-layout :is(.account-option, .backup-tools > button, .backup-upload, .demo-restore > button) {
  font: 14px var(--ui-font);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
}
.auth-layout .primary {
  font-size: 14px;
  background: var(--accent);
  color: var(--accent-ink);
}
.auth-layout :is(.lead, .message, form label) {
  font-size: 14px;
}
.auth-layout :is(.help, label small) {
  font-size: 12px;
}
/* Privacy notice and usage terms: a wider reading column on the login surface. */
.auth-layout.legal-layout {
  max-width: 760px;
}
.legal-page h2 {
  margin-top: 28px;
}
.legal-page h2:first-child {
  margin-top: 0;
}
.legal-page h3 {
  margin: 24px 0 6px;
  font-size: 16px;
  font-weight: 650;
}
.legal-page :is(p, li) {
  line-height: 1.65;
  color: var(--ink);
}
.legal-page ul {
  padding-left: 20px;
}
.legal-page li + li {
  margin-top: 6px;
}
.legal-page a {
  color: var(--accent);
}
/* „Zurück zur Anmeldung“ / „Zurück zu ZeitRaum“ als Knopf statt unterstrichenem Link. */
.legal-page .secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 8px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
}
.legal-page .secondary-link:hover,
.legal-page .secondary-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
/* Password rules below a new-password field, and the privacy consent below the registration. */
.password-rules {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}
.password-rules li::before {
  content: '○ ';
}
.password-rules li.ok {
  color: var(--ink);
}
.password-rules li.ok::before {
  content: '✓ ';
  color: var(--accent);
}
.auth-legal-links {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
}
.check a {
  color: var(--accent);
}
.auth-callback {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
  margin: 0;
}
.auth-callback-card {
  max-width: 440px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.auth-callback-card h1 {
  font-size: 24px;
}
.auth-callback-card p {
  color: var(--muted);
}
@media (max-width: 700px) {
  .auth-layout .auth-card {
    padding: 20px;
  }
  .auth-layout .auth-main {
    padding: 24px 16px;
  }
  .auth-layout .auth-intro {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .dialog-icon {
    min-width: 40px;
    min-height: 40px;
  }
}
/* One toolbar for task-level actions; row actions share its size. */
.auth-layout .auth-intro {
  background: transparent;
  border: 0;
}
.auth-layout .auth-tabs {
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}
.auth-layout .auth-tabs button {
  min-height: 42px;
}
/* Added event options become quiet, permanent form sections for this draft. */
/* Status uses the same outlined, raised control as the other toolbar selects. */
/* The calendar owns its scroll area; the surrounding page stays fixed. */
html:has(#calendarView.active),
body:has(#calendarView.active) {
  height: 100%;
  overflow: hidden !important;
}
body:has(#calendarView.active) > main {
  box-sizing: border-box;
  height: 100dvh;
  min-height: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}
body:has(#calendarView.active) > main > .top {
  flex: none;
}
#calendarView.active {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0 !important;
}
#calendarView.active > .layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0 !important;
}
#calendarView.active > .layout > .panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0 !important;
  height: 100%;
  margin-bottom: 0;
}
#calendarView #calendarViewport {
  flex: 1;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: auto;
  overscroll-behavior: contain;
}
.event.is-too-small > :not(.calendar-resize) {
  visibility: hidden !important;
}
.event.is-too-small {
  font-size: 0 !important;
  overflow: hidden !important;
}
@media (pointer: coarse) {
  .dialog-icon {
    min-width: 44px !important;
    min-height: 44px !important;
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0;
  }
  #calendarView #today {
    min-height: 44px;
    padding: 8px !important;
  }
  input:not([type='checkbox']):not([type='radio']),
  select {
    min-height: 44px;
  }
  #calendarViewport {
    touch-action: pan-x pan-y;
  }
}
/* Quiet, compact progress cards with a consistent action strip. */
