/* salesys ui — מערכת עיצוב משותפת. RTL, Heebo, פלטת מרכז הקווים */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;700;900&family=Frank+Ruhl+Libre:wght@500;800&display=swap');

:root {
  --ink: #1E2B45;          /* נייבי-דיו */
  --ink-soft: #46536E;
  --paper: #FAF8F4;        /* נייר חם */
  --card: #FFFFFF;
  --line: #E6E1D8;
  --accent: #F0A11B;       /* כתום מרכז הקווים */
  --accent-ink: #7A4E00;
  --ok: #1D7A4F;
  --ok-bg: #E4F3EB;
  --warn: #A33B2E;
  --warn-bg: #FBEAE7;
  --pend: #8A6D1A;
  --pend-bg: #FBF3DC;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30,43,69,.06), 0 8px 24px rgba(30,43,69,.07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 'Heebo', system-ui, sans-serif;
}
a { color: inherit; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 900; }
h2 { font-size: 19px; font-weight: 700; }
.muted { color: var(--ink-soft); }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: embed; }

/* ---- מעטפת ---- */
.topbar {
  background: var(--ink); color: #fff;
  padding: 14px 20px; display: flex; align-items: center; gap: 14px;
}
.topbar .brand { font-weight: 900; font-size: 17px; letter-spacing: .2px; }
.topbar .brand b { color: var(--accent); }
.topbar .spacer { flex: 1; }
.topbar button { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; }
.wrap { max-width: 980px; margin: 0 auto; padding: 22px 16px 90px; }

/* ---- כרטיסים ---- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 16px;
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { text-align: center; padding: 16px 10px; }
.stat .v { font-size: 30px; font-weight: 900; }
.stat .l { font-size: 13px; color: var(--ink-soft); }

/* ---- טפסים ---- */
label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 3px solid #F0A11B44; border-color: var(--accent); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 130px; }

button, .btn {
  font: 700 15px 'Heebo'; cursor: pointer; border: 0; border-radius: 10px;
  padding: 12px 20px; background: var(--ink); color: #fff; transition: transform .06s;
}
button:active { transform: translateY(1px); }
button.primary { background: var(--accent); color: var(--ink); }
button.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
button.small { padding: 7px 12px; font-size: 13.5px; }
button:disabled { opacity: .5; cursor: default; }

/* ---- טבלאות ---- */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: right; font-weight: 500; color: var(--ink-soft); font-size: 12.5px; padding: 8px 10px; border-bottom: 1.5px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }

/* ---- תגיות סטטוס ---- */
.tag { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.pend { background: var(--pend-bg); color: var(--pend); }

/* ---- חתימה: מקש טלפון ---- */
.key {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 10px;
  background: linear-gradient(180deg, #fff, #F2EEE6);
  border: 1.5px solid var(--line); border-bottom-width: 3px;
  border-radius: 10px; font-weight: 900; font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.key.accent { background: linear-gradient(180deg, #FFD98A, var(--accent)); border-color: #D68C0F; color: var(--ink); }

/* ---- חנות ---- */
.shop-hero {
  background: var(--ink); color: #fff; padding: 34px 20px 78px; text-align: center;
}
.shop-hero h1 { font: 800 34px 'Frank Ruhl Libre', serif; }
.phone-strip {
  max-width: 620px; margin: -46px auto 20px; position: relative;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px;
  display: flex; align-items: center; gap: 14px; justify-content: center; flex-wrap: wrap;
}
.phone-strip .tel { font-size: 22px; font-weight: 900; letter-spacing: 1px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.product { display: flex; flex-direction: column; gap: 10px; }
.product .head { display: flex; align-items: center; gap: 10px; }
.product .name { font-weight: 700; flex: 1; }
.product .price { font-size: 21px; font-weight: 900; }
.product .price small { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 38px; height: 38px; padding: 0; font-size: 20px; }
.qty span { min-width: 26px; text-align: center; font-weight: 900; font-size: 17px; }

.cartbar {
  position: fixed; bottom: 0; right: 0; left: 0; z-index: 30;
  background: var(--ink); color: #fff; padding: 12px 18px;
  display: flex; align-items: center; gap: 14px;
}
.cartbar .sum { font-size: 19px; font-weight: 900; }

/* ---- מודאל ---- */
dialog {
  border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; width: min(440px, calc(100vw - 32px)); 
}
dialog::backdrop { background: rgba(30,43,69,.45); }

/* ---- הודעות ---- */
.toast {
  position: fixed; bottom: 76px; right: 50%; transform: translateX(50%);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 99px;
  font-weight: 500; z-index: 60; box-shadow: var(--shadow);
}
.banner { border-radius: 10px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 14px; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.info { background: var(--pend-bg); color: var(--pend); }

/* ---- כניסה ---- */
.login-box { max-width: 380px; margin: 9vh auto; }
.login-box .logo { text-align: center; margin-bottom: 18px; font-size: 22px; font-weight: 900; }
.login-box .logo b { color: var(--accent); }

.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button {
  background: none; color: var(--ink-soft); border: 0; border-bottom: 3px solid transparent;
  border-radius: 0; padding: 10px 16px; font-weight: 700; white-space: nowrap;
}
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 560px) {
  .wrap { padding: 14px 10px 100px; }
  .card { padding: 14px; }
  h1 { font-size: 22px; }
}
