/* ============================================================
   Navari / Timix — Login styles
   ============================================================ */

:root {
  /* Brand palette */
  --burgundy:        #551C25;
  --burgundy-deep:   #551C25;
  --terracotta:      #C05131;
  --terracotta-hot:  #D9582F;
  --peach:           #F3CFB3;
  --peach-light:     #F8E3D2;

  --ink:             #2A1F22;
  --ink-soft:        #6B5C5F;
  --line:            #D8CFC8;
  --input-bg:        #F4EEE8;
  --paper:           #FFFFFF;
  --page-bg:         #FFFFFF;

  /* Notice palette */
  --info-bg:         #FBF4EC;
  --info-bd:         #E6D2BD;
  --info-tx:         #5C3E26;

  --warn-bg:         #FFF7DB;
  --warn-bd:         #E8D27A;
  --warn-tx:         #6A5419;

  --err-bg:          #FCEAE3;
  --err-bd:          #F3CFB3;
  --err-tx:          #551C25;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Page shell ---------- */
.page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--page-bg);
  display: flex;
  align-items: center;       /* vertical center, bulletproof */
  padding: 40px 0;           /* breathing room top/bottom on tall cards */
}

/* ---------- Hero photo on the LEFT ~65% ---------- */
.hero {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 65%;
  background-image: url('/admin/images/login/Timix_Login_Page_Image.png');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  z-index: 0;
}

/* ---------- The login card ---------- */
.card {
  position: relative;
  z-index: 2;
  margin-left: calc(65% - 210px);   /* center the 420px card on the 65% boundary */
  width: 420px;
  background: var(--paper);
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
          0 30px 60px -20px rgba(20, 6, 10, 0.40),
          0 12px 28px -10px rgba(20, 6, 10, 0.25);
}

/* ---------- Burgundy TOP section ---------- */
.card-brand {
  background-color: var(--burgundy);
  background-image: url('/admin/images/login/north-star-pattern.png');
  background-repeat: repeat-x;
  background-position: top center;
  background-size: auto 100%;
  color: var(--peach);
  padding: 28px 32px 24px;
  text-align: center;
  position: relative;
}

.card-brand img {
  display: block;
  margin: 0 auto;
  width: auto;
}

.card-brand .brand-logo {
  height: 38px;
  margin-bottom: 10px;
}

.card-brand .product-logo {
  height: 22px;
  margin-bottom: 8px;
  opacity: 0.95;
}

.card-tagline {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--peach-light);
  opacity: 0.92;
}

/* ---------- White FORM section ---------- */
.card-form {
  padding: 28px 32px 24px;
  background: var(--paper);
}

.form-intro {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.form-intro a { color: var(--terracotta); text-decoration: none; font-weight: 600; }
.form-intro a:hover { text-decoration: underline; }

.field {
  margin-bottom: 16px;
}

.field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field-link {
  font-size: 11px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  transition: color 160ms ease;
}
.field-link:hover { color: var(--terracotta); }

.input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--input-bg);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.input.has-icon { padding-right: 40px; }
.input::placeholder { color: #B5A89E; }
.input:hover { background: #FAF6F1; }
.input:focus {
  border-color: var(--terracotta);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(192, 74, 44, 0.12);
}

.input-wrap { position: relative; }

.input-icon-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #8B7D74;
  cursor: pointer;
  padding: 0;
  transition: color 160ms ease, background 160ms ease;
}
.input-icon-btn:hover { color: var(--terracotta); background: rgba(192, 74, 44, 0.06); }
.input-icon-btn:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 1px;
}
.input-icon-btn .eye-hide { display: none; }
.input-icon-btn[aria-pressed="true"] .eye-show { display: none; }
.input-icon-btn[aria-pressed="true"] .eye-hide { display: block; }

/* ---------- Checkbox row (MFA "Remember this device") ---------- */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -4px 0 16px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.checkbox-row input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--terracotta);
  cursor: pointer;
}
.checkbox-row label { cursor: pointer; }
.checkbox-row .hint { color: #978680; }

/* ---------- Submit button ---------- */
.submit {
  width: 100%;
  height: 42px;
  margin-top: 8px;
  border: 0;
  border-radius: 4px;
  background: var(--terracotta);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 160ms ease, transform 100ms ease, box-shadow 200ms ease;
  box-shadow: 0 4px 10px -2px rgba(192, 74, 44, 0.35);
}
.submit:hover {
  background: var(--terracotta-hot);
  box-shadow: 0 6px 14px -2px rgba(192, 74, 44, 0.45);
}
.submit:active { transform: translateY(1px); }
.submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Secure line ---------- */
.secure {
  margin: 18px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}
.secure-lock {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--burgundy);
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
  position: relative;
}
.secure-lock::after {
  content: '';
  position: absolute;
  top: -3px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border: 1.5px solid var(--burgundy);
  border-radius: 50% 50% 0 0;
  border-bottom: 0;
}

/* ---------- Notices (errors, info, warnings) ---------- */
.notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid;
}
.notice p { margin: 0 0 6px; }
.notice p:last-child { margin: 0; }
.notice ul { margin: 4px 0 0; padding-left: 20px; }
.notice ul li { margin-bottom: 3px; }
.notice ul li:last-child { margin-bottom: 0; }
.notice a { color: inherit; font-weight: 600; text-decoration: underline; }

.notice-info {
  background: var(--info-bg);
  border-color: var(--info-bd);
  color: var(--info-tx);
}
.notice-warning {
  background: var(--warn-bg);
  border-color: var(--warn-bd);
  color: var(--warn-tx);
}
.notice-error {
  background: var(--err-bg);
  border-color: var(--err-bd);
  color: var(--err-tx);
}

/* ---------- Foot link (back to login, etc.) ---------- */
.form-foot-link {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
}
.form-foot-link a {
  color: var(--terracotta);
  text-decoration: none;
  font-weight: 600;
}
.form-foot-link a:hover { text-decoration: underline; }

/* ---------- Rebrand announcement modal ---------- */
.rebrand-modal {
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(20, 6, 10, 0.45);
}

.rebrand-modal-header {
  background-color: var(--burgundy);
  background-image: url('/admin/images/login/north-star-pattern.png');
  background-repeat: repeat-x;
  background-position: top center;
  background-size: auto 100%;
  color: var(--peach);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rebrand-modal-logo {
  height: 32px;
  width: auto;
  display: block;
}

.rebrand-modal-body {
  padding: 24px 28px 16px;
  background: var(--paper);
}

.rebrand-modal-title {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--burgundy);
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}

.rebrand-modal-body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}

.rebrand-modal-footer {
  background: var(--paper);
  padding: 0 28px 22px;
  display: flex;
  justify-content: flex-end;
}

.rebrand-modal-btn {
  background-color: var(--terracotta);
  color: #FFFFFF;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 9px 22px;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 200ms ease;
  box-shadow: 0 3px 8px -2px rgba(192, 74, 44, 0.4);
}
.rebrand-modal-btn:hover {
  background-color: var(--terracotta-hot);
  box-shadow: 0 5px 12px -2px rgba(192, 74, 44, 0.5);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .page {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }
  .hero {
    position: relative;
    width: 100%;
    height: 38vh;
    bottom: auto;
  }
  .card {
    margin: -60px auto 40px;
    width: calc(100% - 40px);
    max-width: 420px;
  }
}

@media (max-width: 480px) {
  .hero { height: 32vh; }
  .card { margin-top: -50px; }
  .card-brand { padding: 24px 24px 20px; }
  .card-form { padding: 24px 24px 20px; }
}

/* ---------- Entry animation ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card { animation: rise 500ms ease-out both; }