:root {
  --border: #1f4b6e;
  --bg: #e8eef5;
  --card: #fff;
  --font: Arial, "Segoe UI", Helvetica, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(160deg, #dfe8f2 0%, #f4f7fb 45%, #e6edf6 100%);
  font-family: var(--font);
  color: #10263a;
}

.login-wrap {
  width: 100%;
  max-width: 460px;
}

.login-card {
  background: var(--card);
  border: 1px solid #c5d4e4;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(15, 46, 71, 0.12);
  overflow: hidden;
}

.login-head {
  padding: 24px 24px 16px;
  text-align: center;
  border-bottom: 1px solid #dde7f2;
}

.login-head img {
  max-width: 150px;
  margin-bottom: 12px;
}

.login-head h1 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  color: #0b1e33;
}

.login-head p {
  margin: 0;
  font-size: 0.9rem;
  color: #4a6278;
}

.login-body {
  padding: 22px 24px 24px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1f4b6e;
  margin-bottom: 5px;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c5d4e4;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  background: #fafcff;
}

.field input:focus,
.field select:focus {
  outline: 2px solid #b5d4ed;
  border-color: #1f6e9c;
  background: #fff;
}

.units {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 18px;
}

.unit-pill {
  text-align: center;
  padding: 8px 6px;
  border-radius: 10px;
  background: #f0f5fb;
  border: 1px solid #d5e2ef;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1f4b6e;
}

.btn-login {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  background: #1f4b6e;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-login:hover { background: #113750; }
.btn-login:disabled { opacity: 0.65; cursor: wait; }

.btn-form-login {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 2px solid #1f4b6e;
  background: #fff;
  color: #1f4b6e;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.btn-form-login:hover {
  background: #eef4f8;
}

.hint {
  margin-top: 14px;
  font-size: 0.78rem;
  color: #5d7389;
  line-height: 1.45;
}

.status {
  display: none;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
}

.status.err {
  display: block;
  background: #fdecea;
  color: #b3261e;
  border: 1px solid #f5c6c2;
}

.status.ok {
  display: block;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.personnel-toggle {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #1f4b6e;
  cursor: pointer;
  text-decoration: underline;
}

.personnel-list {
  display: none;
  margin-top: 10px;
  max-height: 180px;
  overflow: auto;
  border: 1px solid #d5e2ef;
  border-radius: 10px;
  background: #fafcff;
  font-size: 0.75rem;
}

.personnel-list.open { display: block; }

.personnel-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #e7eef6;
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
}

.personnel-list button:hover { background: #eef4fb; }

@media (max-width: 480px) {
  .units { grid-template-columns: 1fr; }
}
