/* ניהול - אותה שפה כמו דף התשלום: תכלת, נייבי, כרטיסים לבנים עגולים, Fredoka */
:root {
  --sky: #1E9BE0;
  --sky-deep: #1784C2;
  --mist: #DDF1FC;
  --ice: #F2F8FD;
  --navy: #0B1F5C;
  --ink-soft: #44527A;
  --line: #E3EEF8;
  --ok: #0E7A4E; --ok-bg: #E2F6EC;
  --warn: #8A4B00; --warn-bg: #FFF1DC;
  --bad: #8A1C1C; --bad-bg: #FDE8E8;
  --mute: #5A6480; --mute-bg: #ECEFF5;
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body { background: var(--ice); color: var(--navy); font-family: 'Fredoka', Arial, sans-serif; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--sky-deep); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; }

.bar { background: var(--sky); color: #fff; }
.bar-in { max-width: 980px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bar-brand { color: #fff; text-decoration: none; font-weight: 600; font-size: 18px; margin-inline-end: auto; }
.bar-brand small { font-weight: 400; opacity: .85; font-size: 14px; }
.bar a.nav { color: #fff; text-decoration: none; font-size: 15px; padding: 10px 8px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.bar a.nav:hover { text-decoration: underline; }

.wrap { max-width: 980px; margin: 0 auto; padding: 22px 16px 60px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head h1 { font-size: 26px; }

.card { background: #fff; border-radius: 22px; padding: 20px; box-shadow: 0 6px 22px rgba(11, 31, 92, .07); }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 18px; margin-bottom: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 99px; border: 2px solid var(--navy);
  background: var(--navy); color: #fff; font: inherit; font-size: 16px; font-weight: 500;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #13307F; }
.btn.light { background: #fff; color: var(--navy); }
.btn.light:hover { background: var(--ice); }
.btn.sky { background: var(--sky); border-color: var(--sky); }
.btn.wa { background: #1F8F4E; border-color: #1F8F4E; }
.btn.danger { background: #fff; color: var(--bad); border-color: #E7B4B4; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* סיכום */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 18px; padding: 14px 16px; }
.stat span { display: block; font-size: 13px; color: var(--ink-soft); }
.stat b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats .stat:last-child { grid-column: 1 / -1; } }

/* סינון */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { text-decoration: none; color: var(--navy); background: #fff; border-radius: 99px; padding: 8px 14px; font-size: 14px; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.tabs a.on { background: var(--navy); color: #fff; }
.tabs a em { font-style: normal; opacity: .7; }

/* רשימת בקשות */
.list { display: flex; flex-direction: column; gap: 10px; }
.row { background: #fff; border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.row:hover { box-shadow: 0 4px 16px rgba(11, 31, 92, .1); }
.row-main { flex: 1 1 auto; min-width: 0; }
.row-title { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.row-amt { font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 3px 10px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.tag.open { background: var(--mist); color: var(--sky-deep); }
.tag.paid { background: var(--ok-bg); color: var(--ok); }
.tag.expired { background: var(--warn-bg); color: var(--warn); }
.tag.cancelled { background: var(--mute-bg); color: var(--mute); }

.empty { text-align: center; padding: 40px 16px; color: var(--ink-soft); }
.empty i { font-size: 34px; color: var(--sky); display: block; margin-bottom: 10px; }

/* טפסים */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 500; }
.field .hint { font-size: 13px; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], select, textarea {
  font: inherit; font-size: 16px; color: var(--navy); background: var(--ice);
  border: 2px solid transparent; border-radius: 14px; padding: 11px 14px; width: 100%; min-height: 48px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); background: #fff; }
textarea { min-height: 90px; resize: vertical; }
.amount-input { font-size: 28px !important; font-weight: 600; direction: ltr; text-align: right; }
.req { color: var(--bad); }

.flash { border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; font-size: 15px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--bad-bg); color: var(--bad); }

/* מסך בקשה */
.view { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .view { grid-template-columns: minmax(0, 1fr); } }
.hero-amt { font-size: 44px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 15px; margin: 0; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.linkbox { display: flex; gap: 8px; align-items: stretch; }
.linkbox input { direction: ltr; text-align: left; font-size: 14px; }
.qr { background: #fff; border-radius: 18px; padding: 14px; display: flex; justify-content: center; }
.qr canvas { width: 100%; max-width: 240px; height: auto; image-rendering: pixelated; }
.muted { color: var(--ink-soft); font-size: 14px; }

/* כללי תשלומים */
.rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 10px; }

/* כניסה */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--mist); }
.login .card { width: 100%; max-width: 380px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 14px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
table.tbl th, table.tbl td { text-align: right; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.tbl th { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.scroll { overflow-x: auto; }
