/* דשבורד הקורסים של בראבו */
.db-body { background: var(--bg-2); min-height: 100vh; }
.ico--s { width: 14px; height: 14px; vertical-align: -2px; }

.db-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.db-login[hidden], .db[hidden] { display: none; }
.db-login__card { width: min(420px, 100%); display: grid; gap: 14px; padding: 34px 28px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); text-align: center; }
.db-login__card h1 { font-family: var(--font-head); font-size: 28px; }
.db-login__card p { color: var(--muted); }
.db-msg { min-height: 1.3em; color: var(--gold-l); font-size: 15px; }

/* כותרת וטאבים */
.db-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: color-mix(in srgb, var(--ink) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.db-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.db-brand img { height: 38px; width: auto; }
.db-brand span { display: grid; line-height: 1.15; }
.db-brand strong { font-family: var(--font-head); font-size: 18px; }
.db-brand small { font-size: 13px; color: var(--gold-l); }
.db-tabs { display: flex; gap: 4px; margin-inline: auto; overflow-x: auto; scrollbar-width: none; }
.db-tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 16px; border-radius: 14px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; white-space: nowrap; }
.db-tabs button:hover { color: #fff; background: rgb(255 255 255 / .05); }
.db-tabs button[aria-selected="true"] { color: var(--ink); background: var(--gold); }
.db-tabs .ico { width: 19px; height: 19px; }
.db-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #e0483b; color: #fff; font-size: 13px; display: inline-grid; place-items: center; }
.db-out { flex: none; min-height: 42px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--gold-l); font: inherit; font-size: 15px; cursor: pointer; }
@media (max-width: 860px) {
  .db-top { flex-wrap: wrap; }
  .db-tabs { order: 3; width: 100%; margin: 0; }
  .db-tabs button { flex: 1; flex-direction: column; gap: 2px; padding: 6px 8px; font-size: 13px; min-height: 54px; }
  .db-out { margin-inline-start: auto; }
}

.db-main { width: min(1240px, 100% - 32px); margin: 0 auto; padding: 28px 0 80px; }
.db-h1 { font-family: var(--font-head); font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; line-height: 1.2; }
.db-h2 { font-family: var(--font-head); font-size: 21px; margin: 36px 0 14px; }
.db-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.db-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.empty { padding: 30px; border-radius: 20px; border: 1px dashed var(--line); color: var(--muted); text-align: center; margin-top: 16px; }
.hint { font-size: 14.5px; color: var(--muted); }
.hint a { color: var(--gold-l); text-decoration: underline; word-break: break-all; }
.lnk { background: none; border: 0; padding: 6px 4px; color: var(--gold-l); font: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lnk--bad { color: #ff9b8a; }

.alert { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 20px; border-radius: 18px; background: color-mix(in srgb, var(--yellow) 12%, var(--surface)); border: 1px solid var(--line); }
.alert > .ico { color: var(--gold); flex: none; }
.alert span { flex: 1; min-width: 220px; }

/* מספרים */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 22px; }
.kpi { display: grid; gap: 4px; padding: 20px 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.kpi small { font-size: 15px; color: var(--muted); font-weight: 600; }
.kpi strong { font-family: var(--font-head); font-size: 38px; line-height: 1.1; color: var(--gold-l); }
.kpi span { font-size: 14px; color: var(--muted); }
.kpi--warn strong { color: #ffc57a; }

/* טבלה */
.tbl-wrap { overflow-x: auto; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 760px; }
.tbl th { text-align: start; padding: 12px 14px; font-size: 14px; color: var(--gold-l); background: rgb(0 0 0 / .15); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.tbl small { color: var(--muted); font-size: 13.5px; }
.mini { display: grid; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.mini__r { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.mini__r:first-child { border-top: 0; }
.mini__r small { color: var(--muted); }

.st, .cst { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.st--ok, .cst--live { background: color-mix(in srgb, var(--ok) 22%, transparent); color: #b9f1d2; }
.st--wait, .cst--draft { background: color-mix(in srgb, #ffb84d 20%, transparent); color: #ffd79a; }
.st--bad, .cst--hidden { background: color-mix(in srgb, #e0483b 22%, transparent); color: #ffb3a8; }

/* סינון */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 16px; }
.filters select, .search { min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line-soft); background: var(--surface); color: #fff; font: inherit; font-size: 16px; }
.filters select { padding: 8px 12px; }
.search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; padding: 0 14px; }
.search .ico { color: var(--gold); width: 19px; height: 19px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 16px; outline: none; min-height: 44px; }

/* כרטיסים */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); margin-top: 16px; }
@media (max-width: 420px) { .cards { grid-template-columns: 1fr; } }
.pc { display: grid; gap: 14px; align-content: start; padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.pc--off { opacity: .65; }
.pc__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pc__top > div { display: grid; min-width: 0; }
.pc__name { font-size: 18px; }
.pc__top small { color: var(--muted); font-size: 14.5px; overflow-wrap: anywhere; }
.pc__dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.pc__dl div { min-width: 0; }
.pc__dl dt { font-size: 13px; color: var(--muted); }
.pc__dl dd { font-size: 15.5px; overflow-wrap: anywhere; }
.pc__dl a { color: var(--gold-l); }
.pc__wide { grid-column: 1 / -1; }
.pc__btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.subs { display: grid; gap: 8px; }
.sub { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgb(0 0 0 / .14); }
.sub__t { flex: 1; display: grid; gap: 3px; min-width: 0; }
.sub__t small { color: var(--muted); font-size: 13.5px; }
.bar { display: block; height: 6px; border-radius: 9px; background: rgb(255 255 255 / .1); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.sw { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: none; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw span { width: 48px; height: 28px; border-radius: 99px; background: rgb(255 255 255 / .18); position: relative; transition: background .2s; }
.sw span::after { content: ""; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw input:checked + span { background: var(--ok); }
.sw input:checked + span::after { transform: translateX(-20px); }
.sw input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.sw em { font-style: normal; font-size: 14px; min-width: 48px; }

/* טפסים */
.frm { display: grid; gap: 12px; margin-top: 16px; }
.f { display: grid; gap: 5px; font-size: 15px; font-weight: 600; color: var(--muted); }
.f input, .f select, .f textarea, .chp textarea, .chp input, .les input, .les textarea, .dl input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--line-soft); background: rgb(0 0 0 / .18); color: #fff; font: inherit; font-size: 16px; font-weight: 400; }
.f textarea, .les textarea, .chp textarea { min-height: 0; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus, .les input:focus, .les textarea:focus, .chp input:focus, .chp textarea:focus, .dl input:focus { outline: none; border-color: var(--gold); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* חלון */
.dlg { margin: auto; width: min(480px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border-radius: 26px; border: 1px solid var(--line); background: var(--surface); color: #fff; }
.dlg::backdrop { background: rgb(5 20 16 / .75); backdrop-filter: blur(3px); }
.dlg__in { position: relative; padding: 28px 24px 24px; }
.dlg__in h2 { font-family: var(--font-head); font-size: 24px; padding-inline-end: 40px; margin-bottom: 6px; }
.dlg__in > p { color: var(--muted); }
.dlg__x { position: absolute; top: 14px; left: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .08); color: #fff; display: grid; place-items: center; cursor: pointer; }
.dlg__btns { margin-top: 18px; }
.secret { margin-top: 14px; padding: 14px 18px; border-radius: 16px; background: rgb(0 0 0 / .25); display: grid; }
.secret small { color: var(--muted); }
.secret b { font-size: 26px; letter-spacing: 2px; color: var(--gold-l); }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; padding: 12px 22px; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 700; box-shadow: var(--shadow-pop); }
.toast[hidden] { display: none; }

/* עורך קורס */
.ed { display: grid; gap: 18px; margin-top: 20px; }
.box { padding: 22px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 14px; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.f--wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid2, .row2 { grid-template-columns: 1fr; } }
.chp { display: grid; gap: 10px; padding: 16px; border-radius: 20px; background: rgb(0 0 0 / .14); border: 1px solid var(--line-soft); }
.chp__h { display: flex; align-items: center; gap: 10px; }
.chp__h input { font-weight: 700; font-size: 17px; }
.chp__n { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--gold-l); font-weight: 800; }
.les { display: grid; grid-template-columns: 32px 1.3fr 1.4fr 90px auto auto; gap: 8px; align-items: center; padding: 10px; border-radius: 16px; background: var(--surface); }
.les__n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .08); font-size: 14px; font-weight: 700; }
.les input { min-height: 44px; padding: 8px 12px; font-size: 15.5px; }
.les__ops { display: flex; gap: 2px; }
.les__ops button, .dl button { width: 38px; height: 38px; border-radius: 10px; border: 0; background: rgb(255 255 255 / .06); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.les__ops button:hover, .dl button:hover { color: #fff; background: rgb(255 255 255 / .12); }
.les__ops .ico, .dl .ico { width: 18px; height: 18px; }
.les__more { grid-column: 2 / -1; }
.les__more summary { cursor: pointer; font-size: 14px; color: var(--gold-l); padding: 2px 0; }
.les__more textarea { margin-top: 6px; font-size: 15px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 14.5px; cursor: pointer; white-space: nowrap; }
.chk input { width: 20px; height: 20px; min-height: 0; accent-color: var(--gold); }
@media (max-width: 900px) {
  .les { grid-template-columns: 32px 1fr 1fr; }
  .les__t { grid-column: 2 / -1; }
  .les__v { grid-column: 1 / -1; }
  .les__d { grid-column: 1 / 3; }
  .les__ops { grid-column: 1 / -1; justify-content: flex-end; }
  .les__more { grid-column: 1 / -1; }
}
.dl { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; }
@media (max-width: 640px) { .dl { grid-template-columns: 1fr auto; } .dl input[data-d="url"] { grid-column: 1 / -1; grid-row: 2; } }
.savebar { position: sticky; bottom: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 12px 16px; border-radius: 20px; background: color-mix(in srgb, var(--ink) 92%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.savebar span { color: #ffd79a; font-size: 15px; }

/* חיבורים */
.conn { display: flex; gap: 16px; padding: 22px; margin-top: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.conn > div { display: grid; gap: 10px; min-width: 0; }
.conn h3 { font-size: 19px; }
.conn h3 small { font-size: 15px; color: var(--muted); font-weight: 600; }
.conn p { color: var(--muted); }
.conn__st { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, #ffb84d 22%, transparent); color: #ffd79a; }
.conn__st.is-ok { background: color-mix(in srgb, var(--ok) 25%, transparent); color: #b9f1d2; }
.code { display: block; padding: 12px 14px; border-radius: 12px; background: rgb(0 0 0 / .3); font-size: 14px; overflow-wrap: anywhere; text-align: left; user-select: all; }
.chp__h .lnk { white-space: nowrap; flex: none; }
