/* ═══════════════════════════════════════════════════════════
   MALAIKA LEGAL AI — Login Page
   Standalone, isolated, Figma-level premium design
═══════════════════════════════════════════════════════════ */

/* Fonts loaded via <link> in login.php for non-blocking delivery */

:root {
  --navy:      #08192A;
  --navy-mid:  #0C1E2E;
  --navy-soft: #162D40;
  --gold:      #C9A96E;
  --gold-lt:   #D9BC8A;

  --bg:        #F7F5F2;
  --surface:   #FFFFFF;
  --border:    #E4E0D8;
  --border-2:  #D2CCBF;

  --text-1: #111009;
  --text-2: #3A3630;
  --text-3: #766F65;
  --text-4: #A89F94;

  --red:    #991B1B;
  --red-bg: #FEF2F2;
  --green:  #166534;

  --ff-display: 'Instrument Serif', Georgia, serif;
  --ff-ui:      'Inter', -apple-system, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  font-family: var(--ff-ui);
  -webkit-font-smoothing: antialiased;
}

/* ─── Shell — two-column split ────────────────────────── */
.login-shell {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* ─── Left panel — dark branding ──────────────────────── */
.login-panel-left {
  width: 44%;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Background texture */
.login-panel-left::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(201,169,110,.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 0%, rgba(255,255,255,.015) 0%, transparent 50%);
  pointer-events: none;
}

/* Decorative watermark */
.login-panel-left::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 320px; height: 320px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 320 320' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='160' cy='160' r='155' fill='none' stroke='rgba(201,169,110,.06)' stroke-width='1'/%3E%3Ccircle cx='160' cy='160' r='120' fill='none' stroke='rgba(201,169,110,.045)' stroke-width='1'/%3E%3Ccircle cx='160' cy='160' r='85' fill='none' stroke='rgba(201,169,110,.03)' stroke-width='1'/%3E%3Ccircle cx='160' cy='160' r='50' fill='none' stroke='rgba(201,169,110,.025)' stroke-width='1'/%3E%3Cline x1='5' y1='160' x2='315' y2='160' stroke='rgba(201,169,110,.04)' stroke-width='1'/%3E%3Cline x1='160' y1='5' x2='160' y2='315' stroke='rgba(201,169,110,.04)' stroke-width='1'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none; opacity: .8;
}

.login-panel-left__inner {
  display: flex;
  flex-direction: column;
  padding: 40px 52px;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Brand */
.login-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: auto;
}

.login-brand__icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-lt) 100%);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(201,169,110,.3);
}

.login-brand__name {
  font-family: var(--ff-display);
  font-size: 15px; color: rgba(255,255,255,.88);
  letter-spacing: .01em;
}

/* Content */
.login-panel-left__content {
  padding: 40px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-panel-left__eyebrow {
  font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(201,169,110,.55);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
}

.login-panel-left__eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: rgba(201,169,110,.45);
}

.login-panel-left__headline {
  font-family: 'Roboto', -apple-system, sans-serif;
  font-size: 46px; font-weight: 900;
  color: #fff; letter-spacing: -.02em;
  line-height: 1.08; margin: 0 0 20px;
  text-transform: none;
}

.login-panel-left__headline em {
  font-style: italic;
  font-weight: 700;
  color: #ffffff;
}

.login-panel-left__sub {
  font-size: 14px; color: rgba(255,255,255,.38);
  line-height: 1.7; max-width: 340px; margin: 0 0 36px;
}

/* Feature list */
.login-features {
  display: flex; flex-direction: column; gap: 12px;
}

.login-feature {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
}

.login-feature__icon { font-size: 15px; flex-shrink: 0; }

.login-feature__text {
  font-size: 12.5px; font-weight: 500;
  color: rgba(255,255,255,.55); letter-spacing: .01em;
}

/* Footer */
.login-panel-left__footer {
  font-size: 11px; color: rgba(255,255,255,.2);
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.05);
  margin-top: auto;
}

/* ─── Right panel — form ───────────────────────────────── */
.login-panel-right {
  flex: 1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.login-form-wrap {
  width: 100%;
  max-width: 400px;
}

/* Form header */
.login-form-header {
  margin-bottom: 32px;
}

.login-form-logo {
  margin-bottom: 24px;
}

.login-form-logo__icon {
  width: 42px; height: 42px;
  background: var(--navy);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(8,25,42,.2);
}

.login-form-title {
  font-family: var(--ff-display);
  font-size: 28px; font-weight: 400;
  color: var(--navy); letter-spacing: -.02em;
  margin: 0 0 6px;
}

.login-form-subtitle {
  font-size: 13.5px; color: var(--text-3);
  margin: 0;
}

/* Error */
.login-error {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  background: var(--red-bg);
  border: 1px solid rgba(153,27,27,.12);
  border-radius: 8px;
  font-size: 13px; color: var(--red); font-weight: 500;
  margin-bottom: 20px;
}

/* Fields */
.login-form {
  display: flex; flex-direction: column; gap: 0;
}

.login-field { margin-bottom: 18px; }

.login-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--text-2); letter-spacing: .01em;
  margin-bottom: 6px;
}

.login-label-row {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.login-forgot {
  font-size: 11.5px; font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
  transition: color .12s;
}
.login-forgot:hover { color: var(--navy); }

.login-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 13px;
  font-family: var(--ff-ui);
  font-size: 14px; color: var(--text-1);
  outline: none; line-height: 1.5;
  transition: border-color .1s, box-shadow .1s;
}

.login-input::placeholder { color: var(--text-4); }

.login-input:focus {
  border-color: var(--navy-soft);
  box-shadow: 0 0 0 3px rgba(12,30,46,.07);
}

.login-input.is-error {
  border-color: var(--red);
}

.login-input.is-error:focus {
  box-shadow: 0 0 0 3px rgba(153,27,27,.08);
}

.login-password-wrap {
  position: relative;
}

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

.login-pwd-toggle {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-4); padding: 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  transition: color .12s;
}
.login-pwd-toggle:hover { color: var(--text-1); }

/* Remember me */
.login-remember { margin-bottom: 22px; }

.login-checkbox-label {
  display: flex; align-items: center; gap: 9px;
  cursor: pointer; font-size: 13px; color: var(--text-2);
  font-weight: 500; user-select: none;
}

.login-checkbox { display: none; }

.login-checkbox-mark {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-2);
  border-radius: 4px; background: var(--surface);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: background .1s, border-color .1s;
}

.login-checkbox:checked + .login-checkbox-mark {
  background: var(--navy);
  border-color: var(--navy);
}

.login-checkbox:checked + .login-checkbox-mark::after {
  content: '';
  width: 8px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

/* Submit button */
.login-submit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 20px;
  background: var(--navy); color: #fff;
  border: none; border-radius: 8px;
  font-family: var(--ff-ui);
  font-size: 14px; font-weight: 600;
  cursor: pointer; letter-spacing: .01em;
  box-shadow: 0 1px 3px rgba(8,25,42,.22), 0 4px 16px rgba(8,25,42,.12);
  transition: background .12s, box-shadow .12s, transform .1s;
}

.login-submit:hover {
  background: var(--navy-soft);
  box-shadow: 0 3px 12px rgba(8,25,42,.3);
}

.login-submit:active { transform: translateY(1px); }

.login-submit:disabled {
  opacity: .7; cursor: not-allowed; transform: none;
}

/* Form footer */
.login-form-footer {
  margin-top: 28px;
  font-size: 11.5px; color: var(--text-4);
  text-align: center; line-height: 1.5;
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .login-panel-left { display: none; }
  .login-panel-right {
    min-height: 100vh;
    background: var(--surface);
  }
}

@media (max-width: 480px) {
  .login-panel-right { padding: 32px 20px; }
  .login-panel-left__headline { font-size: 34px; }
}

/* ─── Login ↔ Signup switch link ────────────────────────── */
.login-switch {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
}

.login-switch a {
  color: var(--navy-mid);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .12s, color .12s;
}

.login-switch a:hover {
  color: var(--navy);
  border-bottom-color: var(--navy);
}
