/* EDPGest — Login (allineato a index2 / tema dark) */

:root {
  --edp-bg: #181824;
  --edp-bg-elevated: #1e1e2c;
  --edp-card: #252534;
  --edp-border: rgba(255, 255, 255, 0.06);
  --edp-text: #f2f3f5;
  --edp-muted: #9aa3ad;
  --edp-accent: #ff6b35;
  --edp-accent-hover: #ff8255;
  --edp-radius: 14px;
  --edp-font: "Plus Jakarta Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--edp-font);
  background: var(--edp-bg);
  color: var(--edp-text);
  color-scheme: dark;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 107, 53, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 85% 80%, rgba(78, 182, 199, 0.1) 0%, transparent 40%);
}

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--edp-card);
  border: 1px solid var(--edp-border);
  border-radius: var(--edp-radius);
  padding: 36px 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: loginFadeIn 0.45s ease-out;
}

@keyframes loginFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-brand-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ff7a45 0%, #ff6b35 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(255, 107, 53, 0.3);
}

.logo-mark-grid {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 5px;
}

.logo-mark-grid span {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #fff;
}

.login-brand h1 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-brand-version {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
}

.login-brand-sub {
  margin: 0;
  font-size: 0.92rem;
  color: var(--edp-muted);
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.login-alert-danger {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #ffb4b4;
}

.login-alert i {
  margin-top: 2px;
  flex-shrink: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--edp-muted);
}

.login-input-wrap {
  position: relative;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
  pointer-events: none;
}

.login-input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 40px;
  border-radius: 10px;
  border: 1px solid var(--edp-border);
  background: var(--edp-bg-elevated);
  color: var(--edp-text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.login-input:focus {
  outline: none;
  border-color: rgba(255, 107, 53, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.login-toggle-pass {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--edp-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.login-toggle-pass:hover {
  color: var(--edp-text);
  background: rgba(255, 255, 255, 0.06);
}

.login-submit {
  width: 100%;
  margin-top: 6px;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--edp-accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.login-submit:hover:not(:disabled) {
  background: var(--edp-accent-hover);
  transform: translateY(-1px);
}

.login-submit:disabled,
.login-submit.is-loading {
  opacity: 0.85;
  cursor: wait;
  transform: none;
}

.login-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--edp-border);
  text-align: center;
}

.login-footer p {
  margin: 0;
  color: var(--edp-muted);
  font-size: 0.78rem;
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px 22px;
  }

  .login-brand-mark {
    width: 48px;
    height: 48px;
  }
}
