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

* {
  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, 0.95), transparent 38%),
    var(--background);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.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%, 420px);
  padding: 30px 24px 24px;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.11);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 17px;
  background: var(--dark);
  color: #ffffff;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.login-heading {
  margin-top: 24px;
}

.company-name {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.025em;
}

h1 {
  margin: 7px 0 0;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.login-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.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: #ffffff;
  color: var(--text);
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  border-color: #6e6e69;
  box-shadow: 0 0 0 4px rgba(29, 29, 27, 0.07);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 72px;
}

.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;
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.login-message.visible {
  display: block;
}

.login-button {
  height: 54px;
  border: 0;
  border-radius: 14px;
  background: var(--dark);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.login-security {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.security-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f7a50;
  box-shadow: 0 0 0 4px rgba(47, 122, 80, 0.1);
}

@media (max-width: 480px) {
  .login-card {
    padding: 26px 19px 21px;
    border-radius: 24px;
  }

  h1 {
    font-size: 27px;
  }
}

/* Emanuele One 14.0 - selezione lingua esclusivamente nella schermata di accesso. */
.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: #ffffff;
  color: #171715;
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.09);
}
