@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --lensas-dark: #0a1628;
  --lensas-blue: #1a365d;
  --lensas-accent: #3182ce;
  --lensas-light: #63b3ed;
  --lensas-glow: rgba(99, 179, 237, 0.3);
  --gradient-header: linear-gradient(135deg, #0a1628 0%, #1a365d 50%, #2c5282 100%);
  --gradient-btn: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
  --card-bg: #ffffff;
  --bg-color: #f0f4f8;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: rgba(26, 54, 93, 0.12);
  --danger: #c53030;
  --success: #2f855a;
  --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.08);
  --shadow-md: 0 4px 14px rgba(10, 22, 40, 0.1);
  --shadow-lg: 0 10px 30px rgba(10, 22, 40, 0.15);
  --shadow-glow: 0 0 20px var(--lensas-glow);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(99, 179, 237, 0.22), transparent 28rem),
    linear-gradient(135deg, #0a1628 0%, #1a365d 52%, #2c5282 100%);
  color: var(--text-primary);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 480px);
}

.brand-side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(28px, 5vw, 70px);
  color: #fff;
}

.brand-side::after {
  content: '';
  position: absolute;
  right: -160px;
  top: 80px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 179, 237, 0.26) 0%, rgba(99, 179, 237, 0.12) 38%, transparent 70%);
  animation: pulse-glow 3s ease-in-out infinite;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
  position: relative;
  z-index: 1;
}
.logo-container { position: relative; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; }
.logo-glow { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, var(--lensas-glow) 0%, transparent 70%); }
.header-brand img { position: relative; z-index: 1; height: 44px; filter: brightness(0) invert(1); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 1.7rem; font-weight: 800; letter-spacing: 2px; line-height: 1; }
.brand-tagline { margin-top: 2px; color: var(--lensas-light); font-size: 0.72rem; letter-spacing: 3px; text-transform: uppercase; }

.login-copy { position: relative; z-index: 1; max-width: 660px; }
.login-copy h1 { margin-bottom: 18px; font-size: clamp(2.4rem, 6vw, 5.8rem); line-height: 0.92; letter-spacing: -0.06em; }
.login-copy p { max-width: 560px; color: rgba(255,255,255,0.72); font-size: 1.05rem; line-height: 1.7; }
.login-points {
  display: grid;
  gap: 12px;
  max-width: 520px;
  margin-top: 34px;
  list-style: none;
}
.login-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.82);
  font-weight: 800;
}
.login-points li::before {
  content: '';
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 999px;
  background: var(--lensas-light);
  box-shadow: 0 0 0 6px rgba(99, 179, 237, 0.12);
}

.form-side {
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 52px);
  background: var(--bg-color);
}

.auth-box {
  width: min(100%, 440px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease both;
}

.auth-kicker { margin-bottom: 10px; color: var(--lensas-accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.auth-title { margin-bottom: 10px; color: var(--lensas-dark); font-size: 2rem; font-weight: 800; }
.auth-subtitle { margin-bottom: 26px; color: var(--text-secondary); line-height: 1.6; }
.auth-form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field span { color: var(--text-muted); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 16px;
  background: #fff;
  color: var(--text-primary);
  font: 700 1rem/1 'Inter', sans-serif;
  outline: none;
  transition: all 0.2s;
}
input:focus { border-color: var(--lensas-accent); box-shadow: var(--shadow-glow); }
.password-field {
  position: relative;
  display: block;
}
.password-field input { padding-right: 94px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  min-height: 38px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(49, 130, 206, 0.1);
  color: var(--lensas-blue);
  cursor: pointer;
  font: 900 0.78rem/1 'Inter', sans-serif;
}
.password-toggle:hover { background: rgba(49, 130, 206, 0.18); }
.primary-action {
  min-height: 56px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--gradient-btn);
  color: #fff;
  cursor: pointer;
  font: 800 1rem/1 'Inter', sans-serif;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s;
}
.primary-action:hover { transform: translateY(-2px); box-shadow: var(--shadow-md), var(--shadow-glow); }
.primary-action:disabled { opacity: 0.65; cursor: progress; transform: none; }
.text-action { border: 0; background: transparent; color: var(--lensas-accent); cursor: pointer; font: 800 0.95rem/1 'Inter', sans-serif; }
.auth-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; color: var(--text-muted); font-size: 0.9rem; }
.status { margin-bottom: 18px; border-radius: var(--radius-md); padding: 14px 16px; background: rgba(49, 130, 206, 0.1); color: var(--lensas-blue); line-height: 1.5; }
.status[data-type="error"] { background: rgba(197, 48, 48, 0.1); color: var(--danger); }
.status[data-type="success"] { background: rgba(47, 133, 90, 0.1); color: var(--success); }
.reset-view { display: none; }
[data-mode="reset"] .login-view { display: none; }
[data-mode="reset"] .reset-view { display: grid; }
.microcopy { margin-top: 22px; color: var(--text-muted); font-size: 0.82rem; line-height: 1.6; }
.microcopy a { color: var(--lensas-accent); font-weight: 900; text-decoration: none; }
.microcopy a:hover { text-decoration: underline; }

@keyframes pulse-glow { 0%, 100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 0.85; transform: scale(1.08); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-side { min-height: 34vh; padding: 24px; }
  .login-copy { margin-top: 68px; }
  .form-side { align-items: start; padding: 24px; }
}

@media (max-width: 480px) {
  .brand-tagline { display: none; }
  .login-copy h1 { font-size: 2.35rem; }
  .auth-box { padding: 22px; }
  .auth-meta { flex-direction: column; }
}
