:root {
  color-scheme: light;
  --background: #f4f4f1;
  --surface: #ffffff;
  --text: #181816;
  --muted: #72726d;
  --line: #ddddd7;
  --dark: #1d1d1b;
  --danger: #a33b31;
  --success: #2f7a50;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at 15% 0%, rgba(255,255,255,.95), transparent 38%), var(--background);
  color: var(--text);
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 18px calc(24px + env(safe-area-inset-bottom, 0px));
}

.login-card {
  width: min(100%, 440px);
  padding: 30px 24px 24px;
  border: 1px solid rgba(0,0,0,.055);
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 70px rgba(0,0,0,.11);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-mark-logo {
  display: block;
  width: 64px;
  height: 56px;
  object-fit: contain;
  object-position: left center;
}

.login-heading { margin-top: 18px; }
.company-name { color: var(--text); font-size: 18px; font-weight: 800; letter-spacing: .01em; }

.language-field { display: grid; gap: 9px; margin-top: 24px; }
.language-label { color: #4f4f4b; font-size: 13px; font-weight: 750; }
.language-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid #d6d6d0;
  border-radius: 14px;
  background: #f3f3f0;
}
.language-option {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5d5d58;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.language-option[aria-pressed="true"] { background: #fff; color: #171715; box-shadow: 0 2px 9px rgba(0,0,0,.09); }

.auth-panel[hidden], .sub-form[hidden] { display: none !important; }
.auth-panel { margin-top: 22px; }
form { display: grid; gap: 16px; margin: 0; }
.sub-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid #e4e4df; }

.panel-title { margin-bottom: 18px; }
.panel-title h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.panel-title p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.field { display: grid; gap: 8px; }
.field > span { color: #4f4f4b; font-size: 13px; font-weight: 750; }
.field input {
  width: 100%;
  height: 54px;
  padding: 0 15px;
  border: 1px solid #d6d6d0;
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus { border-color: #6e6e69; box-shadow: 0 0 0 4px rgba(29,29,27,.07); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 76px; }
.password-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: #f0f0ed;
  color: #454542;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.login-message {
  display: none;
  margin-top: 18px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff1ef;
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}
.login-message.visible { display: block; }
.login-message.success { background: #edf7f1; color: #246944; }

.login-button, .secondary-login-button {
  min-height: 54px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.login-button { border: 0; background: var(--dark); color: #fff; }
.secondary-login-button { border: 1px solid #d0d0ca; background: #fff; color: #262624; }
.login-button:disabled, .secondary-login-button:disabled { cursor: wait; opacity: .62; }

.login-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 17px;
  color: #aaa9a3;
  font-size: 13px;
}
.text-action, .back-action {
  border: 0;
  background: transparent;
  color: #4f4f4b;
  font-weight: 750;
  cursor: pointer;
}
.text-action { padding: 8px 4px; }
.back-action { display: block; width: 100%; margin-top: 16px; padding: 12px 0; }

.stack-actions { display: grid; gap: 10px; }
.approved-note {
  padding: 12px 13px;
  border-radius: 12px;
  background: #edf7f1;
  color: #246944;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .login-page { place-items: start center; padding-left: 12px; padding-right: 12px; }
  .login-card { padding: 24px 18px 20px; border-radius: 24px; }
  .field input, .login-button, .secondary-login-button { min-height: 52px; }
}

/* Emanuele One V20260810.09 - login iPhone/iPad: lock page zoom while preserving vertical scroll. */
html,
body,
.login-page {
  touch-action: pan-y;
}
