/* Login — Koperasi AS Limitrajaya (split layout) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy-0: #0a1627;
  --navy-1: #123056;
  --navy-2: #1a3f6f;
  --blue-a: #295ca6;
  --blue-b: #1f4b8f;
  --slate: #f8fafc;
  --card-border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --ok: #22c55e;
  --shadow: 0 10px 40px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  --radius: 16px;
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--slate);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  width: 100%;
}

/* ===== LEFT brand panel ===== */
.login-brand {
  flex: 1 1 48%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
  color: #fff;
  background: linear-gradient(155deg, var(--navy-0) 0%, var(--navy-1) 55%, var(--navy-2) 100%);
  overflow: hidden;
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%);
  pointer-events: none;
}

.login-brand::after {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  right: -120px; bottom: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(41,92,166,0.45) 0%, transparent 70%);
  pointer-events: none;
}

.brand-inner {
  position: relative;
  z-index: 1;
  max-width: 460px;
  width: 100%;
}

.brand-logo-wrap {
  width: 72px; height: 72px;
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  margin-bottom: 28px;
  overflow: hidden;
  padding: 8px;
}

.brand-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.brand-org {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 12px;
}

.brand-title {
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.brand-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.78);
  margin-bottom: 28px;
  max-width: 420px;
}

.brand-features {
  list-style: none;
  display: grid;
  gap: 12px;
}

.brand-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.9);
}

.brand-features .check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4ade80;
}

.brand-features .check svg {
  width: 12px; height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== RIGHT form panel ===== */
.login-panel {
  flex: 1 1 52%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--slate);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px 28px;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.mobile-brand img {
  width: 44px; height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--card-border);
  padding: 4px;
}

.mobile-brand span {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.card-heading {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}

.card-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.flash-box {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.45;
}

.flash-box:empty { display: none; }
.flash-box p { margin: 0 0 4px; }
.flash-box p:last-child { margin-bottom: 0; }
.flash-box font { color: inherit !important; }

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: 14px/1.4 var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--blue-a);
  box-shadow: 0 0 0 3px rgba(41, 92, 166, 0.18);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.pwd-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pwd-toggle:hover { color: var(--text); background: #f1f5f9; }
.pwd-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.pwd-toggle .icon-hide { display: none; }
.pwd-toggle.is-visible .icon-show { display: none; }
.pwd-toggle.is-visible .icon-hide { display: block; }

.btn-login {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font: 600 15px/1 var(--font);
  color: #fff;
  background: linear-gradient(180deg, var(--blue-a) 0%, var(--blue-b) 100%);
  box-shadow: 0 4px 14px rgba(31, 75, 143, 0.35);
  transition: filter .15s, transform .1s;
}

.btn-login:hover { filter: brightness(1.06); }
.btn-login:active { transform: translateY(1px); }

.security-note {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.security-note strong {
  display: block;
  color: #475569;
  font-size: 12px;
  margin-bottom: 2px;
}

.login-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  max-width: 420px;
  width: 100%;
}

/* ===== Mobile ===== */
@media (max-width: 900px) {
  .login-shell { flex-direction: column; }
  .login-brand { display: none; }
  .mobile-brand { display: flex; }
  .login-panel {
    min-height: 100vh;
    padding: 28px 16px 40px;
    justify-content: flex-start;
    padding-top: 48px;
  }
  .login-card { padding: 28px 22px 22px; }
}

@media (max-width: 400px) {
  .login-card { padding: 24px 18px 18px; }
  .card-heading { font-size: 1.2rem; }
}
