:root {
  color-scheme: dark;
  --bg: #070b10;
  --bg-2: #0b1219;
  --panel: #0e151d;
  --panel-2: #131e29;
  --panel-3: #192634;
  --line: #223140;
  --line-soft: #192531;
  --text: #eef4fa;
  --muted: #8fa1b5;
  --accent: #f4b740;
  --accent-2: #ffd479;
  --accent-ink: #1a1205;
  --success: #4ade80;
  --danger: #ff6b6b;
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(244, 183, 64, 0.08), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(49, 130, 206, 0.1), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(180deg, #1a2633, #131c26);
  color: var(--text);
  padding: 9px 13px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 550;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease,
    box-shadow 0.15s ease;
}

button:hover,
.button:hover {
  border-color: #34485c;
  transform: translateY(-1px);
}

button.primary,
.button.primary {
  border-color: rgba(244, 183, 64, 0.7);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-weight: 750;
  box-shadow: 0 10px 30px rgba(244, 183, 64, 0.18);
}

button.ghost {
  background: transparent;
}

button.danger {
  border-color: rgba(255, 107, 107, 0.28);
  color: #ff9b9b;
  background: rgba(255, 107, 107, 0.06);
}

button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a1118;
  color: var(--text);
  padding: 9px 11px;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(244, 183, 64, 0.7);
  box-shadow: 0 0 0 3px rgba(244, 183, 64, 0.1);
}

select option {
  background: var(--panel);
  color: var(--text);
}

a {
  color: var(--accent);
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Shell and sidebar */

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 264px;
  flex: 0 0 264px;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 15px 16px;
  background: linear-gradient(180deg, rgba(14, 21, 29, 0.99), rgba(7, 11, 16, 0.99));
  border-right: 1px solid var(--line);
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.18);
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 7px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
  object-fit: contain;
  background: #fff;
  padding: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.sidebar-brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.sidebar-brand span {
  display: block;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.workspace {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(25, 38, 52, 0.95), rgba(13, 20, 28, 0.95));
}

.workspace-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  flex: 0 0 auto;
}

.workspace-text {
  min-width: 0;
  display: grid;
  gap: 2px;
  flex: 1;
}

.workspace-select {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.workspace-select:focus {
  box-shadow: none;
  outline: none;
}

.workspace-text span {
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  display: grid;
  gap: 3px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.nav-label {
  margin: 10px 10px 3px;
  color: #5f7185;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav button {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 550;
  box-shadow: none;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transform: none;
}

.nav button.active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(244, 183, 64, 0.17), rgba(244, 183, 64, 0.03));
  box-shadow: inset 2px 0 0 var(--accent);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: 0.78;
}

.nav button.active .nav-icon {
  color: var(--accent);
  opacity: 1;
}

.nav-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-badge {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10px;
  text-align: center;
  font-weight: 800;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-user {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.sidebar-user strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user span {
  color: var(--muted);
  font-size: 10px;
}

/* Content */

.content {
  flex: 1;
  min-width: 0;
  padding: 26px 32px 64px;
}

.content-head {
  max-width: 1180px;
  margin: 0 auto 20px;
}

.content-head h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.035em;
}

.content .view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 40px;
}

.panel {
  background: linear-gradient(180deg, rgba(18, 27, 37, 0.97), rgba(12, 18, 25, 0.97));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.panel + .panel {
  margin-top: 18px;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.panel-head h2 {
  margin: 0;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin: 4px 0 20px;
}

.hero h1 {
  margin: 3px 0;
  font-size: 30px;
  letter-spacing: -0.045em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 13px;
  margin-bottom: 20px;
}

.stat {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(25, 38, 52, 0.95), rgba(12, 19, 27, 0.95));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px;
  color: var(--muted);
}

.stat::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.65;
}

.stat strong {
  display: block;
  color: var(--text);
  font-size: 29px;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 4px;
  border-top: 1px solid var(--line-soft);
  transition: background 0.15s ease;
}

.row:hover {
  background: rgba(255, 255, 255, 0.018);
}

.row:first-of-type {
  border-top: 0;
}

.row-main {
  min-width: 0;
}

.row-main strong {
  display: block;
  margin-bottom: 2px;
}

.row-main code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  background: #0a1016;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 2px 6px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.form-row input[type="text"],
.form-row input[type="password"],
.form-row input[type="email"],
.form-row input:not([type]) {
  flex: 1 1 160px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.stack {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

label {
  color: var(--muted);
  font-size: 12px;
}

.form-grid > label,
.screen-settings label,
.group-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.form-grid input,
.form-grid select,
.screen-settings input,
.screen-settings select,
.group-card input,
.group-card select {
  width: 100%;
}

.check,
.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
}

.check input,
.check-row input {
  width: auto;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.screen-settings {
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #111b25, #0c141c);
}

.group-card {
  margin-bottom: 14px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
}

.member-grid .check {
  color: var(--text);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge.live {
  color: #8ef0ac;
  border-color: #1f4a2a;
  background: rgba(20, 83, 45, 0.25);
}

.badge.draft {
  color: var(--accent-2);
  border-color: #4a3a12;
  background: rgba(120, 80, 10, 0.18);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 13px;
  margin-top: 16px;
}

.media-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.media-card:hover {
  transform: translateY(-2px);
  border-color: #34485c;
}

.media-preview {
  aspect-ratio: 16 / 9;
  background: #05080b;
  display: grid;
  place-items: center;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-meta {
  padding: 11px;
  display: grid;
  gap: 3px;
}

.media-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-meta span {
  color: var(--muted);
  font-size: 12px;
}

.media-card button {
  margin: 0 11px 11px;
  width: calc(100% - 22px);
}

.split {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.list-panel {
  align-self: start;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  text-align: left;
  padding: 10px 2px;
  color: var(--muted);
  box-shadow: none;
}

.list-item:hover {
  color: var(--text);
  transform: none;
}

.list-item.active {
  color: var(--accent);
  font-weight: 650;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}

.item-row:first-child {
  border-top: 0;
}

.thumb {
  width: 76px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 7px;
  overflow: hidden;
  background: #05080b;
  border: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-sub {
  display: block;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-thumb {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.item-form .hidden {
  display: none !important;
}

.checklist {
  display: grid;
  gap: 7px;
}

.check-step {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 12px;
}

.check-step:hover {
  transform: none;
  border-color: #34485c;
}

.check-step.done {
  border-color: #1f4a2a;
  color: #b9f0c5;
  background: rgba(13, 31, 18, 0.55);
}

.check-mark {
  width: 20px;
  text-align: center;
  color: var(--muted);
}

.check-step.done .check-mark {
  color: var(--success);
}

.usage-list {
  display: grid;
  gap: 15px;
  margin-top: 18px;
}

.usage-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.usage-head strong {
  color: var(--text);
  font-weight: 600;
}

.usage-bar {
  margin-top: 6px;
  height: 8px;
  border-radius: 999px;
  background: #080d12;
  border: 1px solid var(--line);
  overflow: hidden;
}

.usage-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}

.brand-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #121b25, #0a1118);
  margin-bottom: 16px;
}

.brand-preview img {
  max-height: 56px;
  max-width: 180px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
}

.brand-preview div {
  display: grid;
  gap: 2px;
}

.brand-preview strong {
  font-size: 16px;
}

.brand-preview span {
  color: var(--muted);
  font-size: 12px;
}

.brand-fallback {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 22px;
}

.brand-logo-head {
  margin-top: 20px;
}

.brand-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #080d12;
  margin-bottom: 10px;
}

.brand-logo-box img {
  max-height: 80px;
  max-width: 220px;
  object-fit: contain;
  background: #fff;
  padding: 8px;
  border-radius: 8px;
}

.branding-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #080d12;
  margin-bottom: 14px;
}

.branding-preview img {
  max-width: 320px;
  max-height: 160px;
  object-fit: contain;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
}

.api-docs {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #080d12;
}

.api-docs h3 {
  margin: 14px 0 6px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.api-docs h3:first-child {
  margin-top: 0;
}

.api-docs pre {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #05080b;
  color: #c7d4e2;
  overflow-x: auto;
  font-size: 12px;
}

.api-docs ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}

.secret-box {
  margin-top: 14px;
  border: 1px solid #4a3a12;
  border-radius: 10px;
  background: rgba(26, 21, 10, 0.7);
  padding: 14px;
}

.keys-box {
  border-top: 1px solid var(--line);
  padding-bottom: 6px;
}

.secret-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.secret-row code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #080d12;
  white-space: nowrap;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: 440px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(20, 29, 39, 0.96);
  padding: 11px 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.toast.error {
  border-color: #5a2a2d;
  color: #ff9a9c;
}

/* Platform topbar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 16, 0.85);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--accent);
}

.brand .brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.auth {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth input {
  width: 260px;
}

.session {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}

/* Auth pages */

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(800px 500px at 15% 10%, rgba(244, 183, 64, 0.1), transparent 60%),
    radial-gradient(900px 600px at 90% 20%, rgba(49, 130, 206, 0.14), transparent 55%),
    var(--bg);
}

.auth-shell {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 22px;
  align-items: stretch;
}

.auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(500px 300px at 0% 0%, rgba(244, 183, 64, 0.14), transparent 60%),
    linear-gradient(160deg, #131e29, #0a1118);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.auth-aside-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-weight: 750;
}

.auth-aside h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.auth-aside p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 420px;
}

.auth-aside ul {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.auth-aside li {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-aside li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 800;
}

.auth-aside-foot {
  margin-top: 32px;
  color: #5f7185;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-card {
  width: 100%;
  background: linear-gradient(180deg, rgba(18, 27, 37, 0.98), rgba(11, 17, 24, 0.98));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.auth-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: block;
  margin-bottom: 16px;
  background: #fff;
  padding: 3px;
}

.auth-card h1 {
  margin: 4px 0 8px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.auth-form {
  display: grid;
  gap: 13px;
  margin-top: 22px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.auth-form input {
  width: 100%;
}

.auth-form button {
  margin-top: 5px;
  width: 100%;
}

.auth-error {
  min-height: 18px;
  margin: 10px 0 0;
  color: #ff9a9c;
  font-size: 13px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
}

.auth-links a {
  color: var(--accent);
  text-decoration: none;
}

/* Landing */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 28px;
  backdrop-filter: blur(14px);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.site-actions {
  display: flex;
  gap: 8px;
}

.landing-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 70px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  align-items: center;
  padding: 54px 0 64px;
}

.hero-copy h1 {
  margin: 10px 0 16px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.hero-points {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}

.hero-points li::before {
  content: "✓";
  color: var(--accent);
  margin-right: 6px;
  font-weight: 800;
}

.hero-visual {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(500px 260px at 70% 0%, rgba(244, 183, 64, 0.12), transparent 65%),
    linear-gradient(160deg, #141f2b, #080d12);
  padding: 14px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
  min-height: 360px;
}

.mockup {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 10px;
  height: 100%;
  min-height: 330px;
}

.mockup-sidebar {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a1118;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mockup-brand {
  height: 20px;
  width: 80%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.9;
  margin-bottom: 8px;
}

.mockup-line {
  height: 8px;
  border-radius: 4px;
  background: #1a2835;
}

.mockup-line.short {
  width: 65%;
}

.mockup-line.active {
  background: rgba(244, 183, 64, 0.5);
}

.mockup-body {
  display: grid;
  gap: 10px;
}

.mockup-top {
  display: flex;
  gap: 8px;
}

.mockup-pill {
  height: 24px;
  flex: 1;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #0d151d;
}

.mockup-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mockup-card {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(160deg, #16222e, #0b1219);
  padding: 10px;
}

.mockup-card strong {
  display: block;
  font-size: 19px;
  color: var(--accent-2);
}

.mockup-screen {
  flex: 1;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(244, 183, 64, 0.14), transparent 50%),
    #05080b;
  display: grid;
  place-items: center;
  color: #4d6074;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.feature-section {
  padding: 26px 0 50px;
}

.section-head {
  max-width: 680px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.045em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(170deg, rgba(19, 30, 41, 0.95), rgba(9, 14, 20, 0.95));
  padding: 20px;
}

.feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(244, 183, 64, 0.12);
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 800;
}

.feature-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.steps-section {
  padding: 26px 0 54px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.step-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: linear-gradient(170deg, #111c27, #090f15);
}

.step-number {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.step-card h3 {
  margin: 8px 0 6px;
  font-size: 15px;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border: 1px solid rgba(244, 183, 64, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(500px 200px at 0% 0%, rgba(244, 183, 64, 0.14), transparent 60%),
    linear-gradient(120deg, #121c26, #090f15);
}

.cta-band h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.cta-band p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 28px 40px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

/* Responsive */

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .auth-aside {
    display: none;
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 32px;
  }

  .site-nav {
    display: none;
  }
}

@media (max-width: 860px) {
  .shell {
    flex-direction: column;
  }

  .sidebar {
    width: auto;
    flex: initial;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 30;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
  }

  .sidebar-brand {
    padding-bottom: 8px;
  }

  .workspace {
    display: flex;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    gap: 3px;
  }

  .nav-label {
    display: none;
  }

  .nav button {
    width: auto;
    white-space: nowrap;
  }

  .nav button.active {
    box-shadow: inset 0 -2px 0 var(--accent);
  }

  .nav-text {
    flex: initial;
  }

  .sidebar-foot {
    display: flex;
    margin-top: 8px;
    padding-top: 8px;
  }

  .content {
    padding: 20px 16px 40px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .row {
    align-items: flex-start;
    flex-direction: column;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header {
    padding: 14px 18px;
  }

  .landing-main {
    padding: 0 18px 50px;
  }
}

.site-brand {
  color: var(--text);
  text-decoration: none;
}

.site-actions .button {
  padding: 9px 14px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.auth-aside-brand span {
  font-weight: 750;
  letter-spacing: -0.02em;
}

.mockup-card {
  color: var(--muted);
  font-size: 10px;
}

.mockup-card strong {
  display: block;
  font-size: 19px;
  color: var(--accent-2);
  line-height: 1.2;
}

/* Screen cards */

.screen-toolbar {
  margin: 0 0 18px;
}

.screen-toolbar h2 {
  margin: 4px 0 6px;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.screen-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 27, 37, 0.97), rgba(10, 16, 22, 0.97));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.screen-card:hover {
  transform: translateY(-3px);
  border-color: #34485c;
}

.screen-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(320px 180px at 80% 0%, rgba(49, 130, 206, 0.12), transparent 70%),
    radial-gradient(320px 180px at 10% 100%, rgba(244, 183, 64, 0.1), transparent 70%),
    #080d12;
}

.screen-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.55;
}

.screen-frame {
  position: relative;
  z-index: 1;
  width: 90%;
  height: 80%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #05080b;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

.screen-preview.portrait .screen-frame {
  width: 42%;
  height: 88%;
}

.screen-frame.with-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-preview, 30%);
}

.screen-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.screen-frame.with-sidebar .screen-media {
  position: relative;
  inset: auto;
  grid-column: 1;
  min-height: 100%;
}

.screen-media.image {
  background-color: #0a1118;
}

.screen-media.web,
.screen-media.video,
.screen-media.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  background:
    radial-gradient(220px 140px at 50% 0%, rgba(244, 183, 64, 0.12), transparent 70%),
    #0a1118;
}

.screen-media.web span {
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.screen-media.web small {
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: 0.02em;
}

.screen-media.video span {
  color: #9ecbff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.screen-media.empty span {
  color: #5f7185;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.screen-sidebar {
  position: relative;
  grid-column: 2;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, #14202c, #070c11);
  background-size: cover;
  background-position: center;
}

.screen-logo {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  max-width: 34%;
  max-height: 22%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
  padding: 3px;
  border-radius: 4px;
}

.screen-clock {
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 3;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.screen-draft-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 12, 0.62);
  backdrop-filter: blur(1.5px);
}

.screen-draft-overlay span {
  padding: 4px 8px;
  border: 1px solid rgba(244, 183, 64, 0.5);
  border-radius: 999px;
  background: rgba(26, 21, 10, 0.8);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.screen-status {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 8, 12, 0.65);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}

.screen-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5f7185;
}

.screen-status.online {
  color: #8ef0ac;
  border-color: #1f4a2a;
}

.screen-status.online i {
  background: var(--success);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.screen-res {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 3;
  color: #71869c;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.screen-body {
  display: grid;
  gap: 8px;
  padding: 14px 15px 15px;
}

.screen-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.screen-title strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.screen-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b1219;
  color: var(--muted);
  font-size: 10px;
}

.chip.draft {
  border-color: #4a3a12;
  background: rgba(26, 21, 10, 0.6);
  color: var(--accent-2);
}

.screen-last {
  color: var(--muted);
  font-size: 11px;
}

.screen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.screen-actions button {
  padding: 6px 9px;
  font-size: 11px;
}

.screen-create-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border-style: dashed;
  background: rgba(13, 20, 28, 0.55);
}

.screen-create-card form {
  width: 100%;
  padding: 24px;
  display: grid;
  gap: 9px;
  text-align: center;
}

.screen-create-card h3 {
  margin: 0;
  font-size: 15px;
}

.screen-create-card p {
  margin: 0;
  font-size: 12px;
}

.screen-create-card input {
  width: 100%;
}

.create-plus {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 183, 64, 0.3);
  border-radius: 50%;
  background: rgba(244, 183, 64, 0.12);
  color: var(--accent);
  font-size: 24px;
  font-weight: 300;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 6, 9, 0.72);
  backdrop-filter: blur(6px);
}

.modal {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #111b25, #0a1118);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.modal-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
}

.modal-actions {
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .screen-grid {
    grid-template-columns: 1fr;
  }

  .screen-preview {
    aspect-ratio: 16 / 10;
  }
}

/* Screen groups */

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.group-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(170deg, rgba(20, 31, 42, 0.98), rgba(10, 16, 22, 0.98));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.16);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.group-tile:hover {
  transform: translateY(-2px);
  border-color: #34485c;
}

.group-tile-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.group-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 183, 64, 0.25);
  border-radius: 10px;
  background: rgba(244, 183, 64, 0.1);
  color: var(--accent);
}

.group-tile-title {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.group-tile-title strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.group-tile-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.group-tile-stats {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.group-tile-stats b {
  color: var(--text);
}

.group-members {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 20px;
}

.group-member-chip {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b1219;
  color: var(--muted);
  font-size: 10px;
}

.group-tile-actions {
  display: flex;
  gap: 7px;
  margin-top: auto;
}

.group-create-tile {
  align-items: center;
  justify-content: center;
  border-style: dashed;
  background: rgba(13, 20, 28, 0.55);
}

.group-create-tile form {
  width: 100%;
  display: grid;
  gap: 9px;
  text-align: center;
}

.group-create-tile h3 {
  margin: 0;
  font-size: 15px;
}

.group-create-tile p {
  margin: 0;
  font-size: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin-bottom: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  box-shadow: none;
}

.back-link:hover {
  color: var(--text);
  transform: none;
}

.group-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.group-hero h1 {
  margin: 4px 0 6px;
  font-size: 32px;
  letter-spacing: -0.045em;
}

.group-hero p {
  margin: 0;
}

.group-hero-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.group-hero-stat {
  min-width: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  text-align: center;
}

.group-hero-stat strong {
  display: block;
  color: var(--accent-2);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.group-hero-stat span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.group-content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.group-items {
  margin-top: 6px;
}

.empty-box {
  margin-top: 12px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(10, 16, 22, 0.6);
}

@media (max-width: 760px) {
  .group-grid {
    grid-template-columns: 1fr;
  }

  .group-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Group management workspace */

.group-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.group-topbar .back-link {
  margin-bottom: 0;
}

.group-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.group-actions button {
  white-space: nowrap;
}

.group-header-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 26px;
  margin-bottom: 20px;
  border: 1px solid #2a3c4e;
  border-radius: 18px;
  background:
    radial-gradient(700px 200px at 0% 0%, rgba(244, 183, 64, 0.12), transparent 60%),
    linear-gradient(115deg, #131f2a 0%, #0d161f 55%, #0a1118 100%);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}

.group-header-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 260px;
  height: 260px;
  right: -70px;
  top: -150px;
  border: 1px solid rgba(244, 183, 64, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(244, 183, 64, 0.025), 0 0 0 70px rgba(244, 183, 64, 0.02);
  pointer-events: none;
}

.group-header-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
}

.group-avatar {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 183, 64, 0.32);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(244, 183, 64, 0.22), rgba(244, 183, 64, 0.04)),
    #101a23;
  color: var(--accent-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 34px rgba(0, 0, 0, 0.25);
}

.group-header-main h1 {
  margin: 4px 0 5px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.group-header-main p:last-child {
  margin: 0;
  max-width: 560px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-header-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
}

.group-header-stat {
  min-width: 78px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 2px 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  text-align: left;
}

.group-header-stat strong {
  color: var(--accent-2);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.group-header-stat span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.group-header-status {
  min-width: 130px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.group-header-status > span:last-child:not(.badge) {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.group-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  align-items: start;
  gap: 18px;
}

.group-main-col,
.group-side-col {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.group-main-col > .panel + .panel,
.group-side-col > .panel + .panel {
  margin-top: 0;
}

.group-side-col {
  position: sticky;
  top: 18px;
}

.group-subtitle {
  margin: 5px 0 0;
  font-size: 12px;
}

.group-layout .panel-head {
  align-items: flex-start;
}

.group-layout .panel-head .row-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.group-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.content-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #0b131b;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.content-card:hover {
  border-color: #34485c;
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.content-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #0a1118;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--line-soft);
}

.content-thumb.video {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(88, 130, 180, 0.35), transparent 55%),
    linear-gradient(135deg, #1a2b3c, #0b1219);
}

.content-thumb.video span,
.content-thumb.web > span {
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: rgba(5, 9, 13, 0.55);
  color: #dbe8f5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.content-thumb.web {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 183, 64, 0.22), transparent 60%),
    linear-gradient(135deg, #1d2b37, #0a1118);
}

.content-thumb.web small {
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}

.content-info {
  display: grid;
  gap: 3px;
  padding: 10px 11px 8px;
  min-width: 0;
}

.content-type {
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.content-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: -0.01em;
}

.content-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}

.content-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin-top: auto;
  padding: 5px 7px;
  border-top: 1px solid var(--line-soft);
}

.icon-btn {
  width: 26px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  box-shadow: none;
}

.icon-btn:hover {
  border-color: var(--line);
  background: #131e29;
  color: var(--text);
  transform: none;
}

.icon-btn.danger:hover {
  border-color: rgba(255, 107, 107, 0.32);
  background: rgba(255, 107, 107, 0.08);
  color: #ff9b9b;
}

.content-add {
  min-height: 174px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  border: 1px dashed #30465a;
  border-radius: 13px;
  background: rgba(13, 21, 29, 0.55);
  color: var(--muted);
  text-align: center;
}

.content-add:hover {
  border-color: rgba(244, 183, 64, 0.55);
  background: rgba(244, 183, 64, 0.04);
  color: var(--text);
}

.content-add > span {
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
}

.content-add strong {
  font-size: 12px;
}

.content-add small {
  color: var(--muted);
  font-size: 10px;
}

.group-screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.group-screen-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #0b131b;
  transition: border-color 0.15s ease;
}

.group-screen-card:hover {
  border-color: #34485c;
}

.group-screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.group-screen-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.group-screen-meta {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.group-screen-note {
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #0a1118;
  color: var(--muted);
  font-size: 10px;
}

.group-screen-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.group-screen-actions button {
  flex: 1;
  padding: 6px 8px;
  font-size: 11px;
}

.screen-add {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  border: 1px dashed #30465a;
  border-radius: 13px;
  background: rgba(13, 21, 29, 0.55);
  color: var(--muted);
  text-align: center;
}

.screen-add:hover {
  border-color: rgba(244, 183, 64, 0.55);
  color: var(--text);
}

.screen-add > span {
  color: var(--accent);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.screen-add strong {
  font-size: 12px;
}

.screen-add small {
  color: var(--muted);
  font-size: 10px;
}

.summary-list {
  display: grid;
}

.summary-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.summary-list > div:last-child {
  border-bottom: 0;
}

.summary-list span {
  color: var(--muted);
  font-size: 11px;
}

.summary-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-top: 16px;
  padding: 34px 22px;
  border: 1px dashed #2d4255;
  border-radius: 14px;
  background:
    radial-gradient(420px 130px at 50% 0%, rgba(244, 183, 64, 0.07), transparent 70%),
    rgba(10, 16, 22, 0.62);
}

.empty-state.compact {
  margin-top: 0;
  padding: 24px 16px;
}

.empty-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 183, 64, 0.24);
  border-radius: 12px;
  background: rgba(244, 183, 64, 0.08);
  color: var(--accent);
  font-size: 22px;
}

.empty-state h3 {
  margin: 2px 0 0;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.empty-state p {
  max-width: 440px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

/* Group modals */

.modal-wide {
  max-width: 780px;
}

.modal-tabs {
  display: flex;
  gap: 18px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.modal-tabs button {
  padding: 9px 1px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  box-shadow: none;
}

.modal-tabs button:hover {
  color: var(--text);
  transform: none;
}

.modal-tabs button.active {
  border-bottom-color: var(--accent);
  color: var(--accent-2);
}

.modal-search {
  width: 100%;
  margin-bottom: 10px;
}

.media-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
  max-height: 330px;
  overflow-y: auto;
  padding: 2px;
}

.media-pick {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b131b;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.media-pick:hover {
  border-color: #34485c;
}

.media-pick.selected {
  border-color: rgba(244, 183, 64, 0.75);
  box-shadow: 0 0 0 2px rgba(244, 183, 64, 0.12);
}

.media-pick input {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.media-pick > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}

.media-pick.selected > span {
  color: var(--text);
}

.pick-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 7px;
  background-color: #0a1118;
  background-position: center;
  background-size: cover;
}

.pick-thumb.video {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1a2b3c, #0b1219);
}

.pick-thumb.video span {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(5, 9, 13, 0.55);
  color: #dbe8f5;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.modal-actions-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.modal-actions-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}

.modal-actions-row input {
  width: 130px;
}

.modal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.screen-picker {
  display: grid;
  gap: 7px;
  max-height: 340px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding: 2px;
}

.screen-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b131b;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.screen-pick:hover {
  border-color: #34485c;
}

.screen-pick:has(input:checked) {
  border-color: rgba(244, 183, 64, 0.7);
  background: rgba(244, 183, 64, 0.045);
}

.screen-pick input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.screen-pick > div {
  display: grid;
  gap: 2px;
}

.screen-pick strong {
  font-size: 12px;
}

.screen-pick span {
  color: var(--muted);
  font-size: 10px;
}

.form-row.modal-actions {
  justify-content: space-between;
  align-items: center;
}

.group-actions .primary {
  box-shadow: 0 8px 22px rgba(244, 183, 64, 0.16);
}

.group-tile-actions .primary {
  flex: 1;
}

.group-tile-actions .danger {
  flex: 0 0 auto;
}

@media (max-width: 1120px) {
  .group-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .group-side-col {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .group-header-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .group-header-stats {
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .group-header-stat:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .group-actions {
    width: 100%;
  }

  .group-actions button {
    flex: 1;
  }
}

@media (max-width: 680px) {
  .group-side-col {
    grid-template-columns: 1fr;
  }

  .group-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-header-main {
    align-items: flex-start;
  }

  .group-header-main h1 {
    font-size: 25px;
  }

  .group-header-stat {
    min-width: 62px;
    padding: 2px 12px;
  }

  .group-header-status {
    min-width: 100%;
    margin-top: 10px;
    padding: 10px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  .group-topbar .back-link {
    width: 100%;
  }

  .group-actions button {
    font-size: 12px;
    padding: 8px 10px;
  }
}

.modal .stack label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.modal .stack input,
.modal .stack select,
.modal .stack textarea {
  width: 100%;
}

.modal .stack textarea {
  resize: vertical;
  min-height: 74px;
}

.modal .form-row input {
  min-width: 0;
}

.group-side-col .hint {
  margin-top: 0;
}

.group-live-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0a1118;
  color: var(--muted);
  font-size: 11px;
}

.group-live-note i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.group-live-note.live {
  border-color: #1f4a2a;
  background: rgba(20, 83, 45, 0.14);
  color: #b9f0c9;
}

.group-live-note.live i {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.13);
}

.group-live-note.draft {
  border-color: #4a3a12;
  background: rgba(120, 80, 10, 0.1);
  color: #f5d896;
}

.group-live-note.draft i {
  background: var(--accent);
}

.screen-pick.selected {
  border-color: rgba(244, 183, 64, 0.7);
  background: rgba(244, 183, 64, 0.045);
}

a.icon-btn {
  text-decoration: none;
}

.group-screen-card .screen-status {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  flex: 0 0 auto;
  background: rgba(5, 8, 12, 0.45);
}

/* Group workbench */

.group-workbench-head,
.screens-page-head {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
  padding: 24px;
  margin-bottom: 18px;
  border: 1px solid #2a3c4e;
  border-radius: 18px;
  background:
    radial-gradient(700px 220px at 0% 0%, rgba(244, 183, 64, 0.1), transparent 62%),
    linear-gradient(115deg, #131f2a 0%, #0d161f 58%, #0a1118 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

.group-workbench-head::after,
.screens-page-head::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -150px;
  border: 1px solid rgba(244, 183, 64, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(244, 183, 64, 0.025), 0 0 0 70px rgba(244, 183, 64, 0.018);
  pointer-events: none;
}

.group-head-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.group-head-copy h1 {
  margin: 4px 0 6px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.group-head-copy > .muted {
  max-width: 610px;
  margin: 0;
  font-size: 13px;
}

.group-head-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.head-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0a1118;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.tv-cluster {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px 17px;
  border: 1px solid #2b4053;
  border-radius: 14px;
  background: linear-gradient(170deg, rgba(16, 26, 36, 0.98), rgba(8, 14, 20, 0.98));
  color: var(--text);
  text-align: left;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tv-cluster:hover {
  border-color: rgba(244, 183, 64, 0.45);
  transform: translateY(-1px);
}

.tv-frame {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 118px;
  aspect-ratio: 16 / 10;
  padding: 4px;
  border: 2px solid #30475b;
  border-radius: 9px;
  background: #070c11;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 26px rgba(0, 0, 0, 0.3);
}

.tv-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 36px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 0 0 4px 4px;
  background: #2b4053;
}

.tv-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 5px;
  border-radius: 5px;
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 183, 64, 0.08), transparent 70%),
    #060a0e;
  overflow: hidden;
}

.tv-num {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #293d4f;
  border-radius: 4px;
  background: #0b141c;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}

.tv-num.on {
  border-color: #1f4a2a;
  background: rgba(20, 83, 45, 0.22);
  color: #8ef0ac;
  box-shadow: 0 0 7px rgba(74, 222, 128, 0.16);
}

.tv-num.off {
  border-color: rgba(255, 107, 107, 0.24);
  background: rgba(255, 107, 107, 0.06);
  color: #ffb4b4;
}

.tv-num.more {
  width: auto;
  min-width: 18px;
  padding: 0 3px;
  border-color: rgba(244, 183, 64, 0.28);
  color: var(--accent);
}

.tv-num.empty {
  color: #5b6f83;
}

.tv-copy {
  display: grid;
  gap: 2px;
}

.tv-copy strong {
  font-size: 13px;
  letter-spacing: -0.02em;
}

.tv-copy span {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.group-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  align-items: start;
  gap: 18px;
}

.play-panel,
.library-panel {
  min-width: 0;
}

.play-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0a1118;
  color: var(--muted);
  font-size: 10px;
}

.play-name {
  color: var(--text);
  font-weight: 700;
}

.play-queue {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.queue-item {
  display: grid;
  grid-template-columns: 16px 24px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #0e1821, #0b131b);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.queue-item:hover {
  border-color: #34485c;
}

.queue-item.dragging {
  opacity: 0.35;
}

.queue-item.drag-over-top {
  border-color: rgba(244, 183, 64, 0.6);
  box-shadow: inset 0 2px 0 var(--accent);
}

.queue-item.drag-over-bottom {
  border-color: rgba(244, 183, 64, 0.6);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.drag-handle {
  color: #52677b;
  cursor: grab;
  font-size: 15px;
  line-height: 1;
  text-align: center;
  user-select: none;
  letter-spacing: -2px;
}

.drag-handle:active {
  cursor: grabbing;
}

.queue-index {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 183, 64, 0.24);
  border-radius: 6px;
  background: rgba(244, 183, 64, 0.07);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
}

.queue-thumb {
  width: 72px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #080d12;
}

.queue-thumb img,
.queue-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-thumb.web {
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 183, 64, 0.2), transparent 65%),
    linear-gradient(135deg, #1a2835, #0a1118);
}

.queue-thumb.web span {
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(5, 9, 13, 0.55);
  color: #dbe8f5;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.queue-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.queue-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: -0.01em;
}

.queue-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}

.queue-actions {
  display: flex;
  align-items: center;
  gap: 1px;
}

.queue-empty {
  display: grid;
  gap: 3px;
  padding: 26px 18px;
  border: 1px dashed #2d4255;
  border-radius: 11px;
  background: rgba(10, 16, 22, 0.55);
  text-align: center;
}

.queue-empty strong {
  font-size: 12px;
}

.queue-empty span {
  color: var(--muted);
  font-size: 11px;
}

.library-count {
  font-size: 10px;
}

.lib-tabs {
  display: flex;
  gap: 4px;
  margin: 2px 0 12px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a1118;
}

.lib-tabs button {
  flex: 1;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  box-shadow: none;
}

.lib-tabs button:hover {
  color: var(--text);
  transform: none;
}

.lib-tabs button.active {
  background: #1a2734;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.upload-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px dashed #30465a;
  border-radius: 10px;
  background: rgba(13, 21, 29, 0.55);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-drop:hover {
  border-color: rgba(244, 183, 64, 0.5);
  background: rgba(244, 183, 64, 0.035);
}

.upload-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.upload-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 183, 64, 0.28);
  border-radius: 7px;
  background: rgba(244, 183, 64, 0.09);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.upload-copy {
  display: grid;
  gap: 1px;
}

.upload-copy strong {
  font-size: 11px;
}

.upload-copy small {
  color: var(--muted);
  font-size: 9.5px;
}

.upload-status {
  display: block;
  margin-bottom: 7px;
  color: var(--accent-2);
  font-size: 10px;
}

.upload-status:empty {
  display: none;
}

.library-search {
  width: 100%;
  margin-bottom: 9px;
  padding: 8px 10px;
  font-size: 11px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 522px;
  overflow-y: auto;
  padding: 1px 2px 2px 1px;
}

.lib-card {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b131b;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.lib-card:hover {
  border-color: #34485c;
  transform: translateY(-1px);
}

.lib-thumb {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: #080d12;
}

.lib-thumb img,
.lib-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-info {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.lib-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.lib-info span {
  color: var(--muted);
  font-size: 8.5px;
}

.lib-add {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(244, 183, 64, 0.5);
  border-radius: 50%;
  background: rgba(7, 11, 16, 0.86);
  color: var(--accent-2);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(5px);
}

.lib-add:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  transform: none;
}

.library-empty {
  grid-column: 1 / -1;
  padding: 20px 14px;
  border: 1px dashed #2d4255;
  border-radius: 9px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}

.web-form {
  display: grid;
  gap: 9px;
}

.web-form > label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.web-form input {
  width: 100%;
}

.web-form-grid {
  gap: 8px;
}

.web-form-actions {
  justify-content: space-between;
  margin-top: 0;
}

.web-preview-shell {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #070c11;
}

.web-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-bottom: 1px solid var(--line-soft);
  background: #0a1118;
}

.web-dots {
  display: flex;
  gap: 3px;
  flex: 0 0 auto;
}

.web-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34485c;
}

.web-preview-host {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 9px;
}

.web-preview-bar a {
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
}

.web-preview-body {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #060a0e;
}

.web-preview-placeholder {
  max-width: 230px;
  padding: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.web-preview-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* Group screens page */

.screens-page-head {
  align-items: center;
}

.screens-page-head h1 {
  font-size: 28px;
}

.tv-strip {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  max-width: 52%;
}

.tv-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 170px;
  overflow: hidden;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0a1118;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-strip-item b {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 183, 64, 0.24);
  border-radius: 50%;
  background: rgba(244, 183, 64, 0.08);
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
}

.tv-strip-item.on {
  border-color: rgba(74, 222, 128, 0.2);
}

.tv-strip-item.on b {
  border-color: #1f4a2a;
  background: rgba(20, 83, 45, 0.2);
  color: #8ef0ac;
}

.tv-strip-empty {
  padding: 6px 10px;
  border: 1px dashed #2d4255;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
}

.screen-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.screen-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(180deg, #0e1821, #0b131b);
  transition: border-color 0.15s ease;
}

.screen-row:hover {
  border-color: #34485c;
}

.screen-num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 183, 64, 0.26);
  border-radius: 8px;
  background: rgba(244, 183, 64, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.screen-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.screen-row-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}

.screen-row-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}

.tv-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.tv-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5f7185;
}

.tv-status.on {
  border-color: #1f4a2a;
  color: #8ef0ac;
}

.tv-status.on i {
  background: var(--success);
  box-shadow: 0 0 7px rgba(74, 222, 128, 0.5);
}

.tv-status.off {
  border-color: rgba(255, 107, 107, 0.2);
  color: #ffb4b4;
}

.tv-status.off i {
  background: #b25c5c;
}

.screen-row-actions {
  display: flex;
  gap: 5px;
}

.screen-row-actions button {
  padding: 6px 9px;
  font-size: 10.5px;
}

.group-member-chip.tv {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-color: rgba(244, 183, 64, 0.24);
  border-radius: 6px;
  background: rgba(244, 183, 64, 0.07);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
}

.group-member-empty {
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 1080px) {
  .group-workbench {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1080px) {
  .group-workbench-head,
  .screens-page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 20px;
  }

  .tv-cluster {
    width: fit-content;
    max-width: 100%;
  }

  .tv-strip {
    justify-content: flex-start;
    max-width: 100%;
  }

  .tv-copy span {
    white-space: normal;
  }
}

@media (max-width: 680px) {
  .group-head-copy h1 {
    font-size: 25px;
  }

  .queue-item {
    grid-template-columns: 14px 22px 54px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .queue-thumb {
    width: 54px;
    height: 34px;
  }

  .queue-actions .icon-btn {
    width: 22px;
  }

  .screen-row {
    grid-template-columns: 32px minmax(0, 1fr);
    row-gap: 8px;
  }

  .screen-row .tv-status {
    grid-column: 2;
    justify-self: start;
  }

  .screen-row-actions {
    grid-column: 2;
    justify-self: end;
  }

  .group-actions {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .library-grid {
    grid-template-columns: 1fr;
  }

  .tv-cluster {
    align-items: flex-start;
    padding: 10px 12px 16px;
  }

  .tv-frame {
    width: 100px;
  }
}

/* Compact actions and local play queue */

.icon-action {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b131b;
  color: var(--muted);
  box-shadow: none;
}

.icon-action:hover {
  border-color: #34485c;
  background: #131e29;
  color: var(--text);
  transform: none;
}

.icon-action:disabled {
  opacity: 0.35;
  cursor: default;
}

.icon-action svg {
  width: 15px;
  height: 15px;
}

.icon-action.primary {
  border-color: rgba(244, 183, 64, 0.45);
  background: rgba(244, 183, 64, 0.1);
  color: var(--accent-2);
}

.icon-action.primary:hover {
  border-color: var(--accent);
  background: rgba(244, 183, 64, 0.18);
}

.save-btn {
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid rgba(244, 183, 64, 0.4);
  border-radius: 8px;
  background: rgba(244, 183, 64, 0.08);
  color: var(--accent-2);
  font-size: 10.5px;
  font-weight: 700;
  box-shadow: none;
}

.save-btn:hover {
  border-color: var(--accent);
  background: rgba(244, 183, 64, 0.16);
  transform: none;
}

.save-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.save-btn svg {
  width: 13px;
  height: 13px;
}

.save-btn.is-dirty {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 7px 18px rgba(244, 183, 64, 0.16);
}

.queue-tools {
  flex-wrap: nowrap;
  gap: 4px;
}

.dirty-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-2);
  font-size: 9px;
}

.dirty-note::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

.play-queue {
  min-height: 92px;
  border-radius: 10px;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

.play-queue.accepts-drop {
  box-shadow: inset 0 0 0 1px rgba(244, 183, 64, 0.24);
  background: rgba(244, 183, 64, 0.018);
}

.play-queue.is-drop-target {
  box-shadow: inset 0 0 0 2px var(--accent);
  background: rgba(244, 183, 64, 0.05);
}

.queue-item.pending {
  border-style: dashed;
  background: linear-gradient(180deg, rgba(244, 183, 64, 0.035), #0b131b);
}

.lib-card[draggable="true"] {
  cursor: grab;
}

.lib-card[draggable="true"]:active {
  cursor: grabbing;
}

.lib-card.dragging {
  opacity: 0.4;
  transform: none;
}

.lib-add {
  cursor: pointer;
}

.small-action {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 10.5px;
}

.small-action svg {
  width: 13px;
  height: 13px;
}

.group-topbar .group-actions {
  width: auto;
  margin-left: auto;
}

.group-actions .icon-action {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
}

.group-actions .save-btn,
.group-actions .small-action {
  flex: 0 0 auto;
}

@media (max-width: 680px) {
  .group-actions .icon-action {
    width: 30px;
    padding: 0;
    font-size: inherit;
  }
}

/* Library view switch */

.library-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.view-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a1118;
}

.view-toggle button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.view-toggle button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transform: none;
}

.view-toggle button.active {
  background: #1a2734;
  color: var(--text);
}

.view-toggle svg {
  width: 14px;
  height: 14px;
}

.library-grid.is-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.library-grid.is-list .lib-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
}

.library-grid.is-list .lib-thumb {
  width: 62px;
  height: 39px;
  flex: 0 0 auto;
  aspect-ratio: auto;
}

.library-grid.is-list .lib-info {
  flex: 1;
  min-width: 0;
}

.library-grid.is-list .lib-add {
  position: static;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
}

/* Clean light workspace */

body.admin-light {
  --bg: #f6f7f9;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #fbfcfd;
  --panel-3: #f1f3f6;
  --line: #e4e8ed;
  --line-soft: #eef1f4;
  --text: #1d2733;
  --muted: #6b7786;
  --accent: #a97800;
  --accent-2: #b07c00;
  --accent-ink: #241b05;
  --success: #15803d;
  --danger: #c23b3b;
  background: #f6f7f9;
  color: var(--text);
  color-scheme: light;
}

body.admin-light a {
  color: #966900;
}

body.admin-light .eyebrow {
  color: #a97800;
}

body.admin-light .hint {
  color: var(--muted);
}

body.admin-light button,
body.admin-light .button {
  border-color: #dfe4ea;
  background: #ffffff;
  color: #26313d;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.admin-light button:hover,
body.admin-light .button:hover {
  border-color: #cbd3dc;
  background: #f8f9fb;
  transform: none;
}

body.admin-light button.primary,
body.admin-light .button.primary {
  border-color: #e8b700;
  background: #ffce3a;
  color: #241b05;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

body.admin-light button.primary:hover,
body.admin-light .button.primary:hover {
  border-color: #d7a600;
  background: #ffd65c;
}

body.admin-light button.danger {
  border-color: #efcaca;
  background: #fff8f8;
  color: #bd3a3a;
}

body.admin-light button.danger:hover {
  border-color: #e5aaaa;
  background: #fff1f1;
}

body.admin-light button:disabled {
  opacity: 0.45;
}

body.admin-light input,
body.admin-light select,
body.admin-light textarea {
  border-color: #dfe4ea;
  background: #ffffff;
  color: var(--text);
}

body.admin-light input::placeholder,
body.admin-light textarea::placeholder {
  color: #98a2af;
}

body.admin-light input:focus,
body.admin-light select:focus,
body.admin-light textarea:focus {
  border-color: #d9a800;
  box-shadow: 0 0 0 3px rgba(255, 206, 58, 0.18);
}

body.admin-light select option {
  background: #ffffff;
  color: var(--text);
}

body.admin-light label {
  color: #677486;
}

body.admin-light code {
  background: #f4f6f8;
  color: #8a5f00;
}

body.admin-light pre {
  border-color: #e6eaef;
  background: #f8f9fb;
  color: #26313d;
}

body.admin-light .sidebar {
  background: #ffffff;
  border-right: 1px solid #e6e9ee;
  box-shadow: none;
}

body.admin-light .sidebar-brand {
  border-bottom-color: #eef1f4;
}

body.admin-light .brand-logo {
  border: 1px solid #eceff3;
  box-shadow: none;
}

body.admin-light .sidebar-brand span {
  color: #a97800;
}

body.admin-light .workspace {
  border-color: #e4e8ed;
  background: #f7f8fa;
}

body.admin-light .workspace-logo {
  border: 1px solid #eceff3;
}

body.admin-light .nav-label {
  color: #9aa4b2;
}

body.admin-light .nav button {
  color: #5f6b7a;
}

body.admin-light .nav button:hover {
  background: #f6f7f9;
  color: var(--text);
}

body.admin-light .nav button.active {
  background: #fff8e6;
  color: #1d2733;
  box-shadow: inset 2px 0 0 #e5a400;
}

body.admin-light .nav button.active .nav-icon {
  color: #a97800;
}

body.admin-light .nav-badge {
  background: #ffce3a;
  color: #241b05;
}

body.admin-light .sidebar-foot {
  border-top-color: #eef1f4;
}

body.admin-light .content {
  background: #f6f7f9;
}

body.admin-light .content-head h1 {
  color: #17212b;
  font-size: 24px;
  letter-spacing: -0.03em;
}

body.admin-light .panel {
  border-color: #e4e8ed;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.admin-light .stat {
  border-color: #e4e8ed;
  background: #ffffff;
  color: #6b7786;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.admin-light .stat::after {
  background: #ffce3a;
  opacity: 1;
}

body.admin-light .row {
  border-top-color: #eef1f4;
}

body.admin-light .row:hover {
  background: #fbfcfd;
}

body.admin-light .item-row {
  border-top-color: #eef1f4;
}

body.admin-light .usage-bar {
  border-color: #e8ecf0;
  background: #f1f3f6;
}

body.admin-light .badge {
  border-color: #e3e7ec;
  background: #f8f9fb;
  color: #677486;
}

body.admin-light .badge.live {
  border-color: #bfe3cc;
  background: #f0fbf4;
  color: #15803d;
}

body.admin-light .badge.draft {
  border-color: #efd58e;
  background: #fff9e8;
  color: #8a6400;
}

body.admin-light .media-card {
  border-color: #e4e8ed;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.admin-light .media-card:hover {
  border-color: #d2d9e2;
  transform: none;
}

body.admin-light .media-preview {
  background: #f1f3f6;
}

body.admin-light .screen-card {
  border-color: #e4e8ed;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.admin-light .screen-card:hover {
  border-color: #d2d9e2;
  transform: none;
}

body.admin-light .screen-preview {
  background: #f1f3f6;
}

body.admin-light .screen-preview::before {
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(120, 132, 146, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 132, 146, 0.1) 1px, transparent 1px);
}

body.admin-light .screen-create-card,
body.admin-light .group-create-tile {
  border-color: #dfe4ea;
  background: #fbfcfd;
}

body.admin-light .create-plus {
  border-color: #f0d27a;
  background: #fff8e6;
  color: #a97800;
}

body.admin-light .group-tile {
  border-color: #e4e8ed;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.admin-light .group-tile:hover {
  border-color: #d2d9e2;
  transform: none;
}

body.admin-light .group-icon {
  border-color: #f0d27a;
  background: #fff8e6;
  color: #a97800;
}

body.admin-light .group-member-chip {
  border-color: #e7ebf0;
  background: #f8f9fb;
  color: #677486;
}

body.admin-light .group-member-chip.tv {
  border-color: #f0d27a;
  background: #fff8e6;
  color: #966900;
}

body.admin-light .group-member-empty {
  color: #8a96a3;
}

body.admin-light .group-workbench-head,
body.admin-light .screens-page-head {
  border-color: #e4e8ed;
  border-top: 2px solid #ffce3a;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.admin-light .group-workbench-head::after,
body.admin-light .screens-page-head::after {
  display: none;
}

body.admin-light .group-head-copy h1 {
  color: #17212b;
}

body.admin-light .head-chip {
  border-color: #e7ebf0;
  background: #f8f9fb;
  color: #5f6b7a;
}

body.admin-light .tv-cluster {
  border-color: #e4e8ed;
  background: #ffffff;
  color: #1d2733;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.admin-light .tv-cluster:hover {
  border-color: #e4c268;
  transform: none;
}

body.admin-light .tv-frame {
  border-color: #cfd6df;
  background: #f1f3f6;
  box-shadow: none;
}

body.admin-light .tv-frame::after {
  background: #cfd6df;
}

body.admin-light .tv-screen {
  background: #111923;
}

body.admin-light .tv-copy span {
  color: #6b7786;
}

body.admin-light .play-meta {
  border-color: #e9edf1;
  background: #f8f9fb;
}

body.admin-light .play-name {
  color: #1d2733;
}

body.admin-light .queue-item {
  border-color: #e4e8ed;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

body.admin-light .queue-item:hover {
  border-color: #d2d9e2;
}

body.admin-light .queue-item.pending {
  border-color: #e8cc7d;
  background: #fffdf6;
}

body.admin-light .queue-index {
  border-color: #f0d27a;
  background: #fff8e6;
  color: #966900;
}

body.admin-light .queue-thumb {
  border-color: #e9edf1;
  background: #f1f3f6;
}

body.admin-light .queue-thumb.web {
  background: linear-gradient(135deg, #fff8e6, #f3f5f7);
}

body.admin-light .queue-thumb.web span {
  border-color: #e8d28f;
  background: #ffffff;
  color: #8a6400;
}

body.admin-light .queue-info span {
  color: #6b7786;
}

body.admin-light .drag-handle {
  color: #a1abb7;
}

body.admin-light .queue-empty {
  border-color: #dfe4ea;
  background: #fbfcfd;
}

body.admin-light .play-queue.accepts-drop {
  background: #fffdf4;
  box-shadow: inset 0 0 0 1px #f1d68d;
}

body.admin-light .play-queue.is-drop-target {
  background: #fff9e6;
  box-shadow: inset 0 0 0 2px #e5a400;
}

body.admin-light .dirty-note {
  color: #966900;
}

body.admin-light .dirty-note::before {
  background: #e5a400;
}

body.admin-light .lib-tabs {
  border-color: #e4e8ed;
  background: #f7f8fa;
}

body.admin-light .lib-tabs button {
  color: #677486;
}

body.admin-light .lib-tabs button.active {
  background: #ffffff;
  color: #1d2733;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body.admin-light .view-toggle {
  border-color: #e4e8ed;
  background: #f7f8fa;
}

body.admin-light .view-toggle button {
  color: #7a8695;
}

body.admin-light .view-toggle button:hover {
  background: #ffffff;
  color: #1d2733;
}

body.admin-light .view-toggle button.active {
  background: #ffffff;
  color: #a97800;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body.admin-light .upload-drop {
  border-color: #dfe4ea;
  background: #fbfcfd;
}

body.admin-light .upload-drop:hover {
  border-color: #e6c466;
  background: #fffdf4;
}

body.admin-light .upload-icon {
  border-color: #f0d27a;
  background: #fff8e6;
  color: #a97800;
}

body.admin-light .upload-copy small {
  color: #6b7786;
}

body.admin-light .library-search {
  border-color: #dfe4ea;
  background: #ffffff;
}

body.admin-light .lib-card {
  border-color: #e4e8ed;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

body.admin-light .lib-card:hover {
  border-color: #d2d9e2;
  transform: none;
}

body.admin-light .lib-thumb {
  background: #f1f3f6;
}

body.admin-light .lib-info span {
  color: #6b7786;
}

body.admin-light .lib-add {
  border-color: #e8cd84;
  background: #ffffff;
  color: #966900;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body.admin-light .lib-add:hover {
  border-color: #e5a400;
  background: #ffce3a;
  color: #241b05;
}

body.admin-light .library-empty {
  border-color: #dfe4ea;
  background: #fbfcfd;
  color: #6b7786;
}

body.admin-light .web-preview-shell {
  border-color: #e4e8ed;
  background: #ffffff;
}

body.admin-light .web-preview-bar {
  border-bottom-color: #eef1f4;
  background: #f8f9fb;
}

body.admin-light .web-dots i {
  background: #cfd6df;
}

body.admin-light .web-preview-host {
  color: #6b7786;
}

body.admin-light .web-preview-body {
  background: #f1f3f6;
}

body.admin-light .web-preview-placeholder {
  color: #6b7786;
}

body.admin-light .web-form > label,
body.admin-light .form-grid > label {
  color: #677486;
}

body.admin-light .tv-strip-item {
  border-color: #e7ebf0;
  background: #f8f9fb;
  color: #5f6b7a;
}

body.admin-light .tv-strip-item b {
  border-color: #f0d27a;
  background: #fff8e6;
  color: #966900;
}

body.admin-light .tv-strip-item.on {
  border-color: #bfe3cc;
}

body.admin-light .tv-strip-item.on b {
  border-color: #bfe3cc;
  background: #f0fbf4;
  color: #15803d;
}

body.admin-light .tv-strip-empty {
  border-color: #dfe4ea;
  background: #fbfcfd;
}

body.admin-light .screen-row {
  border-color: #e4e8ed;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

body.admin-light .screen-row:hover {
  border-color: #d2d9e2;
}

body.admin-light .screen-num {
  border-color: #f0d27a;
  background: #fff8e6;
  color: #966900;
}

body.admin-light .screen-row-main span {
  color: #6b7786;
}

body.admin-light .tv-status {
  border-color: #e7ebf0;
  background: #f8f9fb;
  color: #6b7786;
}

body.admin-light .tv-status.on {
  border-color: #bfe3cc;
  background: #f0fbf4;
  color: #15803d;
}

body.admin-light .tv-status.off {
  border-color: #f0caca;
  background: #fff8f8;
  color: #bd3a3a;
}

body.admin-light .empty-state {
  border-color: #dfe4ea;
  background: #fbfcfd;
}

body.admin-light .empty-icon {
  border-color: #f0d27a;
  background: #fff8e6;
  color: #a97800;
}

body.admin-light .icon-action {
  border-color: #dfe4ea;
  background: #ffffff;
  color: #667384;
  box-shadow: none;
}

body.admin-light .icon-action:hover {
  border-color: #cfd6df;
  background: #f8f9fb;
  color: #1d2733;
}

body.admin-light .icon-action.primary {
  border-color: #e8cd84;
  background: #fff8e6;
  color: #966900;
}

body.admin-light .icon-action.primary:hover {
  border-color: #e5a400;
  background: #ffce3a;
  color: #241b05;
}

body.admin-light .save-btn {
  border-color: #e8cd84;
  background: #ffffff;
  color: #966900;
  box-shadow: none;
}

body.admin-light .save-btn:hover {
  border-color: #e5a400;
  background: #fff9e6;
}

body.admin-light .save-btn.is-dirty {
  border-color: #e8b700;
  background: #ffce3a;
  color: #241b05;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
}

body.admin-light .modal-backdrop {
  background: rgba(23, 30, 39, 0.32);
  backdrop-filter: blur(2px);
}

body.admin-light .modal {
  border-color: #e4e8ed;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.2);
  color: var(--text);
}

body.admin-light .modal-head h2 {
  color: #17212b;
}

body.admin-light .modal-close {
  border-color: #e4e8ed;
  background: #f8f9fb;
  color: #5f6b7a;
}

body.admin-light .modal-divider {
  color: #8a96a3;
}

body.admin-light .modal-divider::before,
body.admin-light .modal-divider::after {
  background: #eef1f4;
}

body.admin-light .toast {
  border-color: #e4e8ed;
  background: #ffffff;
  color: #1d2733;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.12);
}

body.admin-light .toast.error {
  border-color: #f0caca;
  color: #bd3a3a;
}

body.admin-light .api-docs pre {
  border-color: #e6eaef;
  background: #f8f9fb;
  color: #26313d;
}

body.admin-light .secret-row code {
  border-color: #e6eaef;
  background: #f8f9fb;
  color: #8a5f00;
}

body.admin-light .role-badge,
body.admin-light .plan-chip {
  border-color: #e3e7ec;
  background: #f8f9fb;
  color: #677486;
}

body.admin-light .screen-settings {
  border-color: #e4e8ed;
  background: #fbfcfd;
}

body.admin-light .chip {
  border-color: #e7ebf0;
  background: #f8f9fb;
  color: #677486;
}

body.admin-light .chip.draft {
  border-color: #efd58e;
  background: #fff9e8;
  color: #8a6400;
}

body.admin-light .check-step {
  border-color: #e4e8ed;
  background: #fbfcfd;
  color: #1d2733;
}

body.admin-light .check-step:hover {
  border-color: #d2d9e2;
}

body.admin-light .check-step.done {
  border-color: #bfe3cc;
  background: #f0fbf4;
  color: #15803d;
}

body.admin-light .brand-preview,
body.admin-light .brand-logo-box,
body.admin-light .branding-preview {
  border-color: #dfe4ea;
  background: #fbfcfd;
}

body.admin-light .secret-box {
  border-color: #efd58e;
  background: #fff9e8;
}

body.admin-light .screen-pick {
  border-color: #e4e8ed;
  background: #ffffff;
}

body.admin-light .screen-pick:hover {
  border-color: #d2d9e2;
}

body.admin-light .screen-pick.selected {
  border-color: #e8cd84;
  background: #fffdf5;
}

body.admin-light .media-pick {
  border-color: #e4e8ed;
  background: #ffffff;
}

body.admin-light .media-pick.selected {
  border-color: #e8cd84;
  background: #fffdf5;
}

body.admin-light .media-pick > span {
  color: #677486;
}

body.admin-light .media-pick.selected > span {
  color: #1d2733;
}

body.admin-light .pick-thumb {
  background-color: #f1f3f6;
}

/* Enterprise screens summary and library toolbar */

.screens-summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 255px;
  max-width: 310px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  text-align: left;
  box-shadow: none;
}

.screens-summary:hover {
  border-color: #d1d5db;
  background: #ffffff;
  transform: none;
}

.screens-summary-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fffbeb;
  color: #a16207;
}

.screens-summary-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.screens-summary-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.screens-summary-row strong {
  font-size: 12.5px;
  letter-spacing: -0.01em;
}

.screens-online {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6b7280;
  font-size: 10px;
}

.screens-online i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
}

.screens-online i.on {
  background: #16a34a;
}

.screens-number-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.screen-number {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 9px;
  font-weight: 700;
}

.screen-number.on {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.screen-number.off {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.screen-number.more {
  width: auto;
  min-width: 22px;
  padding: 0 4px;
  border-color: #fde68a;
  background: #fffbeb;
  color: #a16207;
}

.screen-number.empty {
  color: #9ca3af;
}

.screens-summary-link {
  color: #a16207;
  font-size: 10px;
  font-weight: 600;
}

.library-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 10px;
}

.library-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.library-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.library-search-wrap .library-search {
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0 10px 0 31px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-size: 10.5px;
}

.upload-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.upload-btn:hover {
  border-color: #e5c15c;
  background: #fffbeb;
}

.upload-btn input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.upload-btn svg {
  width: 13px;
  height: 13px;
}

body.admin-light {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.admin-light .content-head h1 {
  font-weight: 650;
}

body.admin-light .group-workbench-head,
body.admin-light .screens-page-head {
  border-top: 1px solid #e5e7eb;
}

body.admin-light .group-head-copy h1 {
  font-size: 28px;
  font-weight: 650;
}

body.admin-light .group-subtitle {
  color: #6b7280;
}

body.admin-light .play-panel > .panel-head,
body.admin-light .library-panel > .panel-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #eef1f4;
}

body.admin-light .queue-item.pending {
  border-style: solid;
  border-color: #efd58e;
  background: #fffdf5;
  box-shadow: inset 3px 0 0 #ffce3a, 0 1px 2px rgba(16, 24, 40, 0.03);
}

body.admin-light .screens-summary {
  border-color: #e5e7eb;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.admin-light .screens-summary:hover {
  border-color: #d1d5db;
  background: #ffffff;
}

@media (max-width: 1080px) {
  .screens-summary {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 680px) {
  .library-tools {
    flex-wrap: nowrap;
  }

  .upload-btn span {
    display: none;
  }

  .upload-btn {
    width: 34px;
    padding: 0;
    justify-content: center;
  }
}

.group-list-intro {
  max-width: 760px;
  margin: -2px 0 16px;
  font-size: 12.5px;
  line-height: 1.55;
}

body.admin-light .panel {
  border-radius: 12px;
}

body.admin-light .group-workbench-head,
body.admin-light .screens-page-head {
  border-radius: 14px;
}

body.admin-light .group-tile,
body.admin-light .screen-card {
  border-radius: 12px;
}

body.admin-light .modal {
  border-radius: 14px;
}

body.admin-light .panel h2 {
  font-weight: 650;
}

body.admin-light .content-head h1 {
  font-weight: 650;
}

body.admin-light .icon-btn {
  color: #8a95a2;
}

body.admin-light .icon-btn:hover {
  border-color: #e5e7eb;
  background: #f9fafb;
  color: #111827;
}

body.admin-light .icon-btn.danger:hover {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

body.admin-light .nav button {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-light .workspace-select {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-light .back-link {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #6b7280;
}

body.admin-light .back-link:hover {
  border: 0;
  background: transparent;
  color: #111827;
}

body.admin-light .lib-tabs button {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-light .view-toggle button {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-light .icon-btn {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

body.admin-light .list-item {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-light .upload-btn {
  color: #374151;
}

.screens-summary {
  justify-content: flex-start;
}

body.admin-light .screens-summary {
  justify-content: flex-start;
}

@media (max-width: 1080px) {
  .screens-summary {
    width: fit-content;
    max-width: 100%;
  }
}

/* Flatter enterprise page headers */
body.admin-light .group-workbench-head,
body.admin-light .screens-page-head {
  padding: 2px 0 18px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body.admin-light .group-head-chips .head-chip {
  border-color: #e5e7eb;
  background: #ffffff;
}

body.admin-light .screens-page-head .tv-strip-item {
  border-color: #e5e7eb;
  background: #ffffff;
}

body.admin-light .screens-page-head .tv-strip-empty {
  border-color: #e5e7eb;
  background: #ffffff;
}

/* Denser enterprise sidebar */
@media (min-width: 861px) {
  body.admin-light .sidebar {
    width: 244px;
    flex: 0 0 244px;
    gap: 14px;
    padding: 18px 12px 14px;
  }

  body.admin-light .sidebar-brand {
    gap: 9px;
    padding: 1px 6px 12px;
  }

  body.admin-light .brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  body.admin-light .sidebar-brand strong {
    font-size: 14px;
  }

  body.admin-light .sidebar-brand span {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  body.admin-light .workspace {
    gap: 8px;
    padding: 8px 9px;
    border-radius: 10px;
  }

  body.admin-light .workspace-logo {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  body.admin-light .workspace-select {
    font-size: 11.5px;
  }

  body.admin-light .workspace-text span {
    font-size: 9.5px;
  }

  body.admin-light .nav {
    gap: 1px;
  }

  body.admin-light .nav-label {
    margin: 11px 8px 4px;
    font-size: 8.5px;
  }

  body.admin-light .nav button {
    gap: 9px;
    padding: 7px 9px;
    border-radius: 7px;
    font-size: 12px;
  }

  body.admin-light .nav-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  body.admin-light .nav-badge {
    min-width: 17px;
    font-size: 9px;
  }

  body.admin-light .sidebar-foot {
    padding-top: 11px;
  }

  body.admin-light .sidebar-user strong {
    font-size: 11.5px;
  }

  body.admin-light .sidebar-user span {
    font-size: 9.5px;
  }
}

.media-upload {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
}

.upload-btn > span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Compact group list */
.group-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: -2px 0 14px;
}

.group-list-toolbar .group-list-intro {
  margin: 0;
}

.group-grid {
  grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
  gap: 12px;
}

.group-tile {
  gap: 9px;
  padding: 14px;
  border-radius: 12px;
}

.group-tile-head {
  gap: 9px;
}

.group-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.group-icon svg {
  width: 16px;
  height: 16px;
}

.group-tile-title strong {
  font-size: 13px;
}

.group-tile-title span {
  font-size: 10.5px;
}

.group-tile-stats {
  gap: 10px;
  font-size: 10.5px;
}

.group-member-chip.tv {
  width: 21px;
  height: 21px;
  border-radius: 5px;
  font-size: 8px;
}

.group-tile-actions {
  gap: 5px;
}

.group-tile-actions button {
  padding: 6px 9px;
  font-size: 10.5px;
}

.group-empty-state {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 34px 20px;
  border: 1px dashed #dfe4ea;
  border-radius: 12px;
  background: #ffffff;
  text-align: center;
}

.group-empty-state strong {
  font-size: 13px;
}

.group-empty-state span {
  color: #6b7280;
  font-size: 11px;
}

.group-tile-actions {
  justify-content: flex-end;
}

.group-tile-actions .primary {
  flex: 0 0 auto;
}

.screen-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.screen-toolbar .small-action {
  margin-top: 4px;
}

/* Media library */

.upload-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 18px;
}

.upload-panel-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.upload-panel-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #f0d27a;
  border-radius: 9px;
  background: #fffbeb;
  color: #a16207;
}

.upload-panel h2 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 650;
}

.upload-panel p {
  margin: 0;
  font-size: 11px;
}

.upload-panel .media-upload {
  margin: 0;
}

.media-panel .panel-head {
  border-bottom: 1px solid #eef1f4;
  padding-bottom: 12px;
}

.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 2px;
}

.media-card {
  position: relative;
  overflow: visible;
  border-radius: 12px;
  background: #ffffff;
}

.media-card.menu-open {
  z-index: 20;
}

.media-preview {
  position: relative;
  overflow: hidden;
  border-radius: 11px 11px 0 0;
  background: #f1f3f6;
  cursor: zoom-in;
}

.media-kind {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(17, 24, 39, 0.72);
  color: #ffffff;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.media-body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px 9px 11px;
}

.media-body .media-meta {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
  padding: 0;
}

.media-body .media-meta strong {
  font-size: 11.5px;
}

.media-body .media-meta span {
  font-size: 9.5px;
}

.media-card .media-menu-btn {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8a95a2;
  box-shadow: none;
}

.media-card .media-menu-btn:hover {
  background: #f3f4f6;
  color: #111827;
  transform: none;
}

.media-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 8px;
  z-index: 30;
  width: 172px;
  padding: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.14);
}

.media-card .media-menu button {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #374151;
  font-size: 10.5px;
  font-weight: 500;
  text-align: left;
  box-shadow: none;
}

.media-card .media-menu button:hover {
  background: #f6f7f9;
  color: #111827;
  transform: none;
}

.media-card .media-menu button.danger {
  color: #b91c1c;
}

.media-card .media-menu button.danger:hover {
  background: #fef2f2;
}

.media-menu svg {
  flex: 0 0 auto;
}

.media-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  place-items: center;
  padding: 30px 18px;
  border: 1px dashed #dfe4ea;
  border-radius: 10px;
  background: #fbfcfd;
  color: #6b7280;
  text-align: center;
}

.media-empty strong {
  color: #111827;
  font-size: 12px;
}

.media-empty span {
  font-size: 10.5px;
}

.media-preview-modal {
  width: min(92vw, 900px);
  max-width: 900px;
}

.media-preview-meta {
  margin: 3px 0 0;
  font-size: 11px;
}

.media-preview-stage {
  display: grid;
  place-items: center;
  min-height: 220px;
  max-height: 72vh;
  overflow: hidden;
  border-radius: 10px;
  background: #111827;
}

.media-preview-stage img,
.media-preview-stage video {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.media-preview-stage video {
  width: 100%;
}

.media-preview-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}

@media (max-width: 680px) {
  .upload-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .upload-panel .media-upload {
    width: 100%;
    flex-wrap: wrap;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
  }
}

.media-upload-btn {
  height: 34px;
  padding: 0 12px;
  gap: 6px;
  border-radius: 8px;
  font-size: 11px;
}

.media-upload-btn svg {
  width: 14px;
  height: 14px;
}

/* Playlist library */

.playlist-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: -2px 0 14px;
}

.playlist-page-toolbar p {
  max-width: 760px;
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.playlist-list-panel {
  padding: 16px;
}

.playlist-nav-list {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.playlist-nav-list .playlist-list-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #374151;
  text-align: left;
  box-shadow: none;
}

.playlist-nav-list .playlist-list-item:hover {
  background: #f6f7f9;
  color: #111827;
  transform: none;
}

.playlist-nav-list .playlist-list-item.active {
  background: #fff8e6;
  color: #111827;
  box-shadow: inset 2px 0 0 #e5a400;
}

.playlist-list-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #9ca3af;
}

.playlist-list-item.active .playlist-list-icon {
  color: #a16207;
}

.playlist-list-main {
  display: grid;
  flex: 1;
  gap: 1px;
  min-width: 0;
}

.playlist-list-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
}

.playlist-list-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6b7280;
  font-size: 9.5px;
}

.playlist-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.playlist-detail-head h2 {
  margin: 0;
  font-size: 16px;
}

.playlist-detail-meta {
  margin: 5px 0 0;
  font-size: 11px;
}

.playlist-detail-actions {
  flex-wrap: nowrap;
  gap: 4px;
}

body.admin-light .playlist-detail-actions .icon-action.danger {
  border-color: #fecaca;
  background: #fff8f8;
  color: #b91c1c;
}

body.admin-light .playlist-detail-actions .icon-action.danger:hover {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

@media (max-width: 680px) {
  .playlist-page-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

.screens-summary {
  min-width: 210px;
  max-width: 250px;
  padding: 12px 14px;
}

.screens-summary-body {
  gap: 5px;
}

/* Screen list */

.screen-list-panel {
  padding: 0;
  overflow: visible;
}

.screen-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid #eef1f4;
  color: #9ca3af;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.screens-table {
  display: grid;
}

.screen-list-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef1f4;
}

.screen-list-item:last-child {
  border-bottom: 0;
}

.screen-list-item:hover {
  background: #fbfcfd;
}

.screen-list-item.menu-open {
  z-index: 20;
}

.screen-list-screen {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.screen-list-item .screen-thumb {
  position: relative;
  width: 78px;
  height: 44px;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #f1f3f6;
  box-shadow: none;
}

.screen-list-item .screen-thumb:hover {
  border-color: #d1d5db;
  transform: none;
}

.screen-list-item .screen-thumb .screen-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.screen-list-item .screen-thumb .screen-media span,
.screen-list-item .screen-thumb .screen-media small {
  font-size: 7px;
}

.thumb-draft {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.55);
  color: #ffffff;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.screen-list-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.screen-list-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.screen-list-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}

.screen-list-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6b7280;
  font-size: 9.5px;
}

.screen-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.screen-list-tags .chip {
  max-width: 100%;
}

.screen-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.screen-menu-wrap {
  position: relative;
}

.screen-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  width: 172px;
  padding: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.14);
}

.screen-list-item .screen-menu button {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #374151;
  font-size: 10.5px;
  font-weight: 500;
  text-align: left;
  box-shadow: none;
}

.screen-list-item .screen-menu button:hover {
  background: #f6f7f9;
  color: #111827;
  transform: none;
}

.screen-list-item .screen-menu button.danger {
  color: #b91c1c;
}

.screen-list-item .screen-menu button.danger:hover {
  background: #fef2f2;
}

.screen-list-empty {
  padding: 30px 16px;
  color: #6b7280;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 900px) {
  .screen-list-head {
    display: none;
  }

  .screen-list-item {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 8px;
  }

  .screen-list-screen {
    grid-column: 1;
  }

  .screen-list-tags {
    grid-column: 1;
  }

  .screen-list-item .tv-status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .screen-list-actions {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
}

.screen-preview-modal {
  width: min(92vw, 900px);
  max-width: 900px;
}

.screen-preview-stage {
  display: grid;
  place-items: center;
}

.screen-preview-stage .screen-preview {
  width: 100%;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
}

.screen-preview-meta {
  margin: 3px 0 0;
  font-size: 11px;
}

.screen-preview-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}

.screen-list-title .screen-name-link {
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: none;
}

.screen-list-title .screen-name-link:hover {
  border: 0;
  background: transparent;
  color: #a16207;
  transform: none;
}

/* Professional modal forms */

.modal {
  padding: 24px;
}

.modal-head {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef1f4;
}

.modal .stack {
  margin-top: 0;
  gap: 12px;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
}

.modal input,
.modal select {
  height: 36px;
  border-radius: 8px;
}

.modal select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.modal textarea {
  min-height: 84px;
  border-radius: 8px;
}

.modal .form-grid {
  gap: 14px 12px;
}

.modal .form-grid > label,
.modal .stack label {
  gap: 6px;
  font-size: 10.5px;
}

.modal .check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 2px 0;
}

.modal .check-row label {
  font-size: 11px;
}

.modal-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eef1f4;
}

.modal-settings {
  width: min(94vw, 780px);
  max-width: 780px;
}

.settings-form {
  display: grid;
  gap: 0;
}

.settings-section {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eef1f4;
}

.settings-section h3 {
  margin: 0 0 11px;
  color: #8a96a3;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.group-logo-config {
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  background: #fbfcfd;
}

.group-logo-config .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.group-logo-config output {
  display: inline-block;
  margin-top: 4px;
  color: #a97800;
  font-size: 9px;
  font-weight: 650;
}

.group-logo-config input[type="range"] {
  width: 100%;
  accent-color: #d99a00;
}

.logo-position-preview {
  position: relative;
  width: 100%;
  max-width: 250px;
  aspect-ratio: 16 / 9;
  margin-top: 10px;
  border: 1px solid #dfe4ea;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 55%),
    repeating-linear-gradient(45deg, #2b3440 0 10px, #333d4a 10px 20px);
  overflow: hidden;
}

.logo-position-preview-label {
  position: absolute;
  left: 8px;
  bottom: 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.logo-position-preview-logo {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  color: #7c4f00;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12);
}

.logo-position-preview-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.settings-size-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 16px;
  align-items: start;
}

.settings-size-fields .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-preview {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  min-height: 175px;
  padding: 12px;
  border: 1px solid #eef1f4;
  border-radius: 10px;
  background: #fbfcfd;
}

.settings-preview-frame {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 30px;
  border: 2px solid #1f2937;
  border-radius: 6px;
  background: #111827;
  color: #ffffff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.12);
}

.settings-preview-size {
  color: #6b7280;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 680px) {
  .settings-size-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-size-fields .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-preview {
    min-height: 150px;
  }
}

.screen-list-item .screen-thumb.portrait {
  width: 44px;
  height: 78px;
}

.screen-list-item .screen-thumb.portrait .screen-media span,
.screen-list-item .screen-thumb.portrait .screen-media small {
  font-size: 6px;
}

.modal input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
}

.settings-field-label {
  margin-bottom: 7px;
  color: #6b7280;
  font-size: 10.5px;
  font-weight: 600;
}

.format-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.format-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #374151;
  text-align: left;
  box-shadow: none;
}

.format-option:hover {
  border-color: #d1d5db;
  background: #fbfcfd;
  transform: none;
}

.format-option.active {
  border-color: #e5b400;
  background: #fffdf4;
  box-shadow: inset 0 0 0 1px #f0d387;
}

.format-icon {
  width: 46px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  background: #f8f9fb;
}

.format-icon i {
  display: block;
  border: 2px solid #6b7280;
  border-radius: 3px;
  background: #ffffff;
}

.format-option[data-format="landscape"] .format-icon i {
  width: 29px;
  height: 17px;
}

.format-option[data-format="portrait"] .format-icon i {
  width: 17px;
  height: 28px;
}

.format-option.active .format-icon {
  border-color: #f3d47a;
  background: #fffbeb;
}

.format-option.active .format-icon i {
  border-color: #a16207;
}

.format-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.format-copy strong {
  font-size: 11px;
  font-weight: 600;
}

.format-copy small {
  overflow: hidden;
  color: #6b7280;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.format-option.active .format-copy small {
  color: #8a6400;
}

.settings-size-fields .settings-dimensions-grid {
  grid-template-columns: 1.15fr 0.9fr 0.9fr;
  gap: 10px 8px;
}

@media (max-width: 680px) {
  .settings-size-fields .settings-dimensions-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .format-switch {
    grid-template-columns: minmax(0, 1fr);
  }
}

.screen-status-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 210px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.screen-status-card-main {
  display: grid;
  gap: 2px;
}

.screen-status-card-main strong {
  font-size: 12.5px;
}

.screen-status-card-main span {
  color: #6b7280;
  font-size: 10px;
}

.screen-status-card-main a {
  margin-top: 2px;
  color: #a16207;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
}

.screen-status-card-main a:hover {
  color: #7c4f00;
}

.screen-group-notice-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 1080px) {
  .screen-status-card {
    width: fit-content;
    max-width: 100%;
  }
}

/* File manager */

.fm-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.fm-layout > .panel + .panel {
  margin-top: 0;
}

.fm-sidebar {
  position: sticky;
  top: 18px;
  padding: 10px;
}

.fm-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 9px;
  border-bottom: 1px solid #eef1f4;
}

.fm-sidebar-head h2 {
  margin: 0;
  color: #8a96a3;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fm-sidebar-head .icon-action {
  width: 26px;
  height: 26px;
}

.fm-tree {
  display: grid;
  gap: 1px;
  margin-top: 7px;
  max-height: 70vh;
  overflow-y: auto;
}

.fm-tree-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 31px;
  gap: 7px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #596574;
  box-shadow: none;
  font-size: 10.5px;
  font-weight: 500;
  text-align: left;
  transform: none;
}

.fm-tree-item:hover {
  border: 0;
  background: #f7f8fa;
  color: #111827;
  transform: none;
}

.fm-tree-item.active {
  background: #fff8e0;
  color: #7c4f00;
  font-weight: 650;
}

.fm-tree-item.drop-target {
  background: #fff3c4;
  box-shadow: inset 0 0 0 1px #e8b700;
}

.fm-tree-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: #9aa5b3;
}

.fm-tree-item.active .fm-tree-icon {
  color: #b78100;
}

.fm-tree-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-tree-count {
  margin-left: auto;
  color: #9ca3af;
  font-size: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fm-tree-item.active .fm-tree-count {
  color: #a97800;
}

.fm-main {
  padding: 0;
  min-width: 0;
}

.fm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-bottom: 1px solid #eef1f4;
}

.fm-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1px;
  min-width: 0;
  color: #9ca3af;
  font-size: 10px;
}

.fm-breadcrumb button {
  padding: 3px 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #697586;
  box-shadow: none;
  font-size: 10px;
  font-weight: 550;
  transform: none;
}

.fm-breadcrumb button:hover {
  border: 0;
  background: #f6f7f9;
  color: #111827;
  transform: none;
}

.fm-crumb-sep {
  color: #c3c9d1;
  font-size: 12px;
}

.fm-crumb-current {
  padding: 3px 5px;
  color: #27313d;
  font-size: 10px;
  font-weight: 650;
}

.fm-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.fm-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.fm-search-wrap svg {
  position: absolute;
  left: 9px;
  color: #9ca3af;
  pointer-events: none;
}

.fm-search {
  width: 176px;
  height: 32px;
  padding: 0 9px 0 27px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #fbfcfd;
  color: #111827;
  font-size: 10px;
}

.fm-search:focus {
  border-color: #e8b700;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(232, 183, 0, 0.1);
}

.fm-toolbar .icon-action {
  width: 32px;
  height: 32px;
}

.fm-toolbar .media-upload-btn {
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 10.5px;
}

.fm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
  gap: 11px;
  padding: 14px;
}

.fm-card {
  position: relative;
  min-width: 0;
  border: 1px solid #e7ebef;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fm-card:hover {
  border-color: #d9dfe6;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06);
}

.fm-card.menu-open {
  z-index: 35;
}

.fm-card.hidden {
  display: none;
}

.fm-card.dragging {
  opacity: 0.45;
}

.fm-file-card {
  cursor: default;
}

.fm-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 9px 9px 0 0;
  background: #f1f3f6;
  cursor: zoom-in;
}

.fm-thumb img,
.fm-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.fm-kind {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(17, 24, 39, 0.72);
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.fm-body {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 7px 8px 9px;
}

.fm-meta {
  display: grid;
  min-width: 0;
  gap: 1px;
  flex: 1;
}

.fm-meta strong {
  overflow: hidden;
  color: #27313d;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-meta span {
  color: #9ca3af;
  font-size: 9px;
}

.fm-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.fm-menu-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9aa5b3;
  box-shadow: none;
  transform: none;
}

.fm-menu-btn:hover {
  border: 0;
  background: #f3f5f7;
  color: #27313d;
  transform: none;
}

.fm-menu-btn[aria-expanded="true"] {
  background: #f3f5f7;
  color: #27313d;
}

.fm-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  display: grid;
  width: 184px;
  padding: 4px;
  border: 1px solid #e4e8ed;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(16, 24, 40, 0.16);
}

.fm-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4b5563;
  box-shadow: none;
  font-size: 10px;
  font-weight: 500;
  text-align: left;
  justify-content: flex-start;
  transform: none;
}

.fm-menu button:hover {
  border: 0;
  background: #f7f8fa;
  color: #111827;
  transform: none;
}

.fm-menu button.danger {
  color: #b42323;
}

.fm-menu button.danger:hover {
  background: #fef2f2;
  color: #991b1b;
}

.fm-menu svg {
  flex: 0 0 auto;
  color: #8a96a3;
}

.fm-menu button.danger svg {
  color: #dc5a5a;
}

.fm-folder-card {
  display: block;
  padding: 0;
}

.fm-folder-card:hover {
  border-color: #ead489;
  background: #fffdf7;
}

.fm-folder-card.drop-target {
  border-color: #e8b700;
  background: #fff8e0;
  box-shadow: 0 0 0 3px rgba(232, 183, 0, 0.12);
}

.fm-folder-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #27313d;
  box-shadow: none;
  text-align: left;
  justify-content: flex-start;
  transform: none;
}

.fm-folder-open:hover {
  border: 0;
  background: transparent;
  transform: none;
}

.fm-folder-icon {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 9px 9px 0 0;
  background:
    radial-gradient(120px 70px at 20% 15%, rgba(255, 255, 255, 0.9), transparent 70%),
    linear-gradient(135deg, #fffdf4, #fff3c4);
  color: #b78100;
}

.fm-folder-icon svg {
  width: 42px;
  height: 42px;
  stroke-width: 1.35;
}

.fm-folder-info {
  display: grid;
  min-width: 0;
  gap: 1px;
  padding: 8px 9px 9px;
}

.fm-folder-info strong {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-folder-info span {
  color: #9ca3af;
  font-size: 9px;
}

.fm-folder-card > .fm-menu-wrap {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}

.fm-folder-card .fm-menu-btn {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(4px);
}

.fm-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 220px;
  padding: 30px;
  border: 1px dashed #e1e6eb;
  border-radius: 10px;
  background: #fbfcfd;
  text-align: center;
}

.fm-empty strong {
  color: #374151;
  font-size: 12px;
  font-weight: 650;
}

.fm-empty span {
  color: #9ca3af;
  font-size: 10px;
}

.fm-grid.is-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.fm-grid.is-list .fm-card {
  border-color: transparent;
  border-radius: 7px;
  box-shadow: none;
}

.fm-grid.is-list .fm-card:hover {
  border-color: #eef1f4;
  background: #fbfcfd;
  box-shadow: none;
}

.fm-grid.is-list .fm-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 7px;
}

.fm-grid.is-list .fm-thumb {
  width: 62px;
  height: 39px;
  aspect-ratio: auto;
  flex: 0 0 auto;
  border-radius: 6px;
}

.fm-grid.is-list .fm-kind {
  top: 4px;
  left: 4px;
  padding: 1px 4px;
  font-size: 7px;
}

.fm-grid.is-list .fm-body {
  flex: 1;
  padding: 0 0 0 1px;
}

.fm-grid.is-list .fm-meta strong {
  font-size: 11px;
}

.fm-grid.is-list .fm-folder-card {
  display: flex;
  align-items: center;
  padding: 5px 7px;
}

.fm-grid.is-list .fm-folder-open {
  flex-direction: row;
  align-items: center;
  gap: 9px;
}

.fm-grid.is-list .fm-folder-icon {
  width: 30px;
  height: 30px;
  aspect-ratio: auto;
  flex: 0 0 auto;
  border-radius: 7px;
}

.fm-grid.is-list .fm-folder-icon svg {
  width: 16px;
  height: 16px;
}

.fm-grid.is-list .fm-folder-info {
  padding: 0;
}

.fm-grid.is-list .fm-folder-card > .fm-menu-wrap {
  position: relative;
  top: auto;
  right: auto;
  margin-left: auto;
}

.fm-grid.is-list .fm-folder-card .fm-menu-btn {
  background: transparent;
  backdrop-filter: none;
}

.fm-preview-modal {
  max-width: 820px;
}

.fm-preview-meta {
  margin: 4px 0 0;
  font-size: 10px;
}

.fm-preview-stage {
  display: grid;
  place-items: center;
  min-height: 220px;
  max-height: 62vh;
  overflow: hidden;
  border: 1px solid #eef1f4;
  border-radius: 10px;
  background: #0f1720;
}

.fm-preview-stage img,
.fm-preview-stage video {
  display: block;
  max-width: 100%;
  max-height: 62vh;
  object-fit: contain;
}

.fm-preview-actions {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #eef1f4;
  flex-wrap: wrap;
}

.fm-preview-actions .button,
.fm-preview-actions button {
  height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 10.5px;
}

@media (max-width: 980px) {
  .fm-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .fm-sidebar {
    position: static;
  }
  .fm-tree {
    max-height: 200px;
  }
}

@media (max-width: 680px) {
  .fm-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .fm-toolbar-actions {
    width: 100%;
  }
  .fm-search-wrap {
    flex: 1;
    min-width: 140px;
  }
  .fm-search {
    width: 100%;
  }
  .fm-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

.fm-move-modal {
  max-width: 430px;
}

.fm-move-modal select {
  width: 100%;
  height: 36px;
}

/* Group configuration and TV assignment */

.group-config-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #e4e8ed;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.group-config-intro {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 180px;
}

.group-config-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #fff8e0;
  color: #a16207;
}

.group-config-icon svg {
  width: 15px;
  height: 15px;
}

.group-config-intro > span:last-child {
  display: grid;
  gap: 1px;
}

.group-config-intro strong {
  color: #27313d;
  font-size: 10.5px;
  font-weight: 650;
}

.group-config-intro small {
  color: #9ca3af;
  font-size: 8.5px;
}

.group-config-facts {
  display: flex;
  align-items: center;
  flex: 1;
  flex-wrap: wrap;
  gap: 7px 20px;
  min-width: 0;
}

.group-config-facts > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.group-config-facts small {
  color: #9ca3af;
  font-size: 7.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.group-config-facts b {
  overflow: hidden;
  color: #374151;
  font-size: 9.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-config-bar > .small-action {
  margin-left: auto;
}

.group-inherit-note,
.assign-inherit-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #f0e1ae;
  border-radius: 8px;
  background: #fffdf4;
  color: #6b5a2e;
  font-size: 9.5px;
  line-height: 1.45;
}

.group-inherit-note svg,
.assign-inherit-note svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #b78100;
}

.group-settings-actions {
  justify-content: flex-end;
}

.group-settings-actions .danger {
  margin-right: auto;
}

.assign-tv-modal {
  max-width: 620px;
}

.assign-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 1px;
}

#assignSelectedCount {
  color: #4b5563;
  font-size: 10px;
  font-weight: 600;
}

.assign-screen-list {
  display: grid;
  gap: 5px;
  max-height: 45vh;
  overflow-y: auto;
  padding: 1px;
}

.assign-screen {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  background: #ffffff;
  color: #27313d;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.assign-screen:hover {
  border-color: #e4dfc8;
  background: #fffdf8;
}

.assign-screen.selected {
  border-color: #ead489;
  background: #fffdf4;
}

.assign-screen input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: #e8b700;
}

.assign-screen-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: #f7f8fa;
  color: #8a96a3;
}

.assign-screen.selected .assign-screen-icon {
  background: #fff8e0;
  color: #a16207;
}

.assign-screen-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.assign-screen-copy strong {
  overflow: hidden;
  color: #27313d;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-screen-copy span {
  overflow: hidden;
  color: #8a96a3;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-screen-copy small {
  color: #a97800;
  font-size: 8px;
  font-weight: 600;
}

.assign-screen .tv-status {
  margin-left: auto;
  padding: 3px 6px;
  font-size: 8px;
}

.assign-empty {
  padding: 24px;
  border: 1px dashed #e1e6eb;
  border-radius: 8px;
  background: #fbfcfd;
  color: #8a96a3;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 760px) {
  .group-config-facts {
    flex-basis: 100%;
    order: 3;
  }
  .group-config-bar > .small-action {
    margin-left: 0;
  }
  .assign-screen .tv-status {
    display: none;
  }
}

/* Group-managed screen settings */

.screen-group-lock {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 16px;
  padding: 10px 11px;
  border: 1px solid #f0d98f;
  border-radius: 9px;
  background: #fffdf4;
}

.screen-group-lock-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: #fff3c4;
  color: #a16207;
}

.screen-group-lock > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.screen-group-lock strong {
  color: #5f4a16;
  font-size: 10.5px;
  font-weight: 650;
}

.screen-group-lock span span,
#screenGroupLockText {
  color: #82704a;
  font-size: 9px;
  line-height: 1.45;
}

.screen-group-lock-link {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #a16207;
  font-size: 9px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.screen-group-lock-link:hover {
  color: #7c4f00;
  text-decoration: underline;
}

.settings-section.is-locked {
  opacity: 0.7;
}

.settings-section.is-locked .format-option,
.settings-section.is-locked input,
.settings-section.is-locked select,
.settings-section.is-locked button {
  cursor: not-allowed;
}

@media (max-width: 620px) {
  .screen-group-lock {
    flex-wrap: wrap;
  }
  .screen-group-lock-link {
    margin-left: 37px;
  }
}

/* Keep assignment rows horizontal inside the modal form */
.modal .stack .assign-screen {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  color: #27313d;
}

.modal .stack .assign-screen input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  flex: 0 0 auto;
  margin: 0;
}

.modal .stack .assign-screen.selected {
  border-color: #ead489;
  background: #fffdf4;
}

.modal .stack .assign-screen-copy {
  display: grid;
  gap: 1px;
  flex: 1;
}

#settingsModal .settings-dimensions-grid {
  grid-template-columns: 1.45fr 0.78fr 0.78fr;
}

@media (max-width: 680px) {
  #settingsModal .settings-dimensions-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Screen schedule, transition and queue controls */

.schedule-panel {
  padding: 14px 16px;
  margin: 0 0 14px;
}

.schedule-panel .panel-head {
  align-items: flex-start;
  margin-bottom: 12px;
}

.schedule-panel .panel-head p {
  margin: 3px 0 0;
  font-size: 10.5px;
}

.schedule-badge {
  padding: 4px 8px;
  border: 1px solid #e7ebf0;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.schedule-badge.on {
  border-color: #bfe3cc;
  background: #f0fbf4;
  color: #15803d;
}

.schedule-badge.off {
  border-color: #e7ebf0;
  background: #f8f9fb;
  color: #8a96a3;
}

.schedule-form {
  display: grid;
  gap: 12px;
}

.schedule-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.schedule-switches {
  align-items: center;
  gap: 22px;
}

.schedule-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  cursor: pointer;
}

.schedule-switch input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-width: 15px;
  margin: 0;
  accent-color: #e8b700;
}

.schedule-switch > span {
  display: grid;
  gap: 1px;
}

.schedule-switch strong {
  font-size: 10.5px;
  font-weight: 600;
}

.schedule-switch small {
  color: #9ca3af;
  font-size: 8.5px;
}

.schedule-timing {
  align-items: center;
  padding-top: 11px;
  border-top: 1px solid #eef1f4;
}

.schedule-days-wrap {
  display: grid;
  gap: 5px;
}

.schedule-label {
  color: #8a96a3;
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schedule-days {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.schedule-day {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid #e4e8ed;
  border-radius: 999px;
  background: #fbfcfd;
  color: #687586;
  font-size: 8.5px;
  cursor: pointer;
}

.schedule-day input {
  width: 11px;
  height: 11px;
  min-width: 11px;
  margin: 0;
  accent-color: #e8b700;
}

.schedule-day:has(input:checked) {
  border-color: #e5c45c;
  background: #fff8e0;
  color: #7c4f00;
  font-weight: 650;
}

.schedule-day:has(input:disabled) {
  opacity: 0.45;
  cursor: default;
}

.schedule-times {
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  width: min(100%, 280px);
  gap: 9px;
}

.schedule-times label {
  font-size: 9px;
}

.schedule-times input {
  height: 32px;
}

.schedule-effects {
  padding-top: 11px;
  border-top: 1px solid #eef1f4;
  align-items: flex-start;
}

.schedule-effects label {
  display: grid;
  gap: 5px;
  color: #6b7786;
  font-size: 9px;
}

.schedule-effects select {
  min-width: 150px;
  height: 32px;
}

.schedule-footer {
  justify-content: space-between;
  align-items: center;
  padding-top: 11px;
  border-top: 1px solid #eef1f4;
}

.schedule-summary {
  color: #8a96a3;
  font-size: 9.5px;
}

.schedule-footer button {
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 10.5px;
}

.queue-item {
  grid-template-columns: 16px 24px 72px minmax(0, 1fr) auto auto;
}

.queue-duration {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #9ca3af;
  font-size: 7.5px;
  text-align: center;
}

.queue-duration span {
  font-size: 7.5px;
  font-weight: 600;
}

.queue-duration input {
  width: 52px;
  height: 29px;
  padding: 0 4px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fbfcfd;
  color: #27313d;
  font-size: 10px;
  text-align: center;
}

.queue-video-time {
  padding: 4px 6px;
  border: 1px solid #eef1f4;
  border-radius: 5px;
  background: #fbfcfd;
  color: #9ca3af;
  font-size: 7.5px;
  font-weight: 600;
  white-space: nowrap;
}

.queue-actions-list {
  gap: 2px;
}

.queue-actions-list .icon-btn {
  width: 27px;
  height: 27px;
  padding: 0;
}

.queue-actions-list .icon-btn svg {
  width: 13px;
  height: 13px;
}

.media-preview-stage iframe {
  width: 100%;
  height: min(60vh, 520px);
  border: 0;
  background: #ffffff;
}

@media (max-width: 760px) {
  .schedule-switches {
    gap: 12px 18px;
  }
  .schedule-timing {
    align-items: flex-start;
    flex-direction: column;
  }
  .schedule-times {
    width: 100%;
  }
  .queue-item {
    grid-template-columns: 14px 22px 54px minmax(0, 1fr) auto;
    gap: 7px;
  }
  .queue-duration {
    grid-column: 4;
    grid-row: 2;
    justify-self: start;
  }
  .queue-actions-list {
    grid-column: 5;
    grid-row: 1 / span 2;
  }
  .queue-thumb {
    width: 54px;
    height: 34px;
  }
  .queue-video-time {
    grid-column: 4;
    grid-row: 2;
    justify-self: start;
  }
}

@media (max-width: 680px) {
  .schedule-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Per-material actions and configuration */

.queue-item {
  position: relative;
  grid-template-columns: 16px 24px 72px minmax(0, 1fr) auto;
}

.queue-item:has(.queue-menu:not(.hidden)) {
  z-index: 45;
}

.queue-menu-wrap {
  position: relative;
}

.queue-menu-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9aa5b3;
  box-shadow: none;
  transform: none;
}

.queue-menu-btn:hover,
.queue-menu-btn[aria-expanded="true"] {
  border: 0;
  background: #f3f5f7;
  color: #27313d;
  transform: none;
}

.queue-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 50;
  display: grid;
  width: 198px;
  padding: 4px;
  border: 1px solid #e4e8ed;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(16, 24, 40, 0.16);
}

.queue-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4b5563;
  box-shadow: none;
  font-size: 10px;
  font-weight: 500;
  text-align: left;
  justify-content: flex-start;
  transform: none;
}

.queue-menu button:hover {
  border: 0;
  background: #f7f8fa;
  color: #111827;
  transform: none;
}

.queue-menu button:disabled {
  opacity: 0.35;
}

.queue-menu button.danger {
  color: #b42323;
}

.queue-menu button.danger:hover {
  background: #fef2f2;
  color: #991b1b;
}

.queue-menu svg {
  flex: 0 0 auto;
  color: #8a96a3;
}

.queue-menu button.danger svg {
  color: #dc5a5a;
}

.queue-schedule-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 4px;
  margin-top: 2px;
  color: #a97800;
  font-size: 8px;
  font-weight: 600;
}

.queue-schedule-tag svg {
  width: 10px;
  height: 10px;
}

.item-config-modal {
  max-width: 640px;
}

.item-config-modal .schedule-days-wrap {
  margin: 10px 0;
}

.item-config-modal .schedule-times {
  width: min(100%, 320px);
}

.item-config-modal .settings-section:last-of-type {
  margin-bottom: 0;
}

.schedule-head-chip {
  white-space: nowrap;
}

.schedule-head-chip.on {
  border-color: #bfe3cc;
  background: #f0fbf4;
  color: #15803d;
}

@media (max-width: 760px) {
  .queue-item {
    grid-template-columns: 14px 22px 54px minmax(0, 1fr) auto;
  }
  .queue-menu {
    width: 180px;
  }
}

.item-config-modal .settings-section > label {
  display: grid;
  gap: 6px;
  color: #6b7786;
  font-size: 10px;
}

.item-config-modal .settings-section > label input {
  height: 36px;
}

.screen-group-lock + .settings-section {
  margin-top: 0;
}

@media (max-width: 680px) {
  .queue-menu {
    right: -4px;
  }
}

/* Branding workspace */

.branding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  align-items: start;
  gap: 16px;
}

.branding-main {
  padding: 18px;
}

.branding-head {
  align-items: flex-start;
  margin-bottom: 16px;
}

.branding-head p {
  margin: 3px 0 0;
  font-size: 10.5px;
}

.branding-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #e7ebf0;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.branding-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
}

.branding-status.on {
  border-color: #bfe3cc;
  background: #f0fbf4;
  color: #15803d;
}

.branding-status.on i {
  background: #22a35a;
  box-shadow: 0 0 0 3px rgba(34, 163, 90, 0.12);
}

.branding-status.off {
  background: #f8f9fb;
  color: #8a96a3;
}

.branding-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.brand-preview-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid #e4e8ed;
  border-radius: 12px;
}

.brand-preview-light {
  display: grid;
  place-items: center;
  padding: 28px 18px 18px;
  background:
    radial-gradient(260px 130px at 25% 0%, rgba(255, 206, 58, 0.12), transparent 70%),
    #fbfcfd;
}

.brand-preview-dark {
  background:
    radial-gradient(260px 150px at 60% 10%, rgba(37, 99, 235, 0.16), transparent 65%),
    linear-gradient(135deg, #111d2a, #060b10);
}

.brand-preview-label {
  position: absolute;
  top: 10px;
  left: 11px;
  z-index: 2;
  color: #9ca3af;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-preview-dark .brand-preview-label {
  color: rgba(255, 255, 255, 0.45);
}

.brand-sidebar-mock {
  width: min(100%, 218px);
  display: grid;
  gap: 9px;
  padding: 13px 12px;
  border: 1px solid #e5e9ee;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.09);
}

.brand-sidebar-brand {
  display: flex;
  align-items: center;
  min-height: 36px;
}

.brand-sidebar-brand img {
  max-width: 132px;
  max-height: 32px;
  object-fit: contain;
}

.brand-sidebar-brand .brand-empty-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.brand-sidebar-name {
  overflow: hidden;
  padding-top: 8px;
  border-top: 1px solid #eef1f4;
  color: #374151;
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-sidebar-lines {
  display: grid;
  gap: 5px;
}

.brand-sidebar-lines i {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #f0f2f5;
}

.brand-sidebar-lines i:nth-child(2) {
  width: 80%;
}

.brand-sidebar-lines i:nth-child(3) {
  width: 62%;
}

.brand-player-mock {
  position: relative;
  height: 100%;
  min-height: 190px;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.03), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 9px);
}

.brand-player-mock::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 44%;
  height: 34px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.brand-player-logo {
  position: absolute;
  top: 30px;
  right: 18px;
  display: grid;
  place-items: center;
  max-width: 100px;
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #8a96a3;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-player-logo img {
  display: block;
  max-width: 86px;
  max-height: 26px;
  object-fit: contain;
}

.brand-player-time {
  position: absolute;
  right: 18px;
  bottom: 17px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.brand-empty-mark {
  display: grid;
  place-items: center;
  gap: 1px;
  width: 52px;
  height: 52px;
  border: 1px dashed #e5c45c;
  border-radius: 10px;
  background: #fff8e0;
  color: #a97800;
}

.brand-empty-mark span {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.brand-empty-mark small {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.branding-upload-area {
  display: grid;
  gap: 11px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid #eef1f4;
}

.branding-current {
  display: flex;
  align-items: center;
  gap: 10px;
}

.branding-current-preview {
  display: grid;
  place-items: center;
  width: 56px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  background: #fbfcfd;
}

.branding-current-preview img {
  max-width: 44px;
  max-height: 36px;
  object-fit: contain;
}

.branding-current-preview .brand-empty-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.branding-current-preview .brand-empty-mark span {
  font-size: 13px;
}

.branding-current-copy {
  display: grid;
  gap: 1px;
}

.branding-current-copy strong {
  color: #27313d;
  font-size: 10.5px;
  font-weight: 650;
}

.branding-current-copy span {
  color: #8a96a3;
  font-size: 9px;
}

.branding-current-copy small {
  color: #a97800;
  font-size: 8.5px;
}

.branding-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 76px;
  padding: 14px;
  overflow: hidden;
  border: 1px dashed #dfe4ea;
  border-radius: 10px;
  background: #fbfcfd;
  color: #4b5563;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.branding-drop:hover,
.branding-drop.drag-over {
  border-color: #e8b700;
  background: #fffdf4;
}

.branding-drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.branding-drop-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fff8e0;
  color: #a16207;
}

.branding-drop-copy {
  display: grid;
  gap: 1px;
}

.branding-drop-copy strong {
  color: #374151;
  font-size: 10.5px;
  font-weight: 650;
}

.branding-drop-copy span {
  color: #9ca3af;
  font-size: 8.5px;
}

.branding-selection {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 1px solid #f0e1ae;
  border-radius: 8px;
  background: #fffdf4;
}

.branding-selection img {
  width: 38px;
  height: 32px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 5px;
  background: #ffffff;
}

.branding-selection-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.branding-selection-copy strong {
  overflow: hidden;
  color: #374151;
  font-size: 9.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branding-selection-copy small {
  color: #9ca3af;
  font-size: 8px;
}

.branding-selection .icon-action {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
}

.branding-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.branding-actions .primary,
.branding-actions .danger {
  height: 34px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 10.5px;
}

.branding-actions .primary svg,
.branding-actions .danger svg {
  width: 13px;
  height: 13px;
}

.branding-action-note {
  color: #9ca3af;
  font-size: 8.5px;
}

.branding-side {
  display: grid;
  gap: 14px;
}

.branding-side .panel {
  padding: 14px;
}

.branding-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.branding-side-head h2 {
  margin: 0;
  color: #27313d;
  font-size: 11px;
  font-weight: 650;
}

.branding-mini-status {
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 7.5px;
  font-weight: 700;
}

.branding-mini-status.on {
  background: #f0fbf4;
  color: #15803d;
}

.branding-mini-status.off {
  background: #f8f9fb;
  color: #8a96a3;
}

.branding-metric-main {
  display: grid;
  gap: 1px;
  padding: 9px 10px;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  background: #fbfcfd;
}

.branding-metric-main strong {
  color: #111827;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
}

.branding-metric-main span {
  color: #4b5563;
  font-size: 9px;
  font-weight: 600;
}

.branding-metric-main small {
  color: #9ca3af;
  font-size: 8px;
}

.branding-usage-bar {
  height: 5px;
  margin: 9px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1f4;
}

.branding-usage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffce3a, #e5a400);
}

.branding-usage-list {
  display: grid;
  gap: 7px;
}

.branding-usage-list > div {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border-top: 1px solid #f2f4f6;
}

.branding-usage-list > div:first-child {
  border-top: 0;
}

.branding-usage-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #f8f9fb;
  color: #8a96a3;
}

.branding-usage-list > div > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.branding-usage-list strong {
  color: #374151;
  font-size: 9px;
  font-weight: 600;
}

.branding-usage-list small {
  color: #9ca3af;
  font-size: 8px;
}

.branding-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f0fbf4;
  color: #15803d;
}

.branding-count {
  color: #a97800;
  font-size: 8.5px;
  font-weight: 650;
}

.branding-muted {
  color: #9ca3af;
  font-size: 8px;
}

.branding-manage-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eef1f4;
  color: #a97800;
  font-size: 9px;
  font-weight: 650;
  text-decoration: none;
}

.branding-manage-link:hover {
  color: #7c4f00;
}

.branding-details {
  display: grid;
  gap: 0;
  margin: 0;
}

.branding-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #f2f4f6;
}

.branding-details > div:first-child {
  border-top: 0;
}

.branding-details dt {
  color: #9ca3af;
  font-size: 8.5px;
}

.branding-details dd {
  overflow: hidden;
  margin: 0;
  color: #4b5563;
  font-size: 8.5px;
  font-weight: 600;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branding-details code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #f7f8fa;
  color: #6b7280;
  font-size: 8px;
}

@media (max-width: 1040px) {
  .branding-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .branding-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .branding-preview-grid,
  .branding-side {
    grid-template-columns: minmax(0, 1fr);
  }
  .branding-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .branding-action-note {
    flex-basis: 100%;
  }
}

/* Workspaces overview */

.workspaces-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #e4e8ed;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.workspaces-intro {
  display: flex;
  align-items: center;
  gap: 9px;
}

.workspaces-intro-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: #fff8e0;
  color: #a16207;
}

.workspaces-intro > span:last-child {
  display: grid;
  gap: 1px;
}

.workspaces-intro strong {
  color: #27313d;
  font-size: 11px;
  font-weight: 650;
}

.workspaces-intro small {
  color: #9ca3af;
  font-size: 8.5px;
}

.workspaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 14px;
}

.workspace-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e4e8ed;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.workspace-card:hover {
  border-color: #dbe1e8;
  box-shadow: 0 8px 26px rgba(16, 24, 40, 0.07);
}

.workspace-card.current {
  border-color: #ead489;
  background:
    linear-gradient(180deg, rgba(255, 248, 224, 0.5), transparent 45%),
    #ffffff;
}

.workspace-card.menu-open {
  z-index: 40;
}

.workspace-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workspace-card-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #eef1f4;
  border-radius: 10px;
  background: #fbfcfd;
  color: #a97800;
  font-size: 17px;
  font-weight: 700;
}

.workspace-card-logo img {
  max-width: 34px;
  max-height: 30px;
  object-fit: contain;
}

.workspace-card-title {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.workspace-card-title strong {
  overflow: hidden;
  color: #27313d;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-card-title span {
  overflow: hidden;
  color: #9ca3af;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-current-badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid #f0d27a;
  border-radius: 999px;
  background: #fffbeb;
  color: #a16207;
  font-size: 7.5px;
  font-weight: 700;
}

.workspace-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.workspace-menu-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9aa5b3;
  box-shadow: none;
  transform: none;
}

.workspace-menu-btn:hover,
.workspace-menu-btn[aria-expanded="true"] {
  border: 0;
  background: #f3f5f7;
  color: #27313d;
  transform: none;
}

.workspace-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 50;
  display: grid;
  width: 194px;
  padding: 4px;
  border: 1px solid #e4e8ed;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(16, 24, 40, 0.16);
}

.workspace-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4b5563;
  box-shadow: none;
  font-size: 10px;
  font-weight: 500;
  text-align: left;
  justify-content: flex-start;
  transform: none;
}

.workspace-menu button:hover {
  border: 0;
  background: #f7f8fa;
  color: #111827;
  transform: none;
}

.workspace-menu button:disabled {
  opacity: 0.4;
}

.workspace-menu button.danger {
  color: #b42323;
}

.workspace-menu button.danger:hover {
  background: #fef2f2;
  color: #991b1b;
}

.workspace-menu svg {
  flex: 0 0 auto;
  color: #8a96a3;
}

.workspace-menu button.danger svg {
  color: #dc5a5a;
}

.workspace-card-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid #eef1f4;
  border-bottom: 1px solid #eef1f4;
}

.workspace-card-stats > span {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 0;
  color: #a97800;
}

.workspace-card-stats b {
  color: #27313d;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.15;
}

.workspace-card-stats small {
  color: #9ca3af;
  font-size: 7.5px;
}

.workspace-card-stats svg {
  width: 12px;
  height: 12px;
  opacity: 0.65;
}

.workspace-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workspace-created {
  color: #9ca3af;
  font-size: 8px;
}

.workspace-open-btn {
  height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 600;
}

.workspace-open-btn.current {
  border-color: #eef1f4;
  background: #f7f8fa;
  color: #9ca3af;
}

.workspaces-empty {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 220px;
  padding: 28px;
  border: 1px dashed #dfe4ea;
  border-radius: 12px;
  background: #ffffff;
  text-align: center;
}

.workspaces-empty strong {
  color: #374151;
  font-size: 12px;
}

.workspaces-empty span {
  color: #9ca3af;
  font-size: 9px;
}

.workspace-modal {
  max-width: 520px;
}

@media (max-width: 760px) {
  .workspaces-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .workspace-card-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 9px;
  }
  .workspace-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Plan and usage overview */

.plan-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: stretch;
  gap: 16px;
  margin-bottom: 18px;
}

.plan-current-panel {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(255, 206, 58, 0.16), transparent 68%),
    #ffffff;
}

.plan-current-panel::after {
  content: "";
  position: absolute;
  right: -62px;
  top: -96px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(232, 183, 0, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(232, 183, 0, 0.035);
  pointer-events: none;
}

.plan-current-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-current-head h2 {
  margin: 4px 0 3px;
  color: #17212b;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.plan-current-price {
  margin: 0;
  color: #7c6a3d;
  font-size: 10.5px;
  font-weight: 600;
}

.plan-status {
  padding: 5px 9px;
  border: 1px solid #e7ebf0;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 700;
}

.plan-status.on {
  border-color: #bfe3cc;
  background: #f0fbf4;
  color: #15803d;
}

.plan-status.off {
  background: #f8f9fb;
  color: #8a96a3;
}

.plan-current-context {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 15px;
  margin-top: 15px;
  padding-top: 11px;
  border-top: 1px solid rgba(232, 183, 0, 0.17);
  color: #9ca3af;
  font-size: 8.5px;
}

.plan-current-context span:first-child {
  color: #6b7786;
  font-weight: 600;
}

.plan-limit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.plan-limit-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid #eef1f4;
  border-radius: 6px;
  background: #fbfcfd;
  color: #6b7280;
  font-size: 8.5px;
  font-weight: 600;
}

.plan-limit-chip svg {
  width: 11px;
  height: 11px;
  color: #a97800;
}

.plan-current-note-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  color: #9ca3af;
  font-size: 8.5px;
}

.plan-current-note-line > span:first-child {
  display: inline-flex;
  color: #a97800;
}

.plan-usage-panel {
  padding: 16px;
}

.plan-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.plan-panel-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.plan-panel-head p {
  margin: 2px 0 0;
  color: #9ca3af;
  font-size: 8.5px;
}

.plan-usage-count {
  color: #a97800;
  font-size: 8.5px;
  font-weight: 650;
  white-space: nowrap;
}

.plan-usage-list {
  display: grid;
  gap: 11px;
}

.plan-usage-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
}

.plan-usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.plan-usage-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4b5563;
  font-size: 9px;
  font-weight: 600;
}

.plan-usage-label svg {
  width: 12px;
  height: 12px;
  color: #9aa5b3;
}

.plan-usage-values {
  color: #9ca3af;
  font-size: 8px;
  white-space: nowrap;
}

.plan-usage-track {
  grid-column: 1 / 2;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1f4;
}

.plan-usage-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffce3a, #dfa700);
}

.plan-usage-track > span.is-unlimited {
  width: 35%;
  opacity: 0.35;
}

.plan-usage-row.is-warning .plan-usage-track > span {
  background: linear-gradient(90deg, #f5c451, #e39a00);
}

.plan-usage-row.is-danger .plan-usage-track > span {
  background: linear-gradient(90deg, #f49b9b, #d94a4a);
}

.plan-usage-percent {
  grid-column: 2 / 3;
  align-self: center;
  color: #9ca3af;
  font-size: 7.5px;
  font-weight: 600;
  white-space: nowrap;
}

.plan-usage-row.is-danger .plan-usage-percent {
  color: #b42323;
}

.plans-section {
  margin-top: 0;
}

.plans-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}

.plans-section-head h2 {
  margin: 3px 0 2px;
  color: #27313d;
  font-size: 15px;
  font-weight: 650;
}

.plans-section-head p {
  margin: 0;
  color: #9ca3af;
  font-size: 9px;
}

.plans-count {
  color: #9ca3af;
  font-size: 8.5px;
  font-weight: 600;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 12px;
}

.plan-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e4e8ed;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.plan-card.current {
  border-color: #e8cf77;
  background:
    linear-gradient(180deg, rgba(255, 248, 224, 0.65), transparent 42%),
    #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.plan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.plan-card-head h3 {
  margin: 2px 0 0;
  color: #27313d;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.plan-code {
  color: #9ca3af;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan-current-badge,
.plan-optional-badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 7.5px;
  font-weight: 700;
}

.plan-current-badge {
  border: 1px solid #e8cf77;
  background: #fff8e0;
  color: #a16207;
}

.plan-optional-badge {
  border: 1px solid #eef1f4;
  background: #fbfcfd;
  color: #9ca3af;
}

.plan-price {
  display: grid;
  gap: 1px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef1f4;
}

.plan-price strong {
  color: #111827;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.plan-price span {
  color: #9ca3af;
  font-size: 8px;
}

.plan-limit-list {
  display: grid;
  gap: 7px;
}

.plan-limit-list > div {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7786;
  font-size: 9px;
}

.plan-limit-list svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: #a97800;
}

.plan-limit-list span {
  flex: 1;
}

.plan-limit-list b {
  color: #4b5563;
  font-size: 8.5px;
  font-weight: 600;
}

.plan-card-foot {
  min-height: 20px;
  padding-top: 9px;
  border-top: 1px solid #eef1f4;
}

.plan-current-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #15803d;
  font-size: 8.5px;
  font-weight: 650;
}

.plan-current-note svg {
  width: 12px;
  height: 12px;
}

.plan-managed-note {
  color: #9ca3af;
  font-size: 8px;
}

.plans-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 170px;
  border: 1px dashed #dfe4ea;
  border-radius: 11px;
  background: #fbfcfd;
  text-align: center;
}

.plans-empty strong {
  color: #374151;
  font-size: 11px;
}

.plans-empty span {
  color: #9ca3af;
  font-size: 8.5px;
}

.plan-footnote {
  margin: 14px 0 0;
  color: #9ca3af;
  font-size: 8.5px;
  text-align: center;
}

@media (max-width: 1000px) {
  .plan-overview {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .plans-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .plans-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Settings workspace */

.settings-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #e4e8ed;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.settings-hero-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #fff8e0;
  color: #a16207;
}

.settings-hero-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.settings-hero-copy strong {
  color: #27313d;
  font-size: 11px;
  font-weight: 650;
}

.settings-hero-copy span {
  color: #9ca3af;
  font-size: 8.5px;
}

.settings-hero-role {
  padding: 3px 7px;
  border: 1px solid #eef1f4;
  border-radius: 999px;
  background: #fbfcfd;
  color: #8a96a3;
  font-size: 8px;
  font-weight: 650;
  text-transform: capitalize;
}

.settings-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 3px;
  border: 1px solid #e4e8ed;
  border-radius: 9px;
  background: #f7f8fa;
}

.settings-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6b7786;
  box-shadow: none;
  font-size: 9.5px;
  font-weight: 550;
  transform: none;
  white-space: nowrap;
}

.settings-tabs button:hover {
  background: #ffffff;
  color: #1d2733;
  transform: none;
}

.settings-tabs button.active {
  background: #ffffff;
  color: #1d2733;
  font-weight: 650;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.settings-tabs button span {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f1f3f6;
  color: #8a96a3;
  font-size: 7.5px;
}

.settings-tabs button.active span {
  background: #fff3c4;
  color: #a16207;
}

.settings-pane {
  display: grid;
  gap: 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-card {
  padding: 15px;
}

.settings-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: #a97800;
}

.settings-card-head h2 {
  margin: 0;
  color: #27313d;
  font-size: 11px;
  font-weight: 650;
}

.settings-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  background: #fbfcfd;
}

.settings-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #fff8e0;
  color: #a16207;
  font-size: 12px;
  font-weight: 700;
}

.settings-avatar.workspace {
  background: #f1f3f6;
  color: #6b7786;
}

.settings-identity > span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.settings-identity strong {
  overflow: hidden;
  color: #27313d;
  font-size: 10.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-identity small {
  color: #9ca3af;
  font-size: 8.5px;
}

.settings-details {
  display: grid;
  gap: 0;
  margin: 10px 0 0;
}

.settings-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 1px;
  border-top: 1px solid #f2f4f6;
}

.settings-details dt {
  color: #9ca3af;
  font-size: 8.5px;
}

.settings-details dd {
  overflow: hidden;
  margin: 0;
  color: #4b5563;
  font-size: 8.5px;
  font-weight: 600;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-details code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #f7f8fa;
  font-size: 8px;
}

.settings-note {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  background: #fbfcfd;
  color: #8a96a3;
  font-size: 8.5px;
}

.settings-note svg {
  flex: 0 0 auto;
  color: #a97800;
}

.settings-pane-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.settings-pane-head h2 {
  margin: 0;
  color: #27313d;
  font-size: 14px;
  font-weight: 650;
}

.settings-pane-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.settings-pane-head p {
  margin: 2px 0 0;
  color: #9ca3af;
  font-size: 9px;
}

.settings-user-list {
  display: grid;
  gap: 6px;
}

.settings-user-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #e7ebef;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.settings-user-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #f1f3f6;
  color: #596574;
  font-size: 9px;
  font-weight: 700;
}

.settings-user-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.settings-user-copy strong {
  overflow: hidden;
  color: #27313d;
  font-size: 10.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-user-copy span {
  overflow: hidden;
  color: #9ca3af;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-user-role,
.settings-user-status {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 7.5px;
  font-weight: 650;
  text-transform: capitalize;
}

.settings-user-role {
  background: #f8f9fb;
  color: #6b7786;
}

.settings-user-role.owner,
.settings-user-role.admin {
  background: #fff8e0;
  color: #a16207;
}

.settings-user-status.active {
  background: #f0fbf4;
  color: #15803d;
}

.settings-user-status.inactive {
  background: #fef2f2;
  color: #b42323;
}

.settings-user-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.settings-user-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 10.5px;
  white-space: nowrap;
}

.settings-user-action.danger {
  padding: 0 8px;
  color: #b42323;
  border-color: #f0d2d2;
  background: #fff8f8;
}

.settings-user-note {
  color: #8b93a1;
  font-size: 9.5px;
  line-height: 1.35;
  max-width: 110px;
}

.settings-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  border: 1px dashed #dfe4ea;
  border-radius: 9px;
  background: #fbfcfd;
  color: #9ca3af;
  font-size: 9px;
}

.settings-modal {
  max-width: 540px;
}

/* Integrated API */

.api-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px;
  border: 1px solid #ead489;
  border-radius: 12px;
  background:
    radial-gradient(360px 150px at 0% 0%, rgba(255, 206, 58, 0.18), transparent 70%),
    #ffffff;
}

.api-hero h2 {
  margin: 3px 0 4px;
  color: #17212b;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.api-hero p:last-child {
  max-width: 540px;
  margin: 0;
  color: #8a96a3;
  font-size: 9.5px;
}

.api-hero .button {
  height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 9.5px;
}

.api-base-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #111d2a;
  color: #dbe8f5;
}

.api-base-row > span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.api-base-row small {
  color: rgba(255, 255, 255, 0.42);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.api-base-row code {
  overflow: hidden;
  color: #f1d48a;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-base-row button,
.api-auth-box button {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  box-shadow: none;
}

.api-base-row button:hover,
.api-auth-box button:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.api-keys-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.api-keys-card {
  padding: 14px;
}

.api-keys-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.api-keys-head > div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.api-card-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: #fff8e0;
  color: #a16207;
}

.api-keys-head h3,
.api-reference-head h3 {
  margin: 1px 0 1px;
  color: #27313d;
  font-size: 10.5px;
  font-weight: 650;
}

.api-keys-head p,
.api-reference-head p {
  margin: 0;
  color: #9ca3af;
  font-size: 8px;
}

.api-keys-head .small-action {
  height: 26px;
  flex: 0 0 auto;
  padding: 0 7px;
  font-size: 8.5px;
}

.api-key-list {
  display: grid;
  gap: 5px;
}

.api-key-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #eef1f4;
  border-radius: 7px;
  background: #fbfcfd;
}

.api-key-row.is-revoked {
  opacity: 0.62;
}

.api-key-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #f1f3f6;
  color: #8a96a3;
}

.api-key-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.api-key-copy strong {
  overflow: hidden;
  color: #4b5563;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-key-copy code {
  color: #a97800;
  font-size: 8px;
}

.api-key-meta {
  display: grid;
  justify-items: end;
  gap: 1px;
  flex: 0 0 auto;
}

.api-key-status {
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 650;
}

.api-key-status.active {
  background: #f0fbf4;
  color: #15803d;
}

.api-key-status.revoked {
  background: #f8f9fb;
  color: #9ca3af;
}

.api-key-meta small {
  color: #b3bac3;
  font-size: 7px;
  white-space: nowrap;
}

.api-key-revoke {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #c66a6a;
  box-shadow: none;
}

.api-key-revoke:hover {
  border: 0;
  background: #fef2f2;
  color: #b42323;
}

.api-keys-empty {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 8px;
  border: 1px dashed #e1e6eb;
  border-radius: 7px;
  color: #9ca3af;
  font-size: 8.5px;
}

.api-reference {
  padding: 14px;
}

.api-reference-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.api-reference-head > div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.api-reference-tag {
  padding: 3px 6px;
  border: 1px solid #eef1f4;
  border-radius: 5px;
  color: #9ca3af;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.api-auth-box {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #111d2a;
  color: rgba(255, 255, 255, 0.55);
}

.api-auth-box > span {
  font-size: 7.5px;
  white-space: nowrap;
}

.api-auth-box code {
  overflow: hidden;
  flex: 1;
  color: #f1d48a;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-endpoint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.api-endpoint-grid > div {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid #eef1f4;
  border-radius: 7px;
  background: #fbfcfd;
}

.api-endpoint-grid > div > span {
  color: #4b5563;
  font-size: 8px;
  font-weight: 650;
}

.api-endpoint-grid code {
  color: #8a96a3;
  font-size: 7.5px;
}

.api-key-modal {
  max-width: 440px;
}

.api-secret-modal {
  max-width: 560px;
}

.api-secret-note {
  margin: 0 0 10px;
  color: #8a96a3;
  font-size: 9.5px;
}

.api-secret-value {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid #f0d98f;
  border-radius: 8px;
  background: #fffdf4;
}

.api-secret-value code {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #6b5318;
  font-size: 9.5px;
}

.api-secret-value button {
  height: 29px;
  flex: 0 0 auto;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 9px;
}

@media (max-width: 940px) {
  .settings-grid,
  .api-keys-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .settings-tabs {
    width: 100%;
    overflow-x: auto;
  }
  .settings-user-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .settings-user-copy {
    flex-basis: calc(100% - 42px);
  }
  .settings-user-actions {
    margin-left: 41px;
  }
  .api-endpoint-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .api-base-row > span {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

/* Settings editing */

.settings-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-card-head {
  justify-content: flex-start;
}

.settings-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.settings-card-actions .settings-card-edit {
  margin-left: 0;
}

.settings-card-edit {
  height: 24px;
  margin-left: auto;
  padding: 0 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #a97800;
  box-shadow: none;
  font-size: 8px;
  font-weight: 650;
  transform: none;
}

.settings-card-edit:hover {
  border: 0;
  background: #fff8e0;
  color: #7c4f00;
  transform: none;
}

.settings-password-block {
  padding: 11px;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  background: #fbfcfd;
}

.settings-password-block h3 {
  margin: 0;
  color: #596574;
  font-size: 9px;
  font-weight: 650;
}

.settings-password-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.settings-password-head .hint {
  margin: 2px 0 0;
}

.settings-password-head .small-action {
  flex: 0 0 auto;
  white-space: nowrap;
}

.settings-password-block .hint {
  margin: 2px 0 9px;
  font-size: 8.5px;
}

.settings-user-active {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
}

.settings-user-active > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7786;
  font-size: 9px;
}

.settings-user-active input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #e8b700;
}

.auth-forgot-hint {
  margin: 12px 0 0;
  padding: 10px 11px;
  border: 1px solid #f0e1ae;
  border-radius: 8px;
  background: #fffdf4;
  color: #6b5a2e;
  font-size: 10px;
  line-height: 1.5;
}

.auth-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #a97800;
  box-shadow: none;
  font-size: inherit;
  font-weight: 600;
}

.auth-link-button:hover {
  border: 0;
  background: transparent;
  color: #7c4f00;
  text-decoration: underline;
  transform: none;
}

@media (max-width: 1120px) {
  .settings-grid-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .settings-grid-three {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Password reset */

.auth-reset-shell {
  width: 100%;
  max-width: 440px;
}

.auth-reset-success {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #bfe3cc;
  border-radius: 9px;
  background: #f0fbf4;
  color: #15803d;
}

.auth-reset-success strong {
  font-size: 12px;
}

.auth-reset-success span {
  font-size: 10px;
}

.auth-reset-success .button {
  width: fit-content;
  margin-top: 5px;
}

.settings-reset-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid #f0e1ae;
  border-radius: 8px;
  background: #fffdf4;
}

.settings-reset-block > span {
  display: grid;
  gap: 1px;
}

.settings-reset-block strong {
  color: #6b5a2e;
  font-size: 9.5px;
  font-weight: 650;
}

.settings-reset-block small {
  color: #9a875b;
  font-size: 8.5px;
}

.settings-reset-block button {
  height: 28px;
  flex: 0 0 auto;
  padding: 0 8px;
  border-radius: 6px;
  color: #7c4f00;
  font-size: 8.5px;
}

.reset-link-value {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid #f0d98f;
  border-radius: 8px;
  background: #fffdf4;
}

.reset-link-value code {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #6b5318;
  font-size: 9px;
}

.reset-link-value button {
  height: 28px;
  flex: 0 0 auto;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 8.5px;
}

.reset-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.reset-link-actions .button,
.reset-link-actions button {
  height: 31px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 9px;
}

@media (max-width: 620px) {
  .settings-reset-block {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Workspace overview */
.ov-page {
  display: grid;
  gap: 15px;
  padding-top: 2px;
}

.ov-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 2px 3px;
}

.ov-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a97800;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ov-kicker::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e0a400;
}

.ov-hero h1 {
  margin: 5px 0 6px;
  color: #17212b;
  font-size: clamp(28px, 3.1vw, 39px);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.ov-hero p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #7a8694;
  font-size: 11px;
}

.ov-sep {
  color: #c4cbd3;
}

.ov-health {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7a8694;
  font-weight: 600;
}

.ov-health i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9aa4af;
}

.ov-health.online {
  color: #15803d;
}

.ov-health.online i {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.11);
}

.ov-health.offline {
  color: #a46a00;
}

.ov-health.offline i {
  background: #d99a00;
}

.ov-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

.ov-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 35px;
  padding: 0 12px;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  background: #ffffff;
  color: #2c3743;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.ov-button:hover {
  border-color: #cbd3dc;
  background: #ffffff;
  transform: translateY(-1px);
}

.ov-button.primary {
  border-color: #e2b43c;
  background: linear-gradient(135deg, #f4c64f, #e8ae25);
  color: #2a1e05;
  font-weight: 750;
  box-shadow: 0 5px 14px rgba(217, 154, 0, 0.18);
}

.ov-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.ov-kpi {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 108px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #e4e8ed;
  border-radius: 13px;
  background: #ffffff;
  color: #1d2733;
  text-align: left;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.ov-kpi::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, #e0a400, rgba(224, 164, 0, 0));
  opacity: 0.65;
}

.ov-kpi:hover {
  transform: translateY(-2px);
  border-color: #d8dee6;
  box-shadow: 0 7px 18px rgba(16, 24, 40, 0.06);
}

.ov-kpi-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #fff8e0;
  color: #a97800;
}

.ov-kpi-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.ov-kpi-label {
  color: #7a8694;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ov-kpi-copy strong {
  color: #17212b;
  font-size: 26px;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.ov-kpi-foot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8b96a3;
  font-size: 9px;
  white-space: nowrap;
}

.ov-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9aa4af;
}

.ov-dot.ok {
  background: #16a34a;
}

.ov-kpi-arrow {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: #bcc4cd;
}

.ov-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(275px, 0.9fr);
  gap: 13px;
}

.ov-layout-bottom {
  grid-template-columns: minmax(0, 1fr) minmax(275px, 0.9fr);
}

.ov-card {
  padding: 16px;
  border: 1px solid #e4e8ed;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.ov-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.ov-card-kicker {
  color: #a97800;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ov-card-head h2 {
  margin: 3px 0 0;
  color: #1d2733;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.ov-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #a97800;
  box-shadow: none;
  font-size: 9.5px;
  font-weight: 650;
}

.ov-link:hover {
  border: 0;
  background: #fff8e0;
  transform: none;
}

.ov-screen-list {
  display: grid;
  gap: 1px;
}

.ov-screen-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto 16px;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 6px;
  border: 0;
  border-top: 1px solid #f0f2f5;
  border-radius: 7px;
  background: transparent;
  color: #1d2733;
  text-align: left;
  box-shadow: none;
}

.ov-screen-row:first-child {
  border-top: 0;
}

.ov-screen-row:hover {
  border-color: #f0f2f5;
  background: #fbfcfd;
  transform: none;
}

.ov-screen-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f1f3f6;
  color: #6b7786;
}

.ov-screen-icon.online {
  background: #eefaf1;
  color: #15803d;
}

.ov-screen-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.ov-screen-copy strong {
  overflow: hidden;
  color: #2a3541;
  font-size: 10.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-screen-copy small {
  color: #8b96a3;
  font-size: 9px;
}

.ov-screen-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8b96a3;
  font-size: 8.5px;
  font-weight: 650;
  white-space: nowrap;
}

.ov-screen-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #aab3bd;
}

.ov-screen-state.online {
  color: #15803d;
}

.ov-screen-state.online i {
  background: #16a34a;
}

.ov-screen-time {
  color: #98a2ae;
  font-size: 8.5px;
  white-space: nowrap;
}

.ov-screen-arrow {
  color: #bcc4cd;
}

.ov-empty {
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 24px 14px;
  border: 1px dashed #dfe4ea;
  border-radius: 9px;
  background: #fbfcfd;
  text-align: center;
}

.ov-empty-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 10px;
  background: #fff8e0;
  color: #a97800;
}

.ov-empty strong {
  color: #2a3541;
  font-size: 11px;
}

.ov-empty p {
  margin: 0 0 6px;
  color: #8b96a3;
  font-size: 9.5px;
}

.ov-progress-value {
  color: #a97800;
  font-size: 10px;
  font-weight: 750;
}

.ov-progress-bar {
  height: 4px;
  margin-bottom: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0f2f5;
}

.ov-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e0a400, #f4c64f);
  transition: width 0.3s ease;
}

.ov-checklist {
  display: grid;
  gap: 4px;
}

.ov-check {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  background: #fbfcfd;
  color: #2c3743;
  text-align: left;
  box-shadow: none;
}

.ov-check:hover {
  border-color: #e1e6eb;
  background: #ffffff;
  transform: none;
}

.ov-check.done {
  border-color: #e3f1e6;
  background: #f7fcf8;
}

.ov-check-mark {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  border: 1px solid #dfe4ea;
  border-radius: 50%;
  background: #ffffff;
  color: #a97800;
}

.ov-check.done .ov-check-mark {
  border-color: #bfe3c7;
  background: #eefaf1;
  color: #15803d;
}

.ov-check-mark i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c3cbd4;
}

.ov-check-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.ov-check-copy strong {
  color: #2a3541;
  font-size: 10px;
  font-weight: 650;
}

.ov-check-copy small {
  color: #8b96a3;
  font-size: 8.5px;
  line-height: 1.3;
}

.ov-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ov-status-grid > div {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  background: #fbfcfd;
}

.ov-status-grid span {
  color: #8b96a3;
  font-size: 8.5px;
}

.ov-status-grid strong {
  color: #1d2733;
  font-size: 19px;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.ov-status-grid small {
  color: #8b96a3;
  font-size: 8.5px;
  font-weight: 500;
}

.ov-last-sync {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f2f5;
  color: #8b96a3;
  font-size: 9px;
}

.ov-last-sync strong {
  color: #596574;
}

.ov-help {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ov-help li {
  display: flex;
  gap: 9px;
}

.ov-help li > span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: #fff8e0;
  color: #a97800;
  font-size: 9px;
  font-weight: 750;
}

.ov-help strong {
  color: #2a3541;
  font-size: 10px;
}

.ov-help p {
  margin: 2px 0 0;
  color: #8b96a3;
  font-size: 9px;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .ov-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ov-layout,
  .ov-layout-bottom {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .ov-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .ov-kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .ov-hero-actions {
    width: 100%;
  }

  .ov-hero-actions .ov-button {
    flex: 1;
  }

  .ov-screen-row {
    grid-template-columns: 34px minmax(0, 1fr) auto 16px;
  }

  .ov-screen-time {
    display: none;
  }
}

.ov-verify-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #f0dfad;
  border-radius: 10px;
  background: #fffaf0;
}

.ov-verify-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #fff1c9;
  color: #a97800;
}

.ov-verify-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.ov-verify-copy strong {
  color: #4a3a14;
  font-size: 10.5px;
}

.ov-verify-copy small {
  color: #9b7b32;
  font-size: 9px;
}

.ov-verify-banner button {
  height: 28px;
  margin-left: auto;
  padding: 0 9px;
  flex: 0 0 auto;
  border-color: #e3c369;
  background: #ffffff;
  color: #7c5b00;
  font-size: 9.5px;
  box-shadow: none;
}

.ov-verify-banner button:hover {
  background: #fff6dd;
}

@media (max-width: 640px) {
  .ov-verify-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ov-verify-banner button {
    margin-left: 40px;
  }
}
