/* ============================================================
   KADIMA SKELETON — login page
   ============================================================ */

.login-body {
  --k-bg:        var(--bg,        #f4f3f1);
  --k-surface:   var(--surface,   #ffffff);
  --k-sidebar:   var(--sidebar,   #faf9f7);
  --k-border:    var(--border,    #e8e5e1);
  --k-text:      var(--text,      #1c1917);
  --k-text-2:    var(--text-2,    #57534e);
  --k-muted:     var(--muted,     #a8a29e);
  --k-accent:    var(--accent,    #d97706);
  --k-accent-soft: var(--accent-soft, #fdf0dd);
  --k-accent-ink:  var(--accent-ink,  #92400e);
  --k-red:       var(--red,       #dc2626);
  --k-red-soft:  var(--red-soft,  #fef2f2);
  --k-radius:    var(--radius,    10px);
  --k-radius-sm: var(--radius-sm, 7px);

  min-height: 100vh;
  margin: 0;
  background: var(--k-bg);
  color: var(--k-text);
}

/* ---------- layout ---------- */
.login-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ---------- left brand panel ---------- */
.login-side {
  background: var(--k-sidebar);
  border-right: 1px solid var(--k-border);
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-side::after {
  content: "";
  position: absolute;
  right: -160px; bottom: -160px;
  width: 440px; height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--k-accent-soft), transparent 70%);
  pointer-events: none;
}

.login-brand {
  display: flex; align-items: center; gap: 10px;
  position: relative; z-index: 1;
}
.login-brand .brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--k-accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}
.login-brand .brand-name { font-size: 14px; font-weight: 600; }
.login-brand .brand-sub  { font-size: 11px; color: var(--k-muted); margin-top: 1px; }

.login-side-body {
  max-width: 440px;
  position: relative; z-index: 1;
}
.login-side-body h2 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--k-text);
}
.login-side-body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--k-muted);
}

.login-side-foot {
  font-size: 12px;
  color: var(--k-muted);
  position: relative; z-index: 1;
}

/* ---------- right form panel ---------- */
.login-main {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-radius);
  padding: 28px 26px 24px;
}

.login-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--k-text);
}
.login-sub {
  font-size: 13px;
  color: var(--k-muted);
  margin: 4px 0 20px;
}

.login-alert {
  background: var(--k-red-soft);
  color: var(--k-red);
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: var(--k-radius-sm);
  padding: 9px 12px;
  font-size: 12.5px;
  margin-bottom: 16px;
}

/* form fields — redefined here so login works even if main.css fails */
.login-body .field { margin-bottom: 14px; }
.login-body .label {
  display: block;
  font-size: 12.5px; font-weight: 500;
  margin-bottom: 5px;
  color: var(--k-text);
}
.login-body .input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-radius-sm);
  background: var(--k-surface);
  font: inherit;
  font-size: 13.5px;
  color: var(--k-text);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.login-body .input:focus {
  outline: none;
  border-color: var(--k-accent);
  box-shadow: 0 0 0 3px var(--k-accent-soft);
}

.login-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  color: var(--k-text-2);
  margin: 4px 0 18px;
  user-select: none;
  cursor: pointer;
}
.login-remember input { accent-color: var(--k-accent); }

/* submit button — redefined here too */
.login-body .login-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--k-radius-sm);
  border: 1px solid var(--k-accent);
  background: var(--k-accent);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.login-body .login-submit:hover  { background: #c2660a; border-color: #c2660a; }
.login-body .login-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-help {
  font-size: 12px;
  text-align: center;
  color: var(--k-muted);
  margin-top: 16px;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-side {
    padding: 24px 24px 20px;
    border-right: none;
    border-bottom: 1px solid var(--k-border);
    min-height: auto;
  }
  .login-side-body { margin-top: 22px; }
  .login-side-body h2 { font-size: 24px; }
  .login-side-foot { display: none; }
  .login-main { padding: 28px 18px 40px; }
}