/* REATS · supplier portal — mobile-first, light/green theme */
:root {
  --sup-bg: #f7faf2;
  --sup-card: #ffffff;
  --sup-ink: #0c3c1e;
  --sup-ink-soft: #466b53;
  --sup-muted: #7a8a80;
  --sup-line: #e3ecdc;
  --sup-accent: #0c3c1e;
  --sup-accent-2: #d9e89a;
  --sup-accent-soft: #b4d6a0;
  --sup-warn: #b35c00;
  --sup-warn-bg: #fff4e0;
  --sup-ok: #1f7a3a;
  --sup-ok-bg: #e8f5dd;
  --sup-danger: #b3261e;
  --sup-danger-bg: #fde7e6;
  --sup-radius: 14px;
  --sup-shadow: 0 4px 16px rgba(12,60,30,0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.sup-body, body.sup-auth-body {
  font-family: 'Heebo','Google Sans',system-ui,sans-serif;
  background: var(--sup-bg);
  color: var(--sup-ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 90px;
}
body.sup-auth-body { padding-bottom: 0; }

a { color: var(--sup-ink); }

h1, h2 {
  font-family: "Google Sans", "Heebo", system-ui, sans-serif;
  font-weight: 700;
  margin: 0;
}

/* ---------- AUTH (login/register) ---------- */
.sup-auth {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 5vw, 24px) clamp(12px, 4vw, 20px);
  background:
    radial-gradient(circle at 20% 10%, rgba(217,232,154,.55), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(180,214,160,.45), transparent 50%),
    var(--sup-bg);
}
.sup-auth-card {
  background: var(--sup-card);
  width: 100%; max-width: 440px;
  border-radius: 18px;
  box-shadow: var(--sup-shadow);
  padding: 28px 22px;
  border: 1px solid var(--sup-line);
}
.sup-auth-card-wide { max-width: 520px; }
.sup-auth-links {
  margin-top: 18px; text-align: center; color: var(--sup-muted); font-size: 0.9rem; line-height: 1.6;
}
.sup-auth-links a { color: var(--sup-accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.sup-form-compact .sup-field { margin-bottom: 0; }
.sup-inline-two {
  display: grid; gap: 8px;
  grid-template-columns: 1fr auto;
  align-items: end;
}

.sup-auth-card h1 { margin: 16px 0 4px; font-size: 1.5rem; }
.sup-auth-foot { margin-top: 16px; text-align: center; color: var(--sup-muted); font-size: 0.92rem; }
.sup-auth-foot a { color: var(--sup-accent); font-weight: 600; text-decoration: none; }

/* ---------- HEADER + NAV (desktop sidebar / mobile burger) ---------- */
.sup-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sup-line);
}
.sup-header-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(12px, 4vw, 18px);
}
.sup-logo {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--sup-ink); font-weight: 700;
}
.sup-logo-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--sup-accent); color: var(--sup-accent-2);
  border-radius: 10px; font-weight: 800;
}
.sup-burger {
  background: none; border: 0; padding: 10px;
  display: flex; flex-direction: column; gap: 4px; cursor: pointer;
  min-width: 44px; min-height: 44px;
  justify-content: center; align-items: center;
}
.sup-burger span {
  display: block; width: 22px; height: 2px; background: var(--sup-ink); border-radius: 2px;
}

.sup-nav {
  position: fixed; inset: 64px 0 70px auto; right: 0;
  width: 240px; background: var(--sup-card);
  border-left: 1px solid var(--sup-line);
  padding: 16px 8px;
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 25;
  overflow-y: auto;
}
body.sup-menu-open .sup-nav { transform: translateX(0); }
.sup-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  text-decoration: none; color: var(--sup-ink);
  font-weight: 500;
}
.sup-nav a.is-active, .sup-nav a:hover {
  background: var(--sup-accent-2); color: var(--sup-accent);
}
.sup-nav .ic { font-size: 1.05rem; }

@media (min-width: 900px) {
  .sup-burger { display: none; }
  .sup-nav {
    position: sticky; top: 64px; transform: none; inset: auto;
    width: auto;
    display: flex; gap: 4px;
    border: 0; padding: 0;
    max-width: 1100px; margin: 12px auto 0; padding: 0 16px;
    background: transparent;
  }
  .sup-nav a { padding: 8px 14px; }
}

/* ---------- MAIN ---------- */
.sup-main { max-width: 1100px; margin: 0 auto; padding: 16px clamp(12px, 4vw, 20px); }
.sup-page-head { margin: 4px 0 16px; }
.sup-page-head h1 { margin: 0; font-size: 1.4rem; }
.sup-greeting { color: var(--sup-muted); font-size: 0.9rem; }

.sup-flash {
  margin: 8px 0 16px; padding: 10px 14px;
  border-radius: 10px; font-weight: 500;
}
.sup-flash.success { background: var(--sup-ok-bg); color: var(--sup-ok); border: 1px solid #cce4b6; }
.sup-flash.error   { background: var(--sup-danger-bg); color: var(--sup-danger); border: 1px solid #f3c2bf; }
.sup-flash.warn    { background: var(--sup-warn-bg); color: var(--sup-warn); border: 1px solid rgba(179,92,0,0.25); }

/* ---------- CARDS ---------- */
.sup-card {
  background: var(--sup-card);
  border: 1px solid var(--sup-line);
  border-radius: var(--sup-radius);
  padding: 16px;
  margin: 12px 0;
  box-shadow: var(--sup-shadow);
}
.sup-card h2 { margin: 0 0 10px; font-size: 1.05rem; }
.sup-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.sup-card-head h2 { margin: 0; }
.sup-muted { color: var(--sup-muted); font-size: 0.92rem; }

.sup-hero-stats {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--sup-accent-2) 0%, var(--sup-accent-soft) 100%);
  border: 0;
}
.sup-hero-stats h2 { margin: 0; }

.sup-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin: 12px 0;
}
@media (min-width: 700px) { .sup-stats { grid-template-columns: repeat(4, 1fr); } }
.sup-stat {
  background: var(--sup-card); border: 1px solid var(--sup-line);
  border-radius: var(--sup-radius); padding: 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.sup-stat strong { font-size: 1.6rem; color: var(--sup-accent); }
.sup-stat span { color: var(--sup-muted); font-size: 0.88rem; }
.sup-stat.warn strong   { color: var(--sup-warn); }
.sup-stat.ok strong     { color: var(--sup-ok); }
.sup-stat.danger strong { color: var(--sup-danger); }

/* ---------- LIST OF POSTS ---------- */
.sup-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sup-list-row {
  display: grid; grid-template-columns: 64px 1fr; gap: 12px;
  padding: 10px; border: 1px solid var(--sup-line);
  border-radius: 12px; background: #fdfdfb;
}
.sup-list-thumb {
  width: 64px; height: 64px; border-radius: 10px;
  background: #eef0e8 50% 50% / cover no-repeat;
}
.sup-list-body { min-width: 0; }
.sup-list-title { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sup-list-title strong { font-size: 0.98rem; }
.sup-list-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 6px; color: var(--sup-muted); font-size: 0.85rem;
}
.sup-list-actions {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
@media (min-width: 760px) {
  .sup-list-row { grid-template-columns: 72px 1fr auto; }
  .sup-list-actions { grid-column: auto; margin-top: 0; align-self: center; }
}
.sup-empty { text-align: center; padding: 24px 8px; }

/* ---------- PILLS ---------- */
.sup-pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
  background: var(--sup-line); color: var(--sup-ink);
}
.sup-pill.type-retreat  { background: #e2efd1; color: #2b5a1e; }
.sup-pill.type-workshop { background: #e9e1f3; color: #4b2c75; }
.sup-pill.status-pending  { background: var(--sup-warn-bg); color: var(--sup-warn); }
.sup-pill.status-approved { background: var(--sup-ok-bg); color: var(--sup-ok); }
.sup-pill.status-rejected { background: var(--sup-danger-bg); color: var(--sup-danger); }
.sup-note {
  margin-top: 6px; padding: 8px 10px; background: var(--sup-danger-bg);
  border: 1px solid #f3c2bf; border-radius: 8px;
  color: var(--sup-danger); font-size: 0.88rem;
}

/* ---------- BUTTONS ---------- */
.sup-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 11px 16px; border-radius: 10px;
  border: 1px solid var(--sup-line); background: #fff;
  color: var(--sup-ink); font-weight: 600;
  text-decoration: none; cursor: pointer;
  font-size: 0.92rem; line-height: 1.25; min-height: 44px;
  transition: transform .06s ease, background .15s ease;
}
.sup-btn:active { transform: translateY(1px); }
.sup-btn.primary { background: var(--sup-accent); color: var(--sup-accent-2); border-color: var(--sup-accent); }
.sup-btn.primary:hover { background: #0a3018; }
.sup-btn.ghost { background: transparent; }
.sup-btn.danger { background: var(--sup-danger-bg); color: var(--sup-danger); border-color: #f3c2bf; }
.sup-btn.lg { padding: 14px 20px; font-size: 1rem; min-height: 48px; }
.sup-btn.sm { padding: 8px 12px; font-size: 0.82rem; min-height: 40px; }

/* ---------- FORM ---------- */
.sup-form, .sup-form-page { display: flex; flex-direction: column; gap: 12px; }
.sup-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.sup-field > span { font-weight: 600; font-size: 0.9rem; color: var(--sup-ink-soft); }
.sup-field > span small { display: block; font-weight: 400; color: var(--sup-muted); font-size: 0.78rem; margin-top: 2px; }
.sup-field input[type="text"],
.sup-field input[type="tel"],
.sup-field input[type="email"],
.sup-field input[type="password"],
.sup-field input[type="url"],
.sup-field input[type="number"],
.sup-field input[type="file"],
.sup-field select,
.sup-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--sup-line);
  border-radius: 10px;
  background: #fff;
  font: inherit; color: var(--sup-ink);
  -webkit-appearance: none;
}
.sup-field textarea { resize: vertical; min-height: 80px; }
.sup-field input:focus, .sup-field select:focus, .sup-field textarea:focus {
  outline: none; border-color: var(--sup-accent-soft);
  box-shadow: 0 0 0 3px rgba(180,214,160,.35);
}
.sup-row-2 { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 600px) { .sup-row-2 { grid-template-columns: 1fr 1fr; } }
.sup-row-2--price-badge .price-currency-wrap { min-width: 0; }
.price-currency-wrap { min-width: 0; }
.price-currency-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}
.price-currency-row__amount {
  width: 100%;
  min-width: 0;
}
.price-currency-row__currency {
  min-width: 4.5rem;
  padding-inline: 10px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.sup-cover-preview {
  width: 100%; height: 140px;
  border-radius: 10px; margin-bottom: 10px;
  background: #eef0e8 50% 50% / cover no-repeat;
  border: 1px solid var(--sup-line);
}

.sup-gallery-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.sup-gallery-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  min-width: 0;
}
.sup-gallery-row .sup-field { flex: 1; min-width: 0; }
.sup-gallery-row .sup-field input,
.sup-gallery-row .sup-field input[type="url"] {
  width: 100%;
  box-sizing: border-box;
}

.sup-photo-preview {
  width: clamp(72px, 18vw, 96px);
  height: clamp(72px, 18vw, 96px);
  border-radius: 50%;
  overflow: hidden;
  margin: 0 0 14px;
  border: 2px solid var(--sup-accent-soft);
  background: var(--sup-line);
}
.sup-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sup-status-card { display: flex; flex-direction: column; gap: 6px; }

.sup-faq-list { display: flex; flex-direction: column; gap: 10px; }
.sup-faq-row {
  border: 1px solid var(--sup-line); border-radius: 10px;
  padding: 10px; background: #fdfdfb;
  display: flex; flex-direction: column; gap: 6px;
}
.sup-faq-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.88rem; color: var(--sup-muted);
}
.sup-faq-row input[type="text"], .sup-faq-row textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--sup-line);
  border-radius: 8px; font: inherit;
}

.sup-actions-bar {
  position: sticky; bottom: 78px;
  display: flex; gap: 8px; justify-content: flex-end;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  padding: 10px; border-radius: 12px;
  border: 1px solid var(--sup-line);
  box-shadow: var(--sup-shadow);
  margin: 16px 0;
  z-index: 120;
}
@media (min-width: 900px) { .sup-actions-bar { bottom: 16px; } }

/* ---------- BOTTOM TABBAR (mobile) ---------- */
.sup-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-around;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--sup-line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 20;
}
.sup-tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 10px; border-radius: 10px; min-width: 64px;
  text-decoration: none; color: var(--sup-muted);
  font-size: 0.74rem; font-weight: 600;
}
.sup-tabbar a .ic { font-size: 1.15rem; }
.sup-tabbar a.is-active { color: var(--sup-accent); background: var(--sup-accent-2); }
@media (min-width: 900px) { .sup-tabbar { display: none; } }

/* ---------- QUILL TWEAKS ---------- */
.ql-toolbar.ql-snow { border-color: var(--sup-line); border-radius: 10px 10px 0 0; background: #fdfdfb; }
.ql-container.ql-snow { border-color: var(--sup-line); border-radius: 0 0 10px 10px; min-height: 240px; font: inherit; }
.sup-richtext-shell .ql-editor {
  direction: rtl;
  text-align: right;
  color: #1a1d28;
  background: #ffffff;
}

.sup-editor-fallback {
  width: 100%;
  min-height: 200px;
  max-width: 100%;
  min-width: 0;
  font-size: 16px;
  line-height: 1.6;
  padding: 12px;
  border: 1px solid var(--sup-line);
  border-radius: 10px;
  background: #fff;
  color: var(--sup-ink);
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
}

/* ---------- SUP · Sessions block ---------- */
.sup-sessions-list { display: grid; gap: 12px; }
.sup-session-row {
  background: #fbfdf6;
  border: 1px solid var(--sup-line);
  border-radius: 14px;
  padding: 14px 16px;
}
.sup-session-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-weight: 700; color: var(--sup-accent);
}

/* ---------- SUP · Tabs (reviews) ---------- */
.sup-tabs-card { padding: 18px 20px; }
.sup-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--sup-line);
  margin-top: 8px;
}
.sup-tabs a {
  padding: 10px 14px;
  text-decoration: none;
  color: var(--sup-muted);
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 2px solid transparent;
  transition: color 150ms, border-color 150ms;
}
.sup-tabs a:hover { color: var(--sup-accent); }
.sup-tabs a.is-active {
  color: var(--sup-accent);
  border-bottom-color: var(--sup-accent);
}

/* ---------- SUP · Reviews ---------- */
.sup-btn.ok {
  background: var(--sup-ok-bg);
  color: var(--sup-ok);
  border-color: rgba(43, 90, 30, 0.25);
}
.sup-reviews-grid { display: grid; gap: 14px; }
.sup-review-card { padding: 18px 20px; }
.sup-rv-head {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; margin-bottom: 8px;
}
.sup-link { color: var(--sup-accent); text-decoration: none; font-weight: 600; }
.sup-rv-author { color: var(--sup-ink); margin-bottom: 8px; }
.sup-rv-author a { color: var(--sup-muted); }
.sup-rv-rating { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--sup-ink); }
.sup-rv-title { margin: 4px 0 6px; color: var(--sup-ink); font-size: 1.08rem; }
.sup-rv-body { color: var(--sup-ink); line-height: 1.65; white-space: pre-line; margin: 0 0 10px; }
.sup-rv-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
}
.sup-rv-photos a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--sup-line);
}
.sup-rv-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sup-rv-actions {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  border-top: 1px solid var(--sup-line);
  padding-top: 12px; margin-top: 8px;
}
.sup-inline-input {
  flex: 1; min-width: 140px;
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--sup-line); background: #fff;
  color: var(--sup-ink); font: inherit; font-size: 0.86rem;
}
.sup-note {
  background: #fff8e6; color: #8a5a00;
  border: 1px solid rgba(232,185,118,0.35);
  padding: 10px 14px; border-radius: 10px;
  margin: 6px 0 10px; font-size: 0.88rem;
}

/* Stars in supplier panel */
.sup-body .stars { color: #d4a04c; font-size: 1rem; }
.sup-body .stars .star.off { color: rgba(12,60,30,0.2); }

/* Mobile */
@media (max-width: 640px) {
  .sup-rv-head { flex-direction: column; align-items: flex-start; }
  .sup-rv-actions { flex-direction: column; align-items: stretch; }
  .sup-rv-actions form { width: 100%; }
  .sup-rv-actions form button { width: 100%; }
  .sup-inline-input { min-width: 0; width: 100%; }
  .sup-inline-two { grid-template-columns: 1fr; align-items: stretch; }
  .sup-auth-links a { white-space: normal; }
  .sup-nav a { min-height: 48px; }
}
