/* Login page – modern, responsive (Dniprolab). */

:root {
  --brand-green: rgb(65, 143, 68);
  --brand-green-700: rgb(46, 108, 52);
  --brand-orange: rgb(195, 82, 47);

  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: rgba(17, 24, 39, 0.12);
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.10);
  --radius: 16px;
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 500px at 20% 0%, rgba(65, 143, 68, 0.12), transparent 60%),
              radial-gradient(900px 500px at 100% 0%, rgba(195, 82, 47, 0.10), transparent 55%),
              var(--bg);
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 20px 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.login-shell {
  width: min(440px, 100%);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.login-brand {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.login-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
}
.login-subtitle {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.header_login {
  font-weight: 900;
  font-size: 20px;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}

.login-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.login-fields {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.caption_login {
  display: block;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px;
  white-space: normal;
}

.flds_login {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  padding: 10px 12px;
  font-size: 16px; /* prevents iOS zoom on focus */
  font-weight: 650;
  color: var(--text);
  background: #ffffff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.flds_login:focus {
  outline: none;
  border-color: rgba(65, 143, 68, 0.65);
  box-shadow: 0 0 0 4px rgba(65, 143, 68, 0.15);
}

.message_login {
  width: 100%;
  font-weight: 750;
  font-size: 14px;
  color: var(--brand-orange);
  margin: 10px 0 0;
}

.checkbox_login {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}
.checkbox_login input { width: 18px; height: 18px; }
.checkbox_login label { cursor: pointer; }

.login-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}
@media (min-width: 420px) {
  .login-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  body {
    place-items: start;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .login-shell {
    width: 100%;
  }
  .login-card {
    padding: 16px;
    border-radius: 14px;
  }
  .header_login {
    font-size: 18px;
  }
  .login-actions {
    grid-template-columns: 1fr;
  }
  .login-logo {
    height: 30px;
  }
  .checkbox_login {
    margin-top: 12px;
  }
}

.bluebtn_login {
  appearance: none;
  border: 1px solid rgba(0,0,0,0);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.2px;
  background: linear-gradient(180deg, rgba(65, 143, 68, 1), rgba(46, 108, 52, 1));
  color: #fff;
  box-shadow: 0 10px 20px rgba(65, 143, 68, 0.20);
}
.bluebtn_login:hover { filter: brightness(1.03); }
.bluebtn_login:active { transform: translateY(1px); }
.bluebtn_login.secondary {
  background: #ffffff;
  border-color: rgba(17, 24, 39, 0.18);
  color: var(--text);
  box-shadow: none;
}

/* Back-compat: if old templates still use these */
.maintable_login { width: 100%; margin: 0 auto; }
.message_login_mini { display: none; }