/* Login page theme — standalone (does not load dashboard.css). */

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --border: #e6e5e0;
  --text-1: #14151a;
  --text-2: #4a4d57;
  --text-3: #80838c;
  --brand: #272a68;
  --brand-hover: #1e2052;
  --accent: #e36028;
  --danger-bg: #fdecec;
  --danger-text: #a12a2a;
  --focus: rgba(39, 42, 104, 0.18);
  --panel-a: #272a68;
  --panel-b: #1a1c47;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1013;
    --surface: #17181c;
    --border: #2a2b33;
    --text-1: #ecedf0;
    --text-2: #b4b6be;
    --text-3: #8a8d96;
    --brand: #5b5fc7;
    --brand-hover: #6d71d4;
    --danger-bg: #3a1c1c;
    --danger-text: #f2a3a3;
    --focus: rgba(109, 113, 212, 0.3);
    --panel-a: #1b1d4a;
    --panel-b: #101231;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1013;
  --surface: #17181c;
  --border: #2a2b33;
  --text-1: #ecedf0;
  --text-2: #b4b6be;
  --text-3: #8a8d96;
  --brand: #5b5fc7;
  --brand-hover: #6d71d4;
  --danger-bg: #3a1c1c;
  --danger-text: #f2a3a3;
  --focus: rgba(109, 113, 212, 0.3);
  --panel-a: #1b1d4a;
  --panel-b: #101231;
  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body.login-page {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- brand panel ---------- */
.login-brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--panel-a) 0%, var(--panel-b) 100%);
  color: #ffffff;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}

.login-brand::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 96, 40, 0.28) 0%, rgba(227, 96, 40, 0) 70%);
  pointer-events: none;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 14px;
  width: fit-content;
}

.brand-logo img {
  height: 30px;
  width: auto;
  display: block;
}

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

.brand-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4a37f;
  margin: 0 0 14px;
}

.brand-copy h1 {
  font-size: 34px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.brand-copy > p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 28px;
}

.brand-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.brand-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}

.brand-points svg {
  flex: none;
  margin-top: 2px;
  color: var(--accent);
}

.brand-foot {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  position: relative;
  z-index: 1;
}

/* ---------- form side ---------- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

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

.login-title h2 {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}

.login-title p {
  margin: 0 0 28px;
  color: var(--text-2);
  font-size: 14px;
}

.error-message {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13.5px;
  margin-bottom: 18px;
}

.form-group {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.form-group label {
  font-size: 13px;
  font-weight: 550;
  color: var(--text-2);
}

.form-group input {
  font: inherit;
  font-size: 14.5px;
  color: var(--text-1);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input::placeholder {
  color: var(--text-3);
}

.form-group input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus);
}

.submit-btn {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  background: var(--brand);
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.submit-btn:hover {
  background: var(--brand-hover);
}

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

.submit-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus);
}

.submit-btn:disabled {
  opacity: 0.65;
  cursor: progress;
}

.footer-text {
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body.login-page {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 28px 24px;
    gap: 20px;
  }

  .brand-copy h1 {
    font-size: 24px;
  }

  .brand-copy > p,
  .brand-points,
  .brand-foot {
    display: none;
  }

  .login-container {
    align-items: flex-start;
    padding: 32px 16px 48px;
  }
}
