* {
  box-sizing: border-box;
}

:root {
  --font-main: "Poppins", Arial, sans-serif;

  --color-bg: #f4f7fb;
  --color-surface: #ffffff;
  --color-surface-soft: #f8fafc;

  --color-primary: #1e40af;
  --color-primary-light: #2563eb;
  --color-primary-soft: #eff6ff;

  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #dbe4ee;

  --color-success: #15803d;
  --color-warning: #d97706;
  --color-danger: #dc2626;

  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius-lg: 24px;
  --radius-md: 14px;
}

body {
  margin: 0;
  font-family: var(--font-main);
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #eef4ff 48%, #e0f2fe 100%);
  color: var(--color-text);
}



/* =========================================================
   LOGIN SHELL LAYOUT
========================================================= */

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 2.45fr 4.55fr;
}



/* =========================================================
   LEFT SIDE BRAND SECTION
========================================================= */

.login-left {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px 40px 42px;
}

.brand-wrap {
  max-width: 330px;
}

.brand-badge {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 22px;
}

.brand-wrap > p {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.7;
  color: #475569;
}

.login-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.point-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
  backdrop-filter: blur(6px);
}

.point-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #0f172a;
}

.point-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.7;
}



/* =========================================================
   RIGHT LOGIN FORM SECTION
========================================================= */

.login-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 70px 40px 40px;
}

.login-box {
  width: 100%;
  max-width: 720px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 28px;
  padding: 56px 52px;
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.18);
}

.login-box-top {
  margin-bottom: 24px;
}

.mini-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

.login-box h2 {
  margin: 0 0 12px;
  font-size: 54px;
  color: #0f172a;
}

.login-box-top p {
  margin: 0;
  color: #64748b;
  font-size: 21px;
  line-height: 1.6;
}



/* =========================================================
   INPUT AREA
========================================================= */

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #334155;
}

.input-box {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  padding: 0 20px;
  height: 68px;
}

.input-box span {
  font-size: 18px;
}

.input-box input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #0f172a;
  font-size: 19px;
}

.input-box input::placeholder {
  color: #94a3b8;
}

.input-box:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #fff;
}



/* =========================================================
   LOGIN OPTIONS
========================================================= */

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 10px 0 28px;
  font-size: 16px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
}

.options a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.options a:hover {
  text-decoration: underline;
}

.forgot-password-box {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.forgot-password-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.forgot-password-note {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 16px;
}

.forgot-password-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.forgot-password-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.login-secondary-btn {
  min-width: 160px;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.login-secondary-btn:hover {
  background: #cbd5e1;
}

.login-secondary-btn.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}

.login-secondary-btn.primary:hover {
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}


/* =========================================================
   LOGIN BUTTON
========================================================= */

.login-btn {
  width: 100%;
  height: 72px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

/* =========================================================
   LOGIN TRUST / STATUS
========================================================= */

.login-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.login-trust-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #dbeafe;
}

.trust-card {
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(255, 255, 255, 0.82);
}

.login-system-note {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.login-system-note-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.login-system-note-text {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
}

.login-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.login-meta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}



/* =========================================================
   INLINE STATUS / ERROR
========================================================= */

.login-inline-message {
  margin-top: 16px;
  min-height: 24px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  display: none;
}

.login-inline-message.error {
  display: block;
  background: #fff1f2;
  border-color: #fecdd3;
  color: #b91c1c;
}

.login-inline-message.success {
  display: block;
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.login-inline-message.info {
  display: block;
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}



/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-left {
    padding: 32px 24px 10px;
  }

  .login-right {
    padding: 10px 24px 32px;
  }

  .brand-wrap h1 {
    font-size: 32px;
  }
}

.password-input-box {
  position: relative;
}

.password-toggle-btn {
  width: auto;
  min-width: 64px;
  height: 38px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.password-toggle-btn:hover {
  background: #cbd5e1;
}
/* =========================================================
   LOGIN PAGE OFFICIAL COMPACT CENTER LAYOUT
========================================================= */

@media (min-width: 901px) {
  body {
    min-height: 100vh;
    overflow: auto;
    background: #f8fafc;
  }

  .login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .login-left {
    display: none;
  }

  .login-right {
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
  }

  .login-box {
    width: 100%;
    max-width: 560px;
    padding: 34px 42px;
    border-radius: 22px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
  }

  .login-box-top {
    margin-bottom: 24px;
  }

  .mini-badge {
    display: none;
  }

  .login-box h2 {
    font-size: 28px;
    margin: 0 0 6px;
  }

  .login-box-top p {
    font-size: 14px;
    line-height: 1.45;
  }

  .login-trust-strip {
    display: none;
  }

  .input-group {
    margin-bottom: 18px;
  }

  .input-group label {
    font-size: 14px;
    margin-bottom: 7px;
  }

  .input-box {
    height: 52px;
    border-radius: 10px;
    padding: 0 16px;
    gap: 12px;
  }

  .input-box input {
    font-size: 15px;
  }

  .password-toggle-btn {
    height: 38px;
    min-width: 64px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 13px;
  }

  .options {
    margin: 4px 0 18px;
    font-size: 14px;
  }

  .login-btn {
    height: 52px;
    border-radius: 10px;
    font-size: 17px;
  }

  .login-system-note {
    margin-top: 24px;
    padding: 16px;
    border-radius: 12px;
  }

  .login-system-note-title {
    font-size: 13px;
  }

  .login-system-note-text {
    font-size: 13px;
    line-height: 1.5;
  }

  .login-meta-row {
    margin-top: 14px;
  }

  .login-meta-badge {
    font-size: 12px;
    padding: 6px 11px;
  }
}
/* =========================================================
   LOGIN BUTTON CLICK SAFETY FIX
========================================================= */

.login-box {
  position: relative;
  z-index: 2;
}

.input-box {
  position: relative;
}

.input-box input {
  flex: 1;
  width: auto;
  min-width: 0;
}

.password-toggle-btn,
.login-btn {
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.password-toggle-btn {
  flex: 0 0 auto;
}
/* =========================================================
   KMS LOGIN TOKEN COMPATIBILITY LAYER
   Purpose:
   Old login.css variable names now read from new tokens/theme.
   This keeps login UI working while making theme changes easier.
========================================================= */

:root {
  --font-main: var(--kms-font-family-base);

  --color-bg: var(--theme-body-bg);
  --color-surface: var(--theme-surface);
  --color-surface-soft: var(--theme-surface-soft);

  --color-primary: var(--theme-primary);
  --color-primary-light: var(--theme-primary-hover);
  --color-primary-soft: var(--theme-primary-soft);

  --color-text: var(--theme-text-heading);
  --color-muted: var(--theme-text-muted);
  --color-border: var(--theme-border);

  --color-success: var(--theme-success);
  --color-warning: var(--theme-warning);
  --color-danger: var(--theme-danger);

  --shadow-card: var(--kms-shadow-xl);
  --radius-lg: var(--kms-radius-3xl);
  --radius-md: var(--kms-radius-xl);
}
