:root {
  --bg: #070b11;
  --surface: #0f131c;
  --surface-2: #151a25;
  --surface-3: #1d2230;
  --line: #262c3a;
  --text: #e7ebf3;
  --muted: #9aa4b8;
  --lime: #ccff80;
  --lime-strong: #a3e635;
  --cyan: #4cd7f6;
  --violet: #b48cff;
  --amber: #ffc46b;
  --rose: #ff7a7a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Plus Jakarta Sans", var(--font);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(163, 230, 53, 0.10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(76, 215, 246, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.shell { max-width: 1240px; margin: 0 auto; padding: 20px 22px 48px; }

/* ------------------------------------------------------------- top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21, 26, 37, 0.9), rgba(15, 19, 28, 0.9));
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-dot {
  width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px;
  border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line);
}
.brand strong { display: block; font-family: var(--display); font-size: 17px; letter-spacing: 0.02em; }
.brand small { color: var(--muted); font-size: 12px; }

.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--muted); font-size: 12px; white-space: nowrap;
}
.pill.ok { color: var(--lime); border-color: rgba(163, 230, 53, 0.4); background: rgba(163, 230, 53, 0.1); }
.pill.bad { color: var(--rose); border-color: rgba(255, 122, 122, 0.4); background: rgba(255, 122, 122, 0.1); }
.pill.user { color: var(--text); }

/* ---------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 8px; margin: 20px 0 18px; }
.tab {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--muted); font-family: var(--display); font-size: 14px; font-weight: 700;
  transition: transform 120ms ease, border-color 160ms ease, color 160ms ease;
}
.tab:hover { color: var(--text); }
.tab.selected { color: #10210a; background: var(--lime); border-color: var(--lime); }
.tab-icon { font-size: 15px; }
.tab em { font-style: normal; font-size: 11px; opacity: 0.75; }

/* --------------------------------------------------------------- panels */
.panel {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 22px; box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.panel-head h1 { margin: 0 0 6px; font-family: var(--display); font-size: 24px; letter-spacing: -0.01em; }
.panel-head p { margin: 0; color: var(--muted); font-size: 13px; max-width: 62ch; }
.panel-head code { color: var(--cyan); }

/* -------------------------------------------------------------- toolbar */
.toolbar { display: flex; gap: 10px; margin: 20px 0 16px; flex-wrap: wrap; }
.input {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font-family: var(--font); font-size: 14px; outline: none; transition: border-color 140ms ease, box-shadow 140ms ease;
}
.input:focus { border-color: var(--lime-strong); box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.14); }
.toolbar .search { flex: 1 1 260px; }
.toolbar select { flex: 0 0 auto; min-width: 170px; }
.bulk-actions { display: flex; align-items: center; gap: 10px; min-height: 50px; margin: -6px 0 14px; padding: 8px 10px 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(163,230,53,.035); }
.bulk-select { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-family: var(--display); font-size: 13px; font-weight: 700; cursor: pointer; }
.bulk-select input, .exercise-select { width: 17px; height: 17px; accent-color: var(--lime-strong); cursor: pointer; }
.bulk-actions > span { color: var(--muted); font-size: 12px; margin-right: auto; }
.bulk-actions .btn { padding: 8px 12px; font-size: 12px; }

.btn {
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-family: var(--display); font-size: 14px; font-weight: 700;
  padding: 11px 18px; cursor: pointer; transition: transform 120ms ease, filter 140ms ease, border-color 140ms ease;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--lime); border-color: var(--lime); color: #10210a; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--surface-3); }
.btn.danger { background: rgba(255, 122, 122, 0.12); border-color: rgba(255, 122, 122, 0.45); color: #ffb3b3; }
.btn.wide-btn { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer;
  border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
}
.icon-btn:hover { color: var(--text); }

/* --------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 12px 14px; font-family: var(--display); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.table tbody tr.selected-row { background: rgba(163,230,53,.055); }
.select-column { width: 44px; padding-left: 16px !important; padding-right: 4px !important; text-align: center !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.cell-exercise { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.thumb {
  width: 52px; height: 52px; flex: 0 0 auto; border-radius: 10px; object-fit: cover;
  background: var(--surface-3); border: 1px solid var(--line);
}
.thumb.placeholder { display: grid; place-items: center; font-size: 20px; }
.cell-exercise b { display: block; font-family: var(--display); font-size: 14px; }
.cell-exercise small { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.tag {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
}
.tag.lime { color: var(--lime); border-color: rgba(163, 230, 53, 0.4); background: rgba(163, 230, 53, 0.08); }
.tag.cyan { color: var(--cyan); border-color: rgba(76, 215, 246, 0.4); background: rgba(76, 215, 246, 0.08); }
.tag.violet { color: var(--violet); border-color: rgba(180, 140, 255, 0.4); background: rgba(180, 140, 255, 0.1); }
.tag.amber { color: var(--amber); border-color: rgba(255, 196, 107, 0.4); background: rgba(255, 196, 107, 0.1); }
.tag.rose { color: var(--rose); border-color: rgba(255, 122, 122, 0.4); background: rgba(255, 122, 122, 0.1); }
.media-flags { display: flex; gap: 5px; }
.flag { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--muted); }
.flag.on { color: #10210a; background: var(--lime-strong); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty { padding: 34px; text-align: center; color: var(--muted); font-size: 14px; }

/* -------------------------------------------------------------- banners */
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 20px; }
.banner-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-2);
}
.banner-visual { position: relative; height: 150px; background: var(--surface-3); display: grid; place-items: center; }
.banner-visual img { width: 100%; height: 100%; object-fit: cover; }
.banner-visual .fallback { font-size: 40px; }
.banner-visual .pos {
  position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px;
  background: rgba(7, 11, 17, 0.8); font-size: 11px; color: var(--muted);
}
.banner-body { padding: 14px 16px 16px; }
.banner-body small { color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.banner-body h3 { margin: 6px 0 4px; font-family: var(--display); font-size: 16px; }
.banner-body p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.banner-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.banner-card.inactive { opacity: 0.55; }

/* --------------------------------------------------------------- modals */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(4, 7, 12, 0.72); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 22px; z-index: 50; overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(880px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin: auto;
}
.modal.small { width: min(560px, 100%); }
.modal.tiny { width: min(420px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-family: var(--display); font-size: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.field { display: block; margin-top: 14px; }
.field > span { display: block; margin-bottom: 6px; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.field > span b { color: var(--lime); }
.field > span i { font-style: normal; opacity: 0.6; text-transform: none; }
textarea.input { resize: vertical; min-height: 78px; }

.upload { position: relative; }
.upload input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.drop {
  display: grid; place-items: center; gap: 6px; min-height: 118px; padding: 14px;
  border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
  text-align: center; transition: border-color 160ms ease, background 160ms ease;
}
.upload:hover .drop, .upload.drag .drop { border-color: var(--lime-strong); background: rgba(163, 230, 53, 0.06); }
.drop-icon { font-size: 26px; }
.drop small { color: var(--muted); font-size: 11.5px; }
.preview { margin-top: 10px; width: 100%; max-height: 190px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #000; }
.media-grid { margin-top: 16px; }
.upload.wide { margin-top: 16px; }

.check { display: flex; align-items: center; gap: 9px; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.check input { width: 17px; height: 17px; accent-color: var(--lime-strong); }
.hint { margin: 14px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.hint code { color: var(--cyan); }
.error { margin: 12px 0 0; padding: 10px 13px; border-radius: var(--radius-sm); border: 1px solid rgba(255, 122, 122, 0.4); background: rgba(255, 122, 122, 0.1); color: #ffb3b3; font-size: 13px; }
.error[hidden] { display: none; }

/* ---------------------------------------------------------------- misc */
.foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 20px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.foot code { color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  padding: 12px 18px; border-radius: 999px; background: var(--lime); color: #10210a;
  font-family: var(--display); font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow); z-index: 80;
}
.toast[hidden] { display: none; }
.toast.error { background: var(--rose); color: #2a0b0b; }

.skeleton { height: 52px; border-bottom: 1px solid var(--line); }

@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .panel { padding: 16px; }
}

/* ------------------------------------------------------ 2026 studio refresh */
:root {
  --bg: #080b10;
  --surface: #10141c;
  --surface-2: #171c25;
  --surface-3: #202630;
  --line: rgba(255, 255, 255, 0.085);
  --text: #f2f5ed;
  --muted: #929b89;
  --lime: #ccff80;
  --lime-strong: #a3e635;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

body {
  background:
    radial-gradient(900px 440px at 18% -10%, rgba(163, 230, 53, 0.105), transparent 62%),
    radial-gradient(700px 440px at 92% 5%, rgba(76, 215, 246, 0.055), transparent 68%),
    linear-gradient(180deg, #0a0e14 0%, #07090d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .17;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.shell { max-width: 1380px; padding: 24px 34px 56px; position: relative; }

.topbar {
  min-height: 72px;
  padding: 12px 16px 12px 14px;
  border-color: rgba(255,255,255,.075);
  border-radius: 18px;
  background: rgba(15, 19, 27, .76);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}

.brand { gap: 13px; }
.brand-dot { width: 44px; height: 44px; border: 0; border-radius: 13px; background: none; }
.brand strong { font-size: 16px; letter-spacing: -.015em; }
.brand strong span { color: var(--lime); font-weight: 600; }
.brand small { display: block; margin-top: 3px; color: #7f8978; }

.top-actions { gap: 7px; }
.pill { padding: 7px 11px; background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.07); }
.pill.ok { color: #cfff88; background: rgba(163,230,53,.08); border-color: rgba(163,230,53,.2); }

.workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 54px 4px 28px;
}

.eyebrow, .section-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.workspace-head h1 { margin: 0; max-width: 680px; font-family: var(--display); font-size: clamp(30px, 4vw, 48px); letter-spacing: -.045em; line-height: 1.06; }
.workspace-head p { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.tabs { margin: 0; padding: 5px; gap: 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(15,19,28,.72); }
.tab { min-height: 42px; padding: 9px 15px; border: 0; border-radius: 10px; background: transparent; font-size: 13px; }
.tab:hover { background: rgba(255,255,255,.04); }
.tab.selected { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.22); }
.tab.selected .tab-icon { color: var(--lime); }
.tab em { min-width: 21px; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.07); text-align: center; }

.panel {
  padding: 28px;
  border-color: rgba(255,255,255,.075);
  background: linear-gradient(145deg, rgba(17,21,29,.97), rgba(12,16,23,.97));
  box-shadow: var(--shadow);
}
.panel-head { align-items: center; }
.panel-head h2 { margin: 0 0 6px; font-family: var(--display); font-size: 25px; letter-spacing: -.025em; }
.panel-head p { color: #8e9788; }
.panel-head .section-kicker { margin-bottom: 7px; }

.toolbar { margin: 26px 0 18px; padding: 6px; gap: 7px; border: 1px solid var(--line); border-radius: 15px; background: rgba(0,0,0,.16); }
.toolbar .input { border-color: transparent; background: transparent; }
.toolbar .input:focus { background: var(--surface-2); }
.toolbar select { border-left-color: var(--line); border-radius: 9px; }

.input { min-height: 44px; border-color: rgba(255,255,255,.09); background: #161b24; }
.input:hover { border-color: rgba(255,255,255,.15); }
.input:focus { border-color: rgba(163,230,53,.58); box-shadow: 0 0 0 3px rgba(163,230,53,.1); }

.btn { min-height: 42px; border-radius: 11px; padding: 10px 17px; }
.btn.primary { background: linear-gradient(135deg, #d7ff9d, #a3e635); border: 0; box-shadow: 0 8px 24px rgba(163,230,53,.15); }
.btn.primary:hover { filter: brightness(1.04); box-shadow: 0 10px 30px rgba(163,230,53,.22); transform: translateY(-1px); }

.table-wrap { border-color: rgba(255,255,255,.075); border-radius: 15px; background: rgba(5,8,12,.24); }
.table th { padding: 13px 16px; background: rgba(255,255,255,.025); color: #778071; font-size: 10px; }
.table td { padding: 14px 16px; border-bottom-color: rgba(255,255,255,.06); }
.table tbody tr { transition: background 150ms ease; }
.table tbody tr:hover { background: rgba(204,255,128,.035); }
.thumb { width: 48px; height: 48px; border-radius: 12px; }
.tag { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.035); }

.banner-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.banner-card { border-color: rgba(255,255,255,.075); border-radius: 17px; background: #151a23; transition: transform 180ms ease, border-color 180ms ease; }
.banner-card:hover { transform: translateY(-3px); border-color: rgba(204,255,128,.22); }
.banner-visual { height: 175px; }
.banner-body { padding: 18px; }

.modal-backdrop { background: rgba(3,5,8,.76); backdrop-filter: blur(14px); }
.modal { border-color: rgba(255,255,255,.1); background: linear-gradient(155deg, #151a23, #0e1219); box-shadow: 0 35px 120px rgba(0,0,0,.62); }
.login-card { padding: 30px; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; color: #c9d0c1; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.login-brand img { width: 34px; height: 34px; }
.login-card .modal-head { margin-bottom: 4px; }
.login-card .modal-head h2 { font-size: 25px; letter-spacing: -.03em; }
.login-card .hint { margin-bottom: 22px; }
.login-card .modal-foot { border: 0; padding-top: 8px; }

.foot { padding: 0 4px; opacity: .72; }
.toast { border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.46); }

@media (max-width: 900px) {
  .workspace-head { align-items: flex-start; flex-direction: column; padding-top: 38px; }
}

@media (max-width: 720px) {
  .shell { padding: 14px 14px 38px; }
  .top-actions .pill:not(.user) { display: none; }
  .workspace-head { padding: 34px 2px 20px; }
  .workspace-head h1 { font-size: 34px; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; }
  .panel { padding: 18px; border-radius: 17px; }
  .toolbar { padding: 5px; }
  .toolbar select { width: 100%; border-left-color: transparent; border-top-color: var(--line); }
}
