/*
 * menetrend.app account — look and feel derived from the MenetrendApp iOS client:
 * pill-shaped controls (44px tall, 22px radius), the green "large button",
 * secondary-background text fields and the dashboard sky-gradient header.
 */

:root {
  --m-green: #68DA85;
  --m-green-text: #59BA71;
  --m-blue: #5067B2;
  --m-red: #FF6C5C;
  --m-orange: #E29342;

  --main-background: #FFFFFF;
  --main-foreground: #000000;
  --secondary-background: #F1F1F1;
  --secondary-foreground: rgba(0, 0, 0, 0.4);
  --main-shadow: rgba(0, 0, 0, 0.12);

  --large-button-background: #68DA85;
  --large-button-foreground: #FFFFFF;

  --sky-top: #BAE9FE;
  --sky-bottom: #FDFEFF;

  --card-background: #FFFFFF;
  --link-color: var(--m-blue);
}

@media (prefers-color-scheme: dark) {
  :root {
    --m-blue: #93B2EF;

    --main-background: #3F5164;
    --main-foreground: #FFFFFF;
    --secondary-background: #516377;
    --secondary-foreground: rgba(255, 255, 255, 0.4);
    --main-shadow: rgba(0, 0, 0, 0.35);

    --large-button-background: #FFFFFF;
    --large-button-foreground: #3F5164;

    --sky-top: #364657;
    --sky-bottom: #3F5164;

    --card-background: #46586C;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--main-foreground);
  background-color: var(--main-background);
  background-image: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom) 420px, var(--main-background) 420px);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

/* ==> Header */

.site-header {
  display: flex;
  justify-content: center;
  padding: 40px 16px 8px;
}

.site-header .brand-logo {
  height: 96px;
  width: auto;
}

.logo-dark { display: none; }

@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: inline; }
}

/* ==> Main content / auth card */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card-background);
  border-radius: 22px;
  padding: 32px 24px;
  box-shadow: 0 8px 32px var(--main-shadow);
}

.card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
}

.card .subtitle {
  margin: 0 0 24px;
  text-align: center;
  color: var(--secondary-foreground);
  font-size: 15px;
}

/* ==> Form fields (CustomTextField) */

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 17px;
  font-weight: 700;
  padding-left: 16px;
  margin-bottom: 12px;
}

.field .hint {
  display: block;
  font-size: 13px;
  color: var(--secondary-foreground);
  padding-left: 16px;
  margin-top: 6px;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 22px;
  border: none;
  border-radius: 22px;
  background: var(--secondary-background);
  color: var(--main-foreground);
  font-size: 17px;
  font-family: inherit;
  appearance: none;
}

.field input:focus {
  outline: 2px solid var(--m-green);
  outline-offset: 0;
}

.field input::placeholder {
  color: var(--secondary-foreground);
}

.field-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  margin-bottom: 20px;
}

.field-checkbox label {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.field-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--m-green);
}

/* ==> Large button */

.large-button {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 22px;
  background: var(--large-button-background);
  color: var(--large-button-foreground);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s ease;
}

a.large-button {
  line-height: 44px;
  text-align: center;
}

.large-button:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.large-button:active {
  filter: brightness(0.95);
}

.large-button.destructive {
  background: var(--m-red);
  color: #FFFFFF;
}

.large-button.secondary {
  background: var(--secondary-background);
  color: var(--main-foreground);
}

/* ==> Divider ("or") between login methods */

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--secondary-foreground);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--secondary-background);
}

/* ==> Section header + small buttons (passkey list) */

.section-header {
  font-size: 17px;
  font-weight: 700;
  padding-left: 16px;
  margin: 24px 0 12px;
}

.small-button {
  border: none;
  border-radius: 14px;
  height: 28px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--secondary-background);
  color: var(--main-foreground);
}

.small-button.destructive {
  background: var(--m-red);
  color: #FFFFFF;
}

/* ==> Links under the forms */

.auth-links {
  margin-top: 24px;
  text-align: center;
  font-size: 15px;
  line-height: 2;
}

.auth-links a {
  display: block;
}

/* ==> Flash messages and validation errors */

.flash {
  width: 100%;
  max-width: 420px;
  margin-bottom: 16px;
  padding: 12px 22px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.flash-notice {
  background: var(--m-green);
  color: #FFFFFF;
}

.flash-alert {
  background: var(--m-red);
  color: #FFFFFF;
}

.error-messages {
  margin-bottom: 20px;
  padding: 12px 22px;
  border-radius: 22px;
  background: var(--m-red);
  color: #FFFFFF;
  font-size: 15px;
}

.error-messages h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.error-messages ul {
  margin: 0;
  padding-left: 20px;
}

/* ==> Account page */

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 22px;
  background: var(--secondary-background);
  margin-bottom: 12px;
  font-size: 16px;
}

.account-row .label {
  font-weight: 700;
}

.account-row .value {
  color: var(--secondary-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* ==> Footer */

.site-footer {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--secondary-foreground);
}
