/*
 * Mikro Onay — login screen (Flow). The front door: Flow palette + the native
 * SF system font, matching phone.css. No web font is shipped and there is no
 * inline style (the CSP forbids it); this file is the login view's only styling.
 * LIGHT ONLY, to match the app.
 */

:root {
  color-scheme: light;

  --brand: #003c91;
  --brand-hover: #0047ab;
  --brand-tint: #e5ebf4;
  --on-brand: #ffffff;

  --danger-ink: #b02a25;
  --danger-surface: #fdecec;
  --danger-border: #f1c7c5;

  --ink: #1f2937;
  --ink-2: #667382;
  --ink-3: #8494a3;
  --bg: #f9fafb;
  --surface: #ffffff;
  --border: #e5e7eb;

  --radius-card: 16px;
  --radius-btn: 11px;
  --radius-input: 11px;
  --shadow-card: 0 1px 3px rgba(15, 27, 36, 0.08), 0 6px 24px rgba(15, 27, 36, 0.08);

  --font: -apple-system, 'SF Pro Text', 'SF Pro Display', BlinkMacSystemFont, system-ui, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.login {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Respect the notch and give the card breathing room on a short screen. */
  padding: calc(env(safe-area-inset-top) + 24px) 20px calc(env(safe-area-inset-bottom) + 24px);
}

.login__card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 24px 26px;
}

/* -- brand ------------------------------------------------------------- */

.login__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.login__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--brand-tint);
}
.login__title {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--brand);
}

/* -- error ------------------------------------------------------------- */

.login__error {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-radius: var(--radius-btn);
  background: var(--danger-surface);
  border: 1px solid var(--danger-border);
  color: var(--danger-ink);
  font-size: 14px;
  text-align: center;
}

/* -- form -------------------------------------------------------------- */

.login__form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.login__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.login__input {
  width: 100%;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 16px;   /* >=16px so iOS Safari does not zoom on focus */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.login__input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}

.login__remember {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.login__check {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
  flex: none;
}

.login__submit {
  margin-top: 8px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--on-brand);
  background: var(--brand);
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 0.15s ease;
}
.login__submit:hover { background: var(--brand-hover); }
.login__submit:active { background: var(--brand-hover); }
.login__submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-tint);
}
