/* קהילת הפאניות — שפה עיצובית אחת לכל המסכים.
   בהיר ויוקרתי: כחול עמוק + פוקסיה על רקע פנינה, קווי שיער דקים, הרבה אוויר. RTL. */
:root {
  --bg: linear-gradient(168deg, #FDFDFE 0%, #F0F4FB 46%, #FAF1F4 100%);
  --ink: #0F2242;          /* כחול עמוק — גם הטקסט, זה מה שעושה את היוקרה */
  --ink-soft: #3E4C66;
  --navy: #10233F;
  --navy-deep: #0A1730;
  --accent: #8E2250;       /* ורוד בורדו עמוק */
  --accent-deep: #68162F;
  --accent-soft: #F8EDF1;
  --blue-soft: #EDF3FB;
  --line: #E3E9F3;
  --muted: #6E7A91;
  --card: #FFFFFF;
  --ok: #127A5A;
  --warn: #9A6400;
  --err: #B01B45;
  --radius: 20px;
  --shadow: 0 16px 44px rgba(16, 35, 63, 0.09);
  --shadow-sm: 0 6px 18px rgba(16, 35, 63, 0.06);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  background: var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.68;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: 'Frank Ruhl Libre', 'Heebo', Georgia, serif;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--ink);
}
h1 { font-size: clamp(32px, 5vw, 50px); font-weight: 500; }
h2 { font-size: clamp(25px, 3.4vw, 33px); }
h3 { font-size: 21px; font-weight: 700; }

a { color: var(--accent); }
p { margin: 0 0 14px; }

.muted { color: var(--muted); }
.small { font-size: 15px; }
.tiny { font-size: 13.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.grow { flex: 1; }

/* ---------- מבנה ---------- */

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 120px; }
.wrap-narrow { max-width: 720px; }

header.top {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.brand span { color: var(--accent); }

nav.main { display: flex; gap: 2px; margin-right: auto; flex-wrap: wrap; }
nav.main a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 16.5px;
  position: relative;
  transition: color .15s ease, background .15s ease;
}
nav.main a:hover { color: var(--ink); background: var(--blue-soft); }
nav.main a.active { background: var(--navy); color: #fff; }
nav.main a .pip {
  position: absolute;
  top: 1px;
  left: 3px;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  line-height: 19px;
  text-align: center;
  padding: 0 4px;
  font-family: 'Heebo', sans-serif;
  font-weight: 600;
}

.who { display: flex; align-items: center; gap: 10px; font-size: 15.5px; color: var(--ink-soft); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; background: var(--blue-soft);
  display: grid; place-items: center;
  font-weight: 700; color: var(--navy); font-size: 15px;
  flex: 0 0 auto;
}
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }

/* ---------- מצב אורח (זמני) ---------- */

.guest-strip {
  position: sticky;
  top: 62px;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 15.5px;
  font-weight: 600;
  border-bottom: 1px solid #EFDCE4;
}

@media (max-width: 860px) {
  .guest-strip { top: 56px; font-size: 14px; padding: 8px 14px; gap: 10px; }
}

/* ---------- כרטיסים ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px;
  margin: 0 0 20px;
}
.card.tight { padding: 16px 18px; }
.card.glass { background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(8px); }
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 8px; }
.between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---------- כפתורים ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 13px 28px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
  box-shadow: 0 4px 14px rgba(16, 35, 63, .16);
}
.btn:hover { transform: translateY(-1px); background: var(--navy-deep); }
.btn:active { transform: none; }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost {
  background: transparent; color: var(--ink); box-shadow: none;
  border: 1.5px solid var(--line);
}
.btn.ghost:hover { background: var(--blue-soft); border-color: #CFDAEA; }
.btn.soft { background: var(--accent-soft); color: var(--accent-deep); box-shadow: none; }
.btn.soft:hover { background: #F2E0E7; }
.btn.pink { background: var(--accent); box-shadow: 0 4px 16px rgba(142, 34, 80, .28); }
.btn.pink:hover { background: var(--accent-deep); }
.btn.danger { background: var(--err); box-shadow: 0 4px 14px rgba(176, 27, 69, .22); }
.btn.sm { padding: 8px 18px; font-size: 15px; }
.btn.block { width: 100%; justify-content: center; }
.btn.link { background: none; color: var(--accent); padding: 4px 6px; font-weight: 600; box-shadow: none; }

.icon-btn {
  background: none; border: 0; cursor: pointer; font: inherit;
  padding: 5px 9px; border-radius: 999px; color: var(--muted); font-size: 16px;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- טפסים ---------- */

label.field { display: block; margin-bottom: 15px; }
label.field > span { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
label.field > span .req { color: var(--accent); }

input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  padding: 12px 15px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  transition: border-color .14s ease, box-shadow .14s ease;
}
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(142, 34, 80, .10);
}
textarea { resize: vertical; min-height: 96px; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 16.5px; margin-bottom: 12px; }
.check input { margin-top: 5px; }

/* ---------- תגיות וסטטוסים ---------- */

.tag {
  display: inline-block;
  padding: 3px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-deep);
  white-space: nowrap;
}
.tag.ok { background: #E6F4EF; color: var(--ok); }
.tag.warn { background: #FBF1DD; color: var(--warn); }
.tag.err { background: #FAE6EC; color: var(--err); }
.tag.flat { background: var(--blue-soft); color: var(--ink-soft); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .big { font-size: 44px; display: block; margin-bottom: 10px; opacity: .8; }

.notice {
  padding: 15px 19px;
  border-radius: 15px;
  background: var(--blue-soft);
  color: var(--navy);
  margin-bottom: 18px;
  font-size: 16.5px;
  border-inline-start: 3px solid var(--navy);
}
.notice.warn { background: #FBF1DD; color: #7A4F00; border-inline-start-color: #C98A00; }
.notice.err { background: #FAE6EC; color: var(--err); border-inline-start-color: var(--err); }
.notice.ok { background: #E6F4EF; color: var(--ok); border-inline-start-color: var(--ok); }

/* ---------- טבלאות ---------- */

.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 16px; }
table.data th, table.data td { padding: 12px; text-align: right; vertical-align: top; }
table.data th { font-weight: 600; color: var(--muted); font-size: 14px; letter-spacing: .02em; }
table.data tbody tr + tr td { border-top: 1px solid var(--line); }

/* ---------- טוסטים ---------- */

#toasts {
  position: fixed; inset-block-start: 16px; inset-inline-start: 50%;
  transform: translateX(-50%); z-index: 90;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: min(560px, 92vw);
}
.toast {
  background: var(--navy); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 16px; box-shadow: 0 10px 30px rgba(10, 23, 48, .26); text-align: center;
}
.toast.err { background: var(--err); }
.toast.ok { background: var(--ok); }

/* ---------- מודאל ---------- */

.modal-back {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(15, 34, 66, .42);
  backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px;
}
.modal {
  background: #fff; border-radius: 24px; width: min(680px, 100%);
  max-height: 92vh; overflow: auto; padding: 28px;
  box-shadow: 0 30px 70px rgba(10, 23, 48, .32);
}
.modal h2 { margin-bottom: 4px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* ---------- עמוד הבית ---------- */

.hero { padding: 40px 0 14px; }
.hero h1 { margin-bottom: 8px; }
.hero .lead { font-size: 21px; color: var(--ink-soft); max-width: 640px; }

a.tile {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--card); border-radius: var(--radius); padding: 28px 26px;
  box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .16s ease;
  position: relative; overflow: hidden;
}
a.tile::after {
  content: ''; position: absolute; inset-block-start: 0; inset-inline: 0;
  height: 3px; background: linear-gradient(90deg, var(--navy), var(--accent));
  opacity: 0; transition: opacity .16s ease;
}
a.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
a.tile:hover::after { opacity: 1; }
a.tile .ico { font-size: 32px; display: block; margin-bottom: 12px; }
a.tile h3 { margin-bottom: 4px; }
a.tile .sub { color: var(--muted); font-size: 16px; }
a.tile .count {
  position: absolute; inset-block-start: 22px; inset-inline-start: 24px;
  background: var(--accent); color: #fff; border-radius: 999px;
  min-width: 26px; height: 26px; line-height: 26px; text-align: center;
  font-size: 14.5px; padding: 0 8px; font-weight: 700;
}
a.tile.admin {
  background: linear-gradient(140deg, var(--navy-deep) 0%, #1B3A6B 100%);
  color: #fff;
}
a.tile.admin h3 { color: #fff; }
a.tile.admin .sub { color: #AFC4E2; }

/* ---------- צ'אט ---------- */

.chat-layout { display: grid; grid-template-columns: 252px 1fr; gap: 20px; align-items: start; }

.channels {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 12px;
}
.channels button {
  display: flex; width: 100%; align-items: center; gap: 8px;
  background: none; border: 0; font: inherit; text-align: right;
  padding: 11px 14px; border-radius: 12px; cursor: pointer; color: var(--ink-soft);
}
.channels button:hover { background: var(--blue-soft); color: var(--ink); }
.channels button.active { background: var(--navy); color: #fff; font-weight: 600; }
.channels button .n {
  margin-inline-start: auto; background: var(--accent); color: #fff;
  border-radius: 999px; font-size: 12.5px; min-width: 20px; height: 20px;
  line-height: 20px; text-align: center; padding: 0 5px; font-weight: 600;
}

.pinned-strip {
  background: #fff;
  border-radius: 16px;
  border-inline-start: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.pinned-strip .ph {
  font-weight: 700; margin-bottom: 8px; font-size: 15px;
  color: var(--accent-deep); letter-spacing: .02em;
}
.pinned-item { padding: 8px 0; font-size: 16.5px; }
.pinned-item + .pinned-item { border-top: 1px solid var(--line); }
.pinned-item .meta { font-size: 13.5px; color: var(--muted); }

.chat-box {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.chat-scroll { padding: 16px 22px; overflow-y: auto; height: min(58vh, 620px); }
.chat-compose { border-top: 1px solid var(--line); padding: 12px 18px; background: #fff; }
.chat-compose .row { align-items: flex-end; }
.chat-compose textarea { min-height: 52px; max-height: 180px; border-radius: 18px; }

.msg { display: flex; gap: 12px; padding: 9px 0; }
.msg .bubble-wrap { min-width: 0; flex: 1; }
.msg .mhead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.msg .mname { font-weight: 700; font-size: 16.5px; }
.msg .mtime { font-size: 13px; color: var(--muted); }
.msg .bubble {
  background: #F4F7FC; border-radius: 4px 18px 18px 18px; padding: 11px 15px;
  margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 17px;
}
.msg.mine .bubble { background: var(--accent-soft); }
.msg.admin-msg .mname::after {
  content: 'הנהלה'; font-family: 'Heebo', sans-serif; font-size: 11.5px;
  background: var(--navy); color: #fff; border-radius: 999px; padding: 2px 9px;
  margin-inline-start: 7px; font-weight: 600; letter-spacing: .03em;
}
.msg .bubble img.att { max-width: min(320px, 100%); border-radius: 12px; display: block; margin-top: 8px; }
.msg .deleted { font-style: italic; color: var(--muted); background: #F3F5F9; }
.msg-actions { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 3px; }
.reactions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.reactions button {
  background: #fff; border: 1.4px solid var(--line); border-radius: 999px;
  padding: 2px 12px; font-size: 15px; cursor: pointer; font-family: inherit; color: var(--ink-soft);
}
.reactions button:hover { border-color: #CFDAEA; }
.reactions button.mine { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.emoji-pick { display: flex; gap: 5px; flex-wrap: wrap; }
.emoji-pick button {
  background: #fff; border: 1.4px solid var(--line); border-radius: 12px;
  font-size: 21px; cursor: pointer; padding: 5px 9px; line-height: 1.2;
}
.emoji-pick button:hover { border-color: var(--accent); background: var(--accent-soft); }
.thread-link { font-size: 14.5px; font-weight: 600; }

/* ---------- חנות ---------- */

.wig-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
}
.wig-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.wig-card .ph {
  aspect-ratio: 4 / 3; background: var(--blue-soft) center/cover no-repeat;
  display: grid; place-items: center; font-size: 40px; color: #B9C9E0;
}
.wig-card .body { padding: 18px 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.wig-card .price {
  font-family: 'Frank Ruhl Libre', serif; font-size: 25px; font-weight: 500; color: var(--accent-deep);
}
.wig-card .seller { font-size: 14.5px; color: var(--muted); }
.wig-card .foot { margin-top: auto; padding-top: 12px; }
.filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }

.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; }
.thumb-wrap { position: relative; }
.thumb-wrap .x {
  position: absolute; inset-block-start: -6px; inset-inline-start: -6px;
  background: var(--err); color: #fff; border: 0; border-radius: 50%;
  width: 24px; height: 24px; cursor: pointer; font-size: 14px; line-height: 1;
}

/* ---------- סרגל התקדמות ---------- */

.bar { height: 10px; border-radius: 999px; background: var(--blue-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--accent)); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.steps .s { font-size: 14px; padding: 3px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--muted); }
.steps .s.done { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.steps .s.now { background: var(--navy); color: #fff; font-weight: 600; }

.timeline { border-inline-start: 2px solid var(--line); padding-inline-start: 20px; margin-top: 16px; }
.timeline .ev { position: relative; padding-bottom: 20px; }
.timeline .ev::before {
  content: ''; position: absolute; inset-inline-start: -27px; top: 8px;
  width: 11px; height: 11px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.timeline .ev img { max-width: 240px; border-radius: 12px; display: block; margin-top: 8px; }

/* ---------- לשוניות ---------- */

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.tabs button {
  background: rgba(255, 255, 255, .72); border: 1px solid var(--line); font: inherit; font-size: 16.5px;
  padding: 9px 20px; border-radius: 999px; cursor: pointer; color: var(--ink-soft);
}
.tabs button:hover { background: #fff; color: var(--ink); }
.tabs button.active { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }
.tabs button .n {
  background: var(--accent); color: #fff; border-radius: 999px; font-size: 12.5px;
  padding: 0 7px; margin-inline-start: 6px;
}

/* ---------- מובייל ---------- */

@media (max-width: 860px) {
  body { font-size: 17px; }

  /* backdrop-filter על הכותרת יוצר containing block, ואז סרגל הניווט
     ה-fixed נתלה בכותרת במקום בחלון ומופיע למעלה. בלעדיו הוא חוזר לתחתית. */
  header.top { backdrop-filter: none; background: rgba(255, 255, 255, .97); }

  .chat-layout { grid-template-columns: 1fr; }
  .channels { display: flex; gap: 6px; overflow-x: auto; padding: 8px; }
  .channels button { width: auto; white-space: nowrap; }
  .chat-scroll { height: min(54vh, 460px); }
  .card { padding: 20px; }
  .hero { padding: 26px 0 10px; }
  .top-inner { gap: 10px; padding: 10px 16px; }
  .who .name { display: none; }

  nav.main {
    position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 50;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 6px 4px;
    justify-content: space-around; gap: 0; margin: 0;
    box-shadow: 0 -6px 24px rgba(16, 35, 63, .07);
  }
  nav.main a {
    flex: 1; text-align: center; font-size: 11.5px; padding: 6px 2px;
    border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  }
  nav.main a .ni { font-size: 21px; line-height: 1; }
  nav.main a.active { background: var(--accent-soft); color: var(--accent-deep); }
  nav.main a .pip { inset-block-start: 0; inset-inline-start: 50%; }
  .wrap { padding-bottom: 96px; }
}

@media (min-width: 861px) {
  nav.main a .ni { display: none; }
}
