:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --ink: #171717;
  --muted: #666666;
  --line: #e5e5e5;
  --line-strong: #c7c7c7;
  --accent: #f4aa19;
  --accent-2: #111111;
  --danger: #d94c3d;
  --dark: #111111;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --app-tabs-height: 64px;
  --inspector-width: 430px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

body.locked .app-shell {
  display: none;
}

.login-screen {
  align-items: center;
  background: var(--bg);
  display: none;
  min-height: 100vh;
  justify-content: center;
  padding: 24px;
}

body.locked .login-screen {
  display: flex;
}

.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding: 22px;
  transform-origin: 50% 60%;
  animation: login-entry 520ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
  width: 100%;
}

@keyframes login-entry {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

button {
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.app-shell {
  display: grid;
  grid-template-columns: clamp(210px, 16vw, 270px) minmax(0, 1fr) minmax(320px, var(--inspector-width));
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  max-width: 100vw;
  width: 100%;
}

.sidebar,
.inspector {
  background: var(--surface);
  border-color: var(--line);
  border-style: solid;
  height: calc(100vh - var(--app-tabs-height));
  overflow-y: auto;
  padding: 16px;
  position: sticky;
  top: var(--app-tabs-height);
  min-width: 0;
}

.sidebar {
  border-width: 0 1px 0 0;
  grid-column: 1;
  grid-row: 2;
}

.inspector {
  border-width: 0 0 0 1px;
  grid-column: 3;
  grid-row: 2;
  overflow-x: hidden;
  position: sticky;
}

.workspace {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  padding: 18px 22px 28px;
  overflow: auto;
}

.mode-manage .workspace,
.mode-dashboard .workspace,
.mode-users .workspace,
.mode-logs .workspace,
.mode-raw .workspace,
.mode-admin .workspace {
  grid-column: 2 / -1;
}

.mode-manage .inspector,
.mode-dashboard .inspector,
.mode-users .inspector,
.mode-logs .inspector,
.mode-raw .inspector,
.mode-admin .inspector {
  display: none;
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.mark {
  align-items: center;
  background: var(--dark);
  border-radius: 6px;
  color: #fff;
  display: grid;
  font-weight: 900;
  height: 44px;
  letter-spacing: 0;
  place-items: center;
  width: 44px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.brand-lockup h1 {
  font-size: 17px;
  line-height: 1.15;
}

.brand-lockup p,
.eyebrow,
.field span,
.group-label,
.status-pill,
.video-meta,
.metric span,
.activity-list {
  color: var(--muted);
  font-size: 12px;
}

.panel,
.toolbar,
.topbar,
.preview-card,
.metric,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel {
  margin-bottom: 12px;
  padding: 12px;
}

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

.heading-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.panel-heading h2 {
  font-size: 14px;
  letter-spacing: 0;
}

.status-pill {
  background: var(--surface-2);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}

.drop-zone {
  align-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 118px;
  padding: 12px;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.drop-zone input {
  display: none;
}

.drop-zone.dragging,
.drop-zone:hover {
  background: #f8fbfb;
  border-color: var(--accent-2);
}

.drop-zone strong {
  font-size: 14px;
}

.drop-zone small {
  color: var(--muted);
  display: block;
  line-height: 1.35;
}

.upload-icon {
  align-items: center;
  background: var(--dark);
  border-radius: 8px;
  color: #fff;
  display: grid;
  height: 34px;
  place-items: center;
  width: 34px;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.upload-progress {
  background: var(--surface-2);
  border-radius: 999px;
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
}

.upload-progress span {
  background: var(--accent-2);
  display: block;
  height: 100%;
  width: 0;
}

.upload-progress-label {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
  text-align: right;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field span,
.group-label {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 38px;
  outline: none;
  padding: 8px 10px;
  width: 100%;
}

textarea {
  line-height: 1.35;
  resize: vertical;
}

input[type="color"] {
  min-height: 42px;
  padding: 4px;
}

input[type="range"] {
  accent-color: var(--accent-2);
  min-height: 32px;
  padding: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.inline-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.user-create {
  display: none;
  margin-top: 10px;
}

.user-create.open {
  display: grid;
}

.page-list {
  display: grid;
  gap: 7px;
  max-height: 240px;
  overflow: auto;
}

.page-select-all {
  margin-bottom: 8px;
}

.page-group-create {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 8px;
}

.page-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 6px;
  padding: 8px;
}

.page-group-header {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 28px;
}

.page-group-header input {
  height: 17px;
  min-height: auto;
  width: 17px;
}

.page-group-header strong,
.page-group-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-group-header strong {
  font-size: 12px;
}

.page-group-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.page-item {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto;
  padding: 8px;
}

.page-item.active {
  border-color: var(--dark);
  box-shadow: none;
}

.page-item input[type="checkbox"] {
  height: 18px;
  min-height: auto;
  width: 18px;
}

.page-dot {
  border-radius: 50%;
  height: 14px;
  width: 14px;
}

.page-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.page-name strong,
.page-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-name strong {
  font-size: 13px;
}

.page-name small {
  color: var(--muted);
  font-size: 12px;
}

.page-transfer {
  font-size: 11px;
  margin-top: 4px;
  min-height: 30px;
  padding: 4px 7px;
}

.icon-button,
.compact-button,
.ghost-button,
.primary-button,
.tab {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 36px;
  white-space: nowrap;
}

.icon-button {
  background: #fff;
  color: var(--ink);
  padding: 0;
  width: 38px;
}

.compact-button {
  background: var(--dark);
  color: #fff;
  font-weight: 650;
  padding: 0 12px;
}

.ghost-button {
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  padding: 0 13px;
}

.primary-button {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
  font-weight: 700;
  padding: 0 14px;
}

.ghost-button:hover,
.icon-button:hover,
.tab:hover {
  border-color: var(--line-strong);
  background: #f8fafb;
}

.primary-button:hover,
.compact-button:hover {
  background: #333333;
}

.icon-button.active {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 20px;
}

.topbar > div:first-child {
  min-width: 0;
}

.topbar h2 {
  font-size: 24px;
  line-height: 1.2;
  max-width: 540px;
}

.eyebrow {
  font-weight: 650;
  margin-bottom: 4px;
  text-transform: none;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.toolbar {
  align-items: stretch;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin: 0 0 14px;
  max-width: none;
  overflow: visible;
  padding: 0;
  position: static;
  width: auto;
  z-index: auto;
}

.tool-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 14px;
  padding: 14px;
}

.tool-heading {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.tool-heading span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
}

.tool-heading strong {
  color: var(--muted);
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.freeze-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding-inline: 10px;
}

.freeze-button.active {
  background: var(--surface-2);
  border-color: var(--dark);
}

.tool-meta-row {
  display: flex;
  justify-content: flex-start;
}

.tool-grid {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.project-grid {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.header-line {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.logo-line {
  grid-template-columns: 56px repeat(4, minmax(130px, 1fr));
}

.watermark-line {
  grid-template-columns: minmax(260px, 1fr);
}

.pov-line {
  grid-template-columns: repeat(5, minmax(135px, 1fr));
}

.inspector .project-grid,
.inspector .header-line,
.inspector .logo-line,
.inspector .pov-line {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.wide-field {
  grid-column: 1 / -1;
}

.project-grid .wide-field {
  grid-column: 1 / -1;
}

.pov-line .wide-field {
  grid-column: span 2;
}

.logo-preview {
  align-items: center;
  align-self: end;
  aspect-ratio: 1;
  background: var(--accent);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #fff;
  display: grid;
  font-size: 18px;
  font-weight: 900;
  justify-items: center;
  overflow: hidden;
  width: 50px;
}

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

.file-action {
  align-items: center;
  background: var(--dark);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 650;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
}

.file-action input {
  display: none;
}

.asset-source {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.range-number {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 58px;
}

.range-number input[type="number"] {
  min-height: 36px;
  padding: 0 8px;
  text-align: center;
}

.quick-actions {
  align-self: stretch;
  display: grid;
  gap: 8px;
  grid-column: span 2;
  grid-template-columns: 1fr 1fr;
}

.quick-actions button {
  min-height: 42px;
}

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

.approve-button {
  border-color: rgba(15, 157, 138, 0.35);
  color: #087a6b;
}

.discard-button {
  border-color: rgba(217, 76, 61, 0.35);
  color: var(--danger);
}

.inline-add,
.speaker-control {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
}

.preview-board {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.library-board,
.dashboard-board,
.raw-tool-board,
.tab-overview-board {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: none;
  padding: 20px;
}

.mode-manage .topbar,
.mode-manage .preview-board,
.mode-manage .dashboard-board,
.mode-manage .raw-tool-board,
.mode-manage .tab-overview-board,
.mode-dashboard .topbar,
.mode-dashboard .library-board,
.mode-dashboard .raw-tool-board,
.mode-dashboard .preview-board,
.mode-dashboard .tab-overview-board,
.mode-raw .topbar,
.mode-raw .library-board,
.mode-raw .dashboard-board,
.mode-raw .preview-board,
.mode-raw .tab-overview-board,
.mode-users .topbar,
.mode-users .library-board,
.mode-users .dashboard-board,
.mode-users .raw-tool-board,
.mode-users .preview-board,
.mode-logs .topbar,
.mode-logs .library-board,
.mode-logs .dashboard-board,
.mode-logs .raw-tool-board,
.mode-logs .preview-board,
.mode-admin .topbar,
.mode-admin .library-board,
.mode-admin .dashboard-board,
.mode-admin .raw-tool-board,
.mode-admin .preview-board {
  display: none;
}

.mode-dashboard .dashboard-board {
  display: block;
}

.mode-manage .library-board {
  display: block;
}

.mode-raw .raw-tool-board {
  display: block;
}

.mode-users .users-board,
.mode-logs .logs-board {
  display: block;
}

.users-board .inspector-pane,
.logs-board .inspector-pane {
  display: block;
}

.users-board #adminPane {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.library-header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.library-header h2 {
  font-size: 20px;
  line-height: 1.2;
}

.library-search {
  min-width: 220px;
}

.sidebar-source-panel,
.sidebar-pages-panel {
  display: none;
}

.dashboard-hero {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: -2px 0 18px;
  padding-bottom: 18px;
}

.dashboard-hero h2 {
  font-size: 28px;
  line-height: 1.12;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr) minmax(300px, 1fr);
}

.dashboard-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
}

.dashboard-analysis {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.dashboard-analysis-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.dashboard-analysis-head span,
.dashboard-analysis p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.analysis-progress {
  background: #fff;
}

.dashboard-drop-zone {
  min-height: 270px;
}

.video-trim-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.video-trim-panel video {
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 8px;
  max-height: 360px;
  object-fit: contain;
  width: 100%;
}

.trim-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.trim-ranges {
  display: grid;
  gap: 6px;
}

.trim-summary {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-page-card {
  align-content: start;
}

.dashboard-page-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.dashboard-page-group {
  display: grid;
  gap: 8px;
}

.dashboard-page-group-title,
.dashboard-page-option {
  align-items: center;
  display: flex;
  gap: 10px;
}

.dashboard-page-group-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  justify-content: space-between;
}

.dashboard-page-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  min-height: 58px;
  padding: 8px 10px;
}

.dashboard-page-option.active {
  border-color: var(--dark);
}

.dashboard-page-logo {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  height: 34px;
  justify-items: center;
  overflow: hidden;
  width: 34px;
}

.dashboard-page-logo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.dashboard-page-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-page-copy strong,
.dashboard-page-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page-copy small {
  color: var(--muted);
}

.layout-library {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  padding: 14px;
}

.group-manager {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  padding: 14px;
}

.group-manager-head {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.group-manager h3 {
  font-size: 18px;
}

.group-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(190px, 1fr) auto;
  max-width: 520px;
  width: 100%;
}

.group-manager-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.group-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.group-card-head,
.group-member {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.group-card-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.group-card-head strong,
.group-card-head span {
  display: block;
}

.group-card-head span,
.group-empty {
  color: var(--muted);
  font-size: 12px;
}

.group-assign-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.group-member-list {
  display: grid;
  gap: 7px;
}

.group-member {
  background: var(--surface-2);
  border-radius: 8px;
  min-height: 34px;
  padding: 6px 7px;
}

.group-member span {
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.group-member strong {
  flex: 1;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-member button,
.compact-danger {
  min-height: 30px;
  padding: 5px 9px;
}

.compact-danger:not(:disabled) {
  border-color: rgba(194, 44, 44, 0.24);
  color: #a52222;
}

.layout-library-head {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.layout-library h3 {
  font-size: 18px;
}

.layout-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  max-width: 820px;
  width: 100%;
}

.layout-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.layout-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  grid-template-columns: 78px minmax(0, 1fr);
  padding: 12px;
}

.layout-preview {
  aspect-ratio: 9 / 16;
  background: linear-gradient(180deg, #6b7375 0%, #222 62%, #050505 100%);
  border-radius: 8px;
  color: #fff;
  min-width: 78px;
  overflow: hidden;
  padding: 8px;
  position: relative;
}

.layout-preview::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.85));
  content: "";
  inset: 0;
  position: absolute;
}

.layout-preview-logo {
  background: var(--accent);
  border-radius: 999px;
  height: 12px;
  left: 10px;
  position: absolute;
  top: 12px;
  width: 32px;
  z-index: 1;
}

.layout-preview strong,
.layout-preview small {
  display: block;
  position: absolute;
  z-index: 1;
}

.layout-preview strong {
  bottom: 34px;
  font-size: 9px;
  font-weight: 950;
  left: 10px;
  line-height: 0.95;
  max-width: 58px;
}

.layout-preview small {
  bottom: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 6px;
  font-weight: 800;
  left: 10px;
  max-width: 58px;
}

.layout-preview-clean {
  background: linear-gradient(180deg, #cad4d5 0%, #6d777a 58%, #eef3f4 100%);
  color: #111;
}

.layout-preview-clean::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.92));
}

.layout-preview-clean strong,
.layout-preview-clean small {
  color: #111;
}

.layout-preview-spotlight strong,
.layout-preview-spotlight small {
  background: rgba(0, 0, 0, 0.78);
  left: 12px;
  padding-left: 5px;
}

.layout-preview-spotlight strong {
  border-left: 4px solid var(--accent);
  bottom: 36px;
  font-size: 10px;
}

.layout-preview-minimal strong {
  bottom: 26px;
  font-size: 8px;
}

.layout-preview-minimal small {
  display: none;
}

.layout-card-copy {
  display: grid;
  gap: 7px;
}

.layout-card-copy > strong {
  font-size: 14px;
  line-height: 1.2;
}

.layout-card-copy p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.layout-card-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.preview-card {
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page-result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.page-result-header {
  align-items: stretch;
  border-bottom: 1px solid transparent;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.page-result.open .page-result-header {
  border-bottom-color: var(--line);
}

.page-result-toggle {
  align-items: center;
  background: #fff;
  border: 0;
  color: var(--ink);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, 1.2fr) 110px 120px 1fr 32px;
  min-height: 58px;
  padding: 0 14px;
  text-align: left;
  width: 100%;
}

.page-download-all {
  align-self: center;
  margin-right: 12px;
  min-height: 38px;
  white-space: nowrap;
}

.page-download-progress {
  padding: 0 14px 10px;
}

.page-result-toggle strong,
.page-result-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-result-toggle span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.page-result-count {
  justify-self: start;
}

.page-result-chevron {
  color: var(--muted);
  justify-self: end;
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.page-result.open .page-result-chevron {
  transform: rotate(180deg);
}

.page-video-grid {
  display: none;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 320px));
  padding: 14px;
}

.page-result.open .page-video-grid {
  display: grid;
}

.instagram-caption-panel {
  border-top: 1px solid var(--line);
  display: none;
  padding: 14px;
}

.page-result.open .instagram-caption-panel {
  display: grid;
  gap: 12px;
}

.caption-panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.caption-panel-heading h3 {
  font-size: 15px;
}

.caption-panel-heading span,
.caption-option-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.instagram-caption-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.instagram-caption-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.caption-option-label {
  display: grid;
  gap: 2px;
}

.instagram-caption-item textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 112px;
  padding: 10px;
  resize: vertical;
  width: 100%;
}

.caption-option-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.preview-card.selected {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(15, 157, 138, 0.14), var(--shadow);
}

.preview-frame {
  aspect-ratio: 9 / 16;
  background: #111;
  overflow: hidden;
  position: relative;
}

.preview-frame video,
.preview-frame > img {
  height: 100%;
  left: 0;
  object-fit: cover;
  position: absolute;
  top: 0;
  width: 100%;
}

.blank-video {
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  display: grid;
  font-size: 13px;
  height: 100%;
  place-items: center;
  width: 100%;
}

.preview-frame video,
.preview-frame > img:not(.template-asset-layer) {
  z-index: 0;
}

.template-asset-layer {
  height: 100%;
  inset: 0;
  object-fit: cover;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: 1;
}

.title-banner {
  color: var(--title-text, #050505);
  font-family: Arial Black, Arial, sans-serif;
  font-size: 56px;
  font-weight: 950;
  left: 3%;
  letter-spacing: 0;
  position: absolute;
  text-align: center;
  text-transform: uppercase;
  top: 4%;
  width: 94%;
  z-index: 2;
}

.title-format-pnj {
  background: transparent;
}

.title-format-jpeg {
  background: var(--title-bg, #fff);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
  padding: 0.1em 0.14em 0.12em;
}

.title-banner strong,
.title-banner span,
.title-banner em {
  display: block;
  line-height: 0.9;
}

.title-banner strong {
  font-size: 1em;
  letter-spacing: 0;
}

.title-banner span {
  font-size: 0.26em;
  line-height: 1.05;
}

.title-banner em {
  background: var(--title-bg, rgba(150, 18, 18, 0.88));
  color: var(--title-text, rgba(0, 0, 0, 0.82));
  display: inline-block;
  font-size: 0.26em;
  font-style: normal;
  line-height: 1.05;
  margin-top: 2px;
  padding: 0 8px;
}

.preview-overlay {
  color: #fff;
  isolation: isolate;
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.preview-tint {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.04) 45%, rgba(0, 0, 0, 0.9) 72%, #000 100%);
  inset: 0;
  position: absolute;
}

.logo-pill {
  align-items: center;
  background: rgba(0, 0, 0, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.26);
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  gap: 5px;
  letter-spacing: 0;
  line-height: 1;
  max-width: calc(100% - 24px);
  min-height: 22px;
  min-width: max-content;
  padding: 4px 8px;
  position: absolute;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 6;
}

.logo-swatch {
  align-items: center;
  border-radius: 4px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.68em;
  font-weight: 950;
  height: var(--logo-icon-size, 18px);
  justify-content: center;
  line-height: 1;
  width: var(--logo-icon-size, 18px);
}

.logo-image {
  border-radius: 5px;
  flex: 0 0 auto;
  height: var(--logo-icon-size, 18px);
  object-fit: contain;
  width: var(--logo-icon-size, 18px);
}

.logo-pill > span:last-child {
  max-width: 18em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.caption-block {
  bottom: 7.5%;
  left: 7%;
  max-height: 48%;
  overflow: hidden;
  position: absolute;
  right: 7%;
  text-align: center;
  z-index: 2;
}

.preview-headline {
  font-family: Arial Black, Arial, sans-serif;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.06;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  overflow: hidden;
  text-transform: uppercase;
  word-break: normal;
}

.preview-headline .accent-word {
  color: var(--preview-accent, var(--accent));
}

.manual-word {
  font-weight: inherit;
}

.preview-sub {
  font-size: 12px;
  font-weight: 850;
  line-height: 1.18;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.watermark {
  bottom: 2.8%;
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  position: absolute;
  right: 5.5%;
  text-transform: uppercase;
  z-index: 2;
}

.template-clean .preview-tint {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(16, 19, 20, 0.2) 52%, rgba(16, 19, 20, 0.82) 82%, rgba(16, 19, 20, 0.95) 100%);
}

.template-clean .logo-pill {
  background: rgba(255, 255, 255, 0.92);
  color: #111;
}

.template-spotlight .caption-block {
  background: rgba(0, 0, 0, 0.86);
  border-left: 6px solid var(--preview-accent, var(--accent));
  bottom: 7%;
  left: 8%;
  max-height: 58%;
  padding: 12px 12px 12px 16px;
  right: 8%;
  text-align: left;
}

.template-minimal .preview-tint {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.04) 58%, rgba(0, 0, 0, 0.72) 100%);
}

.template-minimal .preview-headline {
  font-size: 18px;
}

.template-minimal .caption-block {
  bottom: 5.5%;
  text-align: left;
}

.template-indian .preview-tint {
  background: transparent;
}

.template-indian .preview-overlay::before {
  background: #000;
  bottom: 0;
  content: "";
  height: 36%;
  left: 0;
  position: absolute;
  right: 0;
  z-index: 1;
}

.template-indian .indian-logo-mark {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  z-index: 6;
}

.template-indian .indian-logo-mark .logo-image,
.template-indian .indian-logo-mark .logo-swatch {
  border-radius: 7px;
  height: var(--logo-icon-size, 42px);
  width: var(--logo-icon-size, 42px);
}

.template-indian .caption-block {
  bottom: 10%;
  left: 5.8%;
  max-height: 28%;
  right: 5.8%;
  text-align: left;
  z-index: 2;
}

.template-indian .preview-headline {
  font-size: 19px;
  line-height: 1.08;
  -webkit-line-clamp: 3;
}

.template-indian .preview-sub {
  font-size: 11px;
  font-weight: 760;
  line-height: 1.17;
  margin-top: 13px;
  -webkit-line-clamp: 5;
}

.template-indian .watermark {
  display: none;
}

.preview-info {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.preview-info-top {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.preview-info h3 {
  font-size: 14px;
  line-height: 1.25;
}

.preview-info p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.preview-meta-line {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.preview-status {
  background: var(--surface-2);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  padding: 4px 7px;
  text-transform: uppercase;
}

.preview-status.approved {
  background: rgba(15, 157, 138, 0.12);
  color: #087a6b;
}

.preview-status.discarded {
  background: rgba(217, 76, 61, 0.11);
  color: var(--danger);
}

.preview-status.edited {
  background: rgba(244, 170, 25, 0.16);
  color: #8a5c00;
}

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

.mini-actions button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  display: grid;
  height: 34px;
  place-items: center;
  width: 34px;
}

.mini-actions button:hover {
  border-color: var(--line-strong);
}

.placeholder-board {
  align-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  display: grid;
  grid-column: 1 / -1;
  justify-items: center;
  min-height: 460px;
  padding: 28px;
  text-align: center;
}

.placeholder-board strong {
  color: var(--ink);
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.tabs {
  background: transparent;
  border-radius: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  margin-bottom: 14px;
  padding: 0;
}

.app-tabs {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  display: flex;
  gap: 10px;
  grid-column: 1 / -1;
  grid-row: 1;
  height: var(--app-tabs-height);
  justify-content: center;
  margin: 0;
  overflow-x: auto;
  padding: 10px 24px;
  position: sticky;
  top: 0;
  z-index: 12;
}

.app-tabs .tab {
  border-radius: 999px;
  flex: 0 0 auto;
  min-width: 96px;
}

.app-tabs .logout-tab {
  margin-left: auto;
  min-width: 86px;
}

body.locked .logout-tab {
  display: none;
}

.role-user .sidebar {
  display: none;
}

.role-user .app-shell {
  grid-template-columns: minmax(0, 1fr) minmax(320px, var(--inspector-width));
}

.role-user .workspace {
  grid-column: 1;
}

.role-user .inspector {
  grid-column: 2;
}

.role-user.mode-dashboard .workspace {
  grid-column: 1 / -1;
}

.tab {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-weight: 560;
  padding-inline: 14px;
}

.tab.active {
  background: var(--surface-2);
  border-color: transparent;
  color: var(--ink);
}

.inspector-pane {
  display: none;
}

.inspector-pane.active {
  display: block;
}

.panel-resizer {
  background: transparent;
  border: 0;
  bottom: 0;
  cursor: col-resize;
  left: -8px;
  min-height: 0;
  padding: 0;
  position: absolute;
  top: 0;
  width: 16px;
  z-index: 20;
}

.panel-resizer::before {
  background: var(--line-strong);
  border-radius: 999px;
  content: "";
  height: 72px;
  left: 7px;
  position: absolute;
  top: calc(50% - 36px);
  width: 2px;
}

.panel-resizer:hover::before,
.panel-resizer:focus-visible::before,
body.is-resizing-panel .panel-resizer::before {
  background: var(--dark);
  width: 3px;
}

.empty-state {
  padding: 18px;
}

.empty-state p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 6px;
}

.editor-form {
  display: none !important;
  gap: 12px;
  max-height: calc(100vh - 142px);
  overflow-y: auto;
  padding-right: 4px;
}

.editor-form.active {
  display: none !important;
}

.editor-tools {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  padding: 14px;
  position: sticky;
  top: 0;
  z-index: 4;
}

.check-line {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 9px;
  min-height: 40px;
  padding: 8px 10px;
}

.check-line input {
  height: 18px;
  min-height: auto;
  width: 18px;
}

.check-line span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.control-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  padding: 12px;
}

.align-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, 1fr);
}

.align-grid button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 38px;
  position: relative;
}

.align-grid button::after {
  background: var(--muted);
  border-radius: 50%;
  content: "";
  height: 8px;
  left: var(--dot-x, 50%);
  position: absolute;
  top: var(--dot-y, 50%);
  transform: translate(-50%, -50%);
  width: 8px;
}

.align-grid button[data-align$="left"] {
  --dot-x: 25%;
}

.align-grid button[data-align$="center"] {
  --dot-x: 50%;
}

.align-grid button[data-align$="right"] {
  --dot-x: 75%;
}

.align-grid button[data-align^="top"] {
  --dot-y: 25%;
}

.align-grid button[data-align^="mid"] {
  --dot-y: 50%;
}

.align-grid button.active {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(15, 157, 138, 0.1);
}

.align-grid button.active::after {
  background: var(--accent-2);
}

.action-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.export-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  min-height: 18px;
}

.setup-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}

.setup-table {
  border-collapse: collapse;
  font-size: 12px;
  min-width: 2060px;
  width: 100%;
}

.setup-table th,
.setup-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

.setup-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.setup-table tr:last-child td {
  border-bottom: 0;
}

.setup-table input,
.setup-table select {
  font-size: 12px;
  min-height: 34px;
  padding: 7px 8px;
}

.setup-table input[type="checkbox"] {
  height: 18px;
  min-height: auto;
  width: 18px;
}

.setup-table input[type="number"] {
  max-width: 74px;
}

.setup-table input[type="color"] {
  min-height: 34px;
  padding: 3px;
  width: 46px;
}

.setup-page-cell,
.setup-logo-cell,
.setup-color-cell {
  display: grid;
  gap: 7px;
}

.setup-page-cell {
  min-width: 220px;
}

.setup-page-cell input {
  width: 100%;
}

.setup-page-cell input:first-child {
  font-weight: 800;
}

.setup-logo-line {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: 34px 1fr;
}

.setup-logo-thumb {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  height: 34px;
  justify-items: center;
  overflow: hidden;
  width: 34px;
}

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

.setup-logo-upload {
  align-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.setup-logo-upload input {
  display: none;
}

.setup-logo-visible {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 30px;
  padding: 5px 7px;
}

.row-save-button {
  min-height: 34px;
  padding: 0 12px;
}

.setup-side-cell {
  display: grid;
  gap: 7px;
  min-width: 140px;
}

.setup-asset-cell {
  display: grid;
  gap: 7px;
  min-width: 132px;
}

.setup-asset-button {
  align-items: center;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.setup-asset-button input {
  display: none;
}

.setup-asset-name,
.setup-context {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  max-width: 190px;
}

.setup-context {
  max-height: 92px;
  overflow: auto;
}

.setup-watermark-cell {
  display: grid;
  gap: 7px;
  min-width: 132px;
}

.delete-button {
  align-items: center;
  background: #fff;
  border: 1px solid #f0c7c0;
  border-radius: 8px;
  color: var(--danger);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 38px;
}

.delete-button:hover {
  background: #fff7f5;
}

.setup-preview {
  aspect-ratio: 9 / 16;
  background: #111;
  border-radius: 8px;
  color: #fff;
  min-width: 76px;
  overflow: hidden;
  position: relative;
  width: 76px;
}

.setup-preview::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.1) 48%, rgba(0, 0, 0, 0.92) 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.setup-preview.has-template::after {
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  content: "";
  inset: 5px;
  position: absolute;
}

.setup-preview-logo {
  align-items: center;
  background: rgba(0, 0, 0, 0.74);
  border-radius: 999px;
  display: inline-flex;
  gap: 3px;
  left: 7px;
  max-width: 62px;
  padding: 2px 5px;
  position: absolute;
  top: 12px;
}

.setup-preview-logo span:first-child {
  align-items: center;
  border-radius: 3px;
  display: inline-flex;
  font-size: 4px;
  font-weight: 950;
  height: 8px;
  justify-content: center;
  width: 8px;
}

.setup-preview-logo img {
  border-radius: 3px;
  height: 9px;
  object-fit: cover;
  width: 9px;
}

.setup-preview-logo span:last-child {
  font-size: 4px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-preview-copy {
  bottom: 13px;
  left: 7px;
  position: absolute;
  right: 7px;
}

.setup-preview-title {
  font-size: 7px;
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
}

.setup-preview-sub {
  font-size: 4px;
  font-weight: 850;
  line-height: 1.15;
  margin-top: 4px;
}

.asset-summary {
  display: grid;
  gap: 9px;
}

.asset-summary-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  padding: 10px;
}

.user-manager {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.user-add-button {
  align-self: end;
}

.user-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-height: 340px;
  overflow: auto;
}

.user-table {
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
  width: 100%;
}

.user-table th,
.user-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}

.user-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  position: sticky;
  text-transform: uppercase;
  top: 0;
}

.user-table input,
.user-table select {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 7px;
}

.logs-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 12px;
  max-height: 430px;
  overflow: auto;
}

.logs-table {
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
  width: 1120px;
}

.cost-table {
  width: 980px;
}

.logs-cost-metrics {
  margin-bottom: 12px;
}

.cost-log-heading {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 14px;
}

.logs-table th,
.logs-table td {
  border-bottom: 1px solid var(--line);
  height: 46px;
  overflow: hidden;
  padding: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logs-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  position: sticky;
  text-transform: uppercase;
  top: 0;
}

.logs-table select {
  min-height: 32px;
  padding: 5px 7px;
}

.rating-modal {
  align-items: center;
  background: rgba(16, 19, 20, 0.42);
  display: none;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 20;
}

.rating-modal.open {
  display: flex;
}

.rating-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  padding: 20px;
  width: min(360px, calc(100vw - 32px));
}

.rating-card h2 {
  font-size: 18px;
}

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

.rating-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, 1fr);
}

.rating-row button {
  background: var(--dark);
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  height: 44px;
}

.preview-card-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.download-button {
  background: var(--dark);
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  min-height: 34px;
}

.download-progress {
  background: var(--surface-2);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.download-progress span {
  background: var(--dark);
  display: block;
  height: 100%;
  width: 0;
}

.raw-tool-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 260px minmax(220px, 360px) minmax(260px, 1fr);
}

.raw-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.compact-drop {
  min-height: 138px;
}

.raw-preview-shell {
  aspect-ratio: 9 / 16;
  background: #0f1112;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.raw-preview-shell video {
  background: #111;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.raw-auto-mask,
.raw-mask-preview {
  backdrop-filter: blur(16px);
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.32);
  left: 50%;
  min-height: 10px;
  min-width: 10px;
  pointer-events: none;
  position: absolute;
  top: 88%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
}

.stats-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 14px;
}

.metric {
  padding: 12px;
}

.metric strong {
  display: block;
  font-size: 22px;
  margin-top: 5px;
}

.date-filter {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
}

.admin-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}

.admin-table {
  border-collapse: collapse;
  font-size: 13px;
  width: 100%;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}

.admin-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.activity-list {
  display: grid;
  gap: 8px;
}

.activity-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

#renderCanvas {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 0;
  width: 1px;
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: clamp(190px, 16vw, 240px) minmax(0, 1fr) minmax(320px, var(--inspector-width));
  }

  .sidebar {
    grid-column: 1;
    grid-row: 2;
  }

  .workspace {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 840px) {
  .app-shell {
    display: block;
  }

  .app-tabs {
    grid-template-columns: repeat(3, 1fr);
    height: auto;
    position: static;
  }

  .sidebar,
  .inspector {
    height: auto;
    min-height: 0;
    position: static;
  }

  .topbar,
  .toolbar,
  .library-header {
    display: grid;
  }

  .toolbar {
    grid-template-columns: 1fr;
    max-width: none;
    position: static;
    width: auto;
    border-left: 0;
    bottom: auto;
    top: auto;
  }

  .panel-resizer {
    display: none;
  }

  .project-grid,
  .header-line,
  .logo-line,
  .pov-line,
  .quick-actions,
  .layout-form {
    grid-template-columns: 1fr;
  }

  .layout-library-head {
    align-items: stretch;
    display: grid;
  }

  .wide-field,
  .pov-line .wide-field,
  .quick-actions {
    grid-column: auto;
  }

  .topbar-actions,
  .action-row,
  .inline-fields,
  .page-result-toggle,
  .raw-tool-grid,
  .date-filter,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .page-result-toggle {
    gap: 5px;
    padding: 12px;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions button,
  .action-row button {
    width: 100%;
  }
}
