:root {
  --bg: #050505;
  --bg-soft: #0d0d0d;
  --bg-panel: rgba(16, 16, 16, 0.95);
  --bg-panel-2: rgba(22, 22, 22, 0.94);
  --ink: #f5f7f7;
  --muted: #9ea8a8;
  --accent-hue: 124deg;
  --accent-rgb: 124, 255, 77;
  --accent-2-rgb: 58, 227, 91;
  --accent-deep-rgb: 15, 39, 17;
  --line: rgba(var(--accent-rgb), 0.12);
  --line-strong: rgba(var(--accent-rgb), 0.24);
  --green: rgb(var(--accent-rgb));
  --green-2: rgb(var(--accent-2-rgb));
  --green-deep: rgb(var(--accent-deep-rgb));
  --white-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  --bg: #f3f6f3;
  --bg-soft: #fbfdfb;
  --bg-panel: rgba(255, 255, 255, 0.97);
  --bg-panel-2: rgba(245, 249, 245, 0.98);
  --ink: #111814;
  --muted: #34413d;
  --line: rgba(var(--accent-rgb), 0.14);
  --line-strong: rgba(var(--accent-2-rgb), 0.24);
  --green: rgb(var(--accent-rgb));
  --green-2: rgb(var(--accent-2-rgb));
  --green-deep: rgb(var(--accent-deep-rgb));
  --white-soft: rgba(18, 42, 22, 0.06);
  --shadow: 0 24px 60px rgba(18, 42, 22, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--accent-rgb), 0.14), transparent 22%),
    radial-gradient(circle at 100% 10%, rgba(var(--accent-2-rgb), 0.08), transparent 18%),
    linear-gradient(180deg, #080808, #040404 40%, #090909);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--accent-2-rgb), 0.12), transparent 22%),
    radial-gradient(circle at 100% 10%, rgba(var(--accent-2-rgb), 0.08), transparent 18%),
    linear-gradient(180deg, #f8fbf8, #edf4ee 40%, #f8fbf8);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.overview-strip,
.upload-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar,
.brand-lockup,
.topbar-actions,
.actions,
.upload-actions,
.connect-actions,
.thumb-actions,
.recent-job-head,
.status-chip,
.platform-select {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.actions {
  margin-top: 22px;
}

.theme-toggle {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  background: rgba(var(--accent-rgb), 0.08);
}

.accent-menu {
  position: relative;
  z-index: 1;
}

.accent-menu-trigger {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  position: relative;
  z-index: 1;
  max-width: min(100%, 190px);
}

.accent-menu-trigger::-webkit-details-marker {
  display: none;
}

.accent-menu-copy {
  display: grid;
  gap: 2px;
  text-align: left;
  min-width: 0;
}

.accent-menu-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.accent-menu-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
}

.accent-menu-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.14);
  flex: 0 0 auto;
}

.accent-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 40;
  min-width: 220px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  display: none;
}

.accent-menu[open] .accent-menu-panel {
  display: grid;
  gap: 8px;
}

.accent-choice {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  cursor: pointer;
}

.accent-choice:hover {
  border-color: var(--line-strong);
  background: rgba(var(--accent-rgb), 0.08);
}

.accent-choice.is-selected {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.08);
}

.accent-choice-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.03);
}

.accent-choice-swatch-green {
  background: linear-gradient(135deg, rgb(58, 227, 91), rgb(124, 255, 77));
}

.accent-choice-swatch-blue {
  background: linear-gradient(135deg, rgb(49, 157, 255), rgb(106, 192, 255));
}

.accent-choice-swatch-violet {
  background: linear-gradient(135deg, rgb(170, 83, 255), rgb(220, 106, 255));
}

.accent-choice-swatch-pink {
  background: linear-gradient(135deg, rgb(255, 95, 179), rgb(255, 140, 214));
}

.accent-choice-swatch-orange {
  background: linear-gradient(135deg, rgb(255, 166, 72), rgb(255, 210, 103));
}

.topbar {
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.topbar-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 12px;
  position: relative;
  z-index: 15;
}

.topbar-actions > * {
  flex: 0 0 auto;
}

:root[data-studio-auth-state="signed-in"] #studioSignInButton,
:root[data-studio-auth-state="signed-out"] #studioAccountMenu {
  display: none !important;
}

#studioSignInButton[hidden] {
  display: none !important;
}

.overview-strip {
  margin-bottom: 18px;
}

.overview-strip-bottom {
  margin-top: 26px;
  margin-bottom: 0;
}

.overview-card {
  flex: 1 1 220px;
  min-height: 148px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.96), rgba(8, 8, 8, 0.92));
  box-shadow: var(--shadow);
}

.overview-card-hero {
  flex: 1.5 1 320px;
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.14), transparent 34%),
    linear-gradient(180deg, rgba(18, 24, 18, 0.98), rgba(8, 10, 8, 0.94));
}

.overview-card strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.25;
}

.overview-card span,
.overview-card p {
  display: block;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.overview-label {
  color: var(--green) !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 800;
}

:root[data-theme="light"] .overview-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 244, 0.96));
  border-color: rgba(18, 42, 22, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 18px 38px rgba(18, 42, 22, 0.08);
}

:root[data-theme="light"] .overview-card span,
:root[data-theme="light"] .overview-card p,
:root[data-theme="light"] .rail-card span,
:root[data-theme="light"] .upload-zone p,
:root[data-theme="light"] .grid p,
:root[data-theme="light"] label,
:root[data-theme="light"] .connection-status,
:root[data-theme="light"] .upload-status,
:root[data-theme="light"] .queue-status,
:root[data-theme="light"] .recent-job-meta,
:root[data-theme="light"] .recent-job-platforms,
:root[data-theme="light"] .recent-job-empty,
:root[data-theme="light"] .recent-job-error-text {
  color: #27322e;
}

:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .panel-label,
:root[data-theme="light"] .overview-label {
  color: var(--green-2);
}

:root[data-theme="light"] .status-chip {
  background: rgba(var(--accent-2-rgb), 0.12);
  border-color: rgba(var(--accent-2-rgb), 0.2);
  color: #0e1d12;
}

:root[data-theme="light"] .account-menu-panel {
  background: rgba(255, 255, 255, 0.98);
}

:root[data-theme="light"] .account-menu-link {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

:root[data-theme="light"] .status-chip::before {
  background: rgb(var(--accent-2-rgb));
  box-shadow: 0 0 10px rgba(var(--accent-2-rgb), 0.5);
}

:root[data-theme="light"] .rail-card span,
:root[data-theme="light"] .rail-card strong,
:root[data-theme="light"] .upload-zone strong,
:root[data-theme="light"] .grid strong {
  color: #101612;
}

:root[data-theme="light"] .overview-card-hero {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-2-rgb), 0.14), transparent 34%),
    linear-gradient(180deg, rgba(250, 255, 250, 0.98), rgba(240, 248, 241, 0.96));
}

.brand-shell {
  display: grid;
  gap: 12px;
}

.brand-lockup {
  align-items: center;
  gap: 18px;
}

.brand-icon-shell {
  width: clamp(112px, 10vw, 136px);
  height: clamp(112px, 10vw, 136px);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-logo-icon {
  width: 100%;
  height: 100%;
  display: block;
  background: url('/uploadwave-icon-clean.png') center / contain no-repeat;
  filter:
    hue-rotate(calc(var(--accent-hue) - 124deg))
    drop-shadow(0 16px 28px rgba(var(--accent-2-rgb), 0.2));
}

.studio-icon-shell {
  width: clamp(108px, 9vw, 126px);
  height: clamp(108px, 9vw, 126px);
}

.studio-brand .eyebrow {
  margin: 8px 0 0;
}

.brand-wordmark {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand-wordmark-live {
  font-size: clamp(40px, 4.6vw, 54px);
}

.brand-upload {
  color: #ffffff;
}

.brand-wave {
  color: var(--green);
}

:root[data-theme="light"] .brand-upload {
  color: #111814;
}

:root[data-theme="light"] .brand-logo-icon {
  filter:
    hue-rotate(calc(var(--accent-hue) - 124deg))
    drop-shadow(0 14px 24px rgba(18, 42, 22, 0.12));
}

h1,
h2,
.topbar h1 {
  margin: 0;
}

h1 {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  font-size: 28px;
  line-height: 1.08;
}

.eyebrow,
.panel-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--green);
  font-weight: 800;
}

.status-chip {
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: rgba(var(--accent-rgb), 0.08);
  color: #d9fbd4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.status-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.72);
}

.account-menu {
  position: relative;
  z-index: 1;
}

.notification-menu {
  position: relative;
  z-index: 2;
}

.notification-menu-trigger {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  font-weight: 800;
}

.notification-menu-trigger::-webkit-details-marker {
  display: none;
}

.notification-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--green);
  color: #071107;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.notification-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  display: none;
}

.notification-menu[open] .notification-menu-panel {
  display: grid;
  gap: 10px;
}

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

.notification-menu-head button {
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.notification-list {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}

.notification-item {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  display: grid;
  gap: 3px;
}

.notification-item.is-unread {
  border-color: var(--line-strong);
  background: rgba(var(--accent-rgb), 0.08);
}

.notification-item strong {
  font-size: 13px;
}

.notification-item span,
.notification-item time,
.notification-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.notification-item time {
  font-size: 10px;
}

.notification-history-link {
  min-height: 38px;
  border-radius: 10px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.notification-history-link:hover {
  background: rgba(var(--accent-rgb), 0.08);
}

/* Make sure hidden controls stay hidden even if button styles are applied. */
[hidden] {
  display: none !important;
}

.account-menu-trigger {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  position: relative;
  z-index: 1;
  max-width: min(100%, 240px);
}

.account-menu-trigger::-webkit-details-marker {
  display: none;
}

.account-menu-copy {
  display: grid;
  gap: 2px;
  text-align: left;
  min-width: 0;
}

.account-menu-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.account-menu-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-menu-status {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-menu[data-auth-state="signed-in"] .account-menu-trigger {
  border-color: var(--line-strong);
  background: rgba(var(--accent-rgb), 0.06);
}

.account-menu[data-access-state="active"] .account-menu-trigger {
  border-color: rgba(var(--accent-rgb), 0.22);
}

.account-menu[data-access-state="expired"] .account-menu-trigger {
  border-color: rgba(255, 120, 120, 0.2);
}

.account-menu[data-auth-state="signed-out"] .account-menu-trigger {
  border-color: transparent;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #061106;
  box-shadow: 0 16px 34px rgba(var(--accent-2-rgb), 0.24);
  justify-content: center;
  min-width: 132px;
}

.account-menu[data-auth-state="signed-out"] .account-menu-label,
.account-menu[data-auth-state="signed-out"] .account-menu-status {
  display: none;
}

.account-menu[data-auth-state="signed-out"] .account-menu-copy strong {
  color: #061106;
  font-size: 15px;
  line-height: 1;
}

.account-menu[data-auth-state="signed-out"] .account-menu-copy {
  display: block;
}

.account-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 40;
  min-width: 220px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  display: none;
}

.account-menu-panel-chip {
  width: fit-content;
}

.account-menu-panel-copy {
  margin: -2px 0 2px;
  padding: 4px 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.account-menu[open] .account-menu-panel {
  display: grid;
  gap: 8px;
}

.account-menu-link {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.account-menu-link:hover {
  border-color: var(--line-strong);
  background: rgba(var(--accent-rgb), 0.08);
}

.account-menu-link.button {
  justify-content: flex-start;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #f1f3f3;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

:root[data-theme="light"] .button {
  border-color: rgba(20, 41, 26, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.button:hover {
  border-color: var(--line-strong);
  background: rgba(var(--accent-rgb), 0.08);
}

.button.primary {
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #061106;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(var(--accent-2-rgb), 0.16);
}

.button.primary:hover {
  background:
    linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)),
    linear-gradient(135deg, rgb(var(--accent-2-rgb)), rgb(var(--accent-rgb)));
  border-color: rgba(var(--accent-rgb), 0.42);
  box-shadow: 0 14px 32px rgba(var(--accent-2-rgb), 0.32);
  transform: translateY(-1px);
}

:root[data-theme="light"] .button.primary {
  background: linear-gradient(135deg, rgb(var(--accent-2-rgb)), rgb(var(--accent-rgb)));
  border-color: transparent;
  color: #071008;
  box-shadow: 0 10px 24px rgba(var(--accent-2-rgb), 0.18);
}

:root[data-theme="light"] .button.primary:hover {
  background:
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16)),
    linear-gradient(135deg, rgb(var(--accent-2-rgb)), rgb(var(--accent-rgb)));
  border-color: rgba(var(--accent-rgb), 0.42);
  box-shadow: 0 14px 30px rgba(var(--accent-2-rgb), 0.28);
}

.button.disconnect-button {
  border-color: rgba(255, 101, 101, 0.18);
  background: rgba(255, 101, 101, 0.05);
  color: #ffd3d3;
}

.button.disconnect-button:hover {
  border-color: rgba(255, 101, 101, 0.3);
  background: rgba(255, 101, 101, 0.1);
}

:root[data-theme="light"] .button.disconnect-button {
  border-color: rgba(141, 45, 45, 0.14);
  background: rgba(255, 240, 240, 0.94);
  color: #8d2d2d;
}

:root[data-theme="light"] .button.disconnect-button:hover {
  border-color: rgba(141, 45, 45, 0.24);
  background: rgba(255, 236, 236, 0.98);
}

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

.workspace > * {
  min-width: 0;
}

.composer,
.rail-card,
.panel,
.upload-zone,
.grid article {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--bg-panel), rgba(11, 11, 11, 0.95));
  box-shadow: var(--shadow);
}

:root[data-theme="light"] .composer,
:root[data-theme="light"] .rail-card,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .upload-zone,
:root[data-theme="light"] .grid article,
:root[data-theme="light"] .platform-override,
:root[data-theme="light"] .thumb-box,
:root[data-theme="light"] .recent-job {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 244, 0.96));
  border-color: rgba(18, 42, 22, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 18px 38px rgba(18, 42, 22, 0.08);
}

.rail-card span,
.upload-zone p,
.grid p,
label,
.connection-status,
.upload-status,
.queue-status,
.recent-job-meta,
.recent-job-platforms,
.recent-job-empty,
.recent-job-error-text {
  color: var(--muted);
}

.rail-card strong,
.upload-zone strong,
.grid strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.account-card {
  border-color: rgba(var(--accent-rgb), 0.18);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-2-rgb), 0.08), transparent 36%),
    linear-gradient(180deg, rgba(18, 24, 18, 0.98), rgba(10, 12, 10, 0.95));
}

.account-card strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.2;
}

.account-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.account-card .connect-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.account-card .connect-actions .button {
  width: 100%;
}

.right-rail .button {
  min-height: 42px;
  padding: 0 14px;
}

.account-card .connection-status + .connection-status {
  margin-top: 10px;
}

.connect-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.22;
}

.connect-card .connection-status {
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.3;
}

.connect-card .connection-picker {
  margin-top: 8px;
}

.advanced-tools {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.advanced-tools summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  list-style: none;
}

.advanced-tools summary::-webkit-details-marker {
  display: none;
}

.advanced-tools .button,
.advanced-tools .connection-status,
.advanced-tools .connection-picker {
  margin-top: 8px;
}

:root[data-theme="light"] .account-card {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-2-rgb), 0.1), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 244, 0.96));
}

.access-card {
  border-color: rgba(var(--accent-rgb), 0.18);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.08), transparent 36%),
    linear-gradient(180deg, rgba(18, 24, 18, 0.98), rgba(10, 12, 10, 0.95));
}

.provider-logo {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  margin: 0;
}

.provider-logo-facebook {
  transform: scale(1.02);
}

.provider-logo-instagram {
  transform: scale(1.02);
}

.provider-logo-youtube {
  transform: scale(1.05);
}

.provider-logo-tiktok {
  transform: scale(1.04);
}

:root[data-theme="light"] .access-card {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-2-rgb), 0.1), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 244, 0.96));
}

.composer {
  padding: 24px;
}

.composer.locked {
  position: relative;
}

.composer.locked .section-head,
.composer.locked .subsection-head,
.composer.locked .upload-zone,
.composer.locked .split,
.composer.locked .actions,
.composer.locked .queue-status {
  opacity: 0.72;
}

.studio-gate {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-2-rgb), 0.05));
}

.studio-gate strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.studio-gate span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 62ch;
}

.section-head {
  margin-bottom: 16px;
}

.subsection-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 12px;
}

.subsection-head-tight {
  margin-top: 14px;
  margin-bottom: 10px;
}

.subsection-head strong {
  display: block;
  font-size: 18px;
}

.subsection-head span,
.panel-copy {
  color: var(--muted);
  line-height: 1.55;
}

.subsection-head > span {
  max-width: 34ch;
  text-align: right;
}

.panel-copy {
  margin: 0 0 14px;
  font-size: 14px;
}

.publish-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 380px);
  align-items: center;
  gap: 12px 16px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.94), rgba(9, 9, 9, 0.92));
}

.publish-copy {
  min-width: 0;
}

.publish-copy strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.25;
  max-width: 30ch;
}

.publish-time-field {
  min-width: 0;
  gap: 8px;
  max-width: none;
  justify-self: end;
}

.publish-time-field span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.publish-time-field input {
  width: 100%;
}

.publish-row label {
  margin: 0;
}

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

:root[data-theme="light"] .publish-row {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 244, 0.96));
  border-color: rgba(18, 42, 22, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 24px rgba(18, 42, 22, 0.06);
}

:root[data-theme="light"] .publish-time-field {
  justify-self: end;
}

.upload-zone {
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.09), transparent 34%),
    linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(9, 9, 9, 0.95));
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.post-type-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 12px;
}

.composer-mode-note {
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.post-type-option {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 14px 13px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.94), rgba(16, 16, 16, 0.9));
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  min-height: 88px;
}

.post-type-option input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.post-type-option-label {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}

.post-type-option-copy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.post-type-option:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.18);
}

.post-type-option.is-active {
  border-color: rgba(var(--accent-rgb), 0.3);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.1), transparent 44%),
    linear-gradient(180deg, rgba(var(--accent-deep-rgb), 0.88), rgba(var(--accent-deep-rgb), 0.62));
  box-shadow: inset 0 1px 0 rgba(var(--accent-rgb), 0.08);
}

:root[data-theme="light"] .post-type-option {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 245, 0.96));
  border-color: rgba(18, 42, 22, 0.08);
}

:root[data-theme="light"] .post-type-option.is-active {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.12), transparent 44%),
    linear-gradient(180deg, rgba(var(--accent-deep-rgb), 0.98), rgba(255, 255, 255, 0.96));
}

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

.upload-zone-copy strong {
  font-size: 20px;
  line-height: 1.1;
}

.upload-media-stack {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.text-post-field {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.text-post-field span {
  font-size: 15px;
  font-weight: 800;
}

.text-post-field textarea {
  min-height: 160px;
  resize: vertical;
}

:root[data-theme="light"] .composer-mode-note {
  color: rgba(14, 34, 18, 0.65);
}

.upload-zone.is-text-mode .upload-actions {
  display: none;
}

.upload-zone p {
  margin: 8px 0 0;
  max-width: 58ch;
  line-height: 1.55;
}

.upload-meta {
  margin-top: 14px;
}

.upload-meta span {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  background: rgba(var(--accent-rgb), 0.06);
  color: #d7fbd0;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.upload-zone.drag-over {
  border-color: rgba(var(--accent-rgb), 0.4);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.14), transparent 34%),
    linear-gradient(180deg, rgba(22, 22, 22, 0.98), rgba(10, 10, 10, 0.95));
  transform: translateY(-1px);
}

.upload-zone.has-file,
.upload-zone.queued {
  border-color: rgba(var(--accent-rgb), 0.28);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-status,
.queue-status,
.connection-status {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.connect-actions,
.thumb-actions,
.upload-actions {
  gap: 10px;
  margin-top: 12px;
}

.connect-actions .button,
.thumb-actions .button,
.upload-actions .button {
  flex: 1 1 0;
}

.connect-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.connect-actions .button {
  min-width: 0;
}

.form-grid,
.split,
.stack {
  display: grid;
  gap: 14px;
}

.form-grid {
  grid-template-columns: 1fr;
  margin-top: 16px;
  align-items: stretch;
}

.content-field {
  min-height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.94), rgba(12, 12, 12, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.content-field input,
.content-field textarea {
  margin-top: 6px;
}

.content-field-title textarea,
.content-field-caption textarea {
  min-height: 128px;
  line-height: 1.32;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content-field-title textarea {
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 800;
  letter-spacing: 0;
}

.content-field-caption textarea {
  font-size: clamp(15px, 1.65vw, 20px);
  font-weight: 700;
}

:root[data-theme="light"] .content-field {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 244, 0.96));
  border-color: rgba(18, 42, 22, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 24px rgba(18, 42, 22, 0.06);
}

:root[data-theme="light"] .text-post-field {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(18, 42, 22, 0.08);
}

.split {
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
}

.platform-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.select-all-toggle {
  margin-top: 10px;
  margin-bottom: 8px;
  padding-left: 2px;
}

.platform-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.94), rgba(16, 16, 16, 0.9));
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
  display: grid;
  gap: 10px;
  align-content: start;
}

.platform-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.platform-card-head strong {
  display: block;
  min-width: 0;
  font-size: 18px;
  line-height: 1.15;
}

.platform-card:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.24);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.1), transparent 42%),
    linear-gradient(180deg, rgba(var(--accent-deep-rgb), 0.7), rgba(12, 12, 12, 0.96));
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.08), 0 10px 24px rgba(var(--accent-2-rgb), 0.08);
}

.platform-card.selected {
  border-color: rgba(var(--accent-rgb), 0.34);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-2-rgb), 0.16), transparent 34%),
    linear-gradient(180deg, rgba(var(--accent-deep-rgb), 0.96), rgba(var(--accent-deep-rgb), 0.68));
  box-shadow: inset 0 1px 0 rgba(var(--accent-rgb), 0.08), 0 10px 24px rgba(var(--accent-2-rgb), 0.12);
}

.platform-card.selected:hover {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.22), transparent 38%),
    linear-gradient(180deg, rgba(var(--accent-deep-rgb), 1), rgba(var(--accent-deep-rgb), 0.76));
  border-color: rgba(var(--accent-rgb), 0.48);
  box-shadow: inset 0 1px 0 rgba(var(--accent-rgb), 0.12), 0 14px 30px rgba(var(--accent-2-rgb), 0.18);
}

.platform-select {
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.platform-card-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}

.platform-card-icon-instagram {
  transform: scale(1.02);
}

.platform-card-icon-tiktok {
  transform: scale(1.04);
}

.platform-card-icon-youtube {
  transform: scale(1.04);
}

.platform-card-icon-facebook {
  transform: scale(1.02);
}

.platform-select span {
  margin-top: 0;
  color: var(--ink);
  line-height: 1.2;
}

.platform-card span,
.thumb-box span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

:root[data-theme="light"] .platform-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 245, 0.96));
  border-color: rgba(18, 42, 22, 0.08);
}

:root[data-theme="light"] .platform-card.selected {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.16), transparent 40%),
    linear-gradient(180deg, rgba(var(--accent-deep-rgb), 0.98), rgba(255, 255, 255, 0.96));
}

:root[data-theme="light"] .platform-card:hover,
:root[data-theme="light"] .platform-card.selected:hover {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.22), transparent 42%),
    linear-gradient(180deg, rgba(var(--accent-deep-rgb), 1), rgba(255, 255, 255, 0.98));
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 13px 14px;
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #798282;
}

textarea {
  resize: vertical;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.toggle-row {
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 10px;
}

.master-toggle {
  margin-bottom: 14px;
}

.small-toggle {
  margin-bottom: 0;
}

.panel {
  padding: 18px;
}

.draft-panel-shell {
  display: grid;
  gap: 14px;
}

.draft-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.draft-mode-option {
  position: relative;
  min-height: 104px;
  padding: 12px 13px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.94), rgba(16, 16, 16, 0.9));
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.draft-mode-option input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.draft-mode-option-head {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
}

.draft-mode-option-copy {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.draft-mode-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.draft-mode-option:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.16);
}

.draft-mode-option.is-active {
  border-color: rgba(var(--accent-rgb), 0.24);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.12), transparent 44%),
    linear-gradient(180deg, rgba(var(--accent-deep-rgb), 0.9), rgba(var(--accent-deep-rgb), 0.62));
  box-shadow: inset 0 1px 0 rgba(var(--accent-rgb), 0.08);
}

.draft-mode-option.is-disabled {
  opacity: 0.62;
}

.draft-mode-option.is-locked {
  cursor: not-allowed;
}

.draft-mode-option.is-locked .draft-mode-option-copy,
.draft-mode-option.is-locked .draft-mode-status {
  opacity: 0.88;
}

.draft-panels {
  display: grid;
  gap: 14px;
}

.draft-mode-panel {
  display: grid;
  gap: 12px;
}

.draft-mode-panel[hidden] {
  display: none;
}

:root[data-theme="light"] .draft-mode-option {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 245, 0.96));
  border-color: rgba(18, 42, 22, 0.08);
}

:root[data-theme="light"] .draft-mode-option.is-active {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.14), transparent 44%),
    linear-gradient(180deg, rgba(var(--accent-deep-rgb), 0.98), rgba(255, 255, 255, 0.96));
}

:root[data-theme="light"] .draft-mode-status {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--ink);
}

.platform-override {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.92), rgba(17, 17, 17, 0.9));
}

.platform-override + .platform-override {
  margin-top: 12px;
}

.platform-override:not(.enabled) {
  opacity: 0.62;
}

.plan-gated-hidden {
  display: none !important;
}

.override-fields {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.override-fields > label {
  min-width: 0;
}

.override-schedule {
  grid-column: 1 / -1;
}

.schedule-platforms {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.schedule-platforms[hidden] {
  display: none;
}

.platform-schedule-row {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.platform-schedule-row span {
  margin-top: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.platform-schedule-row input {
  justify-self: end;
  max-width: 240px;
  padding: 11px 12px;
}

:root[data-theme="light"] .platform-schedule-row {
  background: rgba(18, 42, 22, 0.03);
  border-color: rgba(18, 42, 22, 0.08);
}

.thumb-box {
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.1), transparent 34%),
    linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(10, 10, 10, 0.95));
  border: 1px dashed rgba(var(--accent-rgb), 0.18);
  padding: 16px;
}

.thumb-box.drag-over {
  border-color: rgba(var(--accent-rgb), 0.4);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.14), transparent 34%),
    linear-gradient(180deg, rgba(22, 22, 22, 0.98), rgba(10, 10, 10, 0.95));
  transform: translateY(-1px);
}

:root[data-theme="light"] .thumb-box {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-2-rgb), 0.1), transparent 34%),
    linear-gradient(180deg, rgba(252, 255, 252, 0.98), rgba(242, 248, 242, 0.96));
}

.thumb-preview {
  display: grid;
  place-items: center;
  min-height: 160px;
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="light"] .thumb-preview,
:root[data-theme="light"] .recent-job-empty {
  background: rgba(18, 42, 22, 0.03);
  border-color: rgba(18, 42, 22, 0.08);
}

.thumb-preview img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  display: block;
}

.thumb-placeholder {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.right-rail {
  display: grid;
  gap: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.rail-card {
  padding: 14px;
}

.connect-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(var(--accent-rgb), 0.12);
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(10, 10, 10, 0.95));
}

.connect-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.connect-card-head-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.connect-card-head .panel-label {
  margin: 0;
}

.connect-card-head-copy strong,
.connect-card .connection-status {
  display: block;
}

.connect-card-head-copy strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.connect-card > span {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.connect-actions {
  display: grid;
}

.connect-card .connection-status {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 12px;
}

.recent-jobs {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.recent-job {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 4px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.96), rgba(16, 16, 16, 0.94));
  padding: 10px;
}

.recent-job-success {
  border-left-color: rgba(var(--accent-rgb), 0.78);
}

.recent-job-warning {
  border-left-color: rgba(240, 188, 94, 0.9);
}

.recent-job-error {
  border-left-color: rgba(255, 101, 101, 0.92);
}

.recent-job-pending {
  border-left-color: rgba(255, 255, 255, 0.24);
}

.recent-job-head {
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.recent-job-head strong {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.recent-job-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.recent-job-badge-success {
  background: rgba(var(--accent-rgb), 0.12);
  color: #d7fbd0;
}

.recent-job-badge-warning {
  background: rgba(240, 188, 94, 0.16);
  color: #ffdba2;
}

.recent-job-badge-error {
  background: rgba(255, 101, 101, 0.14);
  color: #ffc4c4;
}

.recent-job-badge-pending {
  background: rgba(255, 255, 255, 0.08);
  color: #d7dbdb;
}

:root[data-theme="light"] .recent-job-badge-success {
  color: #1f4e29;
}

:root[data-theme="light"] .recent-job-badge-warning {
  color: #865a11;
}

:root[data-theme="light"] .recent-job-badge-error {
  color: #8d2d2d;
}

:root[data-theme="light"] .recent-job-badge-pending {
  background: rgba(18, 42, 22, 0.08);
  color: #40504b;
}

.recent-job-meta,
.recent-job-platforms,
.recent-job-empty,
.recent-job-error-text {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.recent-job-error-text {
  color: #ffc1c1;
  font-weight: 700;
}

.recent-job-empty {
  padding: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.rail-card-link {
  display: inline-flex;
  margin-top: 12px;
  color: rgb(var(--accent-rgb));
  font-size: 12px;
  font-weight: 800;
}

.rail-card-link:hover {
  text-decoration: underline;
}

.history-page {
  width: min(1180px, calc(100% - 32px));
}

.history-topbar {
  align-items: center;
}

.history-topbar .eyebrow {
  display: block;
}

.history-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: end;
  gap: 28px;
  margin-top: 54px;
}

.history-hero h1 {
  max-width: 760px;
  margin: 8px 0 12px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.history-hero > div > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.usage-card,
.history-summary article,
.history-toolbar,
.history-job,
.history-empty {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 19, 19, 0.98), rgba(10, 10, 10, 0.96));
  box-shadow: var(--shadow);
}

:root[data-theme="light"] .usage-card,
:root[data-theme="light"] .history-summary article,
:root[data-theme="light"] .history-toolbar,
:root[data-theme="light"] .history-job,
:root[data-theme="light"] .history-empty {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 246, 0.98));
}

.usage-card {
  border-radius: 18px;
  padding: 20px;
}

.usage-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.usage-card-head span,
.usage-card > span {
  color: var(--muted);
}

.usage-card-head strong {
  font-size: 24px;
}

.usage-meter {
  height: 8px;
  margin: 18px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .usage-meter {
  background: rgba(18, 42, 22, 0.08);
}

.usage-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(var(--accent-2-rgb)), rgb(var(--accent-rgb)));
  transition: width 220ms ease;
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.history-summary article {
  display: grid;
  gap: 8px;
  border-radius: 16px;
  padding: 18px 20px;
}

.history-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.history-summary strong {
  font-size: 30px;
  line-height: 1;
}

.history-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  border-radius: 18px;
  padding: 12px;
}

.history-search input {
  width: 100%;
  min-height: 46px;
}

.history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.history-filters button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.history-filters button:hover,
.history-filters button.is-active {
  border-color: var(--line-strong);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--ink);
}

.history-message {
  margin: 18px 2px;
  color: var(--muted);
}

.history-message a {
  color: rgb(var(--accent-rgb));
  font-weight: 800;
}

.history-list {
  display: grid;
  gap: 14px;
}

.history-job {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.5fr);
  gap: 22px;
  border-radius: 20px;
  padding: 22px;
}

.history-job-success {
  border-color: rgba(var(--accent-rgb), 0.28);
}

.history-job-warning {
  border-color: rgba(240, 188, 94, 0.42);
}

.history-job-error {
  border-color: rgba(255, 101, 101, 0.42);
}

.history-job-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.history-job-title > div > span {
  color: var(--muted);
  font-size: 13px;
}

.history-job h2 {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.25;
}

.history-caption {
  display: -webkit-box;
  margin: 14px 0 0;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.history-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.history-status-success {
  background: rgba(var(--accent-rgb), 0.12);
  color: rgb(var(--accent-rgb));
}

.history-status-warning {
  background: rgba(240, 188, 94, 0.15);
  color: #ffd99b;
}

.history-status-scheduled {
  background: rgba(var(--accent-rgb), 0.12);
  color: rgb(var(--accent-rgb));
}

.history-status-error,
.history-job-error {
  color: #ffc0c0;
}

.history-targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.history-target {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  padding: 12px;
}

:root[data-theme="light"] .history-target {
  border-color: rgba(18, 42, 22, 0.09);
  background: rgba(18, 42, 22, 0.025);
}

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

.history-target-head span {
  color: var(--muted);
  font-size: 12px;
}

.history-target p {
  margin: 9px 0 0;
  color: #ffc0c0;
  font-size: 12px;
  line-height: 1.4;
}

.history-target .history-target-time,
:root[data-theme="light"] .history-target .history-target-time {
  color: var(--muted);
}

:root[data-theme="light"] .history-target p,
:root[data-theme="light"] .history-job-error {
  color: #8d2d2d;
}

.history-target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.history-target-actions:empty {
  display: none;
}

.history-target-attempts {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.history-error-details {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.history-error-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-weight: 800;
}

.history-error-details code {
  display: block;
  max-height: 120px;
  margin-top: 8px;
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

:root[data-theme="light"] .history-error-details code {
  border-color: rgba(18, 42, 22, 0.1);
  background: rgba(18, 42, 22, 0.04);
}

.history-target-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgb(var(--accent-rgb));
  padding: 0;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.history-schedule-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.history-schedule-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.history-schedule-controls input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.history-schedule-controls .button {
  min-height: 44px;
  white-space: nowrap;
}

.history-cancel {
  color: #ffc0c0;
}

.history-empty {
  display: grid;
  justify-items: start;
  gap: 10px;
  border-radius: 20px;
  padding: 34px;
}

.history-empty strong {
  font-size: 24px;
}

.history-empty span {
  color: var(--muted);
}

.history-empty .button {
  margin-top: 8px;
}

.history-load-more {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .history-hero,
  .history-job {
    grid-template-columns: 1fr;
  }

  .history-toolbar {
    grid-template-columns: 1fr;
  }

  .history-toolbar > .button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .history-summary,
  .history-targets {
    grid-template-columns: 1fr 1fr;
  }

  .history-summary article {
    padding: 16px;
  }

  .history-filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .history-filters button:first-child {
    grid-column: 1 / -1;
  }

  .history-job {
    padding: 16px;
  }

  .history-job-title {
    flex-direction: column;
  }

  .history-schedule-controls {
    grid-template-columns: 1fr;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.grid article {
  padding: 18px;
}

.section {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
}

.section-footer {
  margin-bottom: 12px;
}

.section-footer .grid article {
  padding: 14px;
}

@media (max-width: 1080px) {
  .overview-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .right-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

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

  .publish-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .publish-copy {
    max-width: 100%;
  }

  .publish-time-field {
    max-width: 100%;
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .overview-strip,
  .topbar,
  .form-grid,
  .split,
  .platform-strip,
  .grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    align-items: start;
  }

  .right-rail {
    grid-template-columns: 1fr;
  }

  .post-type-switch {
    grid-template-columns: 1fr;
  }

  .brand-shell {
    gap: 10px;
  }

  .brand-lockup {
    align-items: start;
    gap: 12px;
  }

  .brand-icon-shell {
    width: clamp(84px, 28vw, 120px);
    height: clamp(84px, 28vw, 120px);
  }

  .brand-wordmark-live {
    font-size: clamp(30px, 10vw, 42px);
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions > * {
    width: 100%;
  }

  .account-menu-panel {
    right: 0;
    width: min(320px, calc(100vw - 20px));
  }

  .notification-menu-panel {
    right: 0;
  }

  .page {
    width: min(100% - 20px, 1280px);
    padding-top: 18px;
  }

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

  .topbar-actions .button,
  .topbar-actions .theme-toggle,
  .topbar-actions .status-chip {
    justify-content: center;
  }

  .actions {
    margin-top: 18px;
  }

  .connect-actions,
  .thumb-actions,
  .upload-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .connect-actions .button,
  .thumb-actions .button,
  .upload-actions .button {
    width: 100%;
  }

  .composer {
    padding: 18px;
  }

  .subsection-head {
    align-items: start;
  }

  .subsection-head > span {
    max-width: none;
    text-align: left;
  }

  .rail-card,
  .panel,
  .upload-zone {
    padding: 16px;
  }

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

  .account-card strong {
    font-size: 17px;
  }

  .account-card span {
    font-size: 13px;
  }

  .account-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .draft-mode-switch {
    grid-template-columns: 1fr;
  }

  .account-card .connect-actions {
    grid-template-columns: 1fr;
  }

  .connect-card span {
    font-size: 13px;
  }

  .platform-schedule-row {
    grid-template-columns: 1fr;
  }

  .platform-schedule-row input {
    max-width: none;
    justify-self: stretch;
  }

  .publish-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .publish-copy,
  .publish-time-field {
    width: 100%;
  }

  .publish-time-field input {
    width: 100%;
  }

  .platform-override {
    padding: 12px;
  }

  .platform-override + .platform-override {
    margin-top: 12px;
  }

  .override-fields {
    gap: 10px;
    margin-top: 10px;
  }

  .override-schedule {
    grid-column: auto;
  }
}

@media (min-width: 821px) {
  .override-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .override-fields > label {
    display: grid;
  }

  .override-fields > label > input,
  .override-fields > label > textarea,
  .override-fields > label > select {
    width: 100%;
  }
}

