/* פאנל הניהול. עיצוב מאופק בכוונה — זה כלי עבודה, לא ויטרינה.
   הניגודיות נבדקה מול 4.5:1 כמו באתר עצמו. */

:root {
  --ink:        #1d2433;
  --ink-soft:   #5a6478;
  --line:       #dfe3ec;
  --bg:         #f5f7fb;
  --card:       #ffffff;
  --navy:       #1f3a63;
  --navy-dark:  #16294a;
  --gold:       #9a6b1f;
  --danger:     #a32020;
  --ok-bg:      #e8f5ee;
  --ok-ink:     #14673f;
  --err-bg:     #fdecec;
  --err-ink:    #99201f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 50;
  background: var(--navy); color: #fff; padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { inset-inline-start: 12px; }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}

/* ------------------------------------------------------------ מסגרת */

.topbar { background: var(--navy); color: #fff; padding: 13px 0; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar .brand { font-weight: 600; }
.topbar .who { font-size: 14px; color: #d4dcea; }
.topbar a { color: #fff; }

.tabs { background: var(--navy-dark); }
.tabs .wrap { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs a {
  color: #c9d4e6; text-decoration: none; padding: 11px 15px; font-size: 15px;
  border-bottom: 3px solid transparent;
}
.tabs a:hover { background: rgba(255,255,255,.08); color: #fff; }
.tabs a.on { color: #fff; border-bottom-color: var(--gold); font-weight: 600; }

main { padding: 24px 18px 60px; }

.foot { color: var(--ink-soft); font-size: 14px; padding: 0 0 30px; }

/* ------------------------------------------------------------ רכיבים */

h1 { font-size: 23px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0 0 16px; }
.sub { color: var(--ink-soft); margin: 0 0 22px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px; margin-bottom: 20px;
}
.card.empty { color: var(--ink-soft); text-align: center; padding: 30px; }

.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 15px; }
.field .req { color: var(--danger); }
.field input[type=text], .field input[type=url], .field input[type=number],
.field input[type=password], .field textarea, .field select {
  width: 100%; padding: 9px 11px; border: 1px solid #c3cad8;
  border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 90px; }
.field input[type=checkbox] { width: 20px; height: 20px; }
.hint { color: var(--ink-soft); font-size: 13.5px; margin: 5px 0 0; }

.btn {
  display: inline-block; background: var(--navy); color: #fff; border: 1px solid var(--navy);
  padding: 9px 18px; border-radius: 8px; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--navy-dark); }
.btn.ghost { background: #fff; color: var(--navy); }
.btn.ghost:hover { background: #eef2f8; }
.btn.danger { background: #fff; color: var(--danger); border-color: #e0b6b6; }
.btn.danger:hover { background: #fdecec; }
.btn.sm { padding: 5px 11px; font-size: 14px; }
.actions { display: flex; gap: 10px; margin-top: 18px; }
form.inline { display: inline; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.thumb { width: 54px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.preview { max-width: 180px; margin-top: 8px; border-radius: 8px; border: 1px solid var(--line); display: block; }

.flash { padding: 11px 15px; border-radius: 9px; margin-bottom: 18px; font-weight: 600; }
.flash.ok    { background: var(--ok-bg);  color: var(--ok-ink); }
.flash.error { background: var(--err-bg); color: var(--err-ink); }

/* ------------------------------------------------------------ כניסה */

.login-page { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 14px;
              padding: 30px; width: 100%; max-width: 380px; }
.login-card h1 { text-align: center; font-size: 20px; margin-bottom: 6px; }
.login-card .sub { text-align: center; }

@media (max-width: 640px) {
  .row-actions { flex-wrap: wrap; }
  th:nth-child(3), td:nth-child(3) { display: none; }
}
