:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e3e8ef;
  --primary: #1f6feb;
  --primary-dark: #1558c0;
  --navy: #1d3b6e;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.15rem; margin-top: 1.4em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; margin-inline: auto; }
.narrow-form { max-width: 760px; }
.center-text { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.empty { padding: 32px 0; }

/* ---------- header ---------- */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; padding-block: 6px; }
.brand { font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.nav { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; font-size: .95rem; }
.nav a { color: var(--text); padding: 4px 2px; border-bottom: 2px solid transparent; }
.nav a.active { border-color: var(--primary); color: var(--primary); }
.nav a:hover { text-decoration: none; color: var(--primary); }
.nav form { display: flex; align-items: center; gap: 8px; }
button.link { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }
button.link:hover { text-decoration: underline; }

/* ---------- logos / titles ---------- */
.logos { text-align: center; margin: 28px 0 12px; }
.logos img { max-width: 420px; width: 100%; height: auto; }
.logos-text { font-size: 1.3rem; font-weight: 700; color: var(--navy); }
.page-title { margin: 22px 0 18px; font-size: 1.6rem; }
.page-title .season { font-weight: 400; color: var(--muted); font-size: 1rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head .page-title { margin-bottom: 8px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.center-card { display: block; color: inherit; transition: box-shadow .15s, transform .15s; }
.center-card:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(16, 24, 40, .08); transform: translateY(-2px); }
.center-card h2 { margin-top: 0; }
.center-card-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.align-start { align-items: start; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */
.form label { display: block; font-weight: 500; font-size: .95rem; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea, .filters input, .filters select, .inline-input, .copy-input {
  width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid #cbd3df; border-radius: 8px; background: #fff; font: inherit; color: var(--text);
}
.form input:focus, .form select:focus, .form textarea:focus, .filters input:focus, .filters select:focus { outline: 2px solid rgba(31, 111, 235, .35); border-color: var(--primary); }
.form input.invalid, .form select.invalid, .check.invalid span, .signature-wrap.invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; margin-top: 4px; font-weight: 500; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-weight: 400; cursor: pointer; }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.checks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.checks-grid .check { margin: 4px 0; }
.actions { display: flex; gap: 10px; justify-content: flex-start; margin-top: 22px; flex-wrap: wrap; }
.inline-input { margin-top: 0; min-width: 200px; }
.copy-input { font-size: .8rem; cursor: pointer; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border-radius: 8px; border: 1px solid #cbd3df; background: #fff; color: var(--text); font: inherit; font-weight: 500; cursor: pointer; transition: background .15s, box-shadow .15s; }
.btn:hover { background: #f1f4f9; text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-success:hover { background: #136a33; }
.btn-danger { color: var(--danger); border-color: #f3b4b4; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: .85rem; }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-google { background: #fff; border: 1px solid #cbd3df; padding: 12px 22px; font-size: 1.05rem; }

/* ---------- signature ---------- */
.signature-wrap { position: relative; border: 1px solid #cbd3df; border-radius: 8px; background: #fff; height: 200px; touch-action: none; }
#signature-pad { width: 100%; height: 100%; display: block; border-radius: 8px; }
.signature-line { position: absolute; right: 16px; left: 16px; bottom: 48px; border-top: 1px solid #c7ced9; pointer-events: none; }
.signature-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.signature-img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* ---------- misc ---------- */
.price-box { margin: 26px 0 0; padding: 14px 16px; background: #eef4ff; border-radius: 8px; font-size: 1.05rem; }
.alert { padding: 12px 16px; border-radius: 8px; margin: 16px 0; font-weight: 500; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 500; background: #eef0f4; color: var(--muted); white-space: nowrap; }
.badge-paid { background: var(--ok-bg); color: var(--ok); }
.badge-pending { background: var(--warn-bg); color: var(--warn); }
.badge-failed { background: var(--danger-bg); color: var(--danger); }
.badge-role-super_admin { background: #ede9fe; color: #5b21b6; }
.badge-role-league_admin { background: #dbeafe; color: #1e40af; }
.result-icon { width: 72px; height: 72px; border-radius: 50%; margin: 10px auto 18px; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 700; }
.result-icon.ok { background: var(--ok-bg); color: var(--ok); }
.result-icon.fail { background: var(--danger-bg); color: var(--danger); }
.iframe-wrap { margin: 10px auto; max-width: 600px; }
.iframe-wrap iframe { width: 100%; height: 470px; border: 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat-n { font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.stat-ok .stat-n { color: var(--ok); }
.stat-warn .stat-n { color: var(--warn); }
.stat-l { color: var(--muted); font-size: .9rem; }

/* ---------- filters & tables ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters input[type=search], .filters input[type=text] { flex: 1 1 240px; margin-top: 0; }
.filters select { flex: 0 1 200px; margin-top: 0; width: auto; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
.table th { background: #f8fafc; color: var(--muted); font-weight: 500; white-space: nowrap; }
.table tbody tr:hover { background: #f8fafc; }
.row-inactive { opacity: .6; }
.table td[dir=ltr] { text-align: right; }

/* ---------- footer ---------- */
.footer { margin-top: 36px; padding: 16px 0; background: #eceff4; color: var(--muted); font-size: .85rem; text-align: center; }
.footer a { font-weight: 700; color: #e8731b; }

@media (max-width: 600px) {
  .card { padding: 16px; }
  .page-title { font-size: 1.35rem; }
  .btn-lg { width: 100%; }
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; }
}
