/* Admin panel — builds on styles.css tokens */
body.adm { background: radial-gradient(1000px 600px at 80% -10%, #121a26 0%, var(--bg) 60%) fixed, var(--bg); min-height: 100vh; }
.adm [hidden] { display: none !important; }

.adm-center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.adm-auth { width: min(100%, 420px); padding: 30px 26px; display: grid; gap: 14px; }
.adm-auth h1 { font-family: var(--display); font-size: 1.6rem; }
.adm-auth p { color: var(--muted); font-size: .92rem; }
.adm-logo { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; font-family: var(--display); font-weight: 700; color: #03130c; background: var(--doppler); }
.adm-logo--sm { width: 34px; height: 34px; border-radius: 10px; font-size: .85rem; }
.adm-msg { min-height: 1.2em; color: #ff8fab !important; font-size: .88rem; }

.adm .field { display: grid; gap: .4rem; min-width: 0; }
.adm .field > span { font-size: .82rem; font-weight: 600; color: #cfd5e1; }
.adm .field small { color: var(--dim); font-weight: 500; }
.adm .field input, .adm .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: .75rem .9rem; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line-2);
}
.adm .field input:focus, .adm .field select:focus { outline: none; border-color: rgba(25,245,164,.7); box-shadow: 0 0 0 4px rgba(25,245,164,.12); }
.adm .field select option { background: #0b0d12; }
.adm input[type="datetime-local"] { color-scheme: dark; }

/* top bar */
.adm-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 16px; background: rgba(8,9,13,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.adm-brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); }
.adm-tabs { display: flex; gap: 4px; order: 3; width: 100%; overflow-x: auto; }
.adm-tabs button { padding: .55rem .9rem; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.adm-tabs button[aria-selected="true"] { color: var(--text); background: rgba(255,255,255,.07); }
.adm-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; font-size: .72rem; color: #03130c; background: var(--g); }
.adm-count:empty { display: none; }
.adm-bar-r { margin-left: auto; display: flex; gap: 8px; }

.adm-main { width: 100%; max-width: 1100px; margin: 0 auto; padding: 26px 16px 80px; }
.adm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.adm-head h1 { font-family: var(--display); font-size: clamp(1.8rem, 5vw, 2.6rem); }
.adm-sub { color: var(--muted); font-size: .92rem; }
.adm-h2 { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-size: 1.15rem; margin: 26px 0 12px; }
.adm-h2 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.adm-h2 .dot--live { background: var(--g); box-shadow: 0 0 10px var(--g); }
.adm-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; color: #ffd9a8; background: rgba(234,179,8,.07); border: 1px solid rgba(234,179,8,.3); }

/* list rows */
.adm-list { display: grid; gap: 10px; }
.adm-item { display: grid; grid-template-columns: 64px 1fr; gap: 12px 14px; align-items: center; padding: 12px; border-radius: 16px; background: rgba(14,16,22,.92); border: 1px solid var(--line); }
.adm-item.is-ended { opacity: .85; }
.adm-thumb { --rc: 235, 75, 75; width: 64px; height: 50px; border-radius: 10px; display: grid; place-items: center; background: radial-gradient(closest-side, rgba(var(--rc), .3), rgba(0,0,0,.3)); border-bottom: 2px solid rgb(var(--rc)); overflow: hidden; }
.adm-thumb img { width: 90%; height: auto; }
.adm-info { display: grid; gap: .2rem; min-width: 0; }
.adm-info strong { font-family: var(--display); font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; color: var(--muted); font-size: .82rem; }
.adm-meta svg { width: 13px; height: 13px; color: var(--g); }
.adm-tag { font-style: normal; font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; padding: .1rem .4rem; border-radius: 5px; color: #ffd28a; border: 1px dashed rgba(234,179,8,.5); vertical-align: middle; }
.adm-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.adm-actions .btn { flex: 1 1 auto; min-height: 38px; }
.adm-btn-end { color: #1a0f00; background: linear-gradient(100deg, #f5b544, #ff8a3d); }
.adm-btn-del { color: #ff9db3; border: 1px solid rgba(255,79,120,.35); background: rgba(255,79,120,.06); }
.adm-btn-del:hover { background: rgba(255,79,120,.14); }
.adm-empty { color: var(--muted); padding: 18px; border-radius: 14px; border: 1px dashed var(--line-2); }

/* dialogs */
.adm-dialog { width: min(100% - 24px, 980px); max-height: calc(100vh - 24px); margin: auto; padding: 0; border-radius: 22px; color: var(--text); background: #0c0e14; border: 1px solid var(--line-2); box-shadow: 0 40px 120px rgba(0,0,0,.7); overflow: auto; }
.adm-dialog--sm { width: min(100% - 24px, 460px); }
.adm-dialog::backdrop { background: rgba(3,4,6,.72); backdrop-filter: blur(6px); }
.adm-dialog form { padding: 20px; display: grid; gap: 16px; }
.adm-ed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.adm-ed-head h2 { font-family: var(--display); font-size: 1.4rem; }
.adm-x { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.05); }
.adm-ed-grid { display: grid; gap: 22px; }
.adm-ed-fields { display: grid; gap: 14px; align-content: start; }
.adm-row { display: grid; gap: 14px; }
.adm-ed-preview { display: grid; gap: 10px; align-content: start; }
.adm-ed-preview .mono { color: var(--dim); }
.adm-ed-preview .gw-card { max-width: 300px; }
.adm-noimg { color: var(--dim); font-size: .85rem; text-align: center; padding: 0 20px; }
.adm-ed-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); }
.adm-adv summary { cursor: pointer; color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.adm-adv[open] { display: grid; gap: 12px; }

/* skin search */
.adm-search { position: relative; }
.adm-results { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; right: 0; max-height: 340px; overflow: auto; padding: 6px; border-radius: 14px; background: #10131a; border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.adm-results li { --rc: 235, 75, 75; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; font-size: .92rem; }
.adm-results li img { width: 58px; height: 44px; object-fit: contain; border-radius: 8px; background: radial-gradient(closest-side, rgba(var(--rc), .3), transparent); border-bottom: 2px solid rgb(var(--rc)); }
.adm-results li:hover, .adm-results li.is-active { background: rgba(25,245,164,.08); }
.adm-noresult { color: var(--muted); cursor: default !important; }

/* leads table */
.adm-table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: rgba(14,16,22,.92); }
.adm-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.adm-table th, .adm-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table th { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-card { max-width: 420px; display: grid; gap: 14px; padding: 22px; border-radius: 18px; background: rgba(14,16,22,.92); border: 1px solid var(--line); }

.adm-toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: .8rem 1.2rem; border-radius: 14px; font-weight: 600; color: #03130c; background: var(--g); box-shadow: 0 16px 40px rgba(0,0,0,.5); transition: all .35s var(--ease-out); max-width: calc(100% - 32px); }
.adm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.adm-toast.bad { color: #fff; background: #d6345b; }

@media (max-width: 719px) {
  .adm-table thead { display: none; }
  .adm-table tr { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .adm-table td { border: 0; padding: 4px 14px; }
  .adm-table td::before { content: attr(data-h) ": "; color: var(--dim); font-size: .78rem; }
}
@media (min-width: 720px) {
  .adm-tabs { order: 0; width: auto; }
  .adm-item { grid-template-columns: 72px 1fr auto; }
  .adm-thumb { width: 72px; height: 56px; }
  .adm-actions { grid-column: auto; flex-wrap: nowrap; }
  .adm-row { grid-template-columns: 1fr 1fr; }
  .adm-dialog form { padding: 26px; }
}
@media (min-width: 900px) {
  .adm-ed-grid { grid-template-columns: 1fr 300px; }
}

/* security screens */
.adm-auth code, .adm-card code { font-family: var(--mono); font-size: .82em; padding: .1rem .35rem; border-radius: 6px; background: rgba(255,255,255,.07); color: #dfe3ec; }
.adm-back { color: var(--muted); font-size: .86rem; text-align: center; }
.adm-back:hover { color: var(--g); }
.adm-otp { font-family: var(--mono) !important; font-size: 1.5rem !important; letter-spacing: .3em; text-align: center; }
.adm-warn-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: #f5b544; box-shadow: 0 0 8px #f5b544; vertical-align: middle; }
.adm-banner--2fa { color: #d8fff0; background: rgba(25,245,164,.07); border-color: rgba(25,245,164,.35); margin-bottom: 10px; }
.adm-sec-grid { display: grid; gap: 14px; }
.adm-card { max-width: none; }
.adm-card h2 { font-family: var(--display); font-size: 1.25rem; }
.adm-steps { display: grid; gap: 10px; margin: 6px 0 4px 1.2rem; color: #cfd5e1; font-size: .92rem; list-style: decimal; }
.adm-key { display: block; margin: 8px 0 4px; padding: .7rem .8rem !important; font-size: 1rem !important; letter-spacing: .08em; word-spacing: .25em; word-break: normal; overflow-wrap: normal; user-select: all; border: 1px dashed rgba(25,245,164,.45); }
.adm-link { color: var(--g); font-weight: 600; font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; }
.adm-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-inline input { flex: 1 1 160px; min-width: 0; font: inherit; color: var(--text); padding: .7rem .9rem; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); }
.adm-stack { display: grid; gap: 12px; }
.adm-good { color: var(--g); }
.adm-bad { color: #f5b544; }
.adm-mt { margin-top: 10px; }
.adm-table tr.is-bad td { color: #ffb4c4; }
@media (min-width: 900px) {
  .adm-sec-grid { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .adm-card--wide { grid-column: 1 / -1; }
}
.adm-video { display: grid; gap: 12px; margin-bottom: 14px; border-color: rgba(25,245,164,.25); }
.adm-video .adm-msg { min-height: 0; }

.adm-site { display: grid; gap: 14px; }
.adm-site h2 small { font-family: var(--sans); font-size: .8rem; color: var(--dim); font-weight: 500; }
.adm-row3 { display: grid; gap: 14px; }
.adm-site .field input.is-invalid { border-color: rgba(255,79,120,.85); box-shadow: 0 0 0 4px rgba(255,79,120,.14); }
.adm-site-foot { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 0; background: linear-gradient(180deg, transparent, var(--bg) 35%); }
.adm-site-foot .adm-msg { flex: 1 1 260px; margin: 0; }
@media (min-width: 720px) { .adm-row3 { grid-template-columns: repeat(3, 1fr); } }
