:root {
  --gold: #c9962e;
  --gold-dark: #9f6f16;
  --ink: #172033;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --teal: #1f7a75;
}

* {
  box-sizing: border-box;
}

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

body.login-body {
  margin: 0;
  font: 16px/1.5 "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 18%, rgba(201, 150, 46, .16), transparent 30%),
    radial-gradient(circle at 82% 72%, rgba(31, 122, 117, .13), transparent 28%),
    linear-gradient(135deg, #f7f3ea 0%, #f5f7fb 46%, #eef3f2 100%);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.login-shell {
  width: min(1080px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(360px, 1.05fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 28px 90px rgba(23, 32, 51, .18);
  backdrop-filter: blur(18px);
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  min-height: 100%;
  padding: 42px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(23, 32, 51, .94), rgba(23, 32, 51, .78)),
    url("../images/originals/cover.jpg") center/cover;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 13, 24, .28), rgba(8, 13, 24, 0));
  pointer-events: none;
}

.brand-panel > * {
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.brand-mark img {
  width: 52px;
  height: auto;
  display: block;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.brand-copy h1,
.form-heading h2 {
  margin: 0;
  letter-spacing: 0;
}

.brand-copy h1 {
  max-width: 360px;
  color: #fff;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1;
}

.brand-copy p {
  max-width: 390px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: 17px;
}

.brand-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.brand-stats div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
}

.brand-stats strong,
.brand-stats span {
  display: block;
}

.brand-stats strong {
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.brand-stats span {
  margin-top: 8px;
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.form-panel {
  display: grid;
  place-items: center;
  padding: 42px;
  background: rgba(255, 255, 255, .86);
}

.form-card {
  width: min(430px, 100%);
}

.form-heading {
  margin-bottom: 28px;
}

.form-heading h2 {
  color: var(--ink);
  font-size: 32px;
  line-height: 1.12;
}

.form-heading p {
  margin: 10px 0 0;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  margin: 0;
}

.field span {
  color: #384152;
  font-size: 13px;
  font-weight: 800;
}

.field input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field input::placeholder {
  color: #a0a7b2;
}

.field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 150, 46, .16);
}

.password-wrap {
  position: relative;
}

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

.toggle-password {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-width: 72px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.toggle-password:hover,
.toggle-password:focus-visible {
  background: #e2e8f0;
}

.actions {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.forgot-link {
  width: max-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

.btn {
  min-width: 132px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
}

.btn-gold {
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  box-shadow: 0 14px 28px rgba(159, 111, 22, .24);
}

.btn-gold:hover,
.btn-gold:focus-visible {
  filter: brightness(.98);
  box-shadow: 0 18px 34px rgba(159, 111, 22, .3);
}

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  background: #fff1f2;
  font-size: 14px;
  font-weight: 700;
}

.admin-note {
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.forgot-modal {
  position: relative;
  width: min(390px, 100%);
  padding: 34px 28px 28px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: #e2e8f0;
}

.modal-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  font-size: 28px;
  font-weight: 900;
}

.forgot-modal h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
}

.forgot-modal p {
  margin: 10px 0 24px;
  color: var(--muted);
}

.modal-action {
  width: 100%;
}

.app-header,
.app-sidebar {
  display: none !important;
}

@media (max-width: 860px) {
  .login-page {
    align-items: start;
    padding: 18px;
  }

  .login-shell {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 320px;
    padding: 30px;
  }

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

  .form-panel {
    padding: 30px;
  }
}

@media (max-width: 520px) {
  body.login-body {
    background: #f5f7fb;
  }

  .login-page {
    padding: 0;
  }

  .login-shell {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .brand-panel {
    min-height: 270px;
    padding: 24px;
  }

  .brand-stats {
    grid-template-columns: 1fr;
  }

  .form-panel {
    padding: 28px 20px 34px;
  }

  .form-heading h2 {
    font-size: 27px;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }
}
.remember-device { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.remember-device input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; accent-color: #b88a2b; }
