/* ============================================================
   R&VL's Shipping & Logistics Ja. — custom site (Stage 1)
   Phone-first responsive design, Sethwan-mirror palette.
   ============================================================ */

:root {
  --purple: #4a00e0;
  --purple-dark: #3700a8;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --lavender: #eef2ff;
  --navy: #0f172a;
  --slate: #334155;
  --slate-light: #64748b;
  --line: #e2e8f0;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  color: var(--navy);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 64px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.section-head p {
  color: var(--slate-light);
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  text-align: center;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-blue {
  background: var(--blue);
  color: var(--white);
}

.btn-blue:hover {
  background: var(--blue-dark);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-purple {
  background: var(--purple);
  color: var(--white);
}

.btn-purple:hover {
  background: var(--purple-dark);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header .header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--white);
  line-height: 1.2;
  flex-shrink: 0;
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--white);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo small {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* The real R&VL's logo (recovered from Sethwan 2026-11-18): a cream
   rectangle — small badge in the header, full readable size in the footer. */
.logo-img {
  height: 52px;
  width: auto;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
}

.site-footer .logo-img {
  height: 104px;
  border-radius: 14px;
}

.main-nav {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-login {
  padding: 9px 22px;
  font-size: 0.95rem;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  position: relative;
  transition: background 0.2s;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 12px;
  right: 12px;
  z-index: 99;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 10px;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--navy);
  font-weight: 600;
}

.mobile-nav a:hover {
  background: var(--lavender);
  text-decoration: none;
}

/* Header once scrolled (or toggled) */
.site-header.scrolled,
.site-header.menu-open {
  background: var(--white);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
}

.site-header.scrolled .logo,
.site-header.menu-open .logo {
  color: var(--navy);
}

.site-header.scrolled .logo-mark,
.site-header.menu-open .logo-mark {
  background: var(--purple);
  color: var(--white);
}

.site-header.scrolled .nav-toggle,
.site-header.menu-open .nav-toggle {
  background: var(--lavender);
}

.site-header.scrolled .nav-toggle span,
.site-header.scrolled .nav-toggle span::before,
.site-header.scrolled .nav-toggle span::after,
.site-header.menu-open .nav-toggle span,
.site-header.menu-open .nav-toggle span::before,
.site-header.menu-open .nav-toggle span::after {
  background: var(--navy);
}

@media (min-width: 960px) {
  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }

  .main-nav {
    display: block;
  }

  .main-nav ul {
    display: flex;
    gap: 6px;
    list-style: none;
  }

  .main-nav a {
    color: var(--white);
    font-weight: 600;
    font-size: 0.98rem;
    padding: 8px 14px;
    border-radius: 999px;
    opacity: 0.92;
  }

  .main-nav a:hover,
  .main-nav a.active {
    opacity: 1;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.16);
  }

  .site-header.scrolled .main-nav a {
    color: var(--navy);
  }

  .site-header.scrolled .main-nav a:hover,
  .site-header.scrolled .main-nav a.active {
    background: var(--lavender);
  }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(130deg, var(--purple) 0%, #5b21b6 45%, var(--blue) 115%);
  color: var(--white);
  padding: calc(var(--header-h) + 44px) 0 72px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 22px;
}

.hero-badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.3);
  flex-shrink: 0;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 8.5vw, 4rem);
  margin-bottom: 18px;
}

.hero-sub {
  color: #ddd6fe;
  font-size: 1.08rem;
  max-width: 34rem;
  margin-bottom: 30px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-art {
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 960px) {
  .hero {
    padding: calc(var(--header-h) + 64px) 0 96px;
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
  }
}

/* ---------- Page banner (inner pages) ---------- */
.page-banner {
  background: linear-gradient(130deg, var(--purple) 0%, #5b21b6 55%, var(--blue) 125%);
  color: var(--white);
  padding: calc(var(--header-h) + 40px) 0 52px;
}

.page-banner h1 {
  color: var(--white);
  font-size: clamp(1.9rem, 6vw, 2.7rem);
  margin-bottom: 8px;
}

.page-banner p {
  color: #ddd6fe;
  max-width: 38rem;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--lavender);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.service-icon svg {
  width: 27px;
  height: 27px;
}

.service-card h3 {
  font-size: 1.13rem;
  margin-bottom: 8px;
}

.service-card p {
  font-size: 0.97rem;
  color: var(--slate-light);
  margin-bottom: 14px;
}

.learn-more {
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 44px;
}

.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--lavender);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.step p {
  font-weight: 600;
  color: var(--navy);
  padding-top: 5px;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Calculator ---------- */
.calc-section {
  background: var(--lavender);
}

.calc-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px 24px;
  max-width: 680px;
}

.calc-card h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.calc-card .calc-sub {
  color: var(--slate-light);
  font-size: 0.97rem;
  margin-bottom: 22px;
}

.calc-form {
  display: grid;
  gap: 16px;
}

.field label {
  display: block;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.92rem;
  margin-bottom: 7px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--navy);
  background: var(--white);
  appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 44px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.calc-result {
  display: none;
  margin-top: 20px;
  background: var(--lavender);
  border: 1.5px solid #c7d2fe;
  border-radius: 12px;
  padding: 16px 18px;
  font-weight: 800;
  color: var(--purple);
  font-size: 1.2rem;
}

.calc-result.show {
  display: block;
}

.calc-error {
  display: none;
  margin-top: 14px;
  color: #b91c1c;
  font-weight: 600;
  font-size: 0.95rem;
}

.calc-error.show {
  display: block;
}

.calc-note {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--slate-light);
}

@media (min-width: 640px) {
  .calc-form {
    grid-template-columns: 1fr 1fr;
  }

  .calc-form .btn {
    grid-column: 1 / -1;
  }
}

/* ---------- FAQ accordion ---------- */
.faq-list {
  max-width: 820px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: none;
  border: none;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  text-align: left;
  padding: 18px 20px;
  cursor: pointer;
  font-size: 1.02rem;
}

.faq-q .chev {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--blue);
  transition: transform 0.25s ease;
}

.faq-item.open .faq-q .chev {
  transform: rotate(180deg);
}

.faq-a {
  display: none;
  padding: 0 20px 20px;
  color: var(--slate);
  font-size: 0.99rem;
}

.faq-item.open .faq-a {
  display: block;
}

/* ---------- Tables / rates ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 28px;
}

table.rates {
  width: 100%;
  border-collapse: collapse;
  min-width: 300px;
}

table.rates th,
table.rates td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.99rem;
}

table.rates th {
  background: var(--lavender);
  color: var(--navy);
  font-weight: 700;
}

table.rates tr:last-child td {
  border-bottom: none;
}

table.rates td:last-child,
table.rates th:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rates-cols {
  display: grid;
  gap: 0 28px;
}

@media (min-width: 760px) {
  .rates-cols {
    grid-template-columns: 1fr 1fr;
  }
}

.info-card {
  background: var(--lavender);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 28px;
}

.info-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

/* ---------- Address cards ---------- */
.address-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.address-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.address-card h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
  color: var(--purple);
}

.address-card address {
  font-style: normal;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 8px;
}

.address-card p {
  font-size: 0.95rem;
  color: var(--slate-light);
}

@media (min-width: 700px) {
  .address-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .address-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Forms (pre-alert / contact) ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px 24px;
  max-width: 760px;
}

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

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid .full {
    grid-column: 1 / -1;
  }
}

.form-success {
  display: none;
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  color: #065f46;
  border-radius: 12px;
  padding: 16px 18px;
  font-weight: 600;
  margin-top: 18px;
}

.form-success.show {
  display: block;
}

/* ---------- Contact section ---------- */
.contact-section {
  background: #edf1f7;
}

.contact-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

.contact-details {
  display: grid;
  gap: 14px;
}

.contact-detail {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.contact-detail .service-icon {
  margin-bottom: 0;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.contact-detail .service-icon svg {
  width: 22px;
  height: 22px;
}

.contact-detail h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.contact-detail p {
  color: var(--slate);
  font-size: 0.98rem;
  word-break: break-word;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 44px;
  }
}

/* ---------- Login placeholder ---------- */
.notice-card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 36px 28px;
  text-align: center;
}

.notice-card .service-icon {
  margin: 0 auto 18px;
  width: 60px;
  height: 60px;
}

.notice-card h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.notice-card p {
  color: var(--slate-light);
  margin-bottom: 14px;
}

.notice-card .btn {
  margin-top: 10px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #cbd5e1;
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
  padding-bottom: 44px;
}

.site-footer .logo {
  color: var(--white);
  margin-bottom: 14px;
}

.site-footer .logo-mark {
  background: var(--purple);
  color: var(--white);
}

.footer-brand p {
  font-size: 0.95rem;
  max-width: 22rem;
}

.site-footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.97rem;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-contact {
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 0.97rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0;
  font-size: 0.88rem;
  color: #94a3b8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

@media (min-width: 820px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

/* ============================================================
   Stage 2 — accounts, My Packages, backoffice
   ============================================================ */

/* ---------- Alerts / messages ---------- */
.alert {
  display: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.96rem;
  margin-bottom: 18px;
  border: 1.5px solid transparent;
}

.alert.show {
  display: block;
}

.alert-error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.alert-pending {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.alert-success {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}

.alert-info {
  background: var(--lavender);
  border-color: #c7d2fe;
  color: var(--purple-dark);
}

/* ---------- Auth pages ---------- */
.auth-card {
  max-width: 520px;
  margin: 0 auto;
}

.auth-card .form-grid {
  grid-template-columns: 1fr;
}

.auth-alt {
  margin-top: 18px;
  text-align: center;
  color: var(--slate-light);
  font-size: 0.97rem;
}

/* ---------- Account header strip ---------- */
.account-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  padding: 18px 22px;
  margin-bottom: 26px;
}

.account-strip h2 {
  font-size: 1.25rem;
}

.account-strip p {
  color: var(--slate-light);
  font-size: 0.95rem;
}

.account-strip .strip-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-small {
  padding: 9px 20px;
  font-size: 0.92rem;
}

.btn-outline-purple {
  background: var(--white);
  color: var(--purple);
  border-color: var(--purple);
}

.btn-outline-purple:hover {
  background: var(--lavender);
}

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.pill-florida { background: #e0e7ff; color: #3730a3; }
.pill-transit { background: #fef3c7; color: #92400e; }
.pill-jamaica { background: #ede9fe; color: #5b21b6; }
.pill-ready   { background: #d1fae5; color: #065f46; }
.pill-done    { background: #e2e8f0; color: #334155; }
.pill-pending { background: #fef3c7; color: #92400e; }
.pill-approved { background: #d1fae5; color: #065f46; }
.pill-disabled { background: #fee2e2; color: #991b1b; }

/* ---------- Package cards (customer) ---------- */
.pkg-list {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .pkg-list { grid-template-columns: repeat(2, 1fr); }
}

.pkg-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.pkg-card .pkg-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.pkg-card h3 {
  font-size: 1.05rem;
  word-break: break-all;
}

.pkg-card .pkg-desc {
  color: var(--slate);
  margin-bottom: 12px;
}

.pkg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 0.92rem;
  color: var(--slate-light);
}

.pkg-meta strong {
  color: var(--navy);
}

.pkg-details-btn {
  margin-top: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
}

.pkg-details-btn:hover {
  border-color: var(--purple);
}

.pkg-details {
  display: none;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.pkg-details.open {
  display: block;
}

.pkg-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  font-size: 0.92rem;
}

.pkg-detail-k {
  color: var(--slate-light);
}

.pkg-detail-v {
  color: var(--navy);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

/* Card action row (pre-alert eye / Edit / Remove) */
.pkg-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pkg-actions .pkg-details-btn {
  margin-top: 0;
}

.icon-btn {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover,
.icon-btn.active {
  border-color: var(--purple);
  background: var(--lavender);
}

.pkg-details-btn.danger {
  color: #b91c1c;
}

.pkg-details-btn.danger:hover {
  border-color: #b91c1c;
}

/* Payments (My Packages) */
.pkg-paid {
  color: #15803d;
  font-weight: 700;
  margin-top: 10px;
}

.pkg-due {
  color: var(--navy);
  font-weight: 700;
  margin-top: 10px;
}

.pay-instructions {
  white-space: pre-line;
  font-size: 0.94rem;
  margin-bottom: 12px;
}

.pay-panel .field {
  margin-bottom: 12px;
}

/* Inline pre-alert edit form (My Packages) */
.pa-edit-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.pa-edit-form .field {
  margin-bottom: 12px;
}

.pa-edit-error {
  color: #b91c1c;
  font-size: 0.9rem;
  margin: 6px 0 0;
}

.empty-state {
  text-align: center;
  background: var(--lavender);
  border-radius: var(--radius);
  padding: 40px 26px;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--slate-light);
  margin-bottom: 18px;
}

/* ---------- Backoffice ---------- */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.admin-nav button {
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
}

.admin-nav button.active {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.admin-nav a {
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 9px 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

.admin-nav a:hover {
  text-decoration: none;
  background: var(--lavender);
}

.admin-nav a.active {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

/* ---------- Warehouse portal cards ---------- */
.warehouse-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-bottom: 28px;
}

@media (min-width: 900px) {
  .warehouse-grid { grid-template-columns: repeat(3, 1fr); }
}

.warehouse-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.warehouse-card h3 {
  font-size: 1.15rem;
}

.warehouse-card p {
  color: var(--slate-light);
  flex: 1;
}

.warehouse-card .portal-host {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-light);
}

.warehouse-card .btn {
  text-align: center;
}

.stat-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 28px;
}

@media (min-width: 900px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.stat-card .stat-num {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--purple);
  line-height: 1.1;
}

.stat-card .stat-label {
  color: var(--slate-light);
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  padding: 24px;
  margin-bottom: 28px;
}

.admin-card h3 {
  font-size: 1.15rem;
  margin-bottom: 16px;
}

table.admin {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

table.admin th,
table.admin td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
  vertical-align: top;
}

table.admin th {
  background: var(--lavender);
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

table.admin tr:last-child td {
  border-bottom: none;
}

table.admin td:last-child,
table.admin th:last-child {
  text-align: left;
}

table.admin select {
  padding: 7px 10px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--navy);
  background: var(--white);
  max-width: 190px;
}

.cell-sub {
  display: block;
  color: var(--slate-light);
  font-size: 0.84rem;
}

/* A package's charge cell opens its payment screen on tap. */
td.cost-cell {
  cursor: pointer;
}
td.cost-cell:hover {
  background: #f5f3ff;
}

/* Backoffice list toolbars (search + filters). */
.list-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.list-tools input[type="search"] {
  flex: 1;
  min-width: 200px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 0.95rem;
}
.list-tools .pa-filters {
  display: inline-flex;
  gap: 6px;
}

/* Itemised invoice builder (backoffice) */
.invoice-builder {
  margin-top: 18px;
  border-top: 1px solid #eef2ff;
  padding-top: 14px;
}
.invoice-builder h4 {
  margin: 0 0 10px;
}
.charge-grid {
  display: grid;
  gap: 6px;
}
.charge-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
}
.charge-grid input[type="checkbox"] {
  width: auto;
}
.invoice-total {
  margin-top: 12px;
  font-size: 1rem;
}

/* Installable app card (PWA) */
.pwa-card {
  position: relative;
  background: #fff;
  border: 1px solid #eef2ff;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
  padding: 22px 24px;
  margin: 28px auto;
  max-width: 720px;
}
.pwa-card[hidden] {
  display: none !important;
}
.pwa-card-body {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.pwa-icon {
  border-radius: 14px;
  flex: 0 0 auto;
}
.pwa-card h3 {
  margin: 2px 0 6px;
  color: var(--navy);
  font-size: 1.15rem;
}
.pwa-card p {
  margin: 0 0 10px;
  color: #475569;
}
.pwa-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
}
.pwa-close:hover {
  color: var(--navy);
}

/* ---------- Editable hero (Settings → Website Content) ---------- */
.hero h1 .hero-line2 {
  display: block;
  color: #fbbf24;
}
.hero-size-big h1 {
  font-size: clamp(3rem, 11vw, 5.2rem);
}
.hero-size-extra h1 {
  font-size: clamp(3.4rem, 13vw, 6.4rem);
}

/* ---------- Homepage layouts (Settings → Website Layout) ----------
   classic is the original look (no overrides needed).
   banner: centred big hero, no side picture — the ARAZI-style look.
   stacked: wording on top, wide picture underneath.
   compact: small hero, services as a plain list. */
html[data-layout="banner"] .hero-grid {
  grid-template-columns: 1fr;
  text-align: center;
}
html[data-layout="banner"] .hero .hero-sub {
  margin-left: auto;
  margin-right: auto;
}
html[data-layout="banner"] .hero-ctas {
  justify-content: center;
}
html[data-layout="banner"] .hero-art {
  display: none;
}
html[data-layout="banner"] .hero h1 {
  font-size: clamp(3rem, 11vw, 5.4rem);
}
html[data-layout="stacked"] .hero-grid {
  grid-template-columns: 1fr;
}
html[data-layout="stacked"] .hero-art {
  max-width: 720px;
}
html[data-layout="compact"] .hero {
  padding: calc(var(--header-h) + 24px) 0 40px;
}
html[data-layout="compact"] .hero-art {
  display: none;
}
html[data-layout="compact"] .hero-grid {
  grid-template-columns: 1fr;
}
html[data-layout="compact"] .services-grid {
  grid-template-columns: 1fr;
}

/* Settings — Theme & Colour picker */
.theme-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.theme-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  cursor: pointer;
}
.theme-option.active {
  border-color: var(--purple);
  background: var(--lavender);
}
.theme-dots {
  display: inline-flex;
  gap: 4px;
}
.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.18);
}

/* Archive (packages) */
.pill-archived { background: #e2e8f0; color: #475569; }
.pill-expected { background: #fae8ff; color: #86198f; }
.pkg-archived { opacity: .72; }
.pkg-note { margin-top: 10px; font-size: .9rem; color: #475569; background: #eef2ff; border-radius: 10px; padding: 10px 12px; }
