/* Login page styles: clean, modern, no gradients */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #0f172a; /* slate-900 */
  --muted: #64748b; /* slate-500 */
  --primary: #16a34a; /* green-600 */
  --primary-hover: #15803d; /* green-700 */
  --ring: rgba(22, 163, 74, 0.35);
  --border: #e2e8f0; /* slate-200 */
  --danger: #dc2626; /* red-600 */
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 20px 40px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(24px, 4vw, 48px);
}

.auth-left { flex: 1 1 520px; max-width: 560px; }
.brand { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.brand-logo { width: 110px; height: auto; }
.brand-text { line-height: 1.3; }
.brand-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: clamp(24px, 3.2vw, 36px); margin: 0; color: var(--text); }
.brand-sub { font-size: clamp(14px, 1.6vw, 16px); margin: 4px 0 0; color: var(--muted); }

.illustration { margin-top: clamp(8px, 1.8vw, 16px); }
.illustration img { width: 100%; height: auto; filter: drop-shadow(0 8px 18px rgba(15,23,42,0.10)); }

.auth-card {
  flex: 0 1 440px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-strong);
  border: 1px solid var(--border);
  padding: clamp(24px, 4vw, 40px);
  animation: floatIn .6s ease;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.status-banner {
  background: rgba(22,163,74,0.08);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid rgba(22,163,74,0.25);
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.error-list { margin-bottom: 8px; }
.error-list .font-medium { font-family: 'Inter', sans-serif; }
.error-list ul { margin-top: 8px; }

.field { margin-top: 16px; }
.label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  background: #fafafa;
  border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease;
}
.input-wrap input {
  appearance: none;
  border: 0;
  outline: none;
  width: 100%;
  padding: 14px 44px 14px 40px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}
.input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted);
  transition: color .2s ease, transform .2s ease;
}
.toggle-pass {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  padding: 6px 10px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  cursor: pointer; transition: color .2s ease, background-color .2s ease;
}
.toggle-pass:hover { background: #f2f4f8; color: var(--text); }

.input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 6px var(--ring); transform: translateY(-1px); }
.input-wrap:focus-within .input-icon { color: var(--primary); transform: translateY(-50%) translateX(2px); }
.help { display: inline-block; margin-top: 8px; color: var(--muted); font-size: 12px; }

.field.is-error .input-wrap { border-color: var(--danger); box-shadow: 0 0 0 6px rgba(220,38,38,0.18); }
.field-error { margin-top: 8px; color: var(--danger); font-size: 13px; }

.row { display: flex; gap: 12px; }
.between { justify-content: space-between; }
.align-center { align-items: center; }
.mt-16 { margin-top: 16px; }
.mt-12 { margin-top: 12px; }
.meta { display: flex; gap: 8px; align-items: baseline; }
.muted { color: var(--muted); }
.link { color: var(--text); text-decoration: none; font-weight: 600; }
.link:hover { color: var(--primary); }

.remember { display: inline-flex; gap: 8px; align-items: center; color: var(--text); }
.remember input { width: 16px; height: 16px; }

.btn-primary {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 20px;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: var(--primary);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(22,163,74,0.25);
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
  will-change: transform;
  overflow: hidden;
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 12px 22px rgba(21,128,61,0.25); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-icon { opacity: 0.85; }

/* Ripple micro-interaction using CSS variables set in JS */
.btn-primary::after {
  content: '';
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: 0; height: 0;
  background: rgba(255,255,255,0.35);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.btn-primary:active::after { animation: ripple .5s ease; }
@keyframes ripple {
  0% { width: 0; height: 0; opacity: .6; }
  100% { width: 180%; height: 180%; opacity: 0; }
}

/* Responsive */
@media (max-width: 992px) {
  .auth-wrap { flex-direction: column; }
  .auth-left { max-width: 720px; }
}
@media (max-width: 560px) {
  .brand { flex-direction: column; align-items: flex-start; gap: 8px; }
  .brand-logo { width: 96px; }
  .illustration { display: none; }
  .auth-card { width: 100%; }
  .input-wrap input { padding-right: 44px; }
}

/* Accessibility: focus-visible */
:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(2,132,199,0.4); border-radius: 8px; }