/* ==========================================================
   Paikaray Stones — staff portal additions
   The designer's style.css is used unchanged; everything the app adds to the
   website (header Login, sign-in dialog, login screen, notices) lives here.
   Same tokens, no inline styles (the pages run under a strict CSP).
   ========================================================== */

/* ---------- Header: Login / Dashboard ----------
   The design's row (logo, five links, phone block, Get a Quote) fills the
   1160px container with ~100px to spare; one more button does not fit at
   the logo's full size. Measured fix: links 12px apart instead of 16px makes
   room for "Login"; signed-in staff see Dashboard in place of the phone
   block (the number stays in the top bar); narrower screens shed the phone
   block, then the button label. Nothing in the row may wrap. */
.header .nav-menu a, .nav-cta .btn { white-space: nowrap; }
.nav-menu a { padding-left: 12px; padding-right: 12px; }
.nav-menu a::after { left: 12px; right: 12px; }
.nav-cta .btn.nav-login { padding: 12px 20px; gap: 8px; }
.nav-cta .btn.nav-login i { font-size: 1.35rem; }
.nav-cta .btn.nav-login:hover i { transform: none; }
.nav-login.is-current { background: var(--ink); color: var(--white); }
.is-signed-in .nav-phone { display: none; }

@media (max-width: 1199px) { .nav-phone { display: none; } }
@media (max-width: 1040px) and (min-width: 901px) {
  .nav-cta { gap: 12px; }
  .nav-cta .btn.nav-login { width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 50%; }
  .nav-cta .btn.nav-login span { display: none; }
}
@media (max-width: 960px) and (min-width: 901px) {
  .nav-menu a { padding-left: 9px; padding-right: 9px; }
  .nav-menu a::after { left: 9px; right: 9px; }
  .nav-cta .btn.btn-dark { padding: 13px 20px; }
}
/* Below 900px the design hides header buttons; the login stays, compact. */
@media (max-width: 900px) {
  .nav-cta { gap: 12px; }
  .nav-cta .btn.nav-login { display: inline-flex; padding: 9px 14px; font-size: .9rem; }
  .nav-cta .btn.nav-login i { font-size: 1.25rem; }
}
@media (max-width: 400px) {
  .nav-cta .btn.nav-login { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; }
  .nav-cta .btn.nav-login span { display: none; }
}
/* ---------- Sign-in dialog ---------- */
.login-dialog {
  border: 0; padding: 0; margin: auto; width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); border-radius: var(--radius-lg);
  background: var(--white); color: var(--text); box-shadow: var(--shadow-lg);
}
.login-dialog::backdrop { background: rgba(14, 15, 19, .62); backdrop-filter: blur(3px); }
.login-dialog[open] { animation: login-in .22s ease-out; }
@keyframes login-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .login-dialog[open] { animation: none; } }
body.dialog-open { overflow: hidden; }

.login-box { position: relative; padding: 40px 36px 30px; display: grid; gap: 16px; }
.login-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--stone); color: var(--ink); font-size: 1.5rem;
  display: grid; place-items: center; cursor: pointer; transition: background .2s;
}
.login-close:hover { background: var(--stone-2); }
.login-logo { height: 46px; width: auto; margin-bottom: 6px; }
.login-box h2, .login-card h2 { font-size: 1.7rem; }
.login-sub { color: var(--muted); margin-top: -10px; }
.login-submit { justify-content: center; width: 100%; margin-top: 4px; }
.login-help { font-size: .85rem; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.login-help i { color: var(--accent-2); font-size: 1.05rem; margin-top: 2px; flex: none; }

/* Password field with show/hide */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 38px; height: 38px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.3rem;
  display: grid; place-items: center; cursor: pointer;
}
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--accent-2); background: var(--accent-soft); }

/* ---------- Login screen (/login) ---------- */
.login-section { padding: 80px 0 100px; background: var(--stone); }
.login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
.login-intro {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 56px 48px; color: #c9ccd4;
  background: url("../images/hero-3.jpg") center/cover no-repeat, var(--ink);
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 460px;
}
.login-intro::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(14,15,19,.55), rgba(14,15,19,.94) 70%); }
.login-intro > * { position: relative; z-index: 1; }
.login-intro h1 { color: var(--white); font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 14px; }
.login-intro h1 span { color: var(--accent); }
.login-intro p { max-width: 460px; }
.login-intro .check-list { margin: 26px 0 0; }
.login-intro .check-list li { color: var(--white); }
.login-intro .check-list i { color: var(--accent); }
.login-card { display: grid; gap: 16px; align-content: start; }
.login-card form { display: grid; gap: 16px; }
.login-card > p:first-of-type { color: var(--muted); margin: -8px 0 0; }
.login-meta { font-size: .8rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 14px; }
@media (max-width: 900px) {
  .login-grid { grid-template-columns: 1fr; }
  .login-intro { min-height: 0; padding: 40px 28px; order: 2; }
  .login-section { padding: 40px 0 70px; }
}
@media (max-width: 640px) { .login-box { padding: 34px 22px 24px; } }

/* ---------- Notices (flash messages) ---------- */
.site-alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px;
  font-size: .92rem; font-weight: 500; border: 1px solid transparent;
}
.site-alert i { font-size: 1.25rem; flex: none; margin-top: 1px; }
.site-alert.is-danger  { background: #fdecea; color: #8a1c12; border-color: #f5c6c0; }
.site-alert.is-success { background: #e8f7ec; color: #1d6b35; border-color: #bfe5c9; }
.site-alert.is-info    { background: var(--accent-soft); color: #6b4f1d; border-color: #ecdcb8; }
.site-alert.is-warning { background: #fff4e0; color: #7a4b00; border-color: #f2d9a6; }

/* ---------- Second phone number in the top bar ---------- */
@media (max-width: 900px) { .topbar-info .phone-2 { display: none; } }

/* ---------- Footer staff link & error detail ---------- */
.footer-staff { white-space: nowrap; }
.error-detail {
  margin-top: 28px; max-height: 280px; overflow: auto; padding: 14px 16px; border-radius: 10px;
  background: rgba(0,0,0,.35); color: #e2e4ea; font-size: .78rem; white-space: pre-wrap;
}

/* ---------- Compact homepage ----------
   The design's 100px sections and full-screen hero made the home page a long
   scroll; on the home page only, everything is tightened. */
.page-home .hero { min-height: min(68vh, 620px); }
.page-home .hero .container { padding-top: 56px; padding-bottom: 96px; }
.page-home .hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); margin-bottom: 16px; }
.page-home .hero p { margin-bottom: 28px; }
.page-home .stats-wrap { margin-top: -48px; }
.page-home .stat { padding: 24px 22px; }
.page-home .section { padding: 64px 0; }
.page-home .section-sm { padding: 0 0 64px; }
.page-home .head-block { margin-bottom: 32px; }
.page-home .split { gap: 48px; }
.page-home .about-img { aspect-ratio: 4 / 3.3; }
.page-home .check-list { margin: 20px 0 26px; }
.page-home .product-body { padding: 20px 20px 22px; }
.page-home .product-body p { margin-bottom: 12px; }
.page-home .step .ic { width: 76px; height: 76px; font-size: 1.9rem; margin-bottom: 16px; }
.page-home .process::before { top: 38px; }
.page-home .cta-band { padding: 44px 48px; }
@media (max-width: 900px) {
  .page-home .section { padding: 48px 0; }
  .page-home .section-sm { padding-bottom: 48px; }
  .page-home .cta-band { padding: 36px 26px; }
}
@media (max-width: 640px) {
  .page-home .hero .container { padding-top: 64px; padding-bottom: 104px; }
}