:root {
  --navy: #10243e;
  --blue: #176b87;
  --teal: #22b8a7;
  --light: #f3f7fb;
  --text: #253449;
  --muted: #66778a;
  --border: #dfe7ef;
  --white: #ffffff;
  --soft-teal: #e8f8f5;
  --danger: #b42318;
  --ok: #2a8f52;
  --warn: #b45309;
  --teal-dark: #0f766e;
  --blue-dark: #12607a;
  --soft-danger: #fef2f2;
  --soft-warn: #fff8e6;
  --soft-ok: #ecfdf3;
  --radius: 10px;
  --gutter: max(7%, calc((100% - 1150px) / 2));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--light);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

/* Pages that need a role stay hidden until store.js confirms access */
body[data-require-role] { visibility: hidden; }
body[data-require-role].auth-ok { visibility: visible; }

a { color: var(--blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--teal); }

:focus-visible { outline: 3px solid rgba(34, 184, 167, .55); outline-offset: 2px; }

[hidden] { display: none !important; }

/* ---------- Header / footer ---------- */

.site-header {
  min-height: 78px;
  padding: 15px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--navy);
  border-bottom: 3px solid var(--teal);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
}
.brand:hover { color: var(--white); }

.brand small {
  display: block;
  margin-top: 3px;
  color: #c4d5e5;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: var(--navy);
  border-radius: 8px;
  font-weight: 900;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 13px;
  font-weight: 700;
}
.site-header nav a { color: var(--white); }
.site-header nav a:hover,
.site-header nav a.active { color: var(--teal); }

.cart-link { padding: 9px 13px; border: 1px solid #527087; border-radius: 7px; }
#cart-count { color: var(--teal); }

.site-footer {
  min-height: 80px;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 3px solid var(--teal);
  background: var(--navy);
  color: var(--border);
  font-size: 11px;
}
.site-footer p { margin: 0; }

.footer-brand { font-size: 12px; }
.footer-brand .brand-mark { width: 34px; height: 34px; border-radius: 7px; font-size: 12px; }
.footer-brand small { font-size: 8px; letter-spacing: 0; }

.demo-label { color: var(--teal); font-size: 9px; font-weight: 800; letter-spacing: 1px; }

/* ---------- Shared type and buttons ---------- */

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.hero .eyebrow { color: var(--teal); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { opacity: .5; cursor: not-allowed; }

.primary,
.button-teal { background: var(--teal); color: var(--navy); }
.primary:hover,
.button-teal:hover:not(:disabled) { background: #47d0c1; color: var(--navy); }

.button-secondary,
.small-button {
  border: 1px solid var(--border);
  color: var(--navy);
  background: var(--light);
  cursor: pointer;
}
.button-secondary { padding: 11px 16px; border-radius: 9px; font-weight: 700; }

.small-button { padding: 7px 10px; border-radius: 7px; font-size: 12px; font-weight: 700; }

.delete-button { color: #a12a2a; background: #fff5f5; border-color: #f1d4d4; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 465px;
  padding: 70px var(--gutter);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 40px;
  overflow: hidden;
  background-color: var(--navy);
  background-image:
    linear-gradient(90deg, rgba(16, 36, 62, .96), rgba(16, 36, 62, .82)),
    url("images/ro.jpeg");
  background-position: center;
  background-size: cover;
  color: var(--white);
}

.hero h1 {
  margin: 15px 0 20px;
  color: var(--white);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -2px;
}
.hero h1 span { color: var(--teal); }

.hero-description { max-width: 520px; color: var(--border); font-size: 15px; line-height: 1.9; }
.demo-note { margin-top: 20px; color: var(--border); font-size: 11px; }

.hero-art { position: relative; min-height: 300px; display: grid; place-items: center; overflow: hidden; }

.orbit { position: absolute; border: 1px solid rgba(34, 184, 167, .48); border-radius: 50%; }
.orbit-one { width: 260px; height: 180px; transform: rotate(-25deg); }
.orbit-two { width: 350px; height: 250px; transform: rotate(35deg); }

.hero-core {
  z-index: 1;
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(34, 184, 167, .6);
  border-radius: 18px;
  background: var(--navy);
  color: var(--teal);
  box-shadow: 0 0 45px rgba(34, 184, 167, .15);
  font-size: 32px;
  font-weight: 900;
  transform: rotate(-8deg);
}

.float-label {
  position: absolute;
  padding: 9px 12px;
  border: 1px solid #49647a;
  border-radius: 6px;
  background: rgba(16, 36, 62, .95);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
}
.label-one { top: 15%; left: 8%; }
.label-two { top: 38%; right: 3%; }
.label-three { bottom: 14%; left: 19%; }

/* ---------- Store ---------- */

.section { max-width: 1150px; margin: 0 auto; padding: 65px 25px; }

.section-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.section-heading > p { margin: 0; color: var(--muted); font-size: 12px; }

.section h2,
.about h2 { margin: 0; color: var(--navy); font-size: 32px; line-height: 1.25; letter-spacing: -.7px; }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

.product-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 28px rgba(16, 36, 62, .05);
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(16, 36, 62, .09); }

.product-image { height: 210px; overflow: hidden; background: #eaf1f7; }
.product-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  background: linear-gradient(135deg, #eaf3f8, #dce9f2);
}
.product-placeholder span { font-size: 42px; font-weight: 800; letter-spacing: -3px; }
.product-placeholder small { font-size: 12px; }

.product-content { padding: 21px; display: flex; flex: 1; flex-direction: column; }
.product-category { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.product-content h3 { margin: 10px 0; color: var(--navy); font-size: 19px; }
.product-content > p { color: var(--muted); font-size: 14px; line-height: 1.7; }

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}
.product-price { color: var(--navy); font-size: 20px; }

.product-media { margin-top: 12px; color: var(--blue); font-size: 13px; }
.product-media summary { cursor: pointer; font-weight: 700; padding: 8px 0; }

.video-frame { aspect-ratio: 16 / 9; margin-top: 10px; overflow: hidden; border-radius: 10px; background: var(--navy); }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.product-video { width: 100%; aspect-ratio: 16 / 9; display: block; margin-top: 10px; border-radius: 10px; background: var(--navy); }

.empty-store,
.empty-state {
  padding: 30px;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: 14px;
  text-align: center;
  grid-column: 1 / -1;
}

/* ---------- About ---------- */

.about {
  max-width: 1100px;
  margin: 0 auto 65px;
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.about-symbol {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft-teal);
  color: var(--blue);
  font-size: 24px;
}
.about h2 { font-size: 25px; }
.about p:not(.eyebrow) { color: var(--muted); font-size: 13px; }
.about a { font-size: 12px; font-weight: 700; }

/* ---------- Checkout ---------- */

.checkout-main { max-width: 1050px; margin: 0 auto; padding: 55px 22px 75px; }
.checkout-heading { margin-bottom: 30px; text-align: center; }
.checkout-heading h1,
.success-main h1 { margin: 0; color: var(--navy); font-size: clamp(35px, 5vw, 49px); line-height: 1.15; letter-spacing: -1.5px; }
.checkout-heading > p:last-child { color: var(--muted); font-size: 13px; }

.checkout-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 20px; }

.panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 4px 15px rgba(16, 36, 62, .035);
}
.panel h2 { margin: 0 0 20px; color: var(--navy); font-size: 18px; }

.cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-row p { margin: 2px 0 0; }
.cart-line { color: var(--muted); font-size: 12px; }
.cart-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

.empty-cart { padding: 18px; border-radius: 8px; background: var(--light); color: var(--muted); font-size: 12px; }
.empty-cart a { font-weight: 700; }

.total-row {
  margin-top: 20px;
  padding-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}
.total-row strong { color: var(--navy); font-size: 22px; }

.payment-placeholder {
  margin: 20px 0;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed #b7c9d5;
  border-radius: 8px;
  background: var(--light);
}
.payment-icon { color: var(--blue); font-size: 24px; }
.payment-placeholder strong { color: var(--navy); font-size: 11px; }
.payment-placeholder p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }

.status-tag {
  margin-left: auto;
  padding: 5px 7px;
  border-radius: 5px;
  background: var(--soft-teal);
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.full-width { width: 100%; }
.small-note { color: var(--muted); font-size: 11px; text-align: center; }

.success-main { max-width: 590px; margin: 0 auto; padding: 85px 22px 100px; text-align: center; }
.success-icon {
  width: 65px;
  height: 65px;
  margin: 0 auto 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--navy);
  font-size: 30px;
  font-weight: 900;
}
.success-main > p:not(.eyebrow) { color: var(--muted); font-size: 13px; }

.reference-box {
  margin: 25px 0;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-size: 12px;
}
.reference-box strong { color: var(--navy); overflow-wrap: anywhere; }

/* ---------- Forms (shared by checkout, auth, admin) ---------- */

form label { display: block; margin: 16px 0 7px; color: var(--text); font-size: 13px; font-weight: 700; }

input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
textarea { resize: vertical; }

input:not([type="checkbox"]):focus,
select:focus,
textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 107, 135, .12); }

.field-help { margin: 6px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.form-message { min-height: 20px; color: var(--blue); font-size: 13px; }
.form-message.error { color: var(--danger); }

/* ---------- Auth pages ---------- */

.auth-container { width: min(480px, 92%); margin: 55px auto 75px; }

.auth-card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(16, 36, 62, .07);
}
.auth-card h1 { margin: 12px 0; color: var(--navy); font-size: 30px; line-height: 1.2; }
.auth-card h2 { color: var(--navy); font-size: 20px; }
.auth-intro { margin-bottom: 24px; color: var(--muted); font-size: 14px; line-height: 1.6; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 25px; border-radius: 12px; background: var(--light); }
.auth-tab { padding: 11px 8px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-weight: 700; cursor: pointer; }
.auth-tab.active { color: var(--white); background: var(--navy); }

.auth-submit { width: 100%; margin-top: 22px; }

.auth-switch,
.auth-back { margin-top: 20px; color: var(--muted); font-size: 13px; text-align: center; }
.auth-back { margin-top: 25px; }
.auth-switch a,
.auth-back a { font-weight: 700; }
.auth-switch a:hover,
.auth-back a:hover { text-decoration: underline; }

/* ---------- Admin ---------- */

.admin-main { width: min(1200px, 92%); margin: 0 auto; padding: 48px 0 70px; }

.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-heading h1 { margin: 10px 0; color: var(--navy); font-size: clamp(28px, 4vw, 40px); }
.admin-heading p { color: var(--muted); }

.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }

.admin-stat,
.admin-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 28px rgba(16, 36, 62, .04);
}
.admin-stat span { display: block; color: var(--muted); font-size: 13px; }
.admin-stat strong { display: block; margin-top: 10px; color: var(--navy); font-size: 28px; }

.admin-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 22px; }

.panel-heading { margin-bottom: 22px; }
.panel-heading h2 { margin: 0 0 8px; color: var(--navy); font-size: 21px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

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

.visibility-control { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; }
.visibility-control input { width: auto; accent-color: var(--blue); }

.admin-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.admin-product-list { display: grid; gap: 12px; }

.admin-product-item { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 13px; padding: 13px 0; border-bottom: 1px solid #edf1f5; }
.admin-product-item:last-child { border-bottom: 0; }

.admin-product-thumb {
  width: 66px;
  height: 66px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--blue);
  background: #eaf3f8;
  font-weight: 800;
}
.admin-product-thumb img { width: 100%; height: 100%; object-fit: cover; }

.admin-product-details { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.admin-product-details strong { color: var(--navy); overflow-wrap: anywhere; }
.admin-product-details span { color: var(--muted); font-size: 12px; }
.admin-product-details .product-status { color: var(--blue); }
.admin-product-details .status-hidden { color: #a15c00; }
.admin-product-details .media-tag { color: var(--blue); font-weight: 700; }

.admin-product-actions { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; }

.admin-notice {
  margin-top: 24px;
  padding: 17px 19px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: var(--white);
  font-size: 13px;
  line-height: 1.7;
}
.admin-notice strong { color: var(--navy); }

/* ---------- Utilities ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted { color: var(--muted); }
.num { text-align: right; }

/* ---------- Toast messages ---------- */

#toast-box {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 12px 16px;
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(16, 36, 62, .25);
  animation: toast-in .25s ease;
}
.toast-error { border-left-color: #e5484d; }
.toast.hide { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Store: trust strip and toolbar ---------- */

.trust-strip {
  max-width: 1150px;
  margin: -38px auto 0;
  padding: 0 25px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.trust-strip div, .trust-strip a {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(16, 36, 62, .08);
}
.trust-strip strong { color: var(--navy); font-size: 14px; }
.trust-strip span { color: var(--muted); font-size: 12px; }

.store-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px 190px;
  gap: 12px;
  margin-bottom: 12px;
}
.result-count { margin: 0 0 18px; color: var(--muted); font-size: 12px; }

/* ---------- Checkout extras ---------- */

.success-wide { max-width: 900px; padding-top: 50px; }
.success-wide > .no-print { text-align: center; }
.success-actions { margin: 22px 0 34px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Invoice ---------- */

.invoice-main { max-width: 900px; margin: 0 auto; padding: 40px 22px 70px; }
.invoice-toolbar { margin-bottom: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

.invoice-sheet {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(16, 36, 62, .07);
  color: #1b2a3d;
  font-size: 13px;
  text-align: left;
}

.inv-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 3px solid var(--teal);
}
.inv-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 18px; color: var(--navy); }
.inv-seller { color: var(--muted); font-size: 12px; line-height: 1.6; }
.inv-title { text-align: right; }
.inv-title h2 { margin: 0 0 10px; color: var(--navy); font-size: 30px; letter-spacing: 2px; }
.inv-meta div { display: flex; justify-content: flex-end; gap: 14px; font-size: 12px; }
.inv-meta span { color: var(--muted); }

.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 26px; line-height: 1.6; }
.inv-parties h3 { margin: 0 0 6px; color: var(--blue); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }

.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th {
  padding: 10px 8px;
  background: var(--navy);
  color: var(--white);
  font-size: 11px;
  letter-spacing: .5px;
  text-align: left;
  text-transform: uppercase;
}
.inv-table th.num { text-align: right; }
.inv-table td { padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.inv-table td small { display: block; color: var(--muted); font-size: 11px; }

.inv-totals { width: 280px; max-width: 100%; margin: 18px 0 0 auto; }
.inv-totals > div { display: flex; justify-content: space-between; padding: 6px 8px; }
.inv-grand { margin-top: 6px; padding: 10px 8px !important; border-top: 2px solid var(--navy); color: var(--navy); font-size: 17px; font-weight: 800; }

.inv-demo { margin: 26px 0 0; padding: 10px 12px; border-left: 3px solid #d98a00; background: #fff8e6; color: #7a5200; font-size: 11px; font-weight: 700; }
.inv-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; text-align: center; }

/* ---------- Buyer account ---------- */

.account-main { max-width: 1150px; margin: 0 auto; padding: 40px 22px 70px; }
.account-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: start; gap: 24px; }

.account-sidebar {
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 28px rgba(16, 36, 62, .05);
  text-align: center;
  position: sticky;
  top: 16px;
}
.account-sidebar h2 { margin: 6px 0 0; color: var(--navy); font-size: 19px; overflow-wrap: anywhere; }
.side-email { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.avatar {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: var(--white);
  font-size: 26px;
  font-weight: 800;
}
.avatar-large { width: 92px; height: 92px; font-size: 32px; flex-shrink: 0; }

.member-badge { padding: 4px 10px; border-radius: 999px; background: var(--soft-teal); color: var(--blue); font-size: 11px; font-weight: 800; }

.account-nav { width: 100%; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.acct-nav-btn {
  padding: 11px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.acct-nav-btn:hover { background: var(--light); }
.acct-nav-btn.active { background: var(--navy); color: var(--white); }

.account-sidebar .button { margin: 0; }

.account-content h1 { margin: 0 0 6px; color: var(--navy); font-size: clamp(28px, 4vw, 36px); letter-spacing: -1px; }
.account-content .panel { margin-top: 20px; }
.acct-panel > .muted { margin: 0 0 8px; }

.account-stats { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.account-stats article {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
}
.account-stats span { display: block; color: var(--muted); font-size: 12px; }
.account-stats strong { display: block; margin-top: 6px; color: var(--navy); font-size: 26px; }

.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-title-row h2 { margin: 0; }

.order-card { padding: 16px 0; border-bottom: 1px solid var(--border); }
.order-card:last-child { border-bottom: 0; }
#orders-list .order-card {
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
}
.order-top, .order-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.order-date { margin-left: 10px; color: var(--muted); font-size: 12px; }
.order-items { margin: 8px 0; color: var(--text); font-size: 13px; }
.order-actions { display: flex; gap: 8px; }
.order-actions .small-button, .library-row .small-button, .panel-title-row .small-button { display: inline-block; }
.order-actions a:hover { color: var(--navy); background: var(--soft-teal); }

.status-pill { padding: 4px 10px; border-radius: 999px; background: var(--soft-teal); color: #0f7a6d; font-size: 11px; font-weight: 800; }

.library-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.library-row:last-child { border-bottom: 0; }
.library-row strong { display: block; color: var(--navy); }
.library-row .muted { font-size: 12px; }

.profile-card-head { display: flex; align-items: center; gap: 20px; }
.profile-card-head h2 { margin: 0 0 4px; font-size: 22px; }
.profile-card-head p { margin: 2px 0; font-size: 13px; }
.customer-id strong { padding: 2px 8px; border-radius: 6px; background: var(--light); color: var(--navy); letter-spacing: 1px; }

.completeness { margin-top: 22px; }
.completeness-label { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.completeness-label strong { color: var(--navy); }
.progress { height: 8px; overflow: hidden; border-radius: 999px; background: var(--light); }
.progress div { width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--teal)); transition: width .4s ease; }

.profile-list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.profile-list div { padding: 12px 0; border-bottom: 1px solid var(--border); }
.profile-list dt { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.profile-list dd { margin: 3px 0 0; color: var(--navy); font-size: 14px; overflow-wrap: anywhere; }

.danger-zone { border-color: #f1d4d4; }
.danger-zone h2 { color: var(--danger); }

/* ---------- Admin orders table ---------- */

.admin-orders { margin-top: 24px; }
.table-wrap { overflow-x: auto; }
.orders-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.orders-table th { padding: 10px 8px; border-bottom: 2px solid var(--border); color: var(--muted); font-size: 11px; letter-spacing: .5px; text-align: left; text-transform: uppercase; }
.orders-table th.num { text-align: right; }
.orders-table td { padding: 12px 8px; border-bottom: 1px solid var(--border); }

/* ---------- Print: only the invoice ---------- */

@media print {
  @page { size: A4; margin: 14mm; }

  body { background: #fff !important; visibility: visible !important; }
  .site-header, .site-footer, .no-print, #toast-box, .invoice-toolbar, .success-actions { display: none !important; }

  .checkout-main, .invoice-main, .success-main, .success-wide { max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .invoice-sheet { max-width: none !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  .inv-table th, .inv-demo, .inv-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inv-table tr { break-inside: avoid; }
}

/* ---------- Responsive (new sections) ---------- */

@media (max-width: 900px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; }
  .account-nav { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .store-toolbar { grid-template-columns: 1fr 1fr; }
  .store-toolbar input { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .trust-strip { grid-template-columns: 1fr; margin-top: 20px; }
  .account-stats, .profile-list { grid-template-columns: 1fr; }
  .profile-card-head { flex-direction: column; text-align: center; }
  .invoice-sheet { padding: 22px 16px; }
  .inv-head, .inv-parties { grid-template-columns: 1fr; flex-direction: column; }
  .inv-title { text-align: left; }
  .inv-meta div { justify-content: flex-start; }
  .store-toolbar { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding: 55px 7%; }
  .hero-art { min-height: 260px; }
  .checkout-layout { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .about { margin-right: 5%; margin-left: 5%; }
}

@media (max-width: 600px) {
  .product-grid,
  .admin-stats { grid-template-columns: 1fr; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-panel { padding: 17px; }
  .product-card-footer { align-items: flex-start; flex-direction: column; }
  .form-two-columns { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 520px) {
  .site-header { padding: 15px 5%; flex-wrap: wrap; }
  .brand { font-size: 13px; }
  .site-header nav { width: 100%; justify-content: space-between; gap: 8px; font-size: 11px; }
  .hero h1 { font-size: 43px; }
  .section { padding: 45px 5%; }
  .about { padding: 20px; align-items: flex-start; gap: 14px; }
  .about h2 { font-size: 21px; }
  .site-footer { padding: 20px 5%; flex-wrap: wrap; }
  .checkout-main { padding-top: 35px; }
  .panel { padding: 18px; }
  .auth-container { margin-top: 30px; }
  .auth-card { padding: 23px; }
  .auth-card h1 { font-size: 25px; }
}

/* ---------- Backend notice and small extras ---------- */

.setup-notice {
  padding: 12px 18px;
  background: #fff8e6;
  border-bottom: 2px solid #d98a00;
  color: #7a5200;
  font-size: 13px;
  text-align: center;
}
.setup-notice code { padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .06); }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.link-button:hover { color: var(--teal); text-decoration: underline; }

/* ---------- Payment ---------- */
.payment-methods { border: 1px solid var(--line, var(--border)); border-radius: 10px; padding: 12px 14px; margin: 14px 0; }
.payment-methods legend { font-weight: 700; padding: 0 6px; }
.payment-option { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.payment-option input { width: auto; margin: 0; }
#paypal-container { margin: 10px 0; }
.payment-box { background: #f1f8f7; border: 1px solid #b7dcd6; border-radius: 12px; padding: 16px 18px; margin: 16px 0; text-align: left; }
.payment-box h2 { margin-top: 0; font-size: 18px; }
.pay-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed #b7dcd6; word-break: break-all; }
.pay-row span { color: var(--muted, #5b6b7b); }
.mark-paid { margin-left: 6px; }

.pay-qr { text-align: center; }
.pay-qr img { max-width: 220px; height: auto; border: 1px solid #b7dcd6; border-radius: 10px; background: #fff; padding: 6px; }

/* ---------- Install button (PWA) ---------- */
.install-app { position: fixed; right: 16px; bottom: 16px; z-index: 60; border: 0; border-radius: 999px; padding: 12px 18px;
  background: var(--teal); color: var(--navy); font: 700 14px inherit; box-shadow: 0 6px 20px rgba(16, 36, 62, .25); cursor: pointer; }
@media print { .install-app { display: none !important; } }

/* ---------- Marketplace: partner, seller and delivery pages ---------- */
.role-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.role-tab { padding: 10px 16px; border: 1px solid #dbe3ec; border-radius: 999px; color: var(--navy); background: var(--white); font-weight: 700; cursor: pointer; }
.role-tab.active { color: var(--white); background: var(--navy); border-color: var(--navy); }
.role-pane { margin-bottom: 22px; }
.partner-main .admin-layout { margin-top: 22px; }
.partner-status { margin-bottom: 18px; }
.job-heading { margin: 22px 0 10px; color: var(--navy); font-size: 15px; }
.sold-by { display: block; margin: -4px 0 6px; color: var(--muted); font-size: 12px; }

.role-pane .order-card { display: block; padding: 16px; margin-bottom: 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: var(--white); }
.role-pane .order-card > header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.order-grid small { display: block; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.role-pane .order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.courier-slot { flex-basis: 100%; }
.courier-list { display: grid; gap: 8px; margin-top: 8px; }
.courier-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; }
.courier-row small { display: block; }

.tracking { margin: 6px 0 10px; }
.tracking small { display: block; margin-top: 6px; color: var(--muted); }
.tracking-bad { color: var(--danger); font-size: 13px; }
.tracking-dots { display: flex; gap: 6px; padding: 0; margin: 0; list-style: none; }
.tracking-dots li { flex: 1; height: 6px; border-radius: 4px; background: #dfe6ee; }
.tracking-dots li.done { background: #1ca899; }

/* ---------- chat drawer, maps, camera, debts ---------- */
.chat-drawer{position:fixed;top:0;right:0;bottom:0;width:min(360px,100vw);background:#fff;color:#10243e;box-shadow:-4px 0 24px rgba(0,0,0,.25);z-index:1000;display:flex;flex-direction:column}
.chat-drawer[hidden]{display:none}
.chat-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#10243e;color:#fff}
.chat-close{background:none;border:0;color:#fff;font-size:26px;line-height:1;cursor:pointer}
.chat-list{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px;background:#f3f6fa}
.chat-msg{max-width:85%;background:#fff;border:1px solid var(--border);border-radius:10px;padding:6px 10px;align-self:flex-start;overflow-wrap:anywhere}
.chat-msg.mine{align-self:flex-end;background:#d8f3ee;border-color:#a9e0d6}
.chat-form{display:flex;gap:8px;padding:10px;border-top:1px solid var(--border)}
.chat-form input{flex:1;min-width:0}
.support-fab{position:fixed;right:16px;bottom:16px;z-index:900;border:0;border-radius:999px;padding:12px 18px;background:var(--teal-dark);color:#fff;font-weight:600;box-shadow:0 4px 14px rgba(0,0,0,.3);cursor:pointer}
.support-fab.has-new::after{content:"";position:absolute;top:2px;right:2px;width:12px;height:12px;border-radius:50%;background:#e03131;border:2px solid #fff}
.loc-card{margin:8px 0}
.loc-map{width:100%;height:240px;border:0;border-radius:10px;margin-top:8px}
.live-panel{border:1px solid var(--border);border-radius:10px;padding:12px;margin-bottom:14px}
.distance{font-weight:600;padding:2px 8px;border-radius:999px;font-size:.85em}
.distance-near{background:#d3f9d8;color:#176b2c}
.distance-mid{background:#fff3bf;color:#7a5b00}
.distance-far{background:#ffe3e3;color:#a61e1e}
.photo-row{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}
.photo-preview{max-width:200px;max-height:200px;border-radius:10px;margin:6px 0;display:block}
.debt-box{border:1px solid #f0c36d;background:#fff8e6;border-radius:10px;padding:12px;margin:10px 0}
.progress{height:8px;background:#e5eaf0;border-radius:6px;overflow:hidden;margin:6px 0}
.progress>div{height:100%;background:var(--teal-dark)}
.debt-box .progress>div{background:#e8590c}
.inline-form{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.inline-form input,.inline-form select{flex:1;min-width:160px}
.thread-list{display:flex;flex-direction:column;gap:6px}
.thread-row{display:flex;flex-wrap:wrap;gap:8px;align-items:baseline;text-align:left;border:1px solid var(--border);background:#fff;border-radius:8px;padding:8px 12px;cursor:pointer}
.thread-row.unread{border-color:var(--teal-dark);background:#e6faf7}

/* blocking window for unverified email addresses */
body.verify-locked{overflow:hidden}
.verify-wall{position:fixed;inset:0;z-index:5000;display:flex;align-items:center;justify-content:center;background:rgba(16,36,62,.38);backdrop-filter:blur(1px);padding:16px}
.verify-wall-box{max-width:520px;background:#fff;border:3px solid var(--danger);border-radius:14px;padding:22px;box-shadow:0 10px 40px rgba(0,0,0,.4)}
.verify-wall-box h2{color:var(--danger);margin:0 0 8px}
.verify-wall .verify-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}

/* share */
.share-product{margin-top:10px;background:none;border:1px solid #c5d3e0;border-radius:999px;padding:6px 14px;color:var(--blue-dark);font-weight:600;cursor:pointer}
.share-product:hover{background:#e6f6f4}
.product-highlight{outline:4px solid #17b3a3;box-shadow:0 0 0 8px rgba(23,179,163,.25)}
.share-modal{position:fixed;inset:0;z-index:3000;background:rgba(10,20,35,.7);display:flex;align-items:flex-start;justify-content:center;overflow-y:auto;padding:16px}
.share-box{position:relative;background:#fff;border-radius:16px;padding:20px;max-width:440px;width:100%;margin:auto}
.share-close{position:absolute;top:8px;right:12px;color:#10243e}
.share-poster canvas{width:100%;height:auto;border-radius:12px;display:block;background:#eef3f8}
.share-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 8px}
.share-btn{display:block;text-align:center;padding:10px;border-radius:10px;border:0;color:#fff;font-weight:700;text-decoration:none;cursor:pointer;font-size:.95rem}
.share-fb{background:#1877f2}.share-x{background:#111}.share-wa{background:#25d366}.share-li{background:#0a66c2}
.share-ig{background:linear-gradient(45deg,#f9a825,#e1306c,#833ab4)}
.share-copy{background:#5c6b7a}.share-dl{background:var(--blue-dark)}.share-native{background:var(--teal-dark)}

/* whatsapp */
.wa-btn{display:inline-flex;align-items:center;gap:6px;background:#25d366;color:#fff!important;border-radius:999px;padding:4px 10px;font-weight:700;font-size:.85rem;text-decoration:none;margin:2px 4px 2px 0}
.wa-btn:hover{background:#1ebe5a}
.wa-btn span{line-height:1}

.invite-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0}
.invite-row input{flex:1;min-width:220px}

.kyc-box{max-width:480px;max-height:92vh;overflow-y:auto}
.kyc-box h2{color:var(--blue-dark)}
.kyc-wall{background:rgba(10,30,50,.6)}
.kyc-wall .verify-wall-box{border-color:var(--blue-dark)}
.item-line{display:flex;align-items:center;gap:8px;margin:3px 0}
.item-thumb{width:44px;height:44px;border-radius:8px;object-fit:cover;border:1px solid var(--border);flex:none;background:#eef3f8}
.item-thumb-empty{display:inline-flex;align-items:center;justify-content:center;font-weight:800;color:var(--blue-dark);font-size:.8rem}

.embed header,.embed footer,.embed .support-fab,.embed #chat-fab{display:none!important}
.embed body{padding-top:0}
.join-modal{position:fixed;inset:0;z-index:3000;background:rgba(10,20,35,.7);display:flex;align-items:center;justify-content:center;padding:12px}
.join-box{background:#fff;border-radius:14px;width:min(720px,100%);height:min(88vh,820px);display:flex;flex-direction:column;overflow:hidden}
.join-box header{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-bottom:1px solid var(--border)}
.join-box iframe{flex:1;border:0;width:100%}

.inbox-fab{position:fixed;right:14px;bottom:14px;z-index:2500;background:var(--blue-dark);color:#fff;border:0;border-radius:999px;padding:12px 18px;font-weight:700;box-shadow:0 4px 14px rgba(0,0,0,.25);cursor:pointer}
.inbox-drawer{position:fixed;top:0;right:0;bottom:0;width:min(400px,100%);z-index:2600;margin:0;border-radius:0;overflow-y:auto;transform:translateX(105%);transition:transform .2s;background:#fff;box-shadow:-4px 0 18px rgba(0,0,0,.25)}
.inbox-drawer.open{transform:none}
.inbox-close{position:fixed;right:14px;top:10px;z-index:3;width:38px;height:38px;border-radius:50%;background:#10243e;color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(0,0,0,.3)}
.debt-history-box{margin-top:14px}
.pay-fieldset{border:1px solid var(--border);border-radius:10px;margin:12px 0;padding:10px 14px}
.check-line{display:flex;gap:8px;align-items:center;margin:8px 0}
.chat-drawer{z-index:2700}
.kyc-view{height:auto;max-height:90vh;overflow:auto}.kyc-view-body{padding:14px}.kyc-photo{max-width:100%;border-radius:8px}
.old-order td{font-size:.85rem;color:#5b6b7d;background:#f7f9fb}.seller-head td{background:#eaf3f7;border-top:2px solid var(--blue-dark)}

.seller-sum td{background:#f3f8fb;padding:10px 12px}
.sum-line{display:flex;flex-wrap:wrap;gap:6px 22px;margin-bottom:8px}
.sum-total{color:var(--blue-dark)}
.sum-actions{display:flex;flex-wrap:wrap;gap:6px}
.sum-actions button:disabled{opacity:.45}
.statement-modal .orders-table{width:100%}
@media print{body:has(.statement-modal)>*:not(.statement-modal){display:none!important}.statement-modal{position:static;background:#fff}.statement-modal header button{display:none}}

.lang-switch{margin-inline-start:10px;padding:5px 8px;border:1px solid var(--border);border-radius:8px;background:#fff;color:#10243e;font:inherit;font-size:.85rem;cursor:pointer}
[dir="rtl"] body{text-align:right}
[dir="rtl"] .chat-drawer{right:auto;left:0;box-shadow:4px 0 24px rgba(0,0,0,.25)}
[dir="rtl"] .inbox-drawer{right:auto;left:0;transform:translateX(-105%)}
[dir="rtl"] .inbox-drawer.open{transform:none}
[dir="rtl"] .inbox-fab{right:auto;left:14px}
[dir="rtl"] .inbox-close{right:auto;left:14px}
[dir="rtl"] th,[dir="rtl"] td{text-align:right}
[dir="rtl"] .num{text-align:left}
[dir="rtl"] input[type="email"],[dir="rtl"] input[type="url"],[dir="rtl"] input[type="tel"]{direction:ltr;text-align:right}

a.trust-card{display:block;text-decoration:none;color:inherit;transition:transform .15s,box-shadow .15s}
a.trust-card:hover,a.trust-card:focus-visible{transform:translateY(-3px);box-shadow:0 10px 24px rgba(10,30,60,.18)}
a.trust-card span{display:block}
.accounts-guide .panel{margin-bottom:18px}
.accounts-guide h3{margin:16px 0 6px;font-size:1.02rem;color:var(--blue-dark)}
.accounts-guide ol,.accounts-guide ul{padding-inline-start:22px;line-height:1.65}
.guide-index{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.guide-index a{padding:7px 14px;border:1px solid var(--border);border-radius:999px;text-decoration:none;color:#10243e;font-weight:600;font-size:.9rem}
.guide-index a:hover{background:#eef6f9}
.accounts-guide .button{display:inline-block;margin:6px 6px 0 0}

.settings-table th{white-space:nowrap;text-align:start;padding:10px 12px;vertical-align:middle;background:#f3f8fb}
.settings-table td{padding:8px 12px}
.toggle-button{border:1px solid var(--border);background:#eef1f5;color:#5a6b7d;border-radius:999px;padding:7px 14px;font:inherit;font-size:.88rem;font-weight:600;cursor:pointer;margin:3px 2px}
.toggle-button.on{background:#12a58e;border-color:#12a58e;color:#fff}
.toggle-button:disabled{opacity:.6}
#users-search{width:100%;max-width:420px;margin:6px 0 10px;padding:9px 12px;border:1px solid var(--border);border-radius:8px}
.blocked-row td{background:#fdf0f0}

/* header: never break words onto several lines; wrap whole rows instead */
.site-header { flex-wrap: wrap; row-gap: 10px; }
.site-header nav { flex-wrap: wrap; gap: 10px 20px; justify-content: flex-end; }
.site-header nav a, .site-header nav button, .site-header nav .cart-link { white-space: nowrap; }
@media (max-width: 1100px) { .site-header nav { gap: 8px 14px; } .site-header .brand small { display: none; } }

/* ===== admin orders: one tidy table per seller ===== */
.orders-table td { padding: 8px 10px; vertical-align: middle; }
.orders-table th { padding: 9px 10px; }
.orders-table .item-line { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.orders-table .item-thumb { width: 28px; height: 28px; border-radius: 6px; }
.orders-table .item-thumb-empty { font-size: .65rem; }
.orders-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seller-head td { padding: 8px 10px !important; }
.head-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; justify-content: space-between; }
.head-name { font-size: 14px; }
.head-debt { color: #4a5b6c; font-size: 13px; }
.head-debt strong { color: #b4232a; font-size: 14px; }
.count-pill { display: inline-block; min-width: 22px; padding: 1px 8px; border-radius: 999px; background: #dbe9f0; color: var(--blue-dark); font-size: 11px; font-weight: 700; text-align: center; }
.seller-sum td { padding: 6px 10px 8px !important; }
.sum-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.sum-table th { padding: 4px 10px; color: #6b7a8a; font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; text-align: right; border-bottom: 1px solid #d5e2ea; }
.sum-table th:first-child, .sum-table td:first-child { text-align: left; width: 34%; }
.sum-table td { padding: 4px 10px; text-align: right; border-bottom: 1px dashed #dde7ee; font-variant-numeric: tabular-nums; }
.sum-table tr.sum-total td { border-bottom: 0; border-top: 2px solid var(--blue-dark); color: #0e4e63; font-weight: 700; background: #e8f2f7; }
.old-order td { padding: 6px 10px; }

/* ===== users by category + avatars ===== */
.user-group { margin: 16px 0 6px; }
.user-group-title { margin: 0 0 6px; font-size: 14px; color: #12384f; display: flex; align-items: center; gap: 8px; border-left: 4px solid var(--teal); padding-left: 10px; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.uavatar { border-radius: 50%; object-fit: cover; flex: none; border: 1px solid #cfdde6; background: #eef3f8; }
.uavatar-letter { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--blue-dark); background: #e3f0f5; }
.header-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--teal); vertical-align: middle; }
.profile-photo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar.has-photo { background-size: cover; background-position: center; color: transparent; border: 3px solid var(--teal); }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.photo-actions input[type=file] { display: none; }
.header-avatar-link { display: inline-flex; align-items: center; margin-inline-start: 6px; }
.header-avatar-letter { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: var(--navy); font-weight: 800; font-size: 14px; border: 2px solid var(--teal); }

/* ===== delivery speed choice ===== */
.speed-options { display: grid; gap: 10px; margin: 10px 0 4px; }
.speed-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.speed-card:hover { border-color: #8fc4cf; }
.speed-card.selected, .speed-card:has(input:checked) { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(25,181,166,.15); }
.speed-card.unavailable { opacity: .5; cursor: not-allowed; }
.speed-card input { accent-color: #12877d; }
.speed-card .speed-name { font-weight: 700; }
.speed-card .speed-time { color: #5b6b7d; font-size: 12.5px; }
.speed-card .speed-price { margin-left: auto; font-weight: 800; color: var(--blue-dark); white-space: nowrap; }
.rates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; }

/* ===== general polish ===== */
:focus-visible { outline: 3px solid rgba(25,181,166,.55); outline-offset: 2px; border-radius: 6px; }
.button, .small-button, .toggle-button { transition: transform .12s, box-shadow .15s, background-color .15s, border-color .15s; }
.button:hover:not(:disabled), .small-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(16,36,62,.14); }
.button:active:not(:disabled), .small-button:active:not(:disabled) { transform: none; box-shadow: none; }
.admin-panel, .product-card, .partner-status { box-shadow: 0 1px 2px rgba(16,36,62,.06), 0 6px 18px rgba(16,36,62,.06); }
.product-card { transition: transform .18s, box-shadow .18s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(16,36,62,.14); }
.orders-table tbody tr:not(.seller-head):not(.seller-sum):hover td { background-color: #f1f7fa; }
.table-wrap { border-radius: 10px; overflow-x: auto; }
input, select, textarea { transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(25,181,166,.18); outline: none; }
html { scroll-behavior: smooth; }
::selection { background: #bfeae5; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 720px) { .sum-table th:first-child, .sum-table td:first-child { width: 40%; } .head-line { flex-direction: column; align-items: flex-start; } }
.total-row.grand-row { border-top: 2px solid var(--teal); padding-top: 10px; } .total-row.grand-row strong { color: #0e6d63; font-size: 24px; }
.delivery-line { margin: 8px 0 0; font-size: 13px; color: #31465a; } .subhead { margin: 18px 0 4px; font-size: 14px; color: #12384f; }
.users-table { table-layout: fixed; }
.users-table th:nth-child(1) { width: 34%; } .users-table th:nth-child(2) { width: 28%; }
.users-table td { overflow-wrap: anywhere; }

/* the language picker must never stretch (it is a <select>, and selects are width:100% elsewhere) */
.site-header .lang-switch, .lang-switch { width: auto !important; max-width: 140px; flex: none; margin-top: 0; }
.speed-card { margin: 0; }
.speed-card input[type=radio] { width: 18px !important; height: 18px; margin: 0; flex: none; padding: 0; }
.speed-card > span:nth-of-type(1) { flex: 1; text-align: left; }
.speed-card .speed-price { margin-left: auto; text-align: right; }
.speed-card .speed-name { color: var(--navy); }
.speed-card .speed-time { font-weight: 500; }

/* guide inside each account (collapsed by default) */
.role-guide { margin: 14px 0; border: 1px solid var(--border); border-left: 4px solid var(--teal); border-radius: 10px; background: #fff; }
.role-guide > summary { cursor: pointer; padding: 11px 16px; font-weight: 700; color: #12384f; list-style: none; }
.role-guide > summary::-webkit-details-marker { display: none; }
.role-guide > summary::after { content: "＋"; float: right; color: var(--teal); }
.role-guide[open] > summary::after { content: "−"; }
.role-guide-body { padding: 0 18px 14px; font-size: 14px; }
.role-guide-body h3 { margin: 14px 0 4px; font-size: 14px; color: var(--blue-dark); }
.role-guide-body ul, .role-guide-body ol { margin: 0; padding-left: 20px; }
.role-guide-body li { margin: 3px 0; }

/* ===== admin orders: seller block = header / orders / separate account summary ===== */
.seller-block { margin: 0 0 26px; border: 1px solid #c9dbe5; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(16,36,62,.06); }
.seller-block .seller-head { background: #e3f0f6; border-bottom: 1px solid #c9dbe5; padding: 9px 12px; }
.seller-block .table-wrap { border-radius: 0; margin: 0; }
.seller-block .orders-table tbody tr:last-child td { border-bottom: 0; }
.seller-block .seller-sum { margin: 0; padding: 12px 14px 14px; background: #f4f9fc; border-top: 3px double var(--blue-dark); }
.seller-block .sum-title { margin: 0 0 6px; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--blue-dark); }
.seller-block .sum-table { background: #fff; border: 1px solid #d5e2ea; border-radius: 8px; overflow: hidden; }

/* ===== users: compact rows, the account row is shaded so it stands out ===== */
.users-table td { padding: 5px 10px; }
.users-table th { padding: 6px 10px; }
.users-table tbody tr:nth-child(odd) td { background: #eaf4f9; }
.users-table tbody tr:nth-child(even) td { background: #f8fbfd; }
.users-table tbody tr td:first-child { border-left: 4px solid var(--teal); }
.users-table tbody tr:hover td { background: #d9ecf5; }
.users-table tbody tr.blocked-row td { background: #fdeceb !important; }
.users-table tbody tr.blocked-row td:first-child { border-left-color: var(--danger); }
.users-table small { line-height: 1.2; }
.users-table .uavatar { width: 28px !important; height: 28px !important; font-size: 12px; }
.users-table .user-cell { gap: 8px; }
.users-table .small-button { padding: 4px 9px; }
.seller-sum .sum-actions { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #c9dbe5; justify-content: flex-end; }

/* blocked account: the page stays normal; a small window with a "not allowed" sign appears on top */
.blocked-wall { background: rgba(16,36,62,.38); backdrop-filter: blur(1px); }
.blocked-box { display: flex; align-items: center; gap: 20px; max-width: 540px; }
.blocked-box .prohibited-sign { flex: none; }
.blocked-box p { margin: 0 0 12px; }
@media (max-width: 480px) { .blocked-box { flex-direction: column; text-align: center; } }

/* ===== home page: hero collage, benefits, categories ===== */
:root { --amber: #f5a524; }
.hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 30px; background: radial-gradient(900px 420px at 85% 10%, rgba(25,181,166,.22), transparent 60%), radial-gradient(700px 360px at 0% 100%, rgba(245,165,36,.12), transparent 60%), var(--navy); }
.hero-search { display: flex; gap: 8px; max-width: 540px; margin: 22px 0 14px; padding: 6px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.28); }
.hero-search input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent; padding: 10px 12px; font-size: 15px; color: #10243e; }
.hero-search .button { margin: 0; padding: 10px 22px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-chips button { padding: 6px 14px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 12.5px; cursor: pointer; transition: background .15s, border-color .15s; }
.hero-chips button:hover { background: var(--teal); border-color: var(--teal); color: var(--navy); }
.hero-collage { position: relative; min-height: 360px; }
.collage-card { position: absolute; margin: 0; overflow: hidden; border-radius: 18px; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 22px 50px rgba(0,0,0,.45); background: #1d2f4a; }
.collage-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.collage-main { width: 62%; aspect-ratio: 4/3; left: 18%; top: 8%; transform: rotate(-3deg); z-index: 2; }
.collage-two { width: 44%; aspect-ratio: 4/3; right: 0; top: 0; transform: rotate(5deg); z-index: 1; }
.collage-three { width: 46%; aspect-ratio: 4/3; left: 0; bottom: 4%; transform: rotate(4deg); z-index: 3; }
.float-badge { position: absolute; z-index: 4; padding: 8px 14px; border-radius: 999px; background: #fff; color: var(--navy); font-size: 12.5px; font-weight: 800; box-shadow: 0 10px 24px rgba(0,0,0,.3); animation: floaty 5s ease-in-out infinite; }
.badge-fast { right: 2%; bottom: 22%; background: var(--amber); }
.badge-pay { right: 14%; bottom: 2%; animation-delay: -2s; }
@keyframes floaty { 50% { transform: translateY(-7px); } }
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: -26px var(--gutter) 0; position: relative; z-index: 5; background: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(16,36,62,.14); overflow: hidden; }
.benefits div { padding: 18px 20px; display: grid; gap: 3px; border-right: 1px solid var(--border); }
.benefits div:last-child { border-right: 0; }
.benefits strong { color: var(--navy); font-size: 14px; }
.benefits span { color: var(--muted); font-size: 12px; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.category-tile { position: relative; padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: pointer; background: #1d2f4a; aspect-ratio: 4/3; box-shadow: 0 6px 18px rgba(16,36,62,.14); transition: transform .2s, box-shadow .2s; }
.category-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.category-tile span { position: absolute; inset: auto 0 0 0; padding: 26px 14px 12px; text-align: left; color: #fff; font: inherit; font-size: 15px; font-weight: 800; background: linear-gradient(transparent, rgba(8,20,38,.78)); }
.category-tile:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(16,36,62,.26); }
.category-tile:hover img { transform: scale(1.07); }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-collage { min-height: 300px; max-width: 520px; margin: 0 auto; width: 100%; }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .benefits div:nth-child(2) { border-right: 0; }
  .benefits div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 520px) { .benefits { grid-template-columns: 1fr; } .benefits div { border-right: 0; border-bottom: 1px solid var(--border); } .benefits div:last-child { border-bottom: 0; } .hero-search { flex-direction: column; } }
.hero h1 { font-size: clamp(36px, 4.2vw, 56px); letter-spacing: -1.5px; }
.hero { padding-bottom: 80px; }

/* admin messages: one box per kind of person */
.thread-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.thread-box { border: 1px solid #c9dbe5; border-radius: 12px; background: #f6fafc; overflow: hidden; }
.thread-box-title { margin: 0; padding: 9px 12px; font-size: 13.5px; color: #12384f; background: #e3f0f6; border-bottom: 1px solid #c9dbe5; display: flex; align-items: center; gap: 8px; }
.thread-box[data-group="merchant"] .thread-box-title { border-left: 4px solid #e8913d; }
.thread-box[data-group="courier"] .thread-box-title { border-left: 4px solid #2d7ff9; }
.thread-box[data-group="customer"] .thread-box-title { border-left: 4px solid var(--teal); }
.thread-box[data-group="supervisor"] .thread-box-title { border-left: 4px solid #8a5cd0; }
.unread-pill { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; }
.thread-box .thread-list { padding: 8px; max-height: 340px; overflow-y: auto; }
.thread-box .thread-row { flex-direction: column; gap: 2px; align-items: flex-start; width: 100%; }
.thread-box .thread-row span { overflow-wrap: anywhere; }
.thread-empty { margin: 4px 6px; font-size: 12.5px; }

.debt-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 8px 0 14px; padding: 10px 12px; border: 1px solid #c9dbe5; border-radius: 10px; background: #f6fafc; }
.debt-switch small { flex: 1 1 260px; }

/* debt limits + supervisor reports */
.debt-limits { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; padding-top: 8px; border-top: 1px dashed #c9dbe5; }
.limit-field { display: grid; gap: 3px; font-size: .82rem; color: #4a6a7d; font-weight: 600; }
.limit-field input, .limit-field select { min-width: 120px; padding: 7px 9px; border: 1px solid #c9dbe5; border-radius: 8px; font: inherit; }
.limit-chips { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.report-box { max-width: 560px; }
.report-body { padding: 12px 16px 16px; display: grid; gap: 10px; align-content: start; }
.report-body textarea, .report-text { width: 100%; box-sizing: border-box; font: inherit; line-height: 1.55; }
.report-body textarea { padding: 10px; border: 1px solid #c9dbe5; border-radius: 10px; resize: vertical; }
.word-count { margin: 0; font-size: .85rem; color: #4a6a7d; text-align: end; }
.word-count.over { color: #b3261e; font-weight: 700; }
.signature-block { display: grid; gap: 2px; padding: 10px 14px; border: 1px dashed #7aa0b8; border-radius: 10px; background: #f6fafc; }
.signature-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #5b7a8c; font-weight: 700; }
.signature-name { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.7rem; color: #14425c; line-height: 1.2; }
.check-row { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.report-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; background: #fff; display: grid; gap: 8px; }
.report-card.unread { border-color: #e0a431; background: #fffaf0; }
.report-card header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.report-text { margin: 0; white-space: pre-wrap; }

/* the owner only monitors products */
.monitor-layout { grid-template-columns: 1fr; }

/* supervisor: what is owed to the owner and to the seller, apart */
.owed-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 12px 0 8px; }
.owed-box { display: grid; gap: 2px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
.owed-box span { font-size: .8rem; font-weight: 700; color: #4a6a7d; }
.owed-box strong { font-size: 1.35rem; }
.owed-site { border-inline-start: 4px solid #c2552d; }
.owed-seller { border-inline-start: 4px solid #1f8a5b; }

/* report: templates, hand-drawn signature, stamp */
.template-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.sign-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.sign-pad, .stamp-box { display: grid; gap: 6px; }
#sign-canvas { width: 100%; height: auto; aspect-ratio: 640 / 220; border: 1px dashed #7aa0b8; border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.stamp-box .muted { margin: 0; font-size: .82rem; }
.stamp-box input[type=file] { max-width: 100%; font-size: .82rem; }
.report-sig-img { width: 100%; max-width: 520px; border-radius: 8px; border: 1px solid #c9dbe5; display: block; }
.report-facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: .86rem; color: #3d5a6b; }
@media (max-width: 560px) { .sign-row { grid-template-columns: 1fr; } }

/* the report window scrolls inside; the send button stays visible at the bottom */
.join-box.report-box { height: auto; max-height: 94vh; max-width: 560px; }
.report-box .report-body { display: grid; align-content: start; overflow-y: auto; flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.report-foot { flex: 0 0 auto; display: grid; gap: 6px; padding: 10px 16px 14px; border-top: 1px solid var(--border); background: #fff; }
.report-foot p { margin: 0; }
.report-foot .primary-button { width: 100%; padding: 12px; }
.report-body textarea { min-height: 170px; }
.report-body > * { flex-shrink: 0; }

/* inbox: one box per kind of sender */
.chat-back { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; margin-inline-end: 6px; }
.chat-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head .chat-close, .chat-head .chat-back { flex: none; }
.chat-inbox { flex: 1; overflow-y: auto; background: #f4f7fb; display: flex; flex-direction: column; }
.chat-inbox[hidden] { display: none; }
.inbox-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; }
.inbox-tab { border: 1px solid #c9dbe5; background: #f6fafc; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; color: #14425c; }
.inbox-tab.active { background: #10243e; color: #fff; border-color: #10243e; }
.inbox-list { display: grid; gap: 8px; padding: 12px; align-content: start; }
.inbox-item { display: grid; gap: 2px; text-align: start; border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 10px 12px; font: inherit; cursor: pointer; }
.inbox-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item.unread { border-color: #e0a431; background: #fffaf0; }
.chat-form[hidden],.chat-list[hidden]{display:none!important}

/* picture guides: big pictures with a number, readable without reading */
.picture-guide { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--border, var(--border)); border-radius: 14px; background: #fff; }
.pg-title { margin: 0 0 10px; font-size: 1.05rem; }
.pg-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.pg-steps li { position: relative; flex: 0 0 150px; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 14px 8px 10px; border-radius: 14px; background: #f1f8fb; scroll-snap-align: start; }
.pg-steps li:not(:last-child)::after { content: "➜"; position: absolute; inset-inline-end: -14px; top: 38px; color: var(--teal-dark); font-size: 1.2rem; z-index: 1; }
[dir="rtl"] .pg-steps li:not(:last-child)::after { content: "⬅"; }
.pg-icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: #fff; border: 2px solid #bfe3dd; font-size: 2.2rem; }
.pg-badge { position: absolute; top: 8px; inset-inline-start: 8px; width: 24px; height: 24px; border-radius: 50%; background: #10243e; color: #fff; font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
.pg-steps strong { font-size: .92rem; }
.pg-steps small { font-size: .76rem; color: #5b7a8c; line-height: 1.3; }

/* ---------- credit (Algerian edition) ---------- */
.wallet-main { max-width: 760px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.wallet-balance { text-align: center; }
.wallet-amount { display: block; font-size: 2.2rem; margin: 4px 0; }
.wallet-form { display: grid; gap: 8px; margin: 12px 0; }
.wallet-form input, .wallet-form select { width: 100%; }
.wallet-list { display: grid; gap: 8px; }
.wallet-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px; border: 1px solid rgba(128,128,128,.25); border-radius: 10px; }
.wallet-row small { display: block; }
.wallet-row.plus strong:last-child, .wallet-row.plus div:last-child strong { color: #1a8f5a; }
.wallet-row.minus div:last-child strong { color: var(--danger); }
.pay-currency { border: 1px solid rgba(128,128,128,.25); border-radius: 10px; margin: 0 0 10px; padding: 8px 12px; display: flex; gap: 16px; flex-wrap: wrap; }
.pay-currency[hidden] { display: none; }
.nav-credit { font-weight: 600; }

/* ---------- admin: staff groups (each category has its own colour, with a line between them) ---------- */
.staff-group { border-radius: 14px; padding: 14px 16px 6px; margin: 0 0 18px; border: 1px solid transparent; border-inline-start-width: 6px; }
.staff-group + .staff-group { margin-top: 26px; position: relative; }
.staff-group + .staff-group::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; border-top: 3px solid rgba(128,128,128,.35); }
.staff-sellers  { background: #eaf6ff; border-color: #b9dcf5; border-inline-start-color: #2b8be0; }
.staff-doctors  { background: #eefaf1; border-color: #bfe5c8; border-inline-start-color: var(--ok); }
.staff-agencies { background: #f3eeff; border-color: #d3c4f2; border-inline-start-color: #7a4fd6; }
.staff-taxis { background: #fffbe0; border-color: #efe29a; border-inline-start-color: #d4b300; }
.staff-couriers { background: #fff5e6; border-color: #f4d6a6; border-inline-start-color: #e58a1f; }
.staff-group .job-heading { margin-top: 0; }
.staff-group .orders-table { background: rgba(255,255,255,.6); }
@media (prefers-color-scheme: dark) {
  .staff-sellers  { background: #10263a; border-color: #1f4a6e; }
  .staff-doctors  { background: #11291a; border-color: #1f5a35; }
  .staff-agencies { background: #21183a; border-color: #4a3585; }
  .staff-taxis { background: #2c2910; border-color: #6b5f18; }
  .staff-couriers { background: #2e2210; border-color: #6b4a18; }
  .staff-group .orders-table { background: rgba(0,0,0,.25); }
}

/* ---------- appointments ---------- */
.doctors-main { max-width: 820px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.appt-card { border: 1px solid rgba(128,128,128,.3); border-radius: 12px; padding: 12px; margin: 0 0 12px; display: grid; gap: 8px; border-inline-start-width: 5px; }
.appt-pending { border-inline-start-color: #e0a100; }
.appt-accepted { border-inline-start-color: var(--ok); }
.appt-rejected, .appt-cancelled { border-inline-start-color: var(--danger); opacity: .85; }
.appt-done { border-inline-start-color: #6b7a8c; }
.appt-main { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.appt-main small { display: block; }
.appt-day, .appt-time { font-weight: 700; margin-inline-end: 8px; }
.appt-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.appt-hour { display: flex; gap: 6px; align-items: center; }
.appt-notes { display: grid; gap: 6px; }
.appt-notes textarea { width: 100%; }
.rx-box { border: 1px dashed rgba(128,128,128,.5); border-radius: 10px; padding: 10px; }
.rx-text { white-space: pre-wrap; font: inherit; margin: 8px 0; }
.appt-come { margin: 0; }

/* ---------- services hub (customer home) ---------- */
.services-main { max-width: 900px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.service-card { display: grid; gap: 6px; padding: 18px; border-radius: 16px; text-decoration: none; color: inherit; border: 1px solid rgba(128,128,128,.25); border-top-width: 6px; background: rgba(128,128,128,.06); transition: transform .12s; }
.service-card:hover { transform: translateY(-2px); }
.service-card strong { font-size: 1.15rem; }
.service-card small { opacity: .8; }
.service-icon { font-size: 2rem; }
.service-card[hidden] { display: none; }
.service-shop { border-top-color: #2b8be0; }
.service-doctor { border-top-color: var(--ok); }
.service-travel { border-top-color: #7a4fd6; }
.service-taxi { border-top-color: #d4b300; }
.service-hotel { border-top-color: #0f9b7a; }
.service-credit { border-top-color: #e58a1f; }
.appt-price { font-weight: 700; margin-inline-end: 8px; }
.appt-route { display: block; }

/* ---------- games (home page) ---------- */
.games { max-width: 900px; margin: 16px auto; padding: 0 16px; }
.games > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(128,128,128,.3); background: rgba(128,128,128,.07); list-style: none; }
.games > summary::-webkit-details-marker { display: none; }
.games-icon { font-size: 1.6rem; }
.games-body { display: grid; gap: 10px; padding: 14px 0; justify-items: center; }
.game-tabs, .game-hud, .g-pad { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.game-tab.active { background: var(--teal); color: var(--navy); }
.g-board { display: grid; gap: 3px; width: min(92vw, 380px); padding: 8px; border-radius: 14px; background: rgba(16,36,62,.9); touch-action: manipulation; }
.g-gem, .g-card, .g-tile, .g-cell { aspect-ratio: 1; border-radius: 8px; border: 0; display: grid; place-items: center; }
.g-gem { font-size: clamp(1.1rem, 5vw, 1.7rem); background: rgba(255,255,255,.09); cursor: pointer; padding: 0; transition: transform .15s, opacity .15s; }
.g-gem.sel { outline: 3px solid var(--teal); transform: scale(1.08); }
.g-gem.pop { opacity: 0; transform: scale(.4); }
.g-blocks { width: min(70vw, 260px); gap: 1px; }
.g-cell { aspect-ratio: 1; border-radius: 3px; background: rgba(255,255,255,.07); }
.g-card { font-size: clamp(1.3rem, 7vw, 2rem); background: #2b8be0; color: #fff; cursor: pointer; padding: 0; }
.g-card.done { background: var(--ok); opacity: .7; }
.g-tile { font-weight: 800; font-size: clamp(1rem, 5vw, 1.5rem); background: rgba(255,255,255,.1); color: #10243e; }
.g-tile[data-v="2"] { background: #eee4da; } .g-tile[data-v="4"] { background: #ede0c8; } .g-tile[data-v="8"] { background: #f2b179; }
.g-tile[data-v="16"] { background: #f59563; } .g-tile[data-v="32"] { background: #f67c5f; color: #fff; } .g-tile[data-v="64"] { background: #f65e3b; color: #fff; }
.g-tile[data-v="128"], .g-tile[data-v="256"], .g-tile[data-v="512"] { background: #edcf72; } .g-tile[data-v="1024"], .g-tile[data-v="2048"] { background: #edc22e; }
.g-info { margin: 0; font-weight: 600; text-align: center; }
.g-pad .small-button { min-width: 48px; min-height: 44px; font-size: 1.2rem; }

/* ---------- quick filter (top of the home page) ---------- */
.quick-filter { max-width: 1100px; margin: 12px auto 0; padding: 12px 16px; display: grid; gap: 10px; border-radius: 14px; border: 1px solid rgba(128,128,128,.3); background: rgba(128,128,128,.07); }
.quick-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.quick-row select { min-width: 180px; max-width: 100%; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid rgba(128,128,128,.4); background: transparent; color: inherit; border-radius: 999px; padding: 6px 14px; cursor: pointer; font: inherit; }
.chip small { opacity: .7; }
.chip.active, .chip:hover { background: var(--teal); color: var(--navy); border-color: var(--teal); }

/* ---------- provider dashboard: tables ---------- */
.appt-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.appt-toolbar input[type=search] { flex: 1 1 200px; min-width: 160px; }
.appt-section { margin: 0 0 16px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(128,128,128,.3); }
.appt-heading { cursor: pointer; padding: 10px 14px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-weight: 700; list-style: none; color: #fff; }
.appt-heading::-webkit-details-marker { display: none; }
.appt-heading small { font-weight: 400; opacity: .9; }
.appt-h-count { background: rgba(255,255,255,.28); border-radius: 999px; padding: 0 10px; }
.appt-h-pending > .appt-heading { background: #c98a00; }
.appt-h-accepted > .appt-heading { background: #2a8f52; }
.appt-h-past > .appt-heading { background: #5d6b7c; }
.appt-section .table-wrap { padding: 0 6px 6px; }
.appt-h-pending thead th { background: rgba(201,138,0,.18); }
.appt-h-accepted thead th { background: rgba(42,143,82,.18); }
.appt-h-past thead th { background: rgba(93,107,124,.2); }
.appt-table tr.appt-today { background: rgba(42,143,82,.12); }
.appt-table tr.appt-card { display: table-row; padding: 0; margin: 0; gap: 0; border: 0; border-radius: 0; opacity: 1; }
.appt-table tr.appt-rejected, .appt-table tr.appt-cancelled { background: rgba(192,57,43,.07); }
.appt-table td { vertical-align: top; }
.appt-table td small { display: block; }
.tag { display: inline-block; font-size: .72rem; border-radius: 999px; padding: 1px 8px; margin: 2px 4px 0 0; }
.tag-today { background: #2a8f52; color: #fff; }
.tag-late { background: var(--danger); color: #fff; }
.tag-back { background: #7a4fd6; color: #fff; }

/* ---------- statistics page ---------- */
.viz-root {
  --surface-1: #fcfcfb; --text-primary: #0b0b0b; --text-secondary: #52514e;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
}
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin: 0 0 14px; }
.stat-tile { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(128,128,128,.3); background: rgba(128,128,128,.06); }
.stat-tile span { font-size: .85rem; opacity: .8; }
.stat-tile strong { font-size: 1.7rem; line-height: 1.1; }
.range-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.viz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; margin: 0 0 18px; }
.viz-card { border: 1px solid rgba(128,128,128,.3); border-radius: 14px; padding: 12px 14px; background: var(--surface-1); color: var(--text-primary); min-width: 0; }
.viz-card.wide { grid-column: 1 / -1; }
.viz-card > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.viz-card h2 { font-size: 1.05rem; margin: 0; }
.viz-svg { width: 100%; height: auto; display: block; }
.viz-grid line.viz-grid, .viz-svg .viz-grid { stroke: rgba(128,128,128,.25); stroke-width: 1; }
.viz-axis { fill: var(--text-secondary); font-size: 11px; }
.viz-val { fill: var(--text-primary); font-size: 11px; font-weight: 600; }
.viz-center { fill: var(--text-primary); font-size: 22px; font-weight: 800; }
.viz-cross { stroke: var(--text-secondary); stroke-width: 1; stroke-dasharray: 3 3; }
.viz-legend { display: flex; gap: 6px 16px; flex-wrap: wrap; list-style: none; margin: 8px 0 0; padding: 0; color: var(--text-primary); font-size: .9rem; }
.viz-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; }
.viz-donut-wrap { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
.viz-donut { width: 180px; flex: 0 0 auto; }
.viz-donut-wrap .viz-legend { flex-direction: column; margin: 0; }
.viz-slice, .viz-bar { cursor: pointer; transition: opacity .12s; }
.viz-slice:hover, .viz-bar:hover { opacity: .8; }
.viz-tip { position: fixed; z-index: 1000; background: #10243e; color: #fff; border-radius: 8px; padding: 6px 10px; font-size: .85rem; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.viz-tip[hidden] { display: none; }
.wilaya-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.wilaya-tools input { flex: 1 1 200px; }
.wilaya-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 6px; }
.wilaya-item { display: flex; gap: 4px; align-items: stretch; }
.wilaya-item .toggle-button { flex: 1; text-align: start; }
.wilaya-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.heading-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

.site-account-table th { text-align: start; font-weight: 600; }
.site-account-table td { text-align: end; white-space: nowrap; }
.site-account-table tr.minus td { color: var(--danger); }
.site-account-table tr.total th, .site-account-table tr.total td { border-top: 2px solid rgba(128,128,128,.5); font-size: 1.1rem; }

/* ---------- the owner looks at somebody's page (read only) ---------- */
.view-as-bar { position: sticky; top: 0; z-index: 900; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 14px; background: #7a4fd6; color: #fff; font-size: .92rem; }
.view-as-bar a { color: #10243e; }
body.view-only input:not([type=search]), body.view-only select, body.view-only textarea { pointer-events: none; opacity: .75; }
body.view-only .support-button, body.view-only #chat-launcher, body.view-only .chat-fab { display: none !important; }

/* ---------- side menu with icons ---------- */
.side-toggle { display: none; background: transparent; border: 1px solid #527087; color: #fff; border-radius: 8px; font-size: 20px; line-height: 1; padding: 7px 11px; cursor: pointer; }
.side-nav, .side-backdrop { display: none; }
body.has-side .side-nav { display: flex; flex-direction: column; gap: 6px; position: fixed; inset-block: 0; inset-inline-start: 0; width: 252px; z-index: 950; background: linear-gradient(180deg, #0f2036, #112a46); color: #fff; padding: 16px 12px 22px; overflow-y: auto; box-shadow: 2px 0 14px rgba(0,0,0,.18); transition: transform .25s ease; }
.side-brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 4px 6px 14px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 6px; }
.side-brand:hover { color: #fff; }
.side-brand strong { display: block; font-size: 17px; }
.side-brand small { display: block; font-size: 9px; letter-spacing: 1px; color: #c4d5e5; margin-top: 3px; }
.side-group { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.side-title { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #8fb0cc; padding: 8px 10px 4px; }
.side-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #eaf2f9; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.side-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-item.active { background: rgba(34,184,167,.20); color: #7ff0e0; border-color: rgba(34,184,167,.45); }
.side-icon { width: 24px; text-align: center; font-size: 17px; flex: none; }
.side-lang { margin-top: auto; padding: 14px 4px 0; }
.side-lang select { width: 100% !important; max-width: none !important; }
.side-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 940; }
@media (min-width: 1000px) {
  body.has-side { padding-inline-start: 252px; }
  body.has-side .site-header .brand { display: none; }
  body.has-side .site-header { justify-content: flex-end; min-height: 64px; }
  body.has-side .role-tabs, body.has-side .account-nav { display: none; }
  body.has-side .view-as-bar { margin-inline-start: 0; }
}
body.has-side .site-header nav > :not(.cart-link):not(.header-avatar-link) { display: none !important; }
@media (max-width: 999px) {
  body.has-side .side-toggle { display: inline-block; }
  body.has-side .side-nav { transform: translateX(-105%); }
  [dir="rtl"] body.has-side .side-nav { transform: translateX(105%); }
  body.has-side.side-open .side-nav { transform: none; }
  body.has-side.side-open .side-backdrop { display: block; }
  body.has-side .site-header { flex-wrap: nowrap; }
  body.has-side .site-header nav { width: auto; margin-inline-start: auto; flex-wrap: nowrap; }
}
@media print { .side-nav, .side-backdrop, .side-toggle { display: none !important; } body.has-side { padding-inline-start: 0 !important; } }

/* ---------- payment switches (owner) ---------- */
.pay-switch-box { margin: 0 0 18px; padding: 16px; border: 1px solid #d5e3ee; border-radius: 12px; background: #f7fbfd; }
.pay-switch-box h3 { margin: 0 0 4px; }
.pay-switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; margin-top: 12px; }
.toggle-button.pay-switch { display: flex; align-items: center; gap: 10px; justify-content: flex-start; padding: 14px 16px; font-size: 15px; border-radius: 12px; text-align: start; }
.pay-switch .pay-icon { font-size: 22px; }
.pay-switch strong { margin-inline-start: auto; font-size: 12px; letter-spacing: .5px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.7); }

/* ---------- one look for every table (owner, doctor, seller, agency, taxi) ---------- */
.table-wrap { border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(16,36,62,.06); overflow-x: auto; }
.orders-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; background: #fff; }
.orders-table thead th, .settings-table th[scope=col] {
  background: linear-gradient(180deg, #17314f, #10243e); color: #eaf4fb; font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  text-align: start; padding: 11px 12px; border-bottom: 0; white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.orders-table thead th:first-child { border-top-left-radius: 11px; } .orders-table thead th:last-child { border-top-right-radius: 11px; }
[dir="rtl"] .orders-table thead th:first-child { border-top-left-radius: 0; border-top-right-radius: 11px; } [dir="rtl"] .orders-table thead th:last-child { border-top-right-radius: 0; border-top-left-radius: 11px; }
.orders-table th.num, .orders-table td.num { text-align: end; }
.orders-table tbody td { padding: 11px 12px; border-bottom: 1px solid #e6eef4; vertical-align: middle; }
.orders-table tbody tr:nth-child(even) td { background: #f8fbfd; }
.orders-table tbody tr:last-child td { border-bottom: 0; }
.orders-table tbody tr:not(.seller-head):not(.seller-sum):hover td { background: #eaf6f4; }
.orders-table td small { color: #5f7285; }
.orders-table .small-button, .orders-table .toggle-button { margin: 2px 3px 2px 0; }
.orders-table .status-pill, .orders-table .count-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #e3f1ef; color: #0d6e60; border: 1px solid #bfe0da; }
.settings-table th[scope=row] { background: #eef5f9; color: #17314f; font-weight: 700; border-right: 1px solid var(--border); }

/* the doctor's / agency's / taxi's three tables: same frame, one colour band each */
.appt-section { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: 0 1px 3px rgba(16,36,62,.06); }
.appt-section .table-wrap { border: 0; box-shadow: none; border-radius: 0; }
.appt-section > summary, .appt-section > h3 { padding: 13px 16px; font-weight: 800; }
.appt-table thead th { color: #10243e; border-bottom: 3px solid transparent; }
.appt-h-pending thead th { background: #fdf0cf; border-bottom-color: #e0a100; }
.appt-h-accepted thead th { background: #d9f1e2; border-bottom-color: #2a8f52; }
.appt-h-past thead th { background: #e4e9ee; border-bottom-color: #6b7c8d; }
.appt-table tbody tr:nth-child(even) td { background: #fbfdfe; }
.appt-table tr.appt-today td { background: #e5f6ec !important; }
.appt-table tr.appt-today td:first-child { box-shadow: inset 4px 0 0 #2a8f52; }
[dir="rtl"] .appt-table tr.appt-today td:first-child { box-shadow: inset -4px 0 0 #2a8f52; }
.appt-table tr.appt-rejected td, .appt-table tr.appt-cancelled td { background: #fbeceb !important; }
.appt-table td, .appt-table th { padding: 11px 12px; }
.appt-table .tag, .appt-table .appt-tag { display: inline-block; padding: 2px 8px; margin: 2px 4px 2px 0; border-radius: 999px; font-size: 11px; font-weight: 700; background: #eef2f6; color: #3a4d60; border: 1px solid #d5dee7; }
.users-table th, .users-table td { padding: 10px 12px; }
@media (max-width: 700px) { .orders-table { min-width: 640px; } .orders-table thead th { position: static; } }

/* ---------- settings buttons: one tidy grid ---------- */
.settings-table td { padding: 12px; }
.settings-table .switch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr)); gap: 8px; align-items: stretch; }
.settings-table .tick { width: 18px; flex: none; text-align: center; font-weight: 800; }
.settings-table td .toggle-button { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; padding: 8px 12px; min-height: 40px; border-radius: 10px; font-size: 12.5px; font-weight: 600; line-height: 1.25; text-align: start; white-space: normal; }
.settings-table td .toggle-button.on { background: #e3f4ef; border-color: #7fd0bd; color: #0b6b58; }
.settings-table td .toggle-button.off { background: #f1f4f7; border-color: #d3dce5; color: #66788a; }
.settings-table th[scope=row] { width: 190px; vertical-align: top; padding-top: 18px; }
@media (max-width: 700px) { .settings-table th[scope=row] { width: auto; } }
#fees-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px 14px; align-items: end; }
#fees-box > h3, #fees-box > p, #fees-box > .visibility-control, #fees-box > button { grid-column: 1 / -1; }
#fees-box > button { justify-self: start; }
#fees-box .limit-field { margin: 0; }

/* ---------- statistics: money, credit, growth, lists ---------- */
.lists-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.lists-grid h3 { margin: 0 0 8px; font-size: 1rem; }
#money-panel .stat-tiles, #credit-panel .stat-tiles, #growth-panel .stat-tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
#money-panel .stat-tile strong, #credit-panel .stat-tile strong, #growth-panel .stat-tile strong { font-size: 1.35rem; }

.lists-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.lists-grid .orders-table td, .lists-grid .orders-table th { padding: 9px 10px; }

/* ---------- home quick filter: a cleaner card with icons ---------- */
.quick-filter { padding: 16px 18px; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 6px 22px rgba(16,36,62,.08); }
.quick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.quick-title { font-size: 1.05rem; font-weight: 800; color: var(--navy); display: inline-flex; align-items: center; gap: 8px; }
.quick-clear-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfdde8; background: #f3f8fb; color: #17314f; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.quick-clear-btn:hover { background: #e3f1ef; border-color: #7fd0bd; }
.quick-select { position: relative; display: block; width: 100%; }
.quick-select-icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; pointer-events: none; }
.quick-select select { width: 100%; min-width: 0; padding-inline-start: 44px; height: 46px; border-radius: 12px; border: 1px solid #cfdde8; background: #f8fbfd; font-weight: 600; }
.chip-row { gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; border: 1px solid #d3e0ea; background: #f6fafc; color: #17314f; font-weight: 600; transition: transform .12s, box-shadow .15s, background-color .15s; }
.chip .chip-icon { font-size: 17px; line-height: 1; }
.chip small { background: rgba(16,36,62,.08); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; opacity: 1; font-weight: 700; }
.chip:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(16,36,62,.12); }
.chip.active { background: linear-gradient(135deg, #22b8a7, #19a08f); border-color: #19a08f; color: #fff; box-shadow: 0 4px 12px rgba(25,160,143,.35); }
.chip.active small { background: rgba(255,255,255,.28); color: #fff; }

/* ---------- the fee chain: delivery partner / supervisor / owner ---------- */
.fee-card { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(135deg, #fffaf0, #fff); }
.fee-card-top { display: flex; align-items: center; gap: 12px; }
.fee-card-top > div { flex: 1; display: grid; gap: 2px; }
.fee-icon { font-size: 26px; }
.fee-amount { font-size: 1.5rem; white-space: nowrap; }
.fee-amount.owing { color: #b4531a; } .fee-amount.clear { color: #1d8a5a; }
.fee-card details { margin-top: 8px; } .fee-card summary { cursor: pointer; font-weight: 700; }

/* ---- site fees by kind ---- */
.fee-note{margin:10px 0;padding:10px 14px;border-radius:10px;border:1px solid var(--line,#d8e4e0);background:#f1faf7;display:flex;flex-wrap:wrap;gap:6px 10px;align-items:baseline}
.feeplan-table input[type=number]{width:92px;padding:6px 8px;text-align:center}
.feeplan-table td{vertical-align:middle}
.feeplan-filter{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}
.feeplan-filter select,.feeplan-filter input{padding:8px 10px;min-width:180px}
.status-pill.fee-free{background:#dff5ea;color:#0b6b3a;border-color:#a8dcc0}
#feeplan-panel .limit-box{margin-top:14px}

/* ---- delivery QR code ---- */
.qr-modal{position:fixed;inset:0;z-index:1000;background:rgba(10,20,35,.6);display:flex;align-items:center;justify-content:center;padding:16px}
.qr-card{background:var(--card,#fff);color:inherit;border-radius:16px;padding:20px;max-width:380px;width:100%;max-height:92vh;overflow:auto;text-align:center;box-shadow:0 20px 50px rgba(0,0,0,.35)}
.qr-box{background:#fff;padding:10px;border-radius:12px;margin:10px auto;max-width:260px}
.qr-box svg{width:100%;height:auto;display:block}
.qr-code{font-size:1.6rem;font-weight:800;letter-spacing:.18em;margin:6px 0}
.qr-video{width:100%;border-radius:12px;background:#000;margin:8px 0}
.qr-manual{text-align:center;letter-spacing:.2em;font-weight:700;text-transform:uppercase;width:100%;margin:6px 0}
.parcel-line{margin:6px 0}
.calc-box{margin:14px 0;padding:12px;border:1px dashed var(--line,#c9d8d3);border-radius:12px}
.calc-result{font-weight:700;margin:8px 0 0}
.dims-row{grid-template-columns:repeat(3,1fr)}

/* ---- reviews ---- */
.reviews-summary{display:flex;flex-wrap:wrap;gap:18px 32px;align-items:center;margin:8px 0 16px}
.rating-block{display:flex;flex-direction:column;align-items:center;min-width:120px}
.rating-label{font-size:.85rem;color:var(--muted,#5b6b7a)}
.rating-big{font-size:2.2rem;line-height:1.1}
.stars-line{color:#f0a500;letter-spacing:2px}
.star-picker{display:inline-flex;gap:2px;margin:4px 0}
.star-btn{background:none;border:0;font-size:1.9rem;line-height:1;color:#c9d0d6;cursor:pointer;padding:2px 3px}
.star-btn.on{color:#f0a500}
.review-form{display:grid;gap:8px;max-width:520px;margin:10px 0 18px}
.review-form label{display:grid;gap:2px;font-weight:600}
.review-list{display:grid;gap:10px;margin-top:10px}
.review-item{padding:10px 12px;border:1px solid var(--line,#d8e4e0);border-radius:10px;background:var(--card,#fff)}
.review-item p{margin:6px 0 0}
.stars-link{background:none;border:0;padding:2px 0;color:inherit;cursor:pointer;font-size:.9rem;text-align:left}
.review-card{max-width:480px;text-align:left}
.review-card .rv-close{margin-top:12px}

/* restaurant: offers, kitchen clock, ready notice */
.old-price { color: var(--muted, #6b7280); font-weight: 400; font-size: .85em; }
.offer-badge { display: inline-block; background: #fde68a; color: #7c2d12; border-radius: 999px; padding: 1px 8px; font-size: .75rem; font-weight: 700; }
.kitchen-box { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 4px 8px; }
.kitchen-box .ready-minutes { width: 4.5em; }
.ready-line { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; }
.ready-line.ready-soon { background: #dcfce7; border-color: #86efac; font-weight: 700; }
.restaurant-controls { display: grid; gap: 8px; }
.prep-note { display: block; margin-top: 4px; }

/* schedule board */
.board-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.board-summary { margin-inline-start: auto; display: inline-flex; gap: 6px; flex-wrap: wrap; }
.board-pill { background: #e0f2fe; color: #075985; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }
.board-pill-free { background: #dcfce7; color: #166534; }
.board-pill-wait { background: #fef3c7; color: #92400e; }
.board-table td, .board-table th { vertical-align: middle; }
.board-free td { background: #f8fafc; }
.board-pending td { background: #fffbeb; }
.board-accepted td { background: #f0fdf4; }
.board-done td { background: #f1f5f9; color: #475569; }
.board-source { border-radius: 6px; padding: 1px 8px; font-size: .75rem; font-weight: 700; }
.board-source-app { background: #dbeafe; color: #1e40af; }
.board-source-walkin { background: #ede9fe; color: #5b21b6; }
.board-walkin { margin-top: 16px; padding-top: 12px; border-top: 1px dashed #cbd5e1; }
.board-settings { margin-top: 16px; }
.hours-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.hours-row > .visibility-control { min-width: 9em; }
.board-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.board-chip { background: #fee2e2; color: #991b1b; border-radius: 999px; padding: 2px 4px 2px 10px; font-size: .8rem; }
.board-chip button { border: 0; background: transparent; cursor: pointer; font-size: 1rem; }
.b-price { width: 6em; }
.slot-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 72px), 1fr)); gap: 6px; margin: 8px 0; }
.slot-btn { border: 1px solid #94a3b8; background: #fff; border-radius: 8px; padding: 8px 4px; cursor: pointer; font-weight: 700; }
.slot-btn.on { background: #0f766e; color: #fff; border-color: #0f766e; }
.slot-btn[disabled] { background: #f1f5f9; color: #94a3b8; text-decoration: line-through; cursor: not-allowed; }
@media print { .board-toolbar, .board-walkin, .board-settings { display: none; } }

/* balance card (what the seller / provider owes the site, and his fee rate) */
.balance-card { margin: 12px 0; padding: 16px; border-radius: 14px; border: 1px solid var(--line, #d8e4e0); background: linear-gradient(135deg, #f1faf7, #ffffff); box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
.balance-card.has-debt { border-color: #f0c36d; background: linear-gradient(135deg, #fff8e6, #ffffff); }
.balance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.balance-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.balance-tile span { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.balance-tile strong { font-size: 1.6rem; line-height: 1.2; overflow-wrap: anywhere; }
.balance-main strong { font-size: 2rem; }
.has-debt .balance-main strong { color: #b45309; }
.balance-tile small { color: #64748b; overflow-wrap: anywhere; }
.balance-card .progress { margin-top: 12px; }
.balance-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
@media (max-width: 520px) { .balance-main strong { font-size: 1.7rem; } }

/* credit page */
.wallet-hero { text-align: center; padding: 22px 16px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #0f766e, #115e59 60%, #134e4a); box-shadow: 0 6px 20px rgba(15, 118, 110, .25); }
.wallet-who { margin: 0; font-size: .85rem; opacity: .85; overflow-wrap: anywhere; }
.wallet-label { margin: 10px 0 0; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; opacity: .85; }
.wallet-hero .wallet-amount { font-size: 2.6rem; margin: 2px 0 6px; overflow-wrap: anywhere; }
.wallet-how { margin: 0 auto; max-width: 46ch; font-size: .88rem; opacity: .9; }
.wallet-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px; margin-top: 16px; text-align: start; }
.wallet-tile { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wallet-tile span { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.wallet-tile strong { font-size: 1.35rem; overflow-wrap: anywhere; }
.wallet-tile small { opacity: .85; overflow-wrap: anywhere; }
.wallet-tile.has-debt { background: #fef3c7; color: #78350f; }

/* ---------- Mobile polish (v49) ---------- */
@media (max-width: 900px) {
  .account-layout { grid-template-columns: minmax(0, 1fr); }
  .account-main { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 700px) {
  html, body { overflow-x: hidden; }
  .orders-table:has(td[data-label]) { min-width: 0; display: block; width: 100%; }
  .orders-table:has(td[data-label]) thead { display: none; }
  .orders-table:has(td[data-label]) tbody { display: block; }
  .orders-table:has(td[data-label]) tr { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: var(--white); }
  .orders-table:has(td[data-label]) td { display: block; border: 0; padding: 5px 0; overflow-wrap: anywhere; }
  .orders-table:has(td[data-label]) td::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .board-toolbar { gap: 6px; }
  .board-toolbar .button, .board-toolbar button { flex: 1 1 auto; }
  .board-toolbar input[type=date] { flex: 1 1 140px; min-width: 0; }
  form .button, form button[type=submit] { margin-top: 10px; }
  .inbox-drawer { max-width: 100vw; box-sizing: border-box; }
  .balance-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .admin-stats > * { padding: 12px; min-width: 0; }
  .admin-stats strong { font-size: 1.15rem; overflow-wrap: anywhere; }
  .wallet-hero { padding: 18px 14px; }
}
@media (prefers-color-scheme: dark) {
  .wallet-tile.has-debt { background: #4a3a0a; color: #fde68a; }
}
.order-actions { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.order-actions > * { max-width: 100%; }
@media (max-width: 700px) {
  .board-toolbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
  .board-toolbar .small-button, .board-toolbar input[type=date] { width: 100%; margin: 0; box-sizing: border-box; }
  #b-today, #b-print { grid-column: span 1; }
  #b-today { grid-column: 1 / 3; }
  #b-print { grid-column: 3 / 4; padding-left: 0; padding-right: 0; }
  .board-summary { grid-column: 1 / -1; text-align: center; }
}
@media (max-width: 700px) {
  .table-wrap:has(.orders-table td[data-label]) { border: 0; box-shadow: none; background: transparent; padding: 0; overflow: visible; }
  .orders-table:has(td[data-label]) tr, .orders-table:has(td[data-label]) td { background: var(--white) !important; }
  .orders-table:has(td[data-label]) td:empty { display: none; }
}

/* ---------- erase data ---------- */
.button-danger { background: var(--danger); color: #fff; border: 0; }
.button-danger:hover { background: #991b1b; }
.wipe-zone { margin-top: 24px; border: 1px solid #fecaca; }
.erase-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 14px 0; }
.erase-row .limit-field { flex: 1 1 260px; }
.erase-row p { flex: 1 1 260px; margin: 0; }
@media (max-width: 700px) { .erase-row .button { width: 100%; } }
.push-bar { margin-bottom: 18px; }
.account-main > .push-bar { max-width: 100%; }

/* ---------- Account sidebar: one calm, consistent set of actions ---------- */
.account-sidebar { gap: 8px; padding: 28px 20px 22px; }
.account-sidebar .avatar { box-shadow: 0 6px 16px rgba(16, 36, 62, .15); }
.account-sidebar h2 { margin-top: 8px; }
.account-sidebar .member-badge { margin-bottom: 8px; }
.account-sidebar > .button,
.account-sidebar > button.button {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}
.account-sidebar > .button-teal { background: var(--teal); color: #06262a; border: 1px solid transparent; }
.account-sidebar > .button-secondary { background: var(--white); color: var(--navy); border: 1px solid var(--border); }
.account-sidebar > .button-secondary:hover { background: var(--light); }
/* "Work with us" is an invitation, not the main action: outlined */
.account-sidebar > #join-btn { background: var(--white); color: #0f766e; border: 1.5px solid var(--teal); }
.account-sidebar > #join-btn:hover { background: var(--soft-teal); }
/* log out: quiet, separated from the rest */
.account-sidebar > #logout-btn { margin-top: 10px; background: transparent; color: var(--danger); border: 1px solid #fecaca; }
.account-sidebar > #logout-btn:hover { background: #fef2f2; }
.account-sidebar > .account-nav + .button { margin-top: 4px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .account-sidebar > #logout-btn:hover { background: rgba(185, 28, 28, .15); }
}

/* join: one separate card for each kind of account */
.join-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; margin-top: 12px; }
.join-card { display: grid; gap: 4px; padding: 16px; border-radius: 14px; text-decoration: none; color: inherit; border: 1px solid rgba(128,128,128,.3); border-top: 5px solid #0f8a82; background: rgba(128,128,128,.06); transition: transform .12s; }
.join-card:hover { transform: translateY(-2px); }
.join-card span { font-size: 1.6rem; }
.join-card small { opacity: .8; }
.join-card.on { outline: 2px solid #0f8a82; background: rgba(15,138,130,.12); }

.balance-more { margin-top: 8px; }
.balance-more summary { cursor: pointer; font-size: .85rem; opacity: .7; }
.balance-more[open] summary { margin-bottom: 8px; }

.style-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; margin-top: 12px; }
.style-card { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid rgba(128,128,128,.3); border-radius: 12px; }
.style-card > div:nth-child(2) { flex: 1; display: grid; }
.style-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 10px; margin: 8px 0 12px; }
.style-opt { display: grid; gap: 4px; padding: 8px; text-align: center; border: 2px solid rgba(128,128,128,.3); border-radius: 12px; background: none; color: inherit; cursor: pointer; font: inherit; }
.style-opt img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.style-opt.on { border-color: #0f8a82; background: rgba(15,138,130,.12); }

/* editable tables (plans, limits, fees, percentages): tidy columns, same alignment in header and cells, compact fields */
.form-table { table-layout: auto; }
.form-table thead th { white-space: nowrap; }
.form-table th, .form-table td { vertical-align: middle; padding: 10px 14px; }
.form-table th.num, .form-table td.num { text-align: center; }
.form-table input:not([type=checkbox]):not([type=radio]), .form-table select { box-sizing: border-box; width: 100%; min-width: 0; height: 38px; padding: 0 10px; font-size: .92rem; border-radius: 8px; }
.form-table input[type=number]:not([type=radio]):not([type=checkbox]) { display: block; width: 120px; margin: 0 auto; text-align: center; }
.form-table td:last-child { white-space: nowrap; text-align: end; }
.form-table td:last-child .small-button { margin-inline-start: 4px; }
.form-table input.share-input:not([type=radio]):not([type=checkbox]) { display: inline-block; width: 84px; }
.plans-table th:nth-child(1), .plans-table td:nth-child(1) { width: 24%; }
.plans-table th:nth-child(2), .plans-table td:nth-child(2) { width: 18%; }
.plans-table th:nth-child(3), .plans-table td:nth-child(3) { width: 16%; }
.plans-table th:nth-child(4), .plans-table td:nth-child(4) { width: 30%; }
.plans-table th:nth-child(5), .plans-table td:nth-child(5) { width: 12%; }
.limits-table input[type=number]:not([type=radio]):not([type=checkbox]) { width: 170px; margin: 0; text-align: start; }
.limits-table td:nth-child(1) { font-weight: 600; }
.subs-table select { min-width: 220px; }
.subs-table input[type=number]:not([type=radio]):not([type=checkbox]) { width: 80px; }
.chain-table td:last-child { white-space: normal; }
.limits-table td:last-child { text-align: start; white-space: normal; }

/* ---------- Phones: nothing may be wider than the screen ----------
   A grid or flex item grows to its widest content (a long e-mail, a drop-down with a long option, a wide table) unless told it may shrink;
   then the card is wider than the phone and the right side is cut off. These rules apply to every page. */
main, main > *, .panel, .admin-panel, .wallet-hero, .account-main > * { min-width: 0; max-width: 100%; }
.wallet-main { grid-template-columns: minmax(0, 1fr); }
.wallet-form, .wallet-list, .wallet-tiles { grid-template-columns: minmax(0, 1fr); }
.wallet-form > *, .wallet-list > *, #w-app > *, #w-app section { min-width: 0; max-width: 100%; }
.wallet-hero, .wallet-list > *, .panel p, .admin-panel p, .panel h2, .admin-panel h2, .panel li, .admin-panel li, .muted, label { overflow-wrap: anywhere; }
input, select, textarea, button { max-width: 100%; }
select { text-overflow: ellipsis; }
img, video, canvas, svg { max-width: 100%; }
table { max-width: 100%; }
@media (max-width: 700px) {
  .table-wrap, .appt-section .table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .wallet-list > *, .wallet-form > * { white-space: normal; }
  .grid, .admin-grid, .stat-grid, .stats-grid, .tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
}
#w-app { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }

/* ---------- Side menu: main links and secondary sections look different ---------- */
.side-main { margin-top: 6px; gap: 2px; }
.side-main .side-item { padding: 8px 10px; font-size: 14.5px; font-weight: 700; color: #f2f7fb; border-radius: 12px; border: 0; border-inline-start: 3px solid transparent; }
.side-main .side-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.09); font-size: 17px; }
.side-main .side-item:hover { background: rgba(255,255,255,.07); }
.side-main .side-item.active { background: linear-gradient(90deg, rgba(34,184,167,.30), rgba(34,184,167,.06)); color: #8ff5e8; border-inline-start-color: #22b8a7; }
.side-main .side-item.active .side-icon { background: #22b8a7; }
.side-main .side-logout { margin-top: 8px; color: #ffc9c9; font-weight: 600; }
.side-main .side-logout .side-icon { background: rgba(255,90,90,.16); }
.side-main .side-logout:hover { background: rgba(255,90,90,.14); color: #fff; }

.side-sub { margin-top: 14px; padding: 4px 6px 8px; border-radius: 14px; background: rgba(0,0,0,.24); border: 1px solid rgba(255,255,255,.07); gap: 0; }
.side-sub .side-title { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; color: #8fb0cc; padding: 10px 8px 8px; text-align: start; }
.side-sub .side-title:hover { color: #c4d9ec; }
.side-chevron { transition: transform .15s; font-size: 12px; }
.side-sub.collapsed .side-chevron { transform: rotate(-90deg); }
[dir="rtl"] .side-sub.collapsed .side-chevron { transform: rotate(90deg); }
.side-sub.collapsed .side-items { display: none; }
.side-sub.collapsed .side-title { padding-bottom: 10px; }
.side-items { display: flex; flex-direction: column; gap: 1px; margin-inline-start: 10px; padding-inline-start: 6px; border-inline-start: 1px solid rgba(255,255,255,.14); }
.side-sub .side-item { padding: 6px 10px; gap: 10px; font-size: 13px; font-weight: 500; color: #c3d4e4; border-radius: 8px; border-color: transparent; }
.side-sub .side-icon { width: 20px; font-size: 14px; opacity: .9; }
.side-sub .side-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-sub .side-item.active { background: rgba(34,184,167,.16); color: #7ff0e0; border-color: transparent; font-weight: 700; }
.status-pill.fee-stopped{background:#fde8e8;color:#9b1c1c;border-color:#f3b4b4}
.acct-actions { white-space: nowrap; } .acct-actions .small-button + .small-button { margin-inline-start: 6px; }

/* the "You owe the site" part of the credit window */
.wallet-more { margin-top: 10px; text-align: start; }
.wallet-more summary { cursor: pointer; font-size: .85rem; opacity: .85; }
.wallet-more[open] summary { margin-bottom: 8px; }
.wallet-more .wallet-tiles { margin-top: 0; }
.wallet-debt-extra { margin-top: 12px; display: grid; gap: 8px; text-align: start; }
.wallet-debt-extra small { opacity: .9; overflow-wrap: anywhere; }
.wallet-progress { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.wallet-progress > div { height: 100%; background: #fcd34d; width: 0; }
.wallet-actions { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wallet-hero .small-button { background: #fff; color: #0f766e; border-color: #fff; }
#site-pay .pay-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .2); }
#site-pay .small-note { margin: 6px 0 0; opacity: .9; }
.balance-link { margin: 8px 0; }
.wallet-statement { margin-top: 8px; background: #fff; color: #10243e; border-radius: 12px; padding: 6px; overflow-x: auto; }
.wallet-statement table { width: 100%; font-size: .85rem; }
#w-courier-totals { margin: 4px 0 0; font-size: .9rem; opacity: .9; }

/* payment ways, shown before the customer orders */
.pay-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pay-chip { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.pay-chip.on { background: #dff5ea; color: #0b6b3a; border: 1px solid #a8dcc0; }
.pay-chip.off { background: #eceff3; color: #7b8794; border: 1px dashed #c3cbd5; text-decoration: line-through; }
.wallet-pay { margin-top: 12px; text-align: start; display: grid; gap: 4px; }
.wallet-pay-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.wallet-pay .pay-chip.on { background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .4); }
.wallet-pay .pay-chip.off { background: rgba(0, 0, 0, .28); color: #b8c4cf; border-color: rgba(255, 255, 255, .25); }
.wallet-pay-off { background: rgba(0, 0, 0, .22); border-radius: 8px; padding: 6px 10px; color: #d6dee6; }

/* opening hours: a tidy table (day, open, from, to) for doctors, agencies, taxis, barbers */
.hours-wrap { margin: 8px 0 14px; }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td { padding: 8px 12px; vertical-align: middle; text-align: start; }
.hours-table th.num, .hours-table td.hours-on { text-align: center; width: 70px; }
.hours-table tbody tr:nth-child(even) { background: #f6f9fc; }
.hours-table .hours-day { font-weight: 700; white-space: nowrap; }
.hours-table .hours-day label { margin: 0; font-weight: 700; }
.hours-table input[type=checkbox] { width: 20px; height: 20px; margin: 0; }
.hours-table input[type=time] { width: 9.5em !important; max-width: 100%; padding: 8px 10px; }
.hours-table tr.is-closed { background: #eef0f3 !important; }
.hours-table tr.is-closed .hours-day { color: #8a95a3; font-weight: 600; }
.hours-table tr.is-closed input[type=time] { opacity: .45; }
.hours-table .hours-break { border-top: 2px solid #d7e0ea; }
@media (max-width: 520px) {
  .hours-table { table-layout: fixed; min-width: 0 !important; }
  .hours-table th, .hours-table td { padding: 6px 4px; font-size: 13px; }
  .hours-table th:first-child, .hours-table td:first-child { width: 29%; padding-inline-start: 10px; white-space: normal; }
  .hours-table th.num, .hours-table td.hours-on { width: 13%; }
  .hours-table input[type=time] { width: 100% !important; min-width: 0; padding: 6px 2px; font-size: 13px; text-align: center; }
  .hours-table input[type=time]::-webkit-calendar-picker-indicator { display: none; }
}

/* ---------- Side menu: clear steps (main menu > its pages), a way to close and a way back ---------- */
.side-close { display: none; position: absolute; inset-block-start: 12px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 16px; cursor: pointer; }
.side-close:hover { background: rgba(255,255,255,.18); }
.side-main-title { font-size: 11px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; color: #8fb0cc; padding: 6px 10px 2px; }
.side-go { margin-inline-start: auto; color: #8fb0cc; font-size: 20px; line-height: 1; opacity: .8; }
[dir="rtl"] .side-go { transform: scaleX(-1); }
.side-item:hover .side-go { color: #fff; opacity: 1; }
.side-parent { display: flex; flex-direction: column; }
.side-parent > .side-item { padding-inline-end: 6px; }
.side-toggle-sub { margin-inline-start: auto; width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #cfe3f3; cursor: pointer; font-size: 14px; display: grid; place-items: center; flex: none; }
.side-toggle-sub:hover { background: rgba(255,255,255,.18); color: #fff; }
.side-toggle-sub span { transition: transform .15s; }
.side-parent:not(.open) .side-toggle-sub span { transform: rotate(-90deg); }
[dir="rtl"] .side-parent:not(.open) .side-toggle-sub span { transform: rotate(90deg); }
.side-subs { display: none; flex-direction: column; gap: 1px; margin: 2px 0 6px; margin-inline-start: 26px; padding-inline-start: 8px; border-inline-start: 2px solid rgba(34,184,167,.45); }
.side-parent.open .side-subs { display: flex; }
.side-subitem { padding: 6px 10px !important; font-size: 13px !important; font-weight: 500 !important; color: #c3d4e4 !important; border-radius: 8px !important; border: 0 !important; }
.side-subitem .side-icon { width: 20px !important; height: auto !important; background: none !important; font-size: 14px !important; }
.side-subitem.active { background: rgba(34,184,167,.18) !important; color: #7ff0e0 !important; font-weight: 700 !important; }
.side-back { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.05); color: #eaf2f9; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.side-back:hover { background: rgba(255,255,255,.14); color: #fff; }
.side-back span:first-child { font-size: 18px; }
[dir="rtl"] .side-back span:first-child { transform: scaleX(-1); }
@media (max-width: 900px) { body.has-side .side-close { display: block; } }

/* who brought the partners */
.brought-table th.num, .brought-table td.num { text-align: center; }
.brought-table .brought-dean { background: #eaf3fb; }
.brought-table .brought-dean td:first-child { border-inline-start: 4px solid #1d5f8a; }
.brought-table .brought-sup td:first-child { padding-inline-start: 28px; border-inline-start: 4px solid #cfe0ee; }
.brought-table .brought-group td { background: #f1f3f6; font-weight: 700; color: #51606f; text-transform: uppercase; font-size: .75rem; letter-spacing: .05em; }
.brought-table .brought-alone td { color: #51606f; border-top: 2px solid #d7e0ea; }

/* ---------- Statistics of a dean / supervisor (his own group only) ---------- */
.scoped-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 8px 4px 0; max-width: 520px; }
.scoped-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.scoped-bar i { display: block; width: 100%; max-width: 44px; min-height: 3px; border-radius: 6px 6px 0 0; background: var(--brand, #14a99a); }
.scoped-bar-n { font-size: 12px; font-weight: 700; }
.scoped-bar small { color: var(--muted, #667085); font-size: 11px; }
.scoped-table td:first-child { word-break: break-word; }


/* ---------- The side rail of the store: games always on show + announcements ---------- */
.fun-rail { display: grid; gap: 14px; max-width: 900px; margin: 16px auto; padding: 0 16px; }
.rail-card { box-sizing: border-box; width: 100%; min-width: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 14px; background: #12294a; color: #eaf2fb; display: grid; gap: 10px; justify-items: center; box-shadow: 0 6px 18px rgba(8,20,40,.22); }
.rail-card .muted { color: #9fb4cc; }
.rail-card .g-info, .rail-card .game-hud { color: #eaf2fb; }
.rail-card * { max-width: 100%; }
.rail-card[hidden] { display: none; }
.rail-title { margin: 0; font-size: 1.05rem; }
.rail-sub { margin: -6px 0 0; font-size: 12px; }
.fun-rail .g-board { box-sizing: border-box; width: 100%; max-width: 100%; }
.fun-rail .g-blocks { width: 70%; }
.fun-rail .game-tab { padding: 6px 10px; font-size: 13px; }
#rail-ads-list { display: grid; gap: 10px; width: 100%; }
.rail-ad { display: grid; gap: 4px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06); color: inherit; text-decoration: none; border: 1px solid rgba(255,255,255,.1); }
a.rail-ad:hover { border-color: var(--teal, #22b8a7); }
.rail-ad img { width: 100%; max-height: 150px; object-fit: cover; border-radius: 8px; }
.rail-ad span { font-size: 13px; opacity: .85; }
.ad-row { border: 1px solid rgba(128,128,128,.3); border-radius: 12px; padding: 10px; margin: 0 0 10px; display: grid; gap: 8px; }
.ad-row input { width: 100%; }
@media (min-width: 1280px) {
  /* a full-height bar on the right, the same width as the menu on the left */
  body.has-rail { padding-inline-end: 252px; }
  .fun-rail { position: fixed; inset-block: 0; inset-inline-end: 0; width: 252px; max-width: none; margin: 0; padding: 14px 12px 18px; box-sizing: border-box; overflow-y: auto; z-index: 900; gap: 12px; align-content: start;
    background: linear-gradient(180deg, #0f2036, #112a46); border-inline-start: 1px solid rgba(255,255,255,.08); scrollbar-width: thin; }
  .fun-rail .rail-card { background: rgba(255,255,255,.05); box-shadow: none; padding: 12px 10px; }
  .fun-rail .rail-card .muted { font-size: 12px; }
  .fun-rail .game-tab { padding: 5px 8px; font-size: 12px; }
  .fun-rail .game-hud { gap: 6px; font-size: 13px; }
  .fun-rail #game-help { font-size: 12px; line-height: 1.4; margin: 0; }
  .fun-rail .g-info { font-size: 13px; }
}
@media print { .fun-rail { display: none !important; } body.has-rail { padding-inline-end: 0 !important; } }
.fun-rail .g-gem { font-size: 1.1rem; }
.fun-rail .g-card, .fun-rail .g-tile { font-size: 1.2rem; }
.fun-rail .g-gem, .fun-rail .g-card, .fun-rail .g-tile, .fun-rail .g-cell { min-width: 0; overflow: hidden; }

/* who is signed in, at the top of the side menu */
.side-user { display: flex; align-items: center; gap: 10px; margin: 2px 4px 6px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.side-user:hover { background: rgba(255,255,255,.12); }
.side-user-pic { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--teal, #22b8a7); color: #0f2036; display: grid; place-items: center; font-weight: 800; font-size: 17px; overflow: hidden; }
.side-user-pic img { width: 100%; height: 100%; object-fit: cover; }
.side-user-text { min-width: 0; display: grid; }
.side-user-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-text small { font-size: 11px; color: #9fc3dd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the mark of a dean / supervisor, and the congratulation window */
.header-avatar-link { position: relative; }
.header-avatar-link[data-badge]::after { content: attr(data-badge); position: absolute; inset-block-end: -4px; inset-inline-end: -6px; font-size: 14px; line-height: 1; background: #ffd75e; border-radius: 50%; padding: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.side-user-badge { flex: none; margin-inline-start: auto; font-size: 18px; background: #ffd75e; border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.promo-pop { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; background: rgba(8,20,40,.55); animation: promo-in .35s ease; cursor: pointer; padding: 16px; }
.promo-pop.promo-out { opacity: 0; transition: opacity .4s; }
.promo-card { width: min(92vw, 380px); text-align: center; background: linear-gradient(160deg, #12325a, #0f2036); color: #fff; border-radius: 22px; padding: 26px 22px 20px; border: 2px solid #ffd75e; box-shadow: 0 18px 50px rgba(0,0,0,.45); display: grid; gap: 8px; }
.promo-icon { font-size: 2.4rem; letter-spacing: 6px; }
.promo-card h2 { margin: 0; font-size: 1.6rem; color: #ffd75e; }
.promo-card p { margin: 0; font-size: 1.1rem; }
.promo-card small { color: #b9d0e6; }
.promo-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; margin-top: 8px; }
.promo-bar i { display: block; height: 100%; width: 100%; background: #ffd75e; transform-origin: left; animation: promo-bar 9s linear forwards; }
[dir="rtl"] .promo-bar i { transform-origin: right; }
@keyframes promo-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes promo-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ===== "Join now": a real button on the home page (hero) and a floating one for phones ===== */
.hero-join { margin: 18px 0 0; }
.join-now { display: inline-flex; align-items: center; gap: 12px; background: var(--amber, #f5a524); color: #10243e; font-weight: 800; font-size: 18px; padding: 14px 26px; border-radius: 40px; box-shadow: 0 10px 26px rgba(0,0,0,.35); text-decoration: none; }
.join-now small { font-weight: 600; font-size: 12px; opacity: .8; }
.join-now:hover { background: #ffb940; color: #10243e; transform: translateY(-1px); }
.join-fab { position: fixed; z-index: 40; inset-inline-start: 16px; bottom: 16px; background: var(--amber, #f5a524); color: #10243e; font-weight: 800; padding: 12px 22px; border-radius: 40px; box-shadow: 0 10px 26px rgba(0,0,0,.4); text-decoration: none; }
@media (min-width: 900px) { .join-fab { display: none; } }

/* "Buy now" next to "Add to cart" */
.buy-now { background: var(--amber, #f5a524); color: #10243e; font-weight: 800; }
.buy-now:hover:not(:disabled) { background: #ffb940; color: #10243e; }
.product-card.product-highlight .buy-now { box-shadow: 0 0 0 4px rgba(245,165,36,.35); }

/* ===== spreadsheet-style tables (tables.js) ===== */
:root { --xl-line: #cdd7de; --xl-head: #e8eff4; --xl-zebra: #f7fafc; }
.xl-box { margin: 6px 0; }
.xl-bar { display: flex; align-items: center; gap: 4px; margin: 0 0 4px; font-size: 12px; justify-content: flex-end; }
.xl-bar[hidden] { display: none; }
.xl-btn { min-width: 28px; height: 26px; padding: 0 8px; border: 1px solid var(--xl-line); border-radius: 6px; background: #fff; color: #27506a; font-size: 14px; line-height: 1; cursor: pointer; }
.xl-btn:hover { background: var(--xl-head); }
.xl-pct { min-width: 40px; text-align: center; color: #5b6f7c; font-variant-numeric: tabular-nums; }
.xl-scroll { max-height: 72vh; overflow: auto; border: 1px solid var(--xl-line); border-radius: 6px; background: #fff; }
table.xl-table { border-collapse: collapse; width: 100%; font-size: calc(12.5px * var(--xl-z, 1)); line-height: 1.3; font-variant-numeric: tabular-nums; }
table.xl-table th, table.xl-table td { padding: .28em .6em !important; border: 1px solid var(--xl-line) !important; vertical-align: middle; }
table.xl-table thead th, table.xl-table tr:first-child > th { background: var(--xl-head); color: #27506a; font-size: .92em; font-weight: 700; text-transform: none; letter-spacing: 0; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
table.xl-table tbody tr:nth-child(even):not([class]) td { background: var(--xl-zebra); }
table.xl-table tbody tr:not(.seller-head):not(.seller-sum):hover td { background: #e9f3f9; }
table.xl-table td.num, table.xl-table th.num { text-align: end; white-space: nowrap; }
table.xl-table input, table.xl-table select { font-size: inherit; padding: .15em .35em; max-width: 100%; }
table.xl-table button { font-size: .95em; padding: .2em .55em; }
table.xl-table img, table.xl-table .item-thumb { max-height: 2.4em; }
.xl-box.xl-full { position: fixed; inset: 0; z-index: 3000; background: #fff; padding: 10px; display: flex; flex-direction: column; margin: 0; }
.xl-box.xl-full .xl-bar { display: flex; }
.xl-box.xl-full .xl-scroll { max-height: none; flex: 1; }
html.xl-lock { overflow: hidden; }
@media print { .xl-bar { display: none !important; } .xl-scroll { max-height: none; overflow: visible; } }

/* ===== advertising card panel (adcard.js) ===== */
.adcard-grid { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 20px; align-items: start; }
.adcard-canvas { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 8px 26px rgba(10, 40, 60, .18); background: #fff; }
.adcard-actions { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; max-width: 320px; }
.adcard-link { word-break: break-all; font-size: 12px; }
@media (max-width: 720px) { .adcard-grid { grid-template-columns: 1fr; } .adcard-canvas { max-width: 360px; margin: 0 auto; } }

/* ===== craftsmen directory (trades.html) ===== */
.trades-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 10px 0 4px; }
.trades-filters select, .trades-filters input { width: 100%; }
.trades-list { display: block; width: 100%; margin-top: 10px; }
.trade-card { border: 1px solid #d9e3ea; border-radius: 14px; background: #fff; padding: 14px 16px; box-shadow: 0 2px 8px rgba(10, 40, 60, .06); }
.trade-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.trade-badge { background: #e6f4f1; color: #0b5d57; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.trade-place { margin: 8px 0 4px; font-size: 13px; color: #37556a; }
.trade-about { margin: 4px 0 8px; font-size: 12.5px; }
.trade-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.trade-actions .button { padding: 8px 14px; font-size: 14px; }

.trades-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.icon-button { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #cfdbe3; background: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.icon-button:hover { background: #eef6f8; }
.trades-table td a { text-decoration: none; }

.trades-main { max-width: 1500px; }
.trades-table { width: 100%; }
.trades-table th, .trades-table td { white-space: nowrap; }
.trades-table td[data-label="About"] { white-space: normal; min-width: 180px; }

.thread-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.thread-tab.active { background: var(--navy, #10243e); color: #fff; }
.thread-all.danger { color: #b3261e; border-color: #e3b4b0; }
.thread-item { display: flex; gap: 6px; align-items: stretch; }
.thread-item .thread-row { flex: 1; min-width: 0; }
.thread-item .thread-arch { flex: none; }

.ios-steps { text-align: start; padding-inline-start: 22px; line-height: 1.6; margin: 10px 0 16px; }

/* ===== compact, elegant stat tiles (owner / supervisor / dean / wallet pages) ===== */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr)); gap: 10px; margin: 4px 0 14px; }
.stat-tile, .admin-stat {
  --tc: #1fb5a3;
  position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 9px; row-gap: 1px; align-items: center; min-width: 0;
  padding: 9px 12px; border-radius: 999px 18px 18px 999px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tc) 22%, #fff);
  background: color-mix(in srgb, var(--tc) 9%, #fff);
  box-shadow: none; transition: background .15s ease, border-color .15s ease;
}
[dir="rtl"] .stat-tile, [dir="rtl"] .admin-stat { border-radius: 18px 999px 999px 18px; }
.stat-tile::before, .admin-stat::before { content: ""; grid-row: 1 / span 3; width: 10px; height: 10px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 22%, transparent); }
.stat-tile::after, .admin-stat::after { content: none; }
.stat-tile:hover, .admin-stat:hover { background: color-mix(in srgb, var(--tc) 15%, #fff); border-color: color-mix(in srgb, var(--tc) 40%, #fff); }
.stat-tile:nth-child(6n+2), .admin-stat:nth-child(6n+2) { --tc: #3b82f6; }
.stat-tile:nth-child(6n+3), .admin-stat:nth-child(6n+3) { --tc: #f59e0b; }
.stat-tile:nth-child(6n+4), .admin-stat:nth-child(6n+4) { --tc: #8b5cf6; }
.stat-tile:nth-child(6n+5), .admin-stat:nth-child(6n+5) { --tc: #ef6b6b; }
.stat-tile:nth-child(6n+6), .admin-stat:nth-child(6n+6) { --tc: #22a06b; }
.stat-tile span, .admin-stat span { grid-column: 2; margin: 0; font-size: 11px; font-weight: 600; color: #5f7587; opacity: 1; line-height: 1.25; }
.stat-tile strong, .admin-stat strong { grid-column: 2; margin: 0; font-size: 1.1rem; font-weight: 800; line-height: 1.15; color: #10243e; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-tile small, .admin-stat small { grid-column: 2; font-size: 10.5px; color: #7b8e9d; line-height: 1.3; }
.admin-stats { gap: 10px; margin-bottom: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.admin-stat { padding: 10px 14px; }
.admin-stat strong { font-size: 1.2rem; }
#money-panel .stat-tile strong, #credit-panel .stat-tile strong, #growth-panel .stat-tile strong { font-size: 1.2rem; }
#money-panel .stat-tiles, #credit-panel .stat-tiles, #growth-panel .stat-tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
@media (max-width: 700px) { .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-stats > * { padding: 8px 12px; } .admin-stats strong { font-size: 1.1rem; } }
@media (prefers-reduced-motion: reduce) { .stat-tile, .admin-stat { transition: none; } }

/* craftsmen: verified badge and rating */
.verified-badge { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: #e3f6f1; color: #0d7a68; font-size: 11px; font-weight: 700; white-space: nowrap; }
.trades-table .stars { color: #e59a00; font-weight: 700; }
.trades-table .rate-art { margin-top: 4px; min-width: 84px; padding: 2px 4px; font-size: 12px; }
.sales-top { margin: 6px 0 14px; padding-inline-start: 20px; }
.stmt { margin: 10px 0 16px; padding: 10px 12px; border: 1px solid #e1e9f0; border-radius: 12px; }
.stmt header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- phones: label-cards inside the spreadsheet wrapper must not overflow onto the next panel ---------- */
@media (max-width: 700px) {
  .xl-box:has(td[data-label]) .xl-bar { display: none; }
  .xl-box:has(td[data-label]) { margin: 4px 0; }
  .xl-scroll:has(td[data-label]) { max-height: none !important; overflow: visible !important; border: 0; border-radius: 0; background: transparent; }
  table.xl-table:has(td[data-label]) { display: block; width: 100%; font-size: 14px; }
  table.xl-table:has(td[data-label]) tbody { display: block; }
  table.xl-table:has(td[data-label]) tr { display: block; margin-bottom: 10px; }
  table.xl-table:has(td[data-label]) th, table.xl-table:has(td[data-label]) td { display: block; border: 0 !important; padding: 5px 0 !important; text-align: start; white-space: normal; }
  table.xl-table:has(td[data-label]) td.num { text-align: start; }
  table.xl-table:has(td[data-label]) td input:not([type=checkbox]):not([type=radio]), table.xl-table:has(td[data-label]) td select, table.xl-table:has(td[data-label]) td textarea { width: 100%; max-width: 100%; box-sizing: border-box; font-size: 15px; padding: 8px 10px; }
  table.xl-table:has(td[data-label]) td button { font-size: 14px; padding: 8px 14px; }
}
@media (max-width: 700px) {
  .form-table:has(td[data-label]) th, .form-table:has(td[data-label]) td { width: auto !important; }
  .form-table:has(td[data-label]) td:last-child { text-align: start; white-space: normal; }
  .form-table:has(td[data-label]) td input[type=number]:not([type=radio]):not([type=checkbox]) { display: block; width: 100% !important; margin: 0; text-align: start; }
  .form-table:has(td[data-label]) td input.share-input:not([type=radio]):not([type=checkbox]) { display: block; width: 100% !important; }
}

/* monthly shares by group: the dean's line, his supervisors under it, then the total of the group */
.grp-table tr.grp-head td { font-weight: 700; background: #eaf4f1; }
.grp-table tr.grp-sub td:first-child { padding-inline-start: 1.6em !important; color: #3d566a; }
.grp-table tr.grp-sum td { background: #f3f7fa; border-top: 2px solid var(--xl-line, #cdd7de) !important; }

/* monthly shares drawn like the owner's diagram: owner on top, one card per group (dean, supervisors, collaborators, profits and split) */
.grp-owner { margin: 10px auto 12px; max-width: 320px; text-align: center; border: 2px solid #10243e; border-radius: 10px; padding: 8px 12px; background: #fff; }
.grp-owner small { display: block; color: #5f7587; font-size: 11px; font-weight: 600; }
.grp-owner strong { font-size: 1.15rem; }
.grp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.grp-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 2px solid #10243e; border-radius: 26px; background: #fff; }
.grp-tag { align-self: center; font-weight: 800; font-size: 13px; color: #10243e; }
.grp-dean { align-self: center; padding: 6px 18px; border: 2px solid #22a06b; border-radius: 14px; text-align: center; background: #effaf4; }
.grp-dean small, .grp-sups small, .grp-profit small { display: block; font-size: 11px; font-weight: 600; color: #5f7587; }
.grp-dean strong { overflow-wrap: anywhere; }
.grp-sups { padding: 8px; border: 2px solid #3b82f6; border-radius: 14px; background: #f1f6ff; }
.grp-sups > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.grp-chip { display: inline-flex; flex-direction: column; padding: 3px 10px; border-radius: 10px; background: #fff; border: 1px solid #b9d0f8; min-width: 0; }
.grp-chip b { font-size: 12px; overflow-wrap: anywhere; }
.grp-chip small { font-size: 11px; color: #3b6fd6; }
.grp-collab { padding: 5px 8px; text-align: center; border-top: 2px solid #10243e; border-bottom: 2px solid #10243e; font-size: 12px; }
.grp-profit { align-self: center; width: 150px; height: 150px; border: 3px solid #10243e; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px; box-sizing: border-box; }
.grp-profit strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.grp-split { display: flex; flex-direction: column; gap: 5px; }
.grp-split span { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 4px 10px; border-radius: 999px; font-size: 13px; border: 2px solid; }
.grp-split b { font-weight: 700; }
.grp-split .own { border-color: #e03b3b; color: #b72a2a; background: #fff4f4; }
.grp-split .dean { border-color: #22a06b; color: #167a50; background: #effaf4; }
.grp-split .sup { border-color: #3b82f6; color: #2559b8; background: #f1f6ff; }
.grp-detail summary { cursor: pointer; font-size: 12px; color: #27506a; padding: 4px 0; }

/* schedule board: small tiles, a click opens a pop-up window */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.board-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 58px; padding: 4px 3px; border: 1px solid #cbd5e1; border-radius: 10px; background: #f8fafc; cursor: pointer; font: inherit; color: #0f172a; line-height: 1.15; }
.board-tile b { font-size: .92rem; }
.board-tile .tile-name { font-size: .72rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #475569; }
.board-tile .board-source { font-size: .6rem; padding: 0 5px; }
.board-tile:hover, .board-tile:focus-visible { border-color: #0f766e; box-shadow: 0 0 0 2px rgba(15,118,110,.2); }
.board-tile.board-free { background: #f0fdf4; border-style: dashed; border-color: #86efac; }
.board-tile.board-pending { background: #fffbeb; border-color: #fcd34d; }
.board-tile.board-accepted { background: #dbeafe; border-color: #93c5fd; }
.board-tile.board-done { background: #e2e8f0; border-color: #cbd5e1; color: #64748b; }
.appt-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.appt-modal[hidden] { display: none; }
.appt-modal-card { position: relative; background: #fff; border-radius: 16px; padding: 20px 18px 18px; width: min(100%, 460px); max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.appt-modal-x { position: absolute; inset-block-start: 8px; inset-inline-end: 10px; border: 0; background: transparent; font-size: 1.6rem; line-height: 1; cursor: pointer; color: #475569; }
.appt-modal-card .board-walkin { margin-top: 0; padding-top: 0; border-top: 0; }
.appt-modal-card .form-two-columns { grid-template-columns: 1fr; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
body.modal-open { overflow: hidden; }
@media print { .appt-modal, #b-add { display: none; } }

/* prescription: stamp, signature, QR */
.rx-seal { margin: 12px 0; padding: 10px 12px; border: 1px dashed #94a3b8; border-radius: 12px; }
.rx-seal-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.rx-prev { min-height: 64px; display: flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; margin: 4px 0 6px; padding: 4px; }
.rx-prev img { max-height: 80px; max-width: 100%; mix-blend-mode: multiply; }
.rx-pad { width: 100%; max-width: 360px; height: auto; aspect-ratio: 360 / 140; border: 1px solid #94a3b8; border-radius: 8px; background: #fff; touch-action: none; }
#vf-state.success { color: #166534; font-weight: 700; }
#vf-state.error { color: #b91c1c; font-weight: 700; }

/* owner records panel: small tiles, each opens a window */
.rc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.rc-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px 6px; border: 1px solid #cbd5e1; border-radius: 14px; background: #f8fafc; cursor: pointer; font: inherit; color: #0f172a; text-align: center; }
.rc-tile:hover, .rc-tile:focus-visible { border-color: #0f766e; background: #f0fdfa; }
.rc-tile-icon { font-size: 1.6rem; line-height: 1; }
.rc-tile-title { font-size: .82rem; font-weight: 700; line-height: 1.2; }
.rc-modal .appt-modal-card { width: min(100%, 640px); }
.rc-modal .wallet-form { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* advertising card: hidden under a small QR code */
.adcard-toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 14px; background: #f8fafc; cursor: pointer; font: inherit; color: inherit; text-align: start; }
.adcard-toggle:hover, .adcard-toggle:focus-visible { border-color: #0f766e; background: #f0fdfa; }
.adcard-toggle > span { display: flex; flex-direction: column; gap: 2px; }
.adcard-mini { width: 44px; height: 44px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; flex: 0 0 auto; }
.adcard-body { margin-top: 12px; }

/* the one search / filter bar, right under the store cover */
.search-band { max-width: 1200px; margin: 14px auto 40px; padding: 0 16px; position: relative; z-index: 2; }
.search-band .store-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff; border: 1px solid #dbe3ec; border-radius: 16px; padding: 10px; }
.search-band .store-toolbar input[type=search] { flex: 2 1 220px; min-width: 0; }
.search-band .store-toolbar select { flex: 1 1 150px; min-width: 0; }
.search-band .quick-clear-btn { flex: 0 0 auto; }

/* profit-sharing diagram */
.tree { display: flex; flex-direction: column; align-items: center; overflow-x: auto; padding: 8px 4px 14px; margin: 8px 0; }
.tree .trow { display: flex; gap: 14px; align-items: flex-start; }
.tree .tcol { display: flex; flex-direction: column; align-items: center; min-width: 150px; position: relative; padding-top: 14px; }
.tree .trow > .tcol::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 2px solid #94a3b8; }
.tree .trow > .tcol:first-child::before { left: 50%; } .tree .trow > .tcol:last-child::before { right: 50%; } .tree .trow > .tcol:only-child::before { display: none; }
.tree .trow > .tcol::after { content: ""; position: absolute; top: 0; height: 14px; left: 50%; border-left: 2px solid #94a3b8; }
.tree .tline { width: 2px; height: 14px; background: #94a3b8; }
.tree .tsubs { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.tnode { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 10px; border-radius: 12px; border: 1px solid #cbd5e1; background: #f8fafc; text-align: center; min-width: 130px; max-width: 190px; line-height: 1.2; }
.tnode small { font-size: .68rem; color: #64748b; font-weight: 700; text-transform: uppercase; }
.tnode b { font-size: .85rem; overflow-wrap: anywhere; }
.tnode span { font-weight: 800; }
.tnode em { font-style: normal; font-size: .68rem; color: #475569; }
.tnode.own { background: #0f766e; border-color: #0f766e; color: #fff; } .tnode.own small, .tnode.own em { color: #ccfbf1; }
.tnode.dean { background: #dbeafe; border-color: #93c5fd; }
.tnode.sup { background: #fef3c7; border-color: #fcd34d; }
.tnode.me { box-shadow: 0 0 0 3px rgba(15,118,110,.35); }
.tnode.empty { background: transparent; border-style: dashed; color: #94a3b8; }

.tree .ttop { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.tnode.eng { background: #ede9fe; border-color: #c4b5fd; }

/* Partner cover picture and faint background (v104) */
.dr-cover { margin: 0 0 14px; border-radius: 14px; overflow: hidden; background: rgba(128,128,128,.12); }
.dr-cover img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
.dr-backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .09; background-size: cover; background-position: center; background-repeat: no-repeat; }
.look-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.look-box { display: grid; gap: 8px; align-content: start; }
.look-cover, .look-back { display: grid; place-items: center; min-height: 110px; border: 1px dashed rgba(128,128,128,.5); border-radius: 12px; overflow: hidden; }
.look-cover img { width: 100%; max-height: 160px; object-fit: cover; }
.look-back img { width: 100%; max-height: 160px; object-fit: cover; opacity: .3; }
.look-pick { cursor: pointer; display: inline-block; }

/* Social-page style header (v106) */
.page-head { position: relative; margin: 0 0 18px; border-radius: 16px; overflow: hidden; background: var(--surface, #fff); border: 1px solid rgba(128,128,128,.25); }
.ph-cover { height: 190px; background: linear-gradient(135deg, rgba(19,165,139,.35), rgba(14,134,181,.35)); display: grid; place-items: center; color: rgba(0,0,0,.45); }
.ph-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-tools { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ph-btn { cursor: pointer; background: rgba(255,255,255,.92); color: #10202c; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.ph-row { display: flex; align-items: flex-end; gap: 14px; padding: 0 18px 14px; margin-top: -48px; position: relative; }
.ph-avatar { flex: none; width: 104px; height: 104px; border-radius: 50%; border: 4px solid var(--surface, #fff); background: #13a58b; color: #fff; font-size: 2.4rem; font-weight: 800; display: grid; place-items: center; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.ph-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ph-id { min-width: 0; padding-bottom: 4px; }
.ph-id h2 { margin: 0; font-size: 1.35rem; }
.ph-id p { margin: 2px 0 6px; }
.ph-photo { cursor: pointer; display: inline-block; }
.page-head .form-message { padding: 0 18px 10px; margin: 0; }
@media (max-width: 560px) { .ph-cover { height: 140px; } .ph-avatar { width: 84px; height: 84px; font-size: 2rem; } .ph-row { margin-top: -38px; } }

/* Profit-sharing scheme (v106) */
.scheme { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 14px 0 18px; }
.sc-owner { border: 2px solid currentColor; border-radius: 10px; padding: 8px 40px; font-weight: 800; background: rgba(15,118,110,.1); }
.sc-arrows { display: flex; gap: 140px; font-size: 1.6rem; line-height: 1; opacity: .7; }
.sc-groups { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; width: 100%; }
.sc-group { flex: 1 1 280px; max-width: 420px; display: grid; gap: 8px; justify-items: center; }
.sc-tag { font-weight: 800; }
.sc-circle { width: 100%; border: 2px solid currentColor; border-radius: 50% / 18%; padding: 14px 16px 16px; display: grid; gap: 8px; justify-items: center; background: rgba(128,128,128,.05); }
.sc-dean { border: 2px solid #25a35a; color: #166534; border-radius: 10px; padding: 4px 28px; font-weight: 800; background: #dcfce7; }
.sc-sups { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; border: 2px solid #1b9ad6; border-radius: 8px; padding: 6px 8px; font-size: .8rem; font-weight: 700; }
.sc-collab { width: 90%; text-align: center; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; padding: 4px 0; font-weight: 700; }
.sc-profit { width: 150px; height: 90px; border: 2px solid currentColor; border-radius: 50%; display: grid; place-content: center; text-align: center; }
.sc-profit small { font-size: .7rem; }
.sc-pcts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: .85rem; }
.sc-pcts span { border-radius: 999px; padding: 3px 10px; border: 2px solid; }
.sc-pcts .own { border-color: #dc2626; color: #b91c1c; } .sc-pcts .dean { border-color: #25a35a; color: #166534; } .sc-pcts .sup { border-color: #1b9ad6; color: #0e6a99; }
.sc-note { margin: 0; font-size: .85rem; }
@media (max-width: 560px) { .sc-arrows { gap: 80px; } }

.sc-top { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: stretch; }
.sc-eng { display: grid; gap: 1px; text-align: center; border: 2px dashed #7c3aed; border-radius: 10px; padding: 6px 14px; background: #ede9fe; color: #4c1d95; max-width: 260px; }
.sc-eng small { font-weight: 800; text-transform: uppercase; font-size: .68rem; } .sc-eng b { font-size: .85rem; } .sc-eng span { font-weight: 700; font-size: .85rem; }
.sc-eng i { font-style: normal; }
.sc-top .sc-owner { align-self: center; }

.sc-owner { display: grid; gap: 8px; justify-items: center; padding: 8px 14px; max-width: 320px; }
.sc-owner .sc-own-name { font-weight: 800; }
.sc-owner .sc-eng { border-radius: 8px; width: 100%; }
.tnode.tbox { max-width: 260px; } .tnode .tin { margin-top: 6px; padding: 5px 8px; border-radius: 8px; background: #ede9fe; color: #4c1d95; display: grid; gap: 1px; width: 100%; } .tnode .tin small, .tnode .tin em { color: #5b21b6; }

/* Board of jobs and announcements (v108) */
.board-main { max-width: 1180px; }
.board-main { position: relative; max-width: none; padding: 20px 20px 60px; }
.bd-backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: #f2f6f9 center / cover no-repeat; }
.bd-backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 500px at 12% 8%, color-mix(in srgb, var(--tint, #22b8a7) 16%, transparent), transparent 70%), radial-gradient(800px 500px at 92% 92%, color-mix(in srgb, var(--tint, #22b8a7) 12%, transparent), transparent 70%); }
.bd-backdrop.has-img::after { background: rgba(244,247,250,.78); }
.board-main > *:not(.bd-backdrop) { position: relative; z-index: 1; }
.bd-hero { position: relative; overflow: hidden; border-radius: 18px; min-height: 150px; padding: 22px 32px; margin-bottom: 16px; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; box-shadow: 0 10px 30px rgba(16,36,62,.22); }
.bd-hero-art { position: absolute; inset: 0; z-index: 0; }
.bd-hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,.05) 70%); }
.bd-art-icon { position: absolute; inset-inline-end: 6%; top: 8%; opacity: .22; filter: saturate(.8); transform: rotate(-8deg); }
.bd-art-icon.two { inset-inline-end: 24%; top: 42%; opacity: .16; transform: rotate(10deg); }
.bd-hero-text { position: relative; z-index: 1; max-width: 900px; }
.bd-hero-text h1 { color: #fff; margin: 2px 0 6px; font-size: clamp(1.5rem, 3vw, 2rem); }
.bd-hero-text p { color: rgba(255,255,255,.92); margin: 0; line-height: 1.55; font-size: .92rem; }
.bd-hero .eyebrow { color: #7ff0e2; }
.bd-post-btn { position: relative; z-index: 1; }
.bd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: stretch; direction: ltr; }
.bd-layout > * { direction: ltr; }
html[dir="rtl"] .bd-layout > * { direction: rtl; }
.bd-aside { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; box-shadow: 0 6px 20px rgba(16,36,62,.08); }
.bd-aside .bd-bar { position: sticky; top: 12px; }
.bd-aside .bd-tabs { flex-direction: column; gap: 4px; }
.bd-aside .bd-tab { display: flex; align-items: center; gap: 8px; border-radius: 10px; padding: 8px 12px; width: 100%; text-align: start; border-color: transparent; background: #f4f7f9; }
.bd-aside .bd-tab small { margin-inline-start: auto; font-weight: 700; }
.bd-aside .bd-tab:hover { background: var(--soft-teal); }
.bd-aside .bd-filters { flex-direction: column; }
.bd-aside .bd-filters select { flex: none; width: 100%; }
.bd-list { margin-top: 0; }
@media (max-width: 900px) { .bd-layout { grid-template-columns: 1fr; } .bd-aside { order: -1; } .bd-aside .bd-bar { position: static; } .bd-aside .bd-tabs { flex-direction: row; } .bd-aside .bd-tab { width: auto; } .bd-hero { padding: 24px 18px; min-height: 190px; } }
.bd-bar { display: grid; gap: 10px; }
.bd-bar input[type=search] { width: 100%; }
.bd-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-tab { font: inherit; font-size: .9rem; cursor: pointer; border: 1px solid var(--border); background: #fff; color: inherit; padding: 5px 12px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }
.bd-tab small { opacity: .65; }
.bd-tab[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.bd-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.bd-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-list { display: grid; gap: 12px; align-items: stretch; grid-auto-rows: 1fr; grid-template-columns: repeat(auto-fill, minmax(min(100%, 225px), 1fr)); margin: 14px 0; }
.bd-card { transition: transform .15s, box-shadow .15s; box-shadow: 0 2px 8px rgba(16,36,62,.06); background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--cc, var(--border)); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bd-main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bd-cat { font-size: .78rem; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bd-card h3 { margin: 2px 0; font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.bd-card h3 a { color: inherit; text-decoration: none; } .bd-card h3 a:hover { text-decoration: underline; }
.bd-inst { font-size: .85rem; color: var(--muted); }
.bd-sum { margin: 0; font-size: .88rem; line-height: 1.6; }
.bd-contact { margin: 0; font-size: .88rem; }
.bd-foot { margin-top: auto; padding-top: 6px; font-size: .8rem; color: var(--muted); }
.bd-side { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; border-top: 1px dashed var(--border); padding-top: 8px; font-size: .82rem; }
.bd-pill { border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: .78rem; background: #eceff1; color: #455a64; }
.bd-pill.bd-open { background: #e3f3e7; color: #1e7a3c; } .bd-pill.bd-soon { background: #fcefd9; color: #a35b00; } .bd-pill.bd-closed { background: #f6e5e5; color: #8a3b3b; }
.bd-date b { font-weight: 700; }
.bd-note { margin: 4px 0 18px; font-size: .85rem; }
.bd-mine-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bd-filters select { width: auto; flex: 1 1 180px; }
.bd-card h3, .bd-sum, .bd-inst { text-align: start; }
.bd-picked { outline: 3px solid var(--teal); outline-offset: 2px; }
.bd-share { font-size: .8rem; margin-inline-end: 8px; }
.board-teaser { margin: 18px auto; max-width: 1180px; padding: 0 16px; }
.bt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bt-head h2 { margin: 0; font-size: 1.25rem; }
.bt-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin-top: 10px; }
.bt-card { display: grid; gap: 4px; background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--cc, var(--border)); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: inherit; }
.bt-card small { font-weight: 700; } .bt-card strong { font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; } .bt-card span { font-size: .8rem; color: var(--muted); }

.bd-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(16,36,62,.14); }

.bd-card h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bd-card .bd-sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bd-card .bd-inst { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-art-icon { display: none; }
.bd-featured { box-shadow: 0 0 0 2px #f2a900, 0 8px 22px rgba(242,169,0,.25); }
.bd-star { align-self: flex-start; background: #fff4d6; color: #8a5a00; font-size: .75rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; margin-bottom: 4px; }
.bd-auto{display:flex;gap:8px;align-items:center;font-size:.85rem;margin:8px 0}
.bd-tr{margin-inline-start:6px}
.b-lanes{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}
.board-tab{border:1px solid var(--line,#d8dee6);background:#fff;border-radius:999px;padding:7px 16px;font-weight:700;cursor:pointer}
.board-tab.on{background:#0f766e;color:#fff;border-color:#0f766e}

/* the store's own ad, always at the top of the right column of the board */
.bd-aside .bd-ad{background:linear-gradient(160deg,#0b2545 0%,#13506b 55%,#0f766e 100%);color:#fff;border-radius:16px;padding:16px;margin-bottom:12px;display:grid;gap:10px;box-shadow:0 8px 22px rgba(11,37,69,.28);position:relative;overflow:hidden}
.bd-ad::after{content:"";position:absolute;inset-inline-end:-40px;top:-40px;width:130px;height:130px;border-radius:50%;background:rgba(255,255,255,.07)}
.bd-ad-brand{display:flex;align-items:center;gap:10px}
.bd-ad-brand small{display:block;opacity:.8;font-size:.75rem}
.bd-ad-logo{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#fff;color:#0b2545;font-weight:900}
.bd-ad h2{font-size:1.15rem;line-height:1.3;margin:0;color:#fff}
.bd-ad-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:6px}
.bd-ad-list li{background:rgba(255,255,255,.12);border-radius:9px;padding:6px 8px;font-size:.78rem;line-height:1.25}
.bd-ad-join{display:block;text-align:center;background:#f5a623;color:#1b1b1b;font-weight:800;border-radius:12px;padding:11px 12px;text-decoration:none;font-size:1rem}
.bd-ad-join:hover{background:#ffb739}
.bd-ad-sub{color:#cfe8f1;text-align:center;font-size:.8rem;text-decoration:underline}
.bd-aside{align-self:start;position:sticky;top:12px;max-height:calc(100vh - 24px);overflow-y:auto}
.bd-aside .bd-bar{position:static}
@media (max-width:900px){.bd-aside{position:static;max-height:none;overflow:visible}}

/* "registration opens soon" window */
.op-modal{position:fixed;inset:0;z-index:2000;background:rgba(8,20,38,.62);backdrop-filter:blur(4px);display:grid;place-items:center;padding:16px}
.op-card{width:min(460px,100%);background:#fff;border-radius:24px;overflow:hidden;text-align:center;padding:0 24px 24px;box-shadow:0 24px 70px rgba(0,0,0,.4);animation:opIn .35s ease}
@keyframes opIn{from{transform:translateY(18px) scale(.97);opacity:0}to{transform:none;opacity:1}}
.op-art{position:relative;margin:0 -24px 14px;padding:30px 0 22px;background:linear-gradient(150deg,#0b2545,#13506b 60%,#0f766e)}
.op-icon{font-size:3.2rem;line-height:1;filter:drop-shadow(0 6px 10px rgba(0,0,0,.3))}
.op-spark{position:absolute;color:#f5a623;font-size:1.3rem}.op-spark.s1{left:18%;top:22px}.op-spark.s2{right:16%;top:46px;font-size:1rem}.op-spark.s3{left:30%;bottom:14px;color:#fff}
.op-card h2{margin:6px 0 4px;font-size:1.45rem;color:#0b2545}
.op-sub{margin:0 0 10px;color:#4a5b6c}
.op-date{font-weight:800;font-size:1.1rem;color:#0f766e;background:#e8f6f4;border-radius:12px;padding:10px 12px;margin:6px 0}
.op-count{display:flex;justify-content:center;gap:10px;margin:12px 0}
.op-count span{min-width:70px;background:#0b2545;color:#fff;border-radius:12px;padding:8px 6px}
.op-count b{display:block;font-size:1.5rem;line-height:1.1}.op-count small{opacity:.75;font-size:.72rem}
.op-note{background:#fff7e6;border-radius:12px;padding:10px 12px;color:#7a4b00;margin:10px 0}
.op-actions{display:grid;gap:8px;margin-top:14px}

/* attach a receipt (photo / PDF) next to a button */
.proof-pick{display:inline-flex;align-items:center;gap:6px;cursor:pointer;border:1px dashed #9db4c4;background:#f4f9fc;border-radius:10px;padding:5px 9px;font-size:.8rem;margin-inline-end:6px;vertical-align:middle}
.proof-pick:hover{background:#e6f3f9}
.proof-name{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#0f766e}

.bd-aside .bd-dv{background:#fff8e6;border:1px solid #f1d28a;border-radius:14px;padding:12px;margin-bottom:12px;display:grid;gap:8px}
.bd-dv-top{display:flex;gap:8px;align-items:center;color:#7a4b00}.bd-dv-flag{font-size:1.4rem}
.bd-dv-until{margin:0;font-weight:700;color:#0b2545}.bd-dv-until:empty{display:none}
.bd-dv-btn{display:block;text-align:center;background:#0b2545;color:#fff;border-radius:10px;padding:9px;font-weight:800;text-decoration:none}
.bd-dv small{color:#6b5a2e;line-height:1.35}

/* owner page: use the empty space */
.admin-duo { margin-top: 24px; container-type: inline-size; }
.admin-duo-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.admin-duo-in > .admin-panel { margin-top: 0; }
@container (min-width: 900px) { .admin-duo-in { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; } }
.admin-panel .empty-state { padding: 14px; }
#admin-partners { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-start; }
#admin-partners > .staff-group { flex: 1 1 100%; margin: 0; }
#admin-partners > .staff-group::before { display: none; }
#admin-partners > .staff-group.is-empty { flex: 0 1 auto; padding: 8px 14px; }
#admin-partners > .staff-group.is-empty .job-heading { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
#ads-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
#ads-form .ad-row { margin: 0; }
#ads-form > button { grid-column: 1 / -1; justify-self: start; }

/* ===== owner page: compact (small writing, small fields, no big gaps) ===== */
.admin-compact { padding-top: 22px; }
.admin-compact .admin-heading { margin-bottom: 14px; }
.admin-compact .admin-panel { padding: 13px 15px; margin-top: 14px; font-size: 13px; }
.admin-compact .admin-duo, .admin-compact .admin-duo-in { margin-top: 14px; gap: 14px; }
.admin-compact .admin-duo-in > .admin-panel { margin-top: 0; }
.admin-compact .panel-heading { margin-bottom: 8px; }
.admin-compact .panel-heading h2, .admin-compact .admin-panel > h2 { margin: 0 0 3px; font-size: 16px; }
.admin-compact .panel-heading p, .admin-compact .admin-panel p, .admin-compact .muted { font-size: 12px; line-height: 1.4; margin-top: 2px; margin-bottom: 6px; }
.admin-compact .admin-panel h3, .admin-compact .admin-panel h4, .admin-compact .subhead { margin: 10px 0 4px; font-size: 13.5px; }
.admin-compact form label, .admin-compact .admin-panel label { margin: 6px 0 2px; font-size: 12px; }
.admin-compact input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-compact select, .admin-compact textarea { padding: 4px 8px !important; font-size: 12.5px !important; border-radius: 7px; min-height: 0; }
.admin-compact textarea { min-height: 48px; }
.admin-compact .button { padding: 6px 13px; font-size: 12.5px; border-radius: 8px; }
.admin-compact .small-button, .admin-compact .toggle-button { padding: 3px 9px; font-size: 11.5px; }
.admin-compact .form-two-columns { gap: 4px 12px; }
.admin-compact .empty-state { padding: 8px; font-size: 12px; }
.admin-compact .limit-field input, .admin-compact .limit-field select { min-width: 90px; padding: 4px 7px; }
.admin-compact .form-message { margin: 4px 0; font-size: 12px; }
.admin-compact .xl-bar { margin: 0 0 2px; }
.admin-compact .xl-btn { min-width: 22px; height: 20px; padding: 0 5px; font-size: 12px; }
.admin-compact .xl-box { margin: 2px 0; }
/* short tables take the width of what they hold; the room beside them is not wasted by stretching */
.admin-compact table.xl-table { font-size: calc(12px * var(--xl-z, 1)); }
.admin-compact table.xl-table th, .admin-compact table.xl-table td { padding: .18em .5em !important; }
.admin-compact table.xl-table { width: 100%; }
.admin-compact .xl-scroll { width: 100%; max-width: 100%; }
.admin-compact .xl-scroll > table { width: 100%; }
.admin-compact table.xl-table input[type="number"] { width: 84px; }
.admin-compact table.xl-table input[type="search"], .admin-compact table.xl-table input[type="text"], .admin-compact table.xl-table input:not([type]) { min-width: 120px; }
.admin-compact .feeplan-filter { margin: 4px 0; }
.admin-compact .feeplan-filter input, .admin-compact .feeplan-filter select { max-width: 280px; }
.admin-compact .admin-stats { gap: 8px; margin-bottom: 8px; }
.admin-compact .admin-stat, .admin-compact .stat-tile { padding: 8px 12px; }
.admin-compact .stat-tile strong, .admin-compact .admin-stat strong { font-size: 20px; margin-top: 3px; }
.admin-compact .picture-guide { padding: 10px 14px; }
.admin-compact .staff-group { padding: 8px 12px 4px; margin: 0; }
/* two tables of one panel side by side (subscription plans | what the fee pays for) */
.subs-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
#subs-plans { container-type: inline-size; }
@container (min-width: 760px) { .subs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; } }
.admin-compact .plans-table input.sp-name, .admin-compact .plans-table input[class*="sp-rights"], .admin-compact .plans-table input[type="text"] { min-width: 80px; }
.admin-compact .form-table input:not([type=checkbox]):not([type=radio]), .admin-compact .form-table select { height: 26px !important; padding: 0 7px !important; font-size: 12px !important; }
.admin-compact .form-table input[type=number]:not([type=radio]):not([type=checkbox]) { width: 84px; }
.admin-compact .form-table th, .admin-compact .form-table td { padding: 3px 8px; }
.admin-compact input, .admin-compact select { height: auto; }
.admin-compact .pay-switch-box { margin: 0 0 8px; padding: 9px 12px; }
.admin-compact .pay-switches { gap: 6px; margin-top: 6px; }
.admin-compact .toggle-button.pay-switch { padding: 6px 10px; font-size: 12.5px; border-radius: 9px; gap: 8px; }
.admin-compact .settings-table { width: 100% !important; }
.admin-compact .switch-grid { display: flex !important; flex-wrap: wrap; gap: 4px 6px; grid-template-columns: none !important; }
.admin-compact .settings-table .toggle-button { display: inline-flex; align-items: center; width: auto; padding: 3px 10px; font-size: 11.5px; margin: 2px 3px 2px 0; border-radius: 8px; }

/* follow / subscribe / bell on the cover of the board */
.bd-follow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.bd-f-btn { border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.14); color: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; backdrop-filter: blur(3px); }
.bd-f-btn:hover { background: rgba(255,255,255,.28); }
.bd-f-btn.on { background: #19b5a6; border-color: #19b5a6; color: #fff; }
.bd-f-btn:disabled { opacity: .6; cursor: wait; }
.bd-f-count { color: #fff; font-size: 13px; margin-inline-start: 4px; }
.bd-f-hint { flex-basis: 100%; color: rgba(255,255,255,.85); font-size: 12px; min-height: 1em; }

/* the reader's own table style (☰ ↔ B in the bar of each table) */
.xl-box[data-align="start"] table.xl-table :is(td, th) { text-align: start !important; }
.xl-box[data-align="center"] table.xl-table :is(td, th) { text-align: center !important; }
.xl-box[data-align="end"] table.xl-table :is(td, th) { text-align: end !important; }
.xl-box[data-align] table.xl-table input { text-align: inherit; }
.xl-box[data-fit="fit"] .xl-scroll { width: fit-content; max-width: 100%; }
.xl-box[data-fit="fit"] table.xl-table { width: auto !important; min-width: 0 !important; }
.xl-box[data-fit="full"] .xl-scroll { width: 100% !important; }
.xl-box[data-fit="full"] table.xl-table { width: 100% !important; }
.xl-box[data-bold="1"] table.xl-table td { font-weight: 700; }

/* v132: tables use the whole width, paired panels have the same height, rows on one level */
.admin-compact .xl-box { width: 100%; }
.admin-compact .xl-scroll > table, .admin-compact table.xl-table, .admin-compact .table-wrap > table { width: 100%; }
.admin-compact .staff-group table, .admin-compact #admin-users table, .admin-compact #brought-box table { width: 100%; }
.admin-duo-in > .admin-panel { display: flex; flex-direction: column; }
.admin-duo-in > .admin-panel > :last-child { margin-bottom: 0; }
.admin-compact .subs-grid > div { min-width: 0; }
.admin-compact .subs-grid .subhead { margin: 0 0 6px; min-height: 22px; }
.admin-compact .subs-grid td, .admin-compact .subs-grid th { height: 36px; vertical-align: middle; }
.admin-compact table.xl-table th { height: 28px; text-align: center; }
.admin-compact table.xl-table td { vertical-align: middle; }
.admin-compact table.xl-table td input:not([type="checkbox"]), .admin-compact table.xl-table td select { width: 100%; max-width: 100%; }
.admin-compact table.xl-table td input[type="number"] { width: 100%; text-align: center; }
.admin-compact table.xl-table th.num, .admin-compact table.xl-table td.num:has(input) { text-align: center; }
.admin-compact table.xl-table td .small-button { white-space: nowrap; }
.admin-compact .limit-field { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.admin-compact .limit-field input, .admin-compact .limit-field select { width: 240px; max-width: 100%; }
.admin-compact .fee-cell, .admin-compact td:has(> input[type="number"]) { white-space: nowrap; }
#admin-users { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 12px 16px; align-items: start; }
#admin-users > .staff-group { margin: 0 !important; }
#admin-users { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
#admin-partners, #admin-users { min-width: 0; }
.staff-group, .user-group, .xl-box, .table-wrap, .admin-panel, .adm-grid > * { min-width: 0; max-width: 100%; }
.xl-scroll { overflow-x: auto; max-width: 100%; }
@media (max-width: 820px) {
  .admin-compact .subs-grid td, .admin-compact .subs-grid th, .admin-compact table.xl-table td, .admin-compact table.xl-table th { height: auto !important; }
  .admin-compact table.xl-table td input:not([type="checkbox"]), .admin-compact table.xl-table td select { height: 32px; }
}
@media (max-width: 820px) { .admin-compact table.xl-table td.num:has(input), .admin-compact table.xl-table td input[type="number"] { text-align: start; } }

/* every table is as wide as the box it sits in */
.xl-box { display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
.xl-box:not([data-fit="fit"]) > .xl-scroll { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
.xl-box:not([data-fit="fit"]) > .xl-scroll > table, .xl-box:not([data-fit="fit"]) table.xl-table { width: 100% !important; min-width: 100% !important; }
.table-wrap { width: 100%; }
.table-wrap > table { width: 100%; }
.admin-compact td:has(> input[type="number"]), .admin-compact td.num { white-space: nowrap; }
.book-fee { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.book-fee label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.book-fee input { width: 84px !important; }

/* ---- rented advertising spaces ---- */
.ad-slot { margin: 0 0 14px; }
.ad-slot[hidden] { display: none; }
.ad-slot .ad-list { display: grid; gap: 10px; }
.ad-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line, #e3e6ea); border-radius: 12px; background: var(--card, #fff); color: inherit; text-decoration: none; box-sizing: border-box; width: 100%; }
a.ad-card:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.ad-card img { width: 120px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.ad-card .ad-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ad-card .ad-text strong { overflow-wrap: anywhere; }
.ad-card .ad-text small { color: var(--muted, #6b7280); }
.ad-badge { align-self: flex-start; font-style: normal; font-size: .7rem; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; opacity: .65; }
.ad-slot-rail .ad-card { flex-direction: column; align-items: stretch; }
.ad-slot-rail .ad-card img { width: 100%; height: 110px; }
@media (max-width: 560px) { .ad-card img { width: 84px; height: 56px; } }
.ad-row-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; align-items: end; }
.ad-row-grid label { display: grid; gap: 4px; }
.ad-row-grid input, .ad-row-grid select { width: 100%; box-sizing: border-box; }
.bd-post-btn[hidden] { display: none !important; }
/* the side column is dark: the ads there use its colours */
.ad-slot-rail .ad-card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #eaf2fb; }
.ad-slot-rail .ad-card .ad-text small { color: #9fb4cc; }
.site-footer { flex-wrap: wrap; }
.site-footer .footer-contact { color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-footer a.footer-contact:hover { text-decoration: underline; }

/* Monthly collection tables */
.mt-bar{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.mt-wrap{width:100%;overflow-x:auto}
.mt-table{width:100%;table-layout:fixed;min-width:780px}
.mt-table th:first-child{width:130px;text-align:start;overflow:hidden;text-overflow:ellipsis}
.mt-table td,.mt-table th{padding:4px;font-size:.78rem;text-align:center;overflow-wrap:anywhere}
.mt-btn{width:100%;border:1px solid var(--line,#d5d9e0);border-radius:8px;background:transparent;color:inherit;padding:4px 2px;font-size:.74rem;cursor:pointer}
.mt-paid .mt-btn{border-color:#2e9e6a}.mt-partial .mt-btn{border-color:#d9a21b}.mt-unpaid .mt-btn{border-color:#d9534f}
.mt-total td,.mt-total th{font-size:.72rem}.mt-none{opacity:.4}
.mt-detail{margin-top:12px}.mt-detail .inline-form input{flex:1 1 140px;min-width:0}

/* Products / shops and restaurants */
.view-tabs { display: flex; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; }
.view-tab { flex: 1 1 160px; padding: 12px 16px; border-radius: 12px; border: 2px solid rgba(128,128,128,.3); background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.view-tab.active { border-color: #0f8a82; background: rgba(15,138,130,.12); }
.store-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.store-card { display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 14px; border: 1px solid rgba(128,128,128,.3); background: rgba(128,128,128,.05); cursor: pointer; }
.store-card:hover, .store-card:focus { border-color: #0f8a82; outline: none; transform: translateY(-2px); }
.store-card-icon { font-size: 2rem; }
.store-card-count { font-weight: 700; }
.store-card-open { justify-self: start; margin-top: 4px; }
#store-kinds { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }

/* bus seats */
.bus { max-width: 360px; margin: 10px auto; padding: 12px; border: 2px solid var(--border); border-radius: 22px 22px 12px 12px; background: var(--light); }
.bus-front { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 6px 8px; color: var(--muted); }
.bus-grid { display: grid; grid-template-columns: 1fr 1fr .5fr 1fr 1fr; gap: 8px; }
.seat-aisle { display: block; }
.seat { box-sizing: border-box; min-height: 40px; padding: 0; border: 2px solid var(--teal-dark); border-radius: 8px 8px 4px 4px; background: #fff; color: var(--navy); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.seat:hover:not(:disabled):not(.taken) { background: var(--soft-teal); }
.seat.on { background: var(--teal-dark); color: #fff; }
.seat.taken { border-color: var(--muted); border-style: dashed; color: var(--muted); background: repeating-linear-gradient(45deg, #e6ebf1, #e6ebf1 4px, #f6f8fb 4px, #f6f8fb 8px); cursor: default; }
.seat.taken:not(:disabled) { cursor: pointer; }
.seat.taken.sel { outline: 3px solid var(--blue); }
.seat-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin: 12px 0 0; font-size: .82rem; color: var(--muted); }
.seat-legend .seat { display: inline-block; width: 22px; min-height: 16px; height: 16px; cursor: default; }
.trip-pick { display: grid; gap: 8px; margin: 6px 0 10px; }
.trip-opt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 12px; text-align: start; border: 2px solid rgba(128,128,128,.3); border-radius: 12px; background: none; color: inherit; cursor: pointer; font: inherit; }
.trip-opt.on { border-color: #0f8a82; background: rgba(15,138,130,.12); }
.trip-opt:disabled { opacity: .55; cursor: not-allowed; }
.trip-holder { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--light); }
.pax { margin: 10px 0; padding: 8px 12px 12px; border: 1px solid var(--border); border-radius: 12px; }
.pax legend { padding: 0 6px; font-weight: 700; color: var(--teal-dark); }

/* ---- a chosen account type: cover strip across the page, blurred backdrop, one roomy sign-up window ---- */
body.join-page { background: #eaf0f6; }
body.join-page::before { content: ""; position: fixed; inset: -30px; z-index: -1; background: var(--join-back) center / cover no-repeat; filter: blur(18px) saturate(1.1); opacity: .55; pointer-events: none; }
.join-banner { position: relative; width: 100%; min-height: 250px; display: flex; align-items: flex-end; overflow: hidden; background: #10243e; }
.join-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.join-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,24,40,.15) 0%, rgba(8,24,40,.78) 100%); }
.join-banner-inner { position: relative; z-index: 1; width: min(1000px, 94%); margin: 0 auto; padding: 22px 0 70px; color: #fff; }
.join-banner h1 { margin: 4px 0; font-size: clamp(1.7rem, 4vw, 2.6rem); color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.55); }
.join-banner p { margin: 0; color: #eaf3f9; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.join-banner .eyebrow { color: #75e0d3; }
.join-back { display: block; width: max-content; margin-bottom: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.2); color: #fff; text-decoration: none; font-size: .85rem; backdrop-filter: blur(4px); }
body.join-page .partner-main { width: min(1000px, 94%); position: relative; z-index: 2; margin-top: -52px; padding: 0 0 56px; }
body.join-page .partner-main .admin-layout { grid-template-columns: 1fr; margin-top: 0; gap: 0; }
body.join-page .partner-main .admin-panel { background: rgba(255,255,255,.97); border: 1px solid rgba(255,255,255,.7); border-radius: 20px; padding: 26px 30px 30px; box-shadow: 0 22px 60px rgba(8,24,40,.28); }
body.join-page .partner-main .panel-heading { margin-bottom: 14px; }
body.join-page .partner-main .panel-heading h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; }
body.join-page .partner-main .panel-heading p { margin: 6px 0 0; }
/* the account part and the details part read as one window with two steps */
body.join-page main:has(#direct-box:not([hidden])) #direct-box { border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 8px; box-shadow: 0 -10px 40px rgba(8,24,40,.12); }
body.join-page main:has(#direct-box:not([hidden])) #partner-forms .admin-panel { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 1px dashed #cfd9e4; box-shadow: 0 30px 60px rgba(8,24,40,.28); }
body.join-page #direct-box .panel-heading h2::before, body.join-page main:has(#direct-box:not([hidden])) #partner-forms .panel-heading h2::before { content: "1"; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #0f8a82; color: #fff; font-size: .85rem; flex: none; }
body.join-page main:has(#direct-box:not([hidden])) #partner-forms .panel-heading h2::before { content: "2"; }
body.join-page .partner-main label { font-weight: 700; font-size: .86rem; color: #1b3550; margin-top: 10px; }
body.join-page .partner-main input, body.join-page .partner-main select, body.join-page .partner-main textarea { min-height: 46px; border-radius: 10px; border: 1px solid #cdd8e3; background: #fff; }
body.join-page .partner-main input:focus, body.join-page .partner-main select:focus, body.join-page .partner-main textarea:focus { outline: none; border-color: #0f8a82; box-shadow: 0 0 0 3px rgba(15,138,130,.18); }
body.join-page form .button { padding: 13px 28px; font-size: 1rem; border-radius: 12px; margin-top: 12px; }
@media (prefers-color-scheme: dark) {
  body.join-page { background: #0c1826; }
  body.join-page .partner-main .admin-panel { background: rgba(16,28,44,.95); border-color: rgba(255,255,255,.08); }
  body.join-page .partner-main label { color: #d3e2ef; }
  body.join-page .partner-main input, body.join-page .partner-main select, body.join-page .partner-main textarea { background: #13243a; border-color: #2c4560; }
}
body.join-page form#merchant-form, body.join-page form#courier-form, body.join-page #direct-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2px 20px; align-items: start; }
body.join-page .jf { min-width: 0; }
body.join-page .jf.wide, body.join-page form .button, body.join-page form .form-message, body.join-page form .field-help, body.join-page #direct-box > .panel-heading, body.join-page #direct-kyc, body.join-page #direct-box > p { grid-column: 1 / -1; }
body.join-page .form-two-columns { display: contents; }
body.join-page .form-two-columns > div { min-width: 0; }
body.join-page form .button { justify-self: start; }
@media (max-width: 600px) { .join-banner { min-height: 210px; } body.join-page .partner-main .admin-panel { padding: 20px 16px 24px; border-radius: 16px; } body.join-page form .button { justify-self: stretch; } }
body.join-page .jf:has(> [hidden]) { display: none; }

/* the owner's academic website: a small window in the side menu, under the brand (owner, deans and supervisors only) */
.side-academic { display: flex; align-items: center; gap: 10px; margin: 2px 4px 8px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 14px; background: rgba(255,255,255,.07); color: #fff; text-decoration: none; line-height: 1.2; }
.side-academic:hover { background: rgba(255,255,255,.15); border-color: #68e1d2; }
.side-academic img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center top; border: 2px solid #68e1d2; flex: none; }
.side-academic span { display: grid; gap: 2px; min-width: 0; }
.side-academic strong { font-size: 12.5px; color: #fff; }
.side-academic small { font-size: 10.5px; color: #c3d9e8; }

/* a kind the owner closed (or that is full): shown greyed in the chooser */
.join-card.closed { opacity: .55; filter: grayscale(.6); cursor: not-allowed; }
.join-card.closed:hover { transform: none; }

/* picture cards for choosing a shop or a provider */
.pick-thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, rgba(19,165,139,.3), rgba(14,134,181,.3)); }
.pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-fallback { font-size: 2.2rem; font-weight: 800; color: rgba(0,0,0,.45); }
.pick-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.pick-card { display: grid; gap: 6px; align-content: start; text-align: start; padding: 8px; border-radius: 12px; border: 2px solid rgba(128,128,128,.3); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.pick-card:hover, .pick-card:focus { border-color: #0f8a82; outline: none; }
.pick-card.active { border-color: #0f8a82; box-shadow: 0 0 0 2px rgba(15,138,130,.25); }
.store-card .pick-thumb { margin-bottom: 4px; }

/* year calendar: when is the provider free */
.cal-box { margin: 10px 0 14px; padding: 12px; border: 1px solid rgba(128,128,128,.3); border-radius: 12px; }
.cal-box h3 { margin: 0 0 8px; }
.cal-year { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 8px; }
.cal-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.cal-month { padding: 8px 4px; border-radius: 8px; border: 1px solid rgba(128,128,128,.35); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.cal-month.on { background: #0f8a82; color: #fff; border-color: #0f8a82; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; direction: ltr; }
.cal-head { text-align: center; font-size: .8rem; opacity: .7; }
.cal-day { padding: 8px 0; border-radius: 8px; border: 0; font: inherit; font-weight: 700; color: #fff; }
.cal-day.free { background: #1c9a52; cursor: pointer; }
.cal-day.full { background: #d33a3a; cursor: not-allowed; }
.cal-day.past { background: rgba(128,128,128,.3); color: inherit; cursor: not-allowed; }
.cal-day.on { outline: 3px solid #0f8a82; outline-offset: 2px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 0; font-size: .9rem; }
.cal-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.cal-dot.free { background: #1c9a52; } .cal-dot.full { background: #d33a3a; } .cal-dot.past { background: rgba(128,128,128,.4); }

/* guides with real pictures of the account: a picture of fixed height (click to enlarge) beside a large, easy to read explanation */
.guide-section h2 { display: flex; gap: 8px; align-items: center; }
.guide-section[hidden] { display: none; }
[data-l] { display: none; }
html[lang="en"] [data-l="en"], html[lang="fr"] [data-l="fr"], html[lang="ar"] [data-l="ar"] { display: block; }
html[lang="en"] span[data-l="en"], html[lang="fr"] span[data-l="fr"], html[lang="ar"] span[data-l="ar"] { display: inline; }
#g-intro p[hidden] { display: none; }
.g-steps { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 18px; }
.g-step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 26px; align-items: center; padding: 18px; border: 1px solid rgba(128,128,128,.25); border-radius: 14px; break-inside: avoid; }
.g-shots { display: grid; gap: 10px; }
.g-shots img { width: 100%; height: auto; cursor: zoom-in; border: 1px solid rgba(128,128,128,.35); border-radius: 10px; box-shadow: 0 3px 12px rgba(0,0,0,.12); background: #fff; }
.g-shots img.tall { height: 330px; object-fit: cover; object-position: top center; }
.g-shots.two img.tall { height: 230px; }
.g-text { font-size: 1.12rem; }
.g-text h3 { margin: 0 0 12px; display: flex; gap: 10px; align-items: center; font-size: 1.3rem; }
.g-text p { margin: 8px 0; line-height: 1.9; }
.g-text ul { margin: 8px 0; padding-inline-start: 22px; line-height: 1.9; }
.g-text li { margin: 7px 0; }
.g-no { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: #13a58b; color: #fff; font-weight: 800; }
.g-hint { color: #5b6b7d; font-size: .95rem; }
.g-zoom { position: fixed; inset: 0; z-index: 9999; background: rgba(8,16,28,.82); display: grid; place-items: center; padding: 18px; overflow: auto; cursor: zoom-out; }
.g-zoom img { max-width: min(900px, 100%); height: auto; border-radius: 10px; background: #fff; }
@media (max-width: 860px) { .g-step { grid-template-columns: 1fr; } .g-shots img.tall { height: 260px; } .g-shots.two img.tall { height: 200px; } }
.g-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.g-tools small { color: #5b6b7d; }
.g-tools[hidden] { display: none; }
@media print {
  .side-nav, .guide-index, .g-tools, .g-hint, .g-zoom, .lang-switch, #guide-link, .button { display: none !important; }
  body { margin: 0 !important; padding: 0 !important; }
  .guide-page .panel { border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 0 10px !important; }
  .guide-section { break-before: page; }
  .guide-section:first-of-type { break-before: auto; }
  .g-step { break-inside: avoid; border-color: #bbb; grid-template-columns: 1fr 1fr; }
  .g-text { font-size: 11pt; }
  .g-shots img, .g-shots img.tall, .g-shots.two img.tall { height: auto; object-fit: contain; box-shadow: none; cursor: auto; }
}

/* long pages: every part has a banner title (same icon and words as its menu line), a gap and a frame */
.sec-block { margin-top: 34px !important; border-top: 5px solid #13a58b !important; box-shadow: 0 0 0 1px rgba(20,60,80,.1), 0 8px 22px rgba(20,60,80,.08); scroll-margin-top: 18px; }
.sec-title { display: flex !important; align-items: center; gap: 12px; margin: 0 0 16px !important; padding: 13px 16px; background: #eaf5f4; border-radius: 10px; border-inline-start: 6px solid #13a58b; color: #10243e; font-size: 1.28rem !important; line-height: 1.35; }
.sec-title::before { content: attr(data-icon); font-size: 1.5rem; line-height: 1; }
.sec-flash { animation: secflash 1.6s ease-out 1; }
@keyframes secflash { 0%, 35% { outline: 4px solid #f5a623; outline-offset: 3px; } 100% { outline: 4px solid transparent; outline-offset: 3px; } }
.side-nav a.side-item.sec-on { background: rgba(19,165,139,.28); box-shadow: inset 4px 0 0 #13a58b; }
.side-nav a.side-item.sec-on .side-label { font-weight: 700; }
@media print { .sec-block { box-shadow: none; border-top-width: 2px !important; } .sec-title { background: none; } }
@media (prefers-reduced-motion: reduce) { .sec-flash { animation: none; outline: 3px solid #f5a623; } }

/* monthly collection table on a phone: the month columns keep a readable width (the table scrolls sideways), numbers never break letter by letter */
.mt-table { min-width: 1000px !important; table-layout: fixed; }
.mt-table td, .mt-table th { overflow-wrap: normal !important; word-break: normal !important; white-space: nowrap; }
.mt-table th:first-child { white-space: normal; overflow-wrap: anywhere !important; position: sticky; inset-inline-start: 0; z-index: 1; background: #eef3f8; }
.mt-table .mt-btn { white-space: nowrap; }

/* the owner's list of collaborators' QR codes */
.qrs-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qrs-bar input[type=search] { flex: 1 1 200px; min-width: 0; }
.qrs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 12px; }
.qrs-card { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 12px; border: 1px solid rgba(128,128,128,.3); border-radius: 12px; background: #fff; }
.qrs-code { width: 150px; height: 150px; }
.qrs-code svg { width: 100%; height: 100%; }
.qrs-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

.pane-away { display: none !important; }

/* two small promotion cards in the hero, where "Join now" used to be; "Join now" sits in the far corner of the hero */
.hero .hero-join { position: absolute; inset-block-start: 20px; inset-inline-end: 24px; margin: 0; z-index: 3; }
.hero .join-now { font-size: 15px; padding: 10px 20px; gap: 9px; }
.hp-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 22px 0 0; max-width: 560px; }
.hp-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 7px; padding: 10px 11px; overflow: hidden; box-sizing: border-box; border-radius: 14px; text-decoration: none; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.28); transition: transform .18s, box-shadow .18s; min-width: 0; }
.hp-card:hover, .hp-card:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.38); }
.hp-trades { background: linear-gradient(135deg, #f5a524 0%, #e8590c 100%); }
.hp-services { background: linear-gradient(135deg, #22b8a7 0%, #176b87 100%); }
.hp-pics { display: flex; flex: 0 0 auto; }
.hp-pics img { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; border: 2px solid #fff; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.hp-pics img + img { margin-inline-start: -12px; }
.hp-icons { flex-wrap: nowrap; width: auto; gap: 3px; }
.hp-icons i { font-style: normal; font-size: 16px; line-height: 1; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.95); }
.hp-text { display: grid; gap: 2px; min-width: 0; flex: 1; text-align: start; }
.hp-tag { display: none; }
.hp-title { font-size: .82rem; line-height: 1.25; font-weight: 800; color: #fff; }
.hp-line { display: none; }
.hp-btn { justify-self: start; margin-top: 3px; padding: 3px 10px; border-radius: 999px; background: #fff; color: #10243e; font-weight: 800; font-size: .72rem; white-space: normal; }
.hp-btn::after { content: " →"; }
[dir="rtl"] .hp-btn::after, html[lang="ar"] .hp-btn::after { content: " ←"; }
@media (max-width: 720px) {
  .hero .hero-join { position: static; margin: 0 0 14px; }
}
.hero-text { min-width: 0; }
.hp-duo { min-width: 0; width: 100%; box-sizing: border-box; }
.hp-btn { max-width: 100%; }
.hp-duo { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }   /* always side by side, never one on top of the other */
.hp-card { min-height: 0; }
.hp-text { align-content: start; } .hp-btn { align-self: start; }

/* the owner's part, when it is shown alone: wide, centred, and (when it has several blocks) in two columns */
body[data-admin-pane]:not([data-admin-pane="overview"]) .admin-main .admin-duo { margin-top: 14px; }
body[data-admin-pane]:not([data-admin-pane="overview"]) .admin-main .admin-duo-in { grid-template-columns: minmax(0, 1fr) !important; }
body[data-admin-pane]:not([data-admin-pane="overview"]) .admin-main section.admin-panel { width: 100%; max-width: none; margin-inline: auto; box-sizing: border-box; padding: 18px 26px 22px; }
.admin-main section.pane-cols { display: block; column-count: 2; column-gap: 40px; column-rule: 1px solid #e3ebf2; }
.admin-main section.pane-cols > * { break-inside: avoid; }
.admin-main section.pane-cols > .panel-heading { column-span: all; }
.admin-main section.pane-cols > h3:first-of-type { margin-top: 0; }
@media (max-width: 900px) { .admin-main section.pane-cols { column-count: 1; column-rule: 0; } }

/* home cards: the search button and the join button are two separate buttons */
.hp-btns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.hp-btns .hp-btn { margin-top: 0; text-decoration: none; display: inline-block; }
.hp-btns .hp-join { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.85); }
.hp-btns .hp-join::after { content: ""; }
.hp-btns .hp-join::before { content: "+ "; }
.hp-btns .hp-btn:hover, .hp-btns .hp-btn:focus-visible { filter: brightness(.93); }
[dir="rtl"] .hp-btns .hp-join::after, html[lang="ar"] .hp-btns .hp-join::after { content: ""; }

/* the printed / PDF guide keeps every part of the account even when only one is shown on screen */
@media print { .guide-section.pane-away { display: block !important; } .guide-section[hidden] { display: none !important; } }

/* demo pages and the owner's academic editor */
.demo-tag { display: inline-block; background: #fff3c4; color: #7a5a00; border: 1px solid #f2c94c; border-radius: 999px; padding: 1px 8px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }
.demo-box { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border, #dfe7ef); }
.demo-box h3 { margin: 0 0 6px; }
.acad-list { display: grid; gap: 8px; margin-top: 14px; }
.acad-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--border, #dfe7ef); border-radius: 12px; background: var(--white, #fff); }
.acad-row > div:first-child { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; }
.acad-row small { color: var(--muted, #66778a); }
.acad-row span:not(.demo-tag) { font-size: .85rem; overflow-wrap: anywhere; }
.acad-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.acad-actions .danger { border-color: #e4b4b4; color: #a12626; }
.inline-check { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-weight: 600; }
.inline-check input { width: auto; }
.demo-edit { flex: 1 1 100%; padding-top: 12px; margin-top: 4px; border-top: 1px dashed var(--border, #dfe7ef); }
.demo-edit h4 { margin: 16px 0 8px; }
.demo-pics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 12px 0; }
.demo-pic { display: grid; gap: 6px; align-content: start; padding: 10px; border: 1px solid var(--border, #dfe7ef); border-radius: 10px; }
.demo-prev { min-height: 84px; display: grid; place-items: center; background: #f3f7fb; border-radius: 8px; overflow: hidden; }
.demo-prev img { width: 100%; max-height: 120px; object-fit: cover; display: block; }
.demo-prev.photo img { width: 84px; height: 84px; border-radius: 50%; }
.demo-prods { display: grid; gap: 6px; }
.demo-prod { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--border, #dfe7ef); border-radius: 10px; }
.demo-prod > div:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.demo-thumb { width: 42px; height: 42px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: #f3f7fb; flex: 0 0 auto; }
.demo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.demo-pform { margin-top: 12px; padding: 12px; border: 1px dashed var(--border, #dfe7ef); border-radius: 10px; }

.side-academic-edit[hidden] { display: none; }
.side-academic-edit { display: grid; gap: 4px; margin: -2px 4px 8px; }
.side-academic-edit a { display: block; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.07); color: #e6f3fb; font-size: 12px; text-decoration: none; }
.side-academic-edit a:hover { background: rgba(104,225,210,.2); color: #fff; }
.admin-main:has(#acad-site-panel:not([hidden]):not(.pane-away)), .admin-main:has(#ilrmai-site-panel:not([hidden]):not(.pane-away)) { width: min(1800px, 97%); }
.se-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.se-pv, .se-ed { min-width: 0; }
.se-pv { position: sticky; top: 8px; }
.se-pv-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 13px; }
.se-pv-head span { flex: 1 1 140px; color: #5b6b7a; }
.se-frame-box { height: 78vh; overflow: hidden; border: 2px solid #9fb4c4; border-radius: 10px; background: #fff; position: relative; }
.se-frame { border: 0; transform-origin: 0 0; background: #fff; display: block; }
.se-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.se-pick select { flex: 1 1 220px; min-height: 38px; }
.se-state { font-size: 12px; color: #5b6b7a; }
.se-title { margin: 4px 0; }
.se-editor { display: grid; gap: 8px; }
.se-editor[hidden] { display: none; }
.se-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; border: 1px solid #d7dee6; border-radius: 10px; background: #f3f7fa; position: sticky; top: 0; z-index: 2; }
.se-bar button, .se-file { min-height: 32px; padding: 3px 9px; border: 1px solid #c3ced8; border-radius: 8px; background: #fff; font-size: 13px; cursor: pointer; }
.se-bar .se-url { flex: 1 1 200px; min-width: 140px; min-height: 32px; }
.se-sep { flex: 1 1 8px; }
.se-area { min-height: 200px; max-height: 62vh; overflow: auto; padding: 12px; border: 2px solid #9fb4c4; border-radius: 10px; background: #fff; color: #17222d; }
.se-area img { max-width: 100%; height: auto; }
.se-area .se-sel { outline: 3px solid #14b8a6; outline-offset: 2px; }
.se-area .mk-locked { padding: 8px; border: 2px dashed #b08900; background: #fff8dc; color: #6b5200; font-size: 12px; text-align: center; user-select: none; }
.se-src { width: 100%; min-height: 220px; font-family: monospace; direction: ltr; }
@media (max-width: 1000px) { .se-split { grid-template-columns: 1fr; } .se-pv { position: static; } .se-frame-box { height: 50vh; } }
