/* ==========================================================
   limaPOS — Customer Storefront
   Shares colour tokens with app.css; layout is distinct.
   ========================================================== */

body.shop {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 220px);
  color: var(--text-primary);
}

.shop-topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 18px 36px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.shop-brand { display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit; }
.shop-brand .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}
.shop-brand .wordmark .title {
  font-size: 16px; font-weight: 700; color: var(--deep-navy);
  display: block; line-height: 1;
}
.shop-brand .wordmark .subtitle {
  font-size: 11px; color: var(--text-muted);
  letter-spacing: .12em; text-transform: uppercase;
}

.shop-nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.shop-nav a { color: var(--text-primary); text-decoration: none;
  font-size: 14px; font-weight: 500; }
.shop-nav a:hover { color: var(--brand-blue-dk); }
.shop-nav .btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: 10px; font-size: 13px;
  font-weight: 600; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: background .15s;
}
.shop-nav .btn.primary { background: var(--brand-blue); color: #ffffff; }
.shop-nav .btn.primary:hover { background: var(--brand-blue-dk); }
.shop-nav .btn.ghost { color: var(--deep-navy); border-color: var(--border); }
.shop-nav .btn.ghost:hover { background: var(--blue-light); border-color: var(--brand-blue); }
.shop-nav .ghost { background: transparent; border: 1px solid var(--border);
  padding: 9px 16px; border-radius: 10px; font-size: 13px;
  font-weight: 600; color: var(--text-muted); cursor: pointer; }
.shop-nav .ghost:hover { color: var(--red); border-color: var(--red); }

.account-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-light); padding: 4px 12px 4px 4px;
  border-radius: 999px; color: var(--deep-navy);
  font-size: 13px; font-weight: 600;
}
.account-pill .circle {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

.shop-flash {
  margin: 18px auto 0; max-width: 980px;
  padding: 12px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
}
.shop-flash.ok    { background: var(--emerald-light); color: var(--emerald-text); }
.shop-flash.error { background: var(--red-light); color: var(--red-text); }
.shop-flash.info  { background: var(--blue-light); color: var(--deep-navy); }

/* --- Hero ------------------------------------------------------------- */
.hero {
  padding: 80px 36px 60px;
  text-align: center;
  background: radial-gradient(ellipse at top,
              rgba(59,130,246,.10) 0%, transparent 70%);
}
.hero h1 {
  font-size: 44px; font-weight: 800; color: var(--deep-navy);
  margin: 0 0 18px; letter-spacing: -.02em;
}
.hero h1 .accent { color: var(--brand-blue); }
.hero p {
  font-size: 18px; color: var(--text-muted);
  max-width: 640px; margin: 0 auto 28px; line-height: 1.55;
}
.hero .cta-row { display: flex; gap: 14px; justify-content: center; }
.hero .cta-row .btn { padding: 14px 28px; font-size: 15px; border-radius: 12px;
  font-weight: 600; text-decoration: none; }
.hero .cta-row .primary { background: var(--brand-blue); color: #fff; }
.hero .cta-row .primary:hover { background: var(--brand-blue-dk); }
.hero .cta-row .ghost  { color: var(--deep-navy); border: 1px solid var(--border); }
.hero .cta-row .ghost:hover { background: var(--blue-light); border-color: var(--brand-blue); }

.desktop-banner {
  max-width: 740px; margin: 28px auto 0;
  padding: 12px 18px;
  background: var(--emerald-light); color: var(--emerald-text);
  border-radius: 10px; font-size: 14px; font-weight: 500;
}

/* --- Pricing section -------------------------------------------------- */
.section {
  padding: 60px 36px; max-width: 1180px; margin: 0 auto;
}
.section h2 {
  font-size: 28px; font-weight: 700; color: var(--deep-navy);
  text-align: center; margin: 0 0 8px;
}
.section .lead {
  text-align: center; color: var(--text-muted);
  font-size: 15px; margin: 0 0 32px;
}

.cycle-toggle {
  display: inline-flex; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 4px; margin: 0 auto 32px;
}
.cycle-toggle-wrap { text-align: center; }
.cycle-toggle button {
  border: 0; background: transparent; padding: 8px 22px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  border-radius: 8px; cursor: pointer;
}
.cycle-toggle button.active {
  background: var(--brand-blue); color: #fff;
}
.cycle-toggle .save {
  font-size: 10px; color: var(--emerald); font-weight: 700;
  margin-left: 6px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.plan-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 24px 22px 22px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(30,58,95,.10);
  border-color: var(--brand-blue);
}
.plan-card.featured {
  border-color: var(--brand-blue);
  box-shadow: 0 10px 30px rgba(59,130,246,.15);
  position: relative;
}
.plan-card .featured-tag {
  position: absolute; top: -10px; right: 18px;
  background: var(--brand-blue); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  padding: 5px 10px; border-radius: 6px; text-transform: uppercase;
}
.plan-card .name {
  font-size: 18px; font-weight: 700; color: var(--deep-navy);
}
.plan-card .price {
  display: flex; align-items: baseline; gap: 4px;
}
.plan-card .price .amount {
  font-size: 30px; font-weight: 800; color: var(--deep-navy);
  letter-spacing: -.02em;
}
.plan-card .price .per {
  font-size: 13px; color: var(--text-muted);
}
.plan-card .billed {
  font-size: 11px; color: var(--text-muted); margin-top: -8px;
}
.plan-card ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.plan-card li {
  font-size: 13px; color: var(--text-primary);
  padding-left: 22px; position: relative; line-height: 1.45;
}
.plan-card li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--emerald-light);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3 7l3 3 5-6' stroke='%23059669' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: center;
}
.plan-card .pick {
  margin-top: auto;
  display: inline-flex; justify-content: center; align-items: center;
  padding: 11px 16px; border-radius: 10px;
  background: var(--brand-blue); color: #fff;
  text-decoration: none; font-weight: 600; font-size: 14px;
  border: 1px solid var(--brand-blue);
}
.plan-card .pick:hover { background: var(--brand-blue-dk); border-color: var(--brand-blue-dk); }
.plan-card.featured .pick { background: var(--deep-navy); border-color: var(--deep-navy); }
.plan-card.featured .pick:hover { background: var(--deep-navy-dk); border-color: var(--deep-navy-dk); }

/* --- Setup & onboarding fee ------------------------------------------- */
/* Sits between the recurring price and the feature list, because that is
   where a buyer scanning the card forms their idea of the cost. Tucking a
   one-off charge under the fold reads as a hidden fee even when it isn't. */
.plan-card .setup-line {
  font-size: 12px; color: var(--text-muted);
  padding: 8px 10px; border-radius: 8px;
  background: var(--blue-light);
}
.plan-card .setup-line strong { color: var(--deep-navy); }

.setup-explainer {
  margin-top: 26px; padding: 20px 22px;
  border: 1px solid var(--border); border-radius: 12px;
  background: #fff;
}
.setup-explainer h3 { margin: 0 0 8px; font-size: 15px; }
.setup-explainer p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: var(--text-primary); }
.setup-explainer p.small { margin-bottom: 0; font-size: 12px; color: var(--text-muted); }

/* --- Enterprise enquiry strip ----------------------------------------- */
/* Enterprise is quote-only and deliberately has no plan card: there is no
   verified enterprise price in the market to publish against. This keeps
   the path open without inventing a number for it. */
.enterprise-strip {
  margin-top: 18px; padding: 16px 20px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  border: 1px dashed var(--border); border-radius: 12px;
  background: var(--blue-light);
}
.enterprise-strip > div { flex: 1 1 320px; font-size: 13px; line-height: 1.6; }
.enterprise-strip strong { display: block; color: var(--deep-navy); }
.enterprise-strip .btn.ghost {
  padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--brand-blue); color: var(--brand-blue-dk); background: #fff;
}
.enterprise-strip .btn.ghost:hover { background: var(--brand-blue); color: #fff; }

/* --- How it works steps ---------------------------------------------- */
.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px; margin-top: 24px;
}
.step {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
}
.step .num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue-light); color: var(--brand-blue-dk);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; margin-bottom: 14px;
}
.step h3 { font-size: 15px; color: var(--deep-navy); margin: 0 0 6px; }
.step p { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.55; }

/* --- Forms (signup / login / checkout) ------------------------------- */
.shop-card {
  max-width: 460px; margin: 50px auto;
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 36px 36px 30px;
  box-shadow: 0 6px 20px rgba(30,58,95,.06);
}
.shop-card h1 {
  font-size: 22px; color: var(--deep-navy);
  margin: 0 0 6px; font-weight: 700;
}
.shop-card .sub {
  color: var(--text-muted); font-size: 13px; margin: 0 0 22px;
}
.shop-card .field { margin-bottom: 14px; }
.shop-card .field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-primary); margin-bottom: 6px;
  letter-spacing: .02em;
}
.shop-card .field input,
.shop-card .field select {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px; color: var(--text-primary);
  background: #fff;
}
.shop-card .field input:focus {
  outline: 0; border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}
.shop-card button.primary {
  width: 100%; padding: 12px; font-size: 14px;
  font-weight: 600; background: var(--brand-blue);
  color: #fff; border: 0; border-radius: 10px;
  cursor: pointer; margin-top: 10px;
}
.shop-card button.primary:hover { background: var(--brand-blue-dk); }

.shop-card .or-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0; color: var(--text-soft); font-size: 11px;
  text-transform: uppercase; letter-spacing: .1em;
}
.shop-card .or-divider::before,
.shop-card .or-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.google-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%; padding: 11px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-primary);
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none;
}
.google-btn:hover { background: var(--surface); border-color: #cbd5e1; }
.google-btn svg { width: 18px; height: 18px; flex: 0 0 18px; }

.shop-card .switch-link {
  text-align: center; margin-top: 18px; font-size: 13px;
  color: var(--text-muted);
}
.shop-card .switch-link a { color: var(--brand-blue-dk); font-weight: 600;
  text-decoration: none; }
.shop-card .err {
  background: var(--red-light); color: var(--red-text);
  padding: 10px 12px; border-radius: 8px; font-size: 13px;
  margin: 0 0 14px;
}

/* --- Account dashboard ----------------------------------------------- */
.acct-shell { max-width: 1080px; margin: 30px auto; padding: 0 36px; }
.acct-grid {
  display: grid; grid-template-columns: 280px 1fr; gap: 28px;
  margin-top: 24px;
}
.acct-aside, .acct-main {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 22px;
}
.acct-aside h3 { margin: 0 0 4px; font-size: 14px; color: var(--text-muted);
  font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.acct-aside .name {
  font-size: 17px; font-weight: 700; color: var(--deep-navy);
  margin: 6px 0 0;
}
.acct-aside .email {
  font-size: 13px; color: var(--text-muted); margin-top: 2px;
}
.acct-aside ul {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: flex; flex-direction: column; gap: 6px;
}
.acct-aside a {
  display: block; padding: 9px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-primary); text-decoration: none;
  font-weight: 500;
}
.acct-aside a:hover { background: var(--blue-light); color: var(--deep-navy); }
.acct-aside a.active { background: var(--brand-blue); color: #fff; }

.acct-licence {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; margin-bottom: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.acct-licence .head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 12px;
}
.acct-licence .title { font-size: 16px; font-weight: 700; color: var(--deep-navy); }
.acct-licence .pill {
  display: inline-block; padding: 4px 10px; border-radius: 8px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.acct-licence .pill.active     { background: var(--emerald-light); color: var(--emerald-text); }
.acct-licence .pill.expired    { background: var(--red-light);     color: var(--red-text); }
.acct-licence .pill.suspended  { background: var(--amber-light);   color: var(--amber-text); }
.acct-licence .pill.cancelled  { background: #e2e8f0;              color: #475569; }
.acct-licence .pill.pending    { background: var(--blue-light);    color: var(--deep-navy); }
.acct-licence .meta-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; font-size: 13px; margin-bottom: 14px;
}
.acct-licence .meta-row .item .k { color: var(--text-muted); font-size: 11px;
  letter-spacing: .04em; text-transform: uppercase; }
.acct-licence .meta-row .item .v { color: var(--text-primary); font-weight: 600;
  margin-top: 2px; }
.acct-licence .key-row {
  display: flex; align-items: center; gap: 10px;
  background: #f1f5f9; border: 1px dashed #cbd5e1;
  padding: 12px 14px; border-radius: 10px;
  font-family: 'Menlo', 'Consolas', monospace; font-size: 13px;
  color: var(--deep-navy);
}
.acct-licence .copy {
  margin-left: auto; padding: 6px 12px; border-radius: 7px;
  border: 1px solid var(--brand-blue); color: var(--brand-blue-dk);
  background: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
}
.acct-licence .copy:hover { background: var(--blue-light); }

/* --- Plan groups + key cards (account.php) -------------------------- */
.plan-group {
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.plan-group-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}
.plan-group-name {
  font-size: 15px; font-weight: 700; color: var(--deep-navy);
}
.plan-group-meta {
  font-size: 12px; color: var(--text-muted); margin-left: 6px;
}
.plan-group-head .btn.ghost.small {
  margin-left: auto;
  padding: 7px 12px; font-size: 12px; border-radius: 8px;
  background: #fff; border: 1px solid var(--border);
  color: var(--deep-navy); text-decoration: none; font-weight: 600;
}
.plan-group-head .btn.ghost.small:hover {
  background: var(--blue-light); border-color: var(--brand-blue);
}

.expired-group { opacity: .85; }
.expired-group .plan-group-head { background: #fff7ed; }

.key-card {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.key-card:last-child { border-bottom: 0; }
.expired-card { background: #fffbeb; }

.key-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-bottom: 10px;
}
.key-card-head .key-num {
  font-size: 13px; font-weight: 700; color: var(--deep-navy);
  margin-right: 8px;
}
.key-pill {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 6px;
}
.key-pill.active   { background: var(--emerald-light); color: var(--emerald-text); }
.key-pill.unused   { background: var(--blue-light);    color: var(--deep-navy); }
.key-pill.expired  { background: var(--red-light);     color: var(--red-text); }
.key-expiry {
  font-size: 11px; color: var(--text-muted);
}

.key-card .key-row {
  display: flex; align-items: center; gap: 10px;
  background: #f1f5f9; border: 1px dashed #cbd5e1;
  padding: 10px 14px; border-radius: 9px;
  margin-bottom: 12px;
}
.key-card .key-code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 13.5px; font-weight: 600; color: var(--deep-navy);
  letter-spacing: .02em; flex: 1;
}
.btn-mini {
  background: #fff; border: 1px solid var(--brand-blue);
  color: var(--brand-blue-dk);
  font-size: 11px; font-weight: 600;
  padding: 5px 11px; border-radius: 6px;
  cursor: pointer;
}
.btn-mini:hover { background: var(--blue-light); }

.key-detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  font-size: 12px;
}
.key-detail-row .kv .k {
  display: block;
  color: var(--text-muted); font-size: 10px;
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 2px;
}
.key-detail-row .kv .v {
  display: block;
  color: var(--text-primary); font-weight: 600;
}
.key-detail-row .kv.full { grid-column: 1 / -1; }

.key-more-devices {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12px; color: var(--text-muted);
}
.key-more-devices summary { cursor: pointer; font-weight: 600; }
.key-more-devices ul { margin: 8px 0 0 18px; padding: 0;
  display: flex; flex-direction: column; gap: 4px; }

/* --- Checkout page --------------------------------------------------- */
.checkout-grid {
  display: grid; grid-template-columns: 1fr 360px;
  gap: 28px; max-width: 980px; margin: 40px auto; padding: 0 36px;
}
.checkout-summary {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  position: sticky; top: 100px; align-self: start;
}
.checkout-summary h2 { margin: 0 0 12px; font-size: 17px; color: var(--deep-navy); }
.checkout-summary .total-line {
  display: flex; justify-content: space-between;
  padding: 10px 0; font-size: 14px; color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.checkout-summary .total-line.grand {
  font-size: 17px; font-weight: 700; color: var(--deep-navy);
  border-bottom: 0; padding-top: 14px;
}

/* --- Footer ---------------------------------------------------------- */
.shop-footer {
  margin-top: 80px; padding: 28px 36px;
  background: var(--deep-navy); color: rgba(255,255,255,.7);
  font-size: 13px;
}
.shop-footer .inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
}
.shop-footer a { color: rgba(255,255,255,.9); text-decoration: none; }
.shop-footer a:hover { color: var(--brand-blue); }

/* Polling block on checkout */
.stk-poll {
  margin-top: 18px; padding: 14px 16px;
  background: var(--blue-light); color: var(--deep-navy);
  border-radius: 10px; font-size: 13px;
  display: flex; align-items: center; gap: 12px;
}
.stk-poll.success { background: var(--emerald-light); color: var(--emerald-text); }
.stk-poll.failure { background: var(--red-light); color: var(--red-text); }
.stk-poll .spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--deep-navy); border-top-color: transparent;
  animation: stkspin 1s linear infinite;
}
@keyframes stkspin { to { transform: rotate(360deg); } }

@media (max-width: 880px) {
  .acct-grid { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
  .hero h1 { font-size: 34px; }
}
