/* ---------- Global safety ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; width: 100%; margin: 0; padding: 0; overflow-x: hidden; }
img, input, button { max-width: 100%; }

/* ---------- Page layout ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;      /* stack card + footer vertically */
  align-items: center;
  padding: 16px;               /* breathing room on tiny screens */
  background: #f6f7fb;
  color: #222;
}

/* Center the card in the available vertical space */
.login-card {
  width: 100%;
  max-width: 420px;
  margin: auto;                /* pushes it to vertical center in the column */
  padding: 28px 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  text-align: center;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.brand img { height: 56px; width: auto; margin-bottom: 12px; }

.title { font-size: 1.5rem; font-weight: 700; margin: 6px 0 4px; }
.subtitle { color: #555; font-size: 0.95rem; margin: 0 0 18px; }

/* ---------- Form ---------- */
.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; font-size: 1rem; padding: 12px;
  border: 1px solid #cfd4dc; border-radius: 10px; background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.field input:focus {
  outline: none; border-color: #2a6df4; box-shadow: 0 0 0 3px rgba(42,109,244,0.18);
}

.btn-primary {
  width: 100%; padding: 12px 14px; margin-top: 6px;
  border: 0; border-radius: 10px;
  background: #2a6df4; color: #fff;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: background .15s ease, transform .02s ease;
}
.btn-primary:hover { background: #1f5be0; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.msg { min-height: 20px; color: #d12828; font-size: .92rem; margin-top: 8px; }

/* Links under the form */
.links {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px;
}
.link {
  background: none; border: 0; padding: 0;
  color: #2a6df4; cursor: pointer; text-decoration: none;
  font-size: .92rem; font-weight: 600;
}
.link:hover { text-decoration: underline; }

/* ---------- Footer (always below card) ---------- */
.footer {
  width: 100%;
  max-width: 720px;
  text-align: center;
  padding: 18px 10px;
  color: #666; font-size: .9rem;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin-top: 16px;            /* space away from card */
}
.footer .sep { margin: 0 8px; color: #aaa; }
.footer .copyright { margin-top: 8px; color: #888; font-size: .86rem; }

/* ---------- Dialogs ---------- */
.modal {
  width: min(680px, 92vw);
  border: none; border-radius: 14px; padding: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal::backdrop { background: rgba(0,0,0,0.45); }
.modal-content { padding: 22px 22px 18px; background: #fff; border-radius: 14px; }
.modal-content h2 { margin: 0 0 10px; font-size: 1.35rem; }
.modal-content h3 { margin: 14px 0 8px; font-size: 1.05rem; }
.modal-content p { margin: 8px 0; color: #333; }
.modal-content ul { margin: 8px 0 0 18px; }
.modal-actions { text-align: right; margin-top: 16px; }
.btn {
  display: inline-block; padding: 10px 14px; border-radius: 10px;
  background: #eef2ff; color: #2a3a8a; border: 1px solid #dfe6ff;
  cursor: pointer; font-weight: 700;
}
.btn:hover { background: #e6ecff; }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 480px) {
  .login-card { margin: 0; padding: 22px 16px; }
  .brand img { height: 48px; }
  .subtitle { font-size: .88rem; }
  .modal { width: 94vw; }
}


/* Remember checkbox row */
.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.remember-row label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
}
