/* ממשק ניהול */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login__card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; text-align: center; padding: 32px 28px; }
.login__logo { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 4px; box-shadow: var(--shadow); }
.login__card h1 { margin: 0; font-size: 22px; }
.login__card p { margin: 0; color: var(--muted); font-size: 14px; }
.login__card input { height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); outline: none; text-align: center; }
.login__card input:focus { border-color: var(--brand-1); }
.login__card .btn { height: 46px; }
.login__error { color: #dc2626 !important; min-height: 1.2em; }
.login__back { color: var(--muted); font-size: 13px; }

.admin-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; flex-wrap: wrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.dirty { color: #d97706; font-size: 13px; font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 500; }
.field input, .field select {
  height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--text); outline: none; font-size: 14.5px;
}
.field input:focus, .field select:focus { border-color: var(--brand-1); box-shadow: 0 0 0 3px rgba(91, 75, 196, .14); }
.field--grow { flex: 1; min-width: 200px; }

.add-form__row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.add-form__btn { height: 42px; padding: 0 22px; }
.hint { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }

.col-picker { display: flex; gap: 4px; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; height: 42px; }
.col-picker button {
  width: 40px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-weight: 700; color: var(--muted);
  transition: background .15s, color .15s;
}
.col-picker button[aria-checked="true"] { background: var(--grad); color: #fff; }

.board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: start; }
@media (max-width: 1400px) { .board { grid-template-columns: repeat(3, 1fr); } }
.bcol { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.bcol__head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.bcol__num { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.bcol__title { flex: 1; min-width: 0; height: 32px; border: 1px dashed transparent; border-radius: 8px; padding: 0 8px; background: transparent; font-weight: 600; outline: none; }
.bcol__title:hover { border-color: var(--line); }
.bcol__title:focus { border-color: var(--brand-1); border-style: solid; background: var(--card-2); }
.bcol__count { font-size: 12px; color: var(--muted); background: var(--card-2); border-radius: 999px; padding: 2px 9px; flex-shrink: 0; }
.bcol__list { list-style: none; margin: 0; padding: 8px; min-height: 80px; display: flex; flex-direction: column; gap: 4px; transition: background .15s; border-radius: 0 0 var(--r) var(--r); }
.bcol__list.is-over { background: color-mix(in srgb, var(--brand-2) 12%, transparent); }
.bcol__empty { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 0; }
.bcol__add { margin: 0 8px 10px; border: 1px dashed var(--line); background: transparent; border-radius: 10px; height: 36px; color: var(--muted); cursor: pointer; font-size: 13px; }
.bcol__add:hover { border-color: var(--brand-1); color: var(--brand-1); }

.litem {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px;
  background: var(--card-2); border: 1px solid transparent; cursor: grab; user-select: none;
  transition: border-color .12s, opacity .12s;
}
.litem:hover { border-color: var(--line); }
.litem.is-dragging { opacity: .35; }
.litem.is-new { animation: flash 1.4s; }
@keyframes flash { 0%, 40% { background: rgba(234, 179, 8, .35); } }
.litem__grip { color: var(--muted); font-size: 14px; line-height: 1; flex-shrink: 0; }
.litem img { width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0; }
.litem__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.litem__text strong { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.litem__text small { font-size: 11px; color: var(--muted); direction: ltr; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.litem__btns { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; flex-shrink: 0; }
.litem:hover .litem__btns, .litem:focus-within .litem__btns { opacity: 1; }
.litem__btns button { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; font-size: 13px; }
.litem__btns button:hover { background: var(--card); }
.drop-marker { height: 3px; border-radius: 2px; background: var(--brand-1); margin: -1px 4px; }

.dialog { border: 0; border-radius: var(--r); padding: 0; width: min(440px, calc(100% - 32px)); background: var(--card); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
.dialog::backdrop { background: rgba(10, 15, 30, .45); backdrop-filter: blur(3px); }
.dialog__body { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.dialog h2 { margin: 0 0 4px; font-size: 18px; }
.dialog__actions { display: flex; gap: 8px; margin-top: 6px; }
.spacer { flex: 1; }

.toast {
  position: fixed; bottom: 24px; left: 50%; translate: -50% 20px; opacity: 0; pointer-events: none;
  background: #111827; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 500;
  transition: opacity .2s, translate .2s; z-index: 100; box-shadow: var(--shadow-hover);
}
.toast.show { opacity: 1; translate: -50% 0; }
.toast.error { background: #b91c1c; }

@media (max-width: 1000px) { .board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .board { grid-template-columns: 1fr; }
  .litem__btns { opacity: 1; }
}
