:root {
  color-scheme: light;
  --bg: #fff7e8;
  --panel: #fffdf7;
  --panel-2: #f7edda;
  --text: #1f1812;
  --muted: #746658;
  --line: #ead8bf;
  --line-strong: #d9bd91;
  --brand: #f8b620;
  --brand-deep: #d97706;
  --brand-2: #7c3aed;
  --accent: #e94d88;
  --bad: #dc2626;
  --ok: #059669;
  --shadow: 0 24px 60px rgba(39, 25, 10, .13);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

/* Admin notifications and role management */
.top-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.notification-bell {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: #17213d;
  border: 1px solid #dce5f4;
  border-radius: 50%;
  background: #fff;
  text-decoration: none;
}

.notification-bell svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell.has-unread {
  animation: notification-bob 4s ease-in-out infinite;
}

.notification-bell span {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 11px;
  background: #ff6335;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

@keyframes notification-bob {
  0%, 8%, 16%, 100% { transform: translateY(0) rotate(0); }
  4% { transform: translateY(-4px) rotate(-8deg); }
  12% { transform: translateY(-2px) rotate(8deg); }
}

.notification-filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid #dce5f4;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.notification-item.unread {
  border-color: #b8d8fb;
  background: #f5faff;
  box-shadow: inset 4px 0 #1377c9;
}

.notification-item.read {
  opacity: .76;
}

.notification-state {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b8c2d4;
}

.notification-item.unread .notification-state {
  background: #1377c9;
}

.notification-copy,
.notification-copy p {
  min-width: 0;
  margin: 0;
}

.notification-title-row,
.notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.notification-title-row {
  justify-content: space-between;
  margin-bottom: 6px;
}

.notification-title-row time,
.notification-meta {
  color: #6d758b;
  font-size: 13px;
}

.notification-meta {
  margin-top: 9px;
}

.unread-label {
  color: #1377c9;
  font-weight: 700;
}

.admin-users-panel {
  margin-bottom: 24px;
}

.admin-user-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px auto;
  gap: 14px;
  align-items: end;
  margin: 18px 0;
}

.admin-user-form > div {
  min-width: 0;
}

.admin-user-list {
  display: grid;
  gap: 10px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dce5f4;
  border-radius: 8px;
  background: #fff;
}

.admin-user-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-user-row span {
  color: #6d758b;
  font-size: 13px;
}

.designer-media-status {
  margin-top: 18px;
  padding-top: 10px;
}

@media (max-width: 900px) {
  .admin-user-form,
  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .notification-item {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .notification-open {
    grid-column: 2;
    justify-self: start;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(248, 182, 32, .2), transparent 30%),
    radial-gradient(circle at top right, rgba(124, 58, 237, .14), transparent 24%),
    linear-gradient(180deg, #fffaf0 0%, #fff0d3 100%);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  font-size: 14px;
}

body.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
}

h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-frame {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: calc(100% - 40px);
  min-height: calc(100vh - 40px);
  margin: 20px;
  background: rgba(255, 253, 247, .88);
  border: 1px solid rgba(234, 216, 191, .9);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sidebar {
  background: linear-gradient(180deg, #1f1812 0%, #351b36 100%);
  color: #fffaf0;
  padding: 24px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #23264d;
  border: 1px solid rgba(255, 255, 255, .34);
  box-shadow: 0 12px 22px rgba(248, 182, 32, .2);
  color: #ffffff;
  font-weight: 900;
}

.brand strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.brand span:last-child {
  display: block;
  margin-top: 8px;
  color: #e8cf9e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-wrap {
  width: min(100%, 520px);
}

.login-panel {
  margin: 0;
  padding: 34px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(248, 182, 32, .22), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 247, .98), rgba(255, 248, 234, .98));
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.login-brand strong {
  display: block;
  font-size: 24px;
  font-weight: 950;
}

.login-brand span:last-child {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-copy {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.login-copy h1 {
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1;
}

.login-kicker {
  margin: 0;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-button {
  width: 100%;
  justify-content: center;
  text-align: center;
  padding: 15px 18px;
  font-size: 16px;
}

.login-notice {
  margin: 0 0 18px;
  border: 1px solid rgba(5, 150, 105, .24);
  border-radius: 14px;
  background: rgba(209, 250, 229, .72);
  color: #065f46;
  padding: 12px 14px;
  font-weight: 750;
}

.login-notice[data-tone="error"] {
  border-color: rgba(220, 38, 38, .24);
  background: rgba(254, 226, 226, .72);
  color: #991b1b;
}

.login-footnote {
  margin: 18px 0 0;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  display: block;
  color: #e8cf9e;
  border-radius: 16px;
  padding: 12px 13px;
  font-weight: 850;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav a.active,
.nav a:hover {
  background: rgba(248, 182, 32, .16);
  color: #fff;
  transform: translateY(-1px);
}

.nav-group {
  display: grid;
  gap: 4px;
  border-radius: 18px;
}

.nav-group.active {
  background: rgba(248, 182, 32, .07);
  padding: 4px;
}

.nav-parent {
  width: 100%;
  border: 0;
  background: transparent;
  color: #e8cf9e;
  border-radius: 16px;
  padding: 12px 13px;
  text-align: left;
  font-weight: 900;
  cursor: pointer;
}

.nav-group.active .nav-parent,
.nav-parent:hover {
  background: rgba(248, 182, 32, .12);
  color: #fff;
}

.nav-submenu {
  display: none;
  gap: 6px;
  padding: 4px 0 4px 12px;
}

.nav-group.open .nav-submenu {
  display: grid;
}

.nav-submenu a {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
}

.nav-submenu a.active {
  background: rgba(248, 182, 32, .2);
}

.main-shell {
  min-width: 0;
}

.topbar {
  min-height: 76px;
  background: rgba(255, 253, 247, .9);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 26px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 650;
}

.top-title {
  display: grid;
  gap: 5px;
}

.top-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.logout-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 16px;
}

.content-shell {
  padding: 24px 26px 34px;
  min-width: 0;
}

main {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.admin-dashboard {
  display: grid;
  gap: 18px;
  min-width: 0;
}

section,
.card,
.panel {
  background: linear-gradient(180deg, rgba(255, 253, 247, .98), rgba(255, 249, 238, .98));
  border: 1px solid rgba(234, 216, 191, .92);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(39, 25, 10, .06);
  min-width: 0;
}

section {
  margin-bottom: 18px;
}

.panel {
  margin: 0;
}

.card.compact {
  padding: 16px;
}

.hero-panel {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, .18), transparent 28%),
    linear-gradient(135deg, #1f1812 0%, #351b36 46%, #f8b620 100%);
  border-color: rgba(255, 255, 255, .18);
  color: #fffaf0;
  overflow: hidden;
  position: relative;
  min-width: 0;
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  right: -48px;
  top: -66px;
  background: rgba(255, 255, 255, .08);
}

.hero-panel h2 {
  max-width: 720px;
  color: #fff;
  font-size: 30px;
  line-height: 1.08;
  margin-bottom: 12px;
}

.hero-panel p {
  max-width: 780px;
  color: rgba(255, 249, 244, .78);
  overflow-wrap: anywhere;
}

.admin-hero {
  min-height: 160px;
  display: grid;
  align-content: center;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
  font-weight: 850;
  line-height: 1.1;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(44, 26, 9, .08);
}

button:disabled {
  background: #c3ad91;
  cursor: wait;
}

.sidebar .nav-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  box-shadow: none;
}

.sidebar .nav-parent::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .18s ease;
}

.sidebar .nav-group.open .nav-parent::after {
  transform: rotate(45deg);
}

.button.light {
  background: #fff;
  border-color: #fff;
  color: #2b1808;
  position: relative;
  z-index: 1;
}

.primary-warm {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-color: var(--brand);
  color: #fff;
}

.gradient {
  background: linear-gradient(135deg, var(--brand-2), var(--accent));
  border-color: var(--brand-2);
  color: #fff;
}

.secondary {
  background: #475569;
  border-color: #475569;
  color: #fff;
}

.success {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}

.notice-box {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf9;
  padding: 14px;
  color: var(--text);
}

.notice-box strong {
  font-size: 14px;
}

.notice-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.notice-box.error {
  border-color: rgba(239, 68, 68, .36);
  background: #fff7f4;
}

.notice-box.info {
  border-color: rgba(59, 130, 246, .3);
  background: #f8fbff;
}

.notice-box.success {
  border-color: rgba(34, 197, 94, .35);
  background: #f4fff7;
}

.service-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, .85);
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.service-pill > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
}

.service-pill.live > span {
  background: var(--ok);
}

.service-pill.offline > span {
  background: var(--bad);
}

.action-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  min-width: 0;
}

.logs-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.metric-card {
  min-height: 134px;
  background: linear-gradient(180deg, rgba(255, 253, 247, .98), rgba(255, 249, 238, .98));
  border: 1px solid rgba(234, 216, 191, .92);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(39, 25, 10, .06);
}

.metric-card > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.metric-card > strong {
  display: block;
  margin: 12px 0;
  color: var(--text);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.metric-card h3 {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.metric-value {
  margin: 12px 0 12px;
  color: var(--text);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.metric-card p {
  margin: 0;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.snapshot-list,
.ops-list,
.card-list,
.post-list,
.approval-list {
  display: grid;
  gap: 12px;
}

.logs-panel {
  display: grid;
  gap: 14px;
}

.logs-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.logs-panel-head h2 {
  margin: 0;
}

.logs-list {
  display: grid;
  gap: 10px;
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}

.log-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf9;
  padding: 14px;
}

.log-row.good {
  border-color: rgba(34, 197, 94, .3);
}

.log-row.bad {
  border-color: rgba(239, 68, 68, .36);
  background: #fff8f6;
}

.log-main {
  display: grid;
  gap: 8px;
}

.log-event {
  color: var(--text);
}

.log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.log-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
}

.log-row details {
  color: var(--muted);
}

.log-row summary {
  cursor: pointer;
  font-weight: 800;
}

.log-row pre {
  max-height: 340px;
  overflow: auto;
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #19120e;
  color: #fff7eb;
  padding: 12px;
  font-size: 12px;
  white-space: pre-wrap;
}

.toolbar-row.tight {
  width: auto;
  margin: 0;
}

.log-status {
  min-height: 24px;
}

.snapshot-item,
.ops-item,
.post-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  padding: 12px;
  min-width: 0;
}

.post-row {
  display: grid;
  grid-template-columns: minmax(120px, .42fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.post-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.artifact-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.generated-files-row .artifact-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.artifact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.artifact-row .button {
  flex: 0 0 auto;
}

.artifact-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.artifact-modal.open {
  display: block;
}

.artifact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 28, .54);
}

.artifact-modal-panel {
  position: relative;
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 56px);
  margin: 28px auto;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(16, 12, 35, .26);
  overflow: hidden;
}

.artifact-modal-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background-color: #fff;
}

.artifact-modal-panel h2 {
  margin: 0;
}

.artifact-modal-panel pre {
  margin: 0;
  padding: 20px;
  max-height: calc(100vh - 150px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #211a16;
  background: #fffaf0;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.knowledge-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.knowledge-actions button {
  margin: 0;
}

.snapshot-item strong,
.ops-item strong {
  display: block;
  margin-bottom: 4px;
}

.snapshot-item span,
.muted,
.status {
  color: var(--muted);
}

.social-sync-status {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .55);
}

.error-text {
  color: #9f1239;
}

#generateStatus {
  display: block;
  padding-top: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.badge.ok,
.pill.good {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.badge.warn,
.pill.warn {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.badge.bad {
  background: #fee2e2;
  color: #991b1b;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.client-overview-layout {
  display: grid;
  gap: 18px;
}

.full-width {
  width: 100%;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: block;
  color: var(--text);
  font-weight: 750;
  margin: 14px 0 6px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(248, 182, 32, .18);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.checks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
}

.checks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.checks input,
.platform-card input[type="checkbox"] {
  width: auto;
}

.row,
.editable-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.toolbar-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.toolbar-row .status {
  margin: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 850;
  line-height: 1.1;
  text-decoration: none;
}

.tab.active {
  background: #1f1812;
  color: #fff;
  border-color: #1f1812;
}

.tab-panel[hidden] {
  display: none;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

.pill {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  margin: 0 4px 4px 0;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-2);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.metrics-filter-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
}

.metrics-filter-action {
  display: flex;
  align-items: end;
}

.metrics-filter-action button {
  width: 100%;
}

.metrics-section {
  display: grid;
  gap: 18px;
  min-width: 0;
  overflow: hidden;
}

.metrics-overview {
  margin-top: 0;
  overflow-x: auto;
  grid-template-columns: repeat(8, minmax(220px, 1fr));
  padding-bottom: 4px;
}

.metrics-detail-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  min-width: 0;
}

.metrics-detail-grid > .card,
.metrics-table-card {
  min-width: 0;
  overflow: hidden;
}

.metrics-trend {
  display: grid;
  gap: 10px;
}

.trend-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 1.4fr) 78px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: .92rem;
}

.trend-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-row > div {
  height: 12px;
  border-radius: 999px;
  background: #f1e5cf;
  overflow: hidden;
}

.trend-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #f59e0b);
}

.trend-row strong {
  text-align: right;
  color: var(--text);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 6px;
}

.metrics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

.metrics-table th,
.metrics-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: .92rem;
}

.metrics-table th {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #fffaf0;
  position: sticky;
  top: 0;
}

.metrics-post-cell {
  min-width: 260px;
}

.metrics-post-cell strong,
.metrics-post-cell span {
  display: block;
}

.metrics-post-cell span {
  color: var(--muted);
  margin-top: 4px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fffdf9;
}

.metric strong {
  display: block;
  font-size: 24px;
}

.client-card {
  display: grid;
  gap: 10px;
}

.client-stack {
  display: grid;
  gap: 14px;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.mini-metrics div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 253, 247, .82);
}

.mini-metrics strong,
.mini-metrics span {
  display: block;
}

.mini-metrics strong {
  font-size: 24px;
  line-height: 1;
}

.mini-metrics span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.custom-platform-editor .media-picker {
  display: block;
}

.custom-platform-editor .media-picker input {
  margin-top: 10px;
}

.client-card header,
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
}

.platform-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.platform-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fffdf9;
  display: grid;
  gap: 8px;
}

.platform-card label:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.publish-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-top: 14px;
  background: #fff8ec;
}

.publish-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.audit-trail {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.audit-trail summary {
  cursor: pointer;
  font-weight: 750;
}

.audit-row {
  border-left: 3px solid var(--line-strong);
  padding: 8px 0 8px 10px;
  margin-top: 8px;
  color: var(--text);
}

.audit-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.approval-card {
  overflow: hidden;
  transition: opacity .22s ease, transform .22s ease;
}

.approval-card.leaving {
  opacity: 0;
  transform: translateY(10px) scale(.985);
}

.media-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
}

.media-empty {
  min-width: 180px;
}

.media-thumb {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--panel-2);
  flex: 0 0 auto;
}

.media-thumb-wrap {
  position: relative;
  flex: 0 0 auto;
}

.media-thumb-delete {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(31, 24, 18, .2);
  background: rgba(31, 24, 18, .78);
  color: #fff;
  line-height: 1;
}

.platform-media-tools {
  display: grid;
  gap: 8px;
  padding: 10px 0 0;
}

.platform-media-tools .media-picker {
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.platform-media-tools input {
  padding: 9px;
  font-size: 13px;
}

.platform-media-tools button {
  width: fit-content;
  padding: 8px 11px;
  font-size: 13px;
}

.platform-previews {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

.posts-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
}

.posts-toolbar label {
  width: min(420px, 100%);
  margin: 0;
}

.platform-post-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.platform-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fffaf0;
}

.platform-post-heading {
  min-width: 0;
}

.platform-post-heading h4 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.08rem;
}

.platform-post-heading span {
  display: block;
  color: var(--muted);
  font-size: .88rem;
  margin-top: 3px;
}

.platform-post-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
}

.platform-media-column {
  min-width: 0;
}

.platform-media-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel-2);
}

.platform-media-frame .preview-media {
  border: 0;
  display: block;
}

.platform-remove-media {
  right: 8px;
  top: 8px;
}

.platform-content-column {
  min-width: 0;
}

.post-internal-panel {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-left: 4px solid #71809b;
  border-radius: 6px;
  background: #f4f7fb;
}

.post-internal-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #28334a;
}

.post-internal-heading strong {
  font-size: .95rem;
}

.post-internal-heading span {
  color: var(--muted);
  font-size: .8rem;
}

.post-internal-panel label:first-of-type {
  margin-top: 0;
}

.editable-grid.compact {
  gap: 12px;
  margin-bottom: 10px;
}

.fixed-description {
  height: 118px;
  min-height: 118px;
  resize: vertical;
  overflow-y: auto;
}

.fixed-description.small {
  height: 82px;
  min-height: 82px;
}

.preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.preview-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #1f1812;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.preview-name {
  font-weight: 800;
}

.preview-meta {
  color: var(--muted);
  font-size: 12px;
}

.preview-body {
  padding: 0 12px 12px;
  white-space: pre-wrap;
  line-height: 1.4;
}

.preview-body textarea {
  min-height: 130px;
}

.platform-rule-status {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffaf0;
  font-size: 0.9rem;
  white-space: normal;
}

.platform-rule-status.good {
  border-color: #b7e4c7;
  background: #f0fff4;
  color: #22543d;
}

.platform-rule-status.bad {
  border-color: #f3b0a5;
  background: #fff5f5;
  color: #7f1d1d;
}

.platform-rule-status strong {
  display: block;
  margin-bottom: 2px;
}

.platform-rule-status span {
  display: block;
  color: inherit;
  opacity: 0.82;
}

.platform-rule-status ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.platform-rule-status li {
  margin: 3px 0;
}

.platform-rule-status li.warning {
  color: #7c4a03;
}

.preview-media {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.preview-media.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.preview-actions {
  display: flex;
  gap: 18px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.instagram .preview-media {
  aspect-ratio: 1;
}

.linkedin .preview-name {
  color: #0a66c2;
}

.facebook .preview-name {
  color: #1877f2;
}

@media (max-width: 1050px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .logs-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-frame {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
    margin: 12px;
    min-height: calc(100vh - 24px);
    border-radius: 24px;
  }

  .sidebar {
    padding: 18px;
  }

  .topbar,
  .page-heading,
  .toolbar-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .content-shell {
    padding: 16px;
  }

  .hero-panel .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-panel h2,
  .hero-panel p {
    max-width: calc(100vw - 140px);
  }

  .hero-panel .button {
    width: 100%;
  }

  .dashboard-metrics,
  .logs-summary-grid,
  .dashboard-panels,
  .grid,
  .row,
  .metrics-filter-row,
  .metrics-detail-grid,
  .editable-grid {
    grid-template-columns: 1fr;
  }

  .trend-row {
    grid-template-columns: 1fr;
  }

  .trend-row strong {
    text-align: left;
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tab,
  .button-row button,
  .button-row .button {
    width: 100%;
  }

  .client-card header,
  .post-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .platform-previews {
    grid-template-columns: 1fr;
  }

  .platform-post-body {
    grid-template-columns: 1fr;
  }

  .platform-media-column {
    max-width: 420px;
  }

  .preview-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Figma dashboard visual refresh. UI-only overrides; existing workflow classes remain intact. */
:root {
  color-scheme: light;
  --bg: #f4f7ff;
  --panel: #ffffff;
  --panel-2: #eef4ff;
  --text: #121338;
  --muted: #686b82;
  --line: #e7ebf5;
  --line-strong: #b8c6dc;
  --brand: #FF6E36;
  --brand-deep: #d95322;
  --brand-2: #0e63b6;
  --accent: #1b77d3;
  --bad: #df3045;
  --ok: #16a36f;
  --shadow: 0 22px 48px rgba(53, 84, 130, .12);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(244, 247, 255, .9)),
    radial-gradient(circle at 18% 24%, rgba(255, 110, 54, .11), transparent 24%),
    radial-gradient(circle at 78% 18%, rgba(40, 120, 220, .15), transparent 26%),
    #f4f7ff;
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

h1 {
  color: #3c3a55;
  font-size: 28px;
  font-weight: 500;
}

h2 {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

h3 {
  color: #555875;
  font-size: 14px;
  font-weight: 800;
}

p,
.status,
.muted {
  color: var(--muted);
}

.app-frame {
  grid-template-columns: 274px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(246, 248, 255, .92);
  box-shadow: none;
}

.sidebar {
  background: rgba(255, 255, 255, .94);
  color: var(--text);
  border-right: 1px solid var(--line);
  padding: 23px 23px;
}

.brand {
  gap: 12px;
  margin-bottom: 46px;
}

.brand-logo {
  position: relative;
  width: 26px;
  height: 26px;
  background: #111827;
  border: 0;
  box-shadow: none;
  color: transparent;
}

.brand-logo::before {
  content: "";
  position: absolute;
  inset: 5px 8px;
  border-radius: 2px 8px 2px 8px;
  background: linear-gradient(180deg, #FFB15F 0%, #FF6E36 100%);
  transform: rotate(45deg);
}

.brand-logo::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, .6);
  transform: translateX(-50%);
}

.brand strong {
  color: #17173d;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.brand span:last-child {
  color: #7d8198;
  font-size: 11px;
  letter-spacing: .08em;
}

.nav {
  gap: 8px;
}

.nav::before {
  content: "MAIN MENU";
  display: block;
  margin: 0 0 8px;
  color: #5e6279;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}

.nav a,
.nav-parent {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 42px;
  color: #44475f;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  padding: 11px 12px;
  font-size: 15px;
  font-weight: 500;
  transform: none;
  box-shadow: none;
}

.nav a:hover,
.nav-parent:hover {
  background: #f7faff;
  border-color: #c7d8ee;
  color: #0f5fae;
  transform: none;
  box-shadow: none;
}

.nav a.active,
.nav-group.active .nav-parent {
  background: #f7faff;
  border-color: #aac3df;
  color: #0e63b6;
  box-shadow: 0 8px 20px rgba(14, 99, 182, .08);
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-group {
  gap: 5px;
  border-radius: 14px;
}

.nav-group.active {
  background: transparent;
  padding: 0;
}

.sidebar .nav-parent {
  justify-content: flex-start;
}

.sidebar .nav-parent::after {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-color: currentColor;
  opacity: .55;
}

.nav-submenu {
  padding: 4px 0 4px 32px;
}

.nav-submenu a {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 14px;
}

.topbar {
  min-height: 74px;
  background: rgba(255, 255, 255, .76);
  border-bottom: 1px solid var(--line);
  padding: 22px 32px;
  backdrop-filter: blur(12px);
}

.top-title span {
  color: #7c8097;
}

.top-actions {
  color: var(--muted);
}

.content-shell {
  padding: 38px 32px 42px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .7), rgba(246, 249, 255, .92)),
    #f5f7ff;
}

.page-heading {
  margin-bottom: 26px;
}

section,
.card,
.panel,
.metric-card,
.snapshot-item,
.ops-item,
.post-row,
.platform-card,
.preview,
.log-row,
.metric {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 244, .95);
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(53, 84, 130, .08);
}

section,
.card,
.panel {
  padding: 20px;
}

.hero-panel {
  min-height: 188px;
  padding: 38px 28px;
  border: 0;
  border-radius: 22px;
  background:
    radial-gradient(circle at 85% 50%, rgba(255, 110, 54, .44), transparent 32%),
    radial-gradient(circle at 62% 48%, rgba(18, 62, 126, .7), transparent 34%),
    linear-gradient(102deg, #020308 0%, #081021 45%, #25132c 100%);
  box-shadow: 0 24px 48px rgba(15, 24, 48, .2);
}

.hero-panel::after {
  display: none;
}

.hero-panel h2 {
  max-width: 780px;
  color: #ffffff;
  font-size: 29px;
  font-weight: 800;
}

.hero-panel p {
  max-width: 960px;
  color: rgba(255, 255, 255, .72);
  font-size: 16px;
}

button,
.button {
  min-height: 40px;
  border-radius: 9px;
  border-color: #dbe3f0;
  background: #ffffff;
  color: #1f2546;
  padding: 10px 18px;
  font-weight: 750;
  box-shadow: none;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(53, 84, 130, .14);
}

.button.light,
.primary-warm,
.success {
  border-color: #FF6E36;
  background: #FF6E36;
  color: #ffffff;
}

.button.light:hover,
.primary-warm:hover,
.success:hover {
  background: #FF6E36;
}

.secondary {
  background: #7a3c26;
  border-color: #9b5539;
  color: #ffffff;
}

.gradient {
  background: linear-gradient(135deg, #8a3f27, #FF6E36);
  border-color: #FF6E36;
  color: #ffffff;
}

.danger {
  background: #df3045;
  border-color: #df3045;
}

.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 30px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.metric-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-height: 138px;
  padding: 18px 18px 16px;
}

.metric-card h3,
.metric-card > span {
  letter-spacing: 0;
  text-transform: none;
}

.metric-card h3 {
  color: #535671;
  margin-bottom: 12px;
  font-size: 14px;
}

.metric-value,
.metric-card > strong {
  margin: 0 0 22px;
  color: #090b35;
  font-size: 38px;
  font-weight: 700;
}

.metric-card p {
  margin: 0;
  color: #62667d;
  font-size: 13px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 10px;
  background: #edf4ff;
  color: #0e63b6;
}

.metric-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-panels {
  gap: 28px;
}

.tabs {
  gap: 10px;
}

.tab {
  border-radius: 10px;
  border-color: #dbe4f1;
  background: #ffffff;
  color: #4c526b;
}

.tab.active {
  background: #0e63b6;
  border-color: #0e63b6;
  color: #ffffff;
}

input,
textarea,
select {
  border-color: #dfe7f4;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
  border-color: #0e63b6;
  box-shadow: 0 0 0 4px rgba(14, 99, 182, .12);
}

.badge,
.pill {
  border-color: #dce5f2;
  background: #edf4ff;
  color: #31577f;
}

.badge.ok,
.pill.good {
  background: #e8f8f0;
  color: #11734f;
}

.badge.warn,
.pill.warn {
  background: #fff2e8;
  color: #aa4a1e;
}

.empty {
  border-color: #c9d7e8;
  background: #ffffff;
}

.preview-top,
.platform-post-header,
.metrics-table th {
  background: #f7faff;
}

.avatar {
  background: #0e63b6;
}

.preview {
  border-radius: 14px;
}

.preview-media {
  background: #eef4ff;
  border-color: #e1e9f5;
}

.login-panel {
  background: #ffffff;
  border-radius: 18px;
}

@media (max-width: 1050px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    overflow: visible;
  }
}

@media (max-width: 860px) {
  .app-frame {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    margin-bottom: 24px;
  }

  .topbar {
    padding: 18px;
  }

  .content-shell {
    padding: 20px 16px 28px;
  }

  .hero-panel {
    padding: 26px 20px;
  }

  .hero-panel h2 {
    font-size: 25px;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 126px;
  }
}

/* Figma page refresh for Clients Overview, All Clients, and Admin. */
.figma-page {
  display: grid;
  gap: 24px;
}

.figma-page-heading {
  position: relative;
  min-height: 154px;
  align-items: center;
  margin-bottom: 0;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 244, .95);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 34%, rgba(255, 110, 54, .22), transparent 27%),
    radial-gradient(circle at 63% 74%, rgba(14, 99, 182, .15), transparent 30%),
    #ffffff;
  box-shadow: 0 18px 42px rgba(53, 84, 130, .09);
}

.figma-page-heading::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -86px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(255, 110, 54, .12);
  pointer-events: none;
}

.figma-page-heading > * {
  position: relative;
  z-index: 1;
}

.figma-page-heading h1 {
  color: #111333;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -.03em;
}

.figma-page-heading .status {
  max-width: 620px;
  margin: 10px 0 0;
  color: #717790;
  font-size: 15px;
}

.figma-panel {
  padding: 24px;
  border-radius: 22px;
}

.figma-panel > h2 {
  margin-bottom: 18px;
  color: #111333;
  font-size: 22px;
  letter-spacing: -.02em;
}

.clients-overview-page > .metric-grid {
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 18px;
}

.overview-metric-card {
  min-height: 150px;
  border-radius: 20px;
  padding: 20px;
}

.overview-metric-card > div > span {
  display: block;
  margin-bottom: 13px;
  color: #616881;
  font-size: 14px;
  font-weight: 700;
}

.platform-status-panel .table-wrap {
  margin: 0 -6px -6px;
  padding: 0 6px 6px;
}

.data-table {
  overflow: hidden;
  border: 1px solid #e5edf7;
  border-radius: 18px;
  background: #ffffff;
}

.data-table th {
  background: #f6faff;
  color: #6c748d;
  font-size: 12px;
}

.data-table td {
  color: #242a45;
  font-weight: 650;
}

.data-table tbody tr:hover td {
  background: #fbfdff;
}

.client-stack {
  gap: 18px;
}

.figma-client-card {
  position: relative;
  gap: 18px;
  padding: 20px;
  border-radius: 22px;
  overflow: hidden;
}

.figma-client-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #0e63b6, #FF6E36);
  opacity: .85;
}

.figma-client-card header {
  align-items: center;
  justify-content: flex-start;
}

.figma-client-card header .pill,
.figma-client-card header button {
  margin-left: auto;
}

.client-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .6), transparent 28%),
    linear-gradient(135deg, #0e63b6, #10234d);
  color: #ffffff;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: .04em;
  box-shadow: 0 12px 24px rgba(14, 99, 182, .2);
}

.figma-client-card h3 {
  margin-bottom: 4px;
  color: #111333;
  font-size: 20px;
  font-weight: 800;
}

.mini-metrics {
  gap: 12px;
}

.mini-metrics div,
.detail-list div,
.admin-workspace-card .metric {
  border-color: #e5edf7;
  border-radius: 16px;
  background: #f8fbff;
}

.mini-metrics div {
  padding: 14px;
}

.mini-metrics strong,
.admin-workspace-card .metric strong {
  color: #111333;
  font-size: 28px;
}

.mini-metrics span,
.detail-list dt {
  color: #747d95;
}

.button-row {
  gap: 10px;
}

.all-clients-page .client-stack,
.admin-control-page .cards {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.all-clients-page .client-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
}

.all-client-card .detail-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.all-client-card .detail-list div {
  grid-template-columns: 1fr;
  gap: 3px;
  padding: 13px;
}

.all-client-card .detail-list dd {
  color: #18213b;
  font-weight: 750;
}

.all-client-card {
  gap: 0;
  padding: 0;
  border-radius: 16px;
  background: #ffffff;
}

.all-client-card::before {
  display: none;
}

.all-client-card-body {
  padding: 30px 28px 24px;
}

.all-client-card header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.all-client-card .client-avatar {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border-radius: 50%;
  background: #eaf0ff;
  color: #1f62d0;
  box-shadow: none;
  font-size: 22px;
  font-weight: 500;
}

.all-client-card h3 {
  margin: 0;
  color: #11103d;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
}

.all-client-card .client-email {
  margin-top: 2px;
  color: #858585;
  font-size: 16px;
  line-height: 1.2;
}

.all-client-card header .pill {
  margin-left: auto;
  border-color: #7ef0a2;
  border-radius: 12px;
  background: #dfffe8;
  color: #1f3926;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
}

.client-platform-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.client-platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border-radius: 7px;
  background: #efefef;
  color: #111111;
  padding: 5px 10px;
  font-size: 16px;
  line-height: 1;
}

.platform-icon {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 3px;
  color: #ffffff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.platform-icon.instagram {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1' y1='1' y2='0'%3E%3Cstop offset='0' stop-color='%23feda75'/%3E%3Cstop offset='.28' stop-color='%23fa7e1e'/%3E%3Cstop offset='.55' stop-color='%23d62976'/%3E%3Cstop offset='.78' stop-color='%239624fb'/%3E%3Cstop offset='1' stop-color='%234f5bd5'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='24' height='24' rx='5' fill='url(%23g)'/%3E%3Cg fill='none' stroke='white' stroke-width='2'%3E%3Crect x='6.3' y='6.3' width='11.4' height='11.4' rx='3.4'/%3E%3Ccircle cx='12' cy='12' r='3.1'/%3E%3C/g%3E%3Ccircle cx='16.3' cy='7.8' r='1.2' fill='white'/%3E%3C/svg%3E");
}

.platform-icon.facebook {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='24' height='24' rx='3' fill='%231877f2'/%3E%3Cpath fill='white' d='M14.1 8.2h2.1V5h-2.7c-3 0-4.1 1.8-4.1 4v2H7v3.3h2.4V22h3.5v-7.7h2.8l.5-3.3h-3.3V9.3c0-.8.3-1.1 1.2-1.1Z'/%3E%3C/svg%3E");
}

.platform-icon.linkedin {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='24' height='24' rx='3' fill='%230a66c2'/%3E%3Cpath fill='white' d='M5.2 9h3.1v10H5.2V9Zm1.6-4.8a1.8 1.8 0 1 1 0 3.6 1.8 1.8 0 0 1 0-3.6ZM10.2 9h3v1.4h.1c.4-.8 1.5-1.7 3.1-1.7 3.3 0 3.9 2.2 3.9 5V19h-3.1v-4.7c0-1.1 0-2.6-1.6-2.6s-1.8 1.2-1.8 2.5V19h-3.1V9Z'/%3E%3C/svg%3E");
}

.platform-icon.x {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='24' height='24' rx='3' fill='%23111111'/%3E%3Cpath fill='white' d='M14.2 10.6 20 4h-2.2l-4.6 5.3L9.5 4H4l6.1 8.6L4 20h2.2l4.9-5.7 4 5.7H20l-5.8-9.4Zm-1.8 2.1-.7-1L7 5.8h1.5l3.8 5.4.7 1 4.9 6h-1.5l-4-5.5Z'/%3E%3C/svg%3E");
}

/* Seven-day publishing calendar. */
.publishing-calendar {
  min-width: 0;
  overflow: hidden;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.calendar-toolbar h2 {
  margin: 2px 0 0;
  color: #111333;
  font-size: 24px;
}

.calendar-eyebrow {
  margin: 0;
  color: #737a92;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-today,
.calendar-arrow {
  min-height: 42px;
  border: 1px solid #dbe4f2;
  border-radius: 8px;
  background: #ffffff;
  color: #151735;
}

.calendar-today {
  padding: 8px 16px;
}

.calendar-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  padding: 0;
}

.calendar-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-legend {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
  color: #737a92;
  font-size: 13px;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.calendar-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.calendar-legend .scheduled {
  background: #ff6e36;
}

.calendar-legend .planned {
  background: #c83535;
}

.calendar-legend .approved {
  background: #1972c9;
}

.calendar-legend .published {
  background: #16845b;
}

.calendar-scroll {
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  min-width: 1190px;
  border: 1px solid #e3e9f3;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.calendar-day {
  min-height: 520px;
  border-right: 1px solid #e8edf5;
}

.calendar-day:last-child {
  border-right: 0;
}

.calendar-day > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 15px;
  border-bottom: 1px solid #e8edf5;
  background: #f8faff;
}

.calendar-day > header span {
  color: #737a92;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.calendar-day > header strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #151735;
  font-size: 16px;
}

.calendar-day.today > header strong {
  background: #ff6e36;
  color: #ffffff;
}

.calendar-day-events {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 12px;
}

.calendar-day-empty {
  padding: 20px 4px;
  color: #a0a6b8;
  font-size: 13px;
  text-align: center;
}

.calendar-event {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid #e0e6f0;
  border-left: 4px solid #ff6e36;
  border-radius: 8px;
  background: #fff7f3;
  color: #151735;
  text-decoration: none;
}

.calendar-event.planned {
  border-left-color: #c83535;
  background: #fff2f2;
}

.calendar-event.approved {
  border-left-color: #1972c9;
  background: #f1f7ff;
}

.calendar-event.published {
  border-left-color: #16845b;
  background: #f0fbf6;
}

.calendar-event:hover {
  border-color: #bfcce0;
  box-shadow: 0 7px 18px rgba(45, 67, 104, .1);
}

.calendar-event .platform-icon {
  width: 20px;
  height: 20px;
}

.calendar-event-title {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .calendar-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-actions {
    align-self: stretch;
  }

  .calendar-today {
    flex: 1;
  }
}

.client-brand-line {
  margin: 0 0 26px;
  color: #111111;
  font-size: 16px;
}

.client-brand-line strong {
  font-weight: 800;
}

.client-metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.client-metric-tile {
  min-height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid #f0e7e7;
  border-radius: 9px;
  background: #fffbfb;
}

.client-metric-tile strong {
  color: #11103d;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

.client-metric-tile span {
  color: #11103d;
  font-size: 16px;
  text-align: center;
}

.client-updated {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #111111;
  font-size: 16px;
}

.client-updated span {
  width: 21px;
  height: 21px;
  border: 1.8px solid #111111;
  border-radius: 4px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='5'/%3E%3Cpath d='M12 10v3l2 1'/%3E%3Cpath d='M8 3v3M16 3v3M4 8h16'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

.client-updated strong {
  font-weight: 800;
}

.all-client-card > .button-row {
  margin: 0;
  padding: 24px 28px;
  border-top: 1px solid #eeeeee;
}


.admin-danger-panel {
  border-color: rgba(255, 110, 54, .24);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 110, 54, .12), transparent 26%),
    #ffffff;
}

.admin-danger-panel .toolbar-row {
  padding: 14px 16px;
  border: 1px solid #ffe0d2;
  border-radius: 16px;
  background: #fff7f2;
}

.admin-danger-panel .toolbar-row .status {
  color: #8c4b2f;
  font-weight: 650;
}

.admin-workspace-card {
  gap: 18px;
  padding: 28px 14px 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-workspace-card::before {
  display: none;
}

.admin-workspace-card header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.admin-workspace-card .client-avatar {
  width: 62px;
  height: 62px;
  flex-basis: 62px;
  border-radius: 50%;
  background: #eaf0ff;
  color: #1f62d0;
  box-shadow: none;
  font-size: 23px;
  font-weight: 700;
}

.admin-workspace-card h3 {
  margin: 4px 0 3px;
  color: #11103d;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.1;
}

.admin-workspace-card .client-email {
  margin: 0;
  color: #766f80;
  font-size: 20px;
  line-height: 1.2;
}

.admin-workspace-card .delete-workspace {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: #fff1f1;
  color: #111111;
  padding: 6px 13px;
  font-size: 16px;
  font-weight: 500;
  box-shadow: none;
}

.admin-workspace-card .delete-workspace::before {
  content: "";
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ff0000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3Cpath d='M6 7l1 14h10l1-14'/%3E%3Cpath d='M9 7V4h6v3'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.admin-workspace-card .delete-workspace:hover {
  border: 0;
  background: #ffe8e8;
  color: #111111;
  box-shadow: none;
  transform: none;
}

.admin-client-url {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #3172ff;
  font-size: 16px;
}

.admin-client-url::before {
  content: "";
  width: 27px;
  height: 27px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%233172ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a13 13 0 0 1 0 18M12 3a13 13 0 0 0 0 18'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.admin-metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 20px;
}

.admin-metric-tile {
  min-height: 124px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid #f0e7e7;
  border-radius: 9px;
  background: #fffbfb;
}

.admin-metric-tile strong {
  color: #11103d;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

.admin-metric-tile span {
  max-width: 96px;
  color: #11103d;
  font-size: 16px;
  line-height: 1.15;
  text-align: center;
}

.admin-platform-panel {
  display: grid;
  gap: 12px;
  margin: 0 -14px;
  padding: 17px 20px 13px;
  border: 1px solid #f0e7e7;
  border-radius: 9px;
  background: #fffbfb;
}

.admin-platform-panel strong {
  color: #11103d;
  font-size: 17px;
  font-weight: 500;
}

.admin-platform-panel .client-platform-chips {
  margin: 0;
  gap: 8px;
}

.admin-workspace-card .client-updated {
  margin: 4px 0 0;
  padding-bottom: 0;
  font-size: 18px;
}

@media (max-width: 1180px) {
  .clients-overview-page > .metric-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  .figma-page-heading {
    display: grid;
    min-height: auto;
    padding: 22px;
  }

  .figma-page-heading h1 {
    font-size: 30px;
  }

  .figma-page-heading .button {
    width: 100%;
    justify-content: center;
  }

  .clients-overview-page > .metric-grid,
  .all-clients-page .client-stack,
  .admin-control-page .cards,
  .client-metric-row,
  .admin-metric-row,
  .all-client-card .detail-list,
  .admin-workspace-card .metric-grid {
    grid-template-columns: 1fr;
  }

  .figma-client-card header,
  .admin-workspace-card .post-row {
    grid-template-columns: 1fr;
  }

  .figma-client-card header {
    align-items: flex-start;
  }

  .figma-client-card header .pill,
  .figma-client-card header button {
    margin-left: 0;
  }

  .all-client-card header {
    flex-wrap: wrap;
  }

  .all-client-card > .button-row {
    padding: 22px;
  }
}

/* Button color unification requested across all dashboard pages. */
button,
.button,
.button.light,
.primary-warm,
.success,
.secondary,
.gradient,
.danger,
.logout-button,
.button-row button,
.button-row .button {
  border-color: #FF6E36;
  background: #FF6E36;
  color: #ffffff;
}

button:hover,
.button:hover,
.button.light:hover,
.primary-warm:hover,
.success:hover,
.secondary:hover,
.gradient:hover,
.danger:hover,
.logout-button:hover,
.button-row button:hover,
.button-row .button:hover {
  border-color: #FF6E36;
  background: #FF6E36;
  color: #ffffff;
}

button:disabled,
.button:disabled {
  border-color: #FF6E36;
  background: #FF6E36;
  color: #ffffff;
  opacity: .58;
}

/* All Clients card buttons follow the supplied outline-button reference. */
.all-client-card .button-row {
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}

.all-client-card .button-row .button {
  width: 152px;
  min-width: 0;
  min-height: 43px;
  justify-content: center;
  border: 1.5px solid #FF6E36;
  border-radius: 11px;
  background: #ffffff;
  color: #101010;
  padding: 9px 14px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: none;
  white-space: nowrap;
}

.all-client-card .button-row .button:hover {
  border-color: #FF6E36;
  background: #fff7f3;
  color: #101010;
  box-shadow: none;
  transform: none;
}

.all-client-card .delete-client {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: auto;
  min-height: 36px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #101010;
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  white-space: nowrap;
}

.all-client-card .delete-client::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background-color: #ffe8ea;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ff0000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3Cpath d='M6 7l1 14h10l1-14'/%3E%3Cpath d='M9 7V4h6v3'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 17px 17px;
}

.all-client-card .delete-client:hover {
  border: 0;
  background: #fff5f5;
  color: #101010;
  box-shadow: none;
  transform: none;
}

/* Generate Posts, Posts, Custom Post, Metrics, and Logs visual refresh. */
.generate-posts-page,
.posts-section-page,
.custom-post-page,
.metrics-page,
.logs-page {
  gap: 24px;
}

.generate-command-panel,
.generate-context-panel,
.posts-dashboard-panel,
.custom-post-form-panel,
.custom-post-preview-panel,
.metrics-filter-panel,
.metrics-trend-card,
.metrics-sync-card,
.metrics-table-card,
.logs-panel {
  border-radius: 22px;
  background: #ffffff;
}

.generate-command-panel {
  position: relative;
  overflow: hidden;
}

.generate-command-panel::after {
  content: "";
  position: absolute;
  right: -82px;
  top: -96px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255, 110, 54, .1);
  pointer-events: none;
}

.generate-command-panel > * {
  position: relative;
  z-index: 1;
}

.generate-command-panel h2,
.generate-context-panel h2 {
  color: #11103d;
  font-size: 22px;
  letter-spacing: -.02em;
}

.generate-command-panel .row {
  gap: 16px;
}

.generate-command-panel label {
  color: #11103d;
  font-size: 14px;
  font-weight: 800;
}

.generate-command-panel textarea {
  min-height: 138px;
}

#generateStatus .notice-box,
#generateStatus {
  margin-top: 14px;
}

.generate-context-panel .card-list {
  display: grid;
  gap: 16px;
}

.generate-client-summary,
.generate-notes-row {
  border-radius: 18px;
  background: #f8fbff;
  box-shadow: none;
}

.generate-client-summary {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.generate-client-summary strong {
  color: #11103d;
  font-size: 22px;
}

.generate-context-metrics {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 16px;
}

.generate-context-metric {
  min-height: 128px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border-color: #f0e7e7;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 110, 54, .09), transparent 35%),
    #fffbfb;
}

.generate-context-metric strong {
  color: #11103d;
  font-size: 38px;
  font-weight: 850;
}

.generate-context-metric .status {
  color: #11103d;
  font-size: 15px;
  text-align: center;
}

.generate-notes-row {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.generate-notes-row strong {
  color: #11103d;
}

.posts-toolbar {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #e8eef8;
  border-radius: 18px;
  background: #f8fbff;
}

.posts-toolbar label {
  color: #11103d;
  font-size: 14px;
  font-weight: 800;
}

.posts-section-page .tabs {
  gap: 11px;
  margin-bottom: 20px;
}

.posts-section-page .tab {
  min-height: 42px;
  border: 1px solid #e1e9f5;
  border-radius: 12px;
  background: #ffffff;
  color: #1e2844;
  padding: 10px 16px;
  font-weight: 800;
}

.posts-section-page .tab.active {
  border-color: #FF6E36;
  background: #fff5ef;
  color: #c74616;
}

.approval-list {
  gap: 22px;
}

.approval-card {
  border-radius: 22px;
  padding: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 110, 54, .08), transparent 24%),
    #ffffff;
}

.approval-card > .post-header {
  align-items: center;
  margin: -2px 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf1f7;
}

.approval-card > .post-header h3 {
  margin: 0 0 6px;
  color: #11103d;
  font-size: 22px;
  font-weight: 800;
}

.approval-card .platform-previews {
  gap: 18px;
}

.platform-post-row,
.custom-platform-editor .preview {
  border: 1px solid #e8eef8;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(53, 84, 130, .07);
}

.platform-post-header,
.preview-top {
  border-radius: 18px 18px 0 0;
  background: #f8fbff;
}

.platform-post-heading h4,
.preview-name {
  color: #11103d;
  font-weight: 800;
}

.platform-content-column,
.preview-body {
  background: #ffffff;
}

.decision-note,
.publish-panel {
  margin-top: 18px;
}

.publish-panel {
  border: 1px solid #e8eef8;
  border-radius: 18px;
  background: #f8fbff;
}

.custom-post-form-panel .row,
.custom-post-form-panel .editable-grid,
.metrics-filter-panel .metrics-filter-row {
  gap: 16px;
}

.custom-post-form-panel label,
.metrics-filter-panel label {
  color: #11103d;
  font-size: 14px;
  font-weight: 800;
}

.checks label {
  min-height: 34px;
  border: 1px solid #e1e9f5;
  border-radius: 999px;
  background: #f8fbff;
  padding: 7px 12px;
  color: #1e2844;
}

.checks input[type="checkbox"] {
  accent-color: #FF6E36;
}

.custom-post-preview-panel > h2 {
  color: #11103d;
  font-size: 22px;
}

.custom-platform-editor {
  border-radius: 20px;
}

.custom-platform-editor .preview {
  overflow: hidden;
}

.custom-platform-editor .media-picker {
  padding: 16px;
}

.custom-platform-editor .preview-body {
  padding: 0 16px 16px;
}

.metrics-filter-panel {
  padding: 20px;
}

.figma-metrics-section {
  display: grid;
  gap: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.metrics-overview {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 18px;
  overflow-x: visible;
}

.metrics-kpi-card {
  min-height: 132px;
  display: grid;
  gap: 12px;
  align-content: center;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 110, 54, .1), transparent 34%),
    #ffffff;
}

.metrics-kpi-card strong {
  color: #626a84;
  font-size: 14px;
  font-weight: 800;
}

.metrics-kpi-card span {
  color: #11103d;
  font-size: 34px;
  font-weight: 850;
}

.metrics-detail-grid {
  gap: 22px;
}

.metrics-trend-card h3,
.metrics-sync-card h3,
.metrics-table-card h3 {
  color: #11103d;
  font-size: 22px;
}

.trend-row {
  border: 1px solid #edf1f7;
  border-radius: 14px;
  background: #f8fbff;
  padding: 10px 12px;
}

.trend-row > div {
  background: #e8eef8;
}

.trend-row i {
  background: linear-gradient(90deg, #0e63b6, #FF6E36);
}

.metrics-sync-card .post-row {
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: none;
}

.metrics-table-card {
  overflow: hidden;
}

.metrics-table th {
  background: #f8fbff;
  color: #69748d;
}

.metrics-table td {
  color: #222842;
}

.logs-page .figma-page-heading {
  align-items: flex-start;
}

.logs-page .toolbar-row.tight {
  align-items: center;
  margin: 0;
}

.logs-summary-grid {
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 18px;
}

.logs-summary-card {
  min-height: 150px;
}

.logs-summary-card > div > span {
  display: block;
  margin-bottom: 12px;
  color: #626a84;
  font-size: 14px;
  font-weight: 800;
}

.logs-summary-card > div > strong {
  display: block;
  margin-bottom: 14px;
  color: #11103d;
  font-size: 36px;
  font-weight: 850;
}

.logs-panel {
  padding: 24px;
}

.logs-panel-head {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf1f7;
}

.logs-panel-head h2 {
  color: #11103d;
  font-size: 22px;
}

.logs-list {
  display: grid;
  gap: 12px;
}

.log-row {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(53, 84, 130, .07);
}

.log-row.good {
  border-color: rgba(22, 163, 111, .28);
}

.log-row.bad {
  border-color: rgba(223, 48, 69, .28);
}

.log-event {
  color: #11103d;
}

.log-meta {
  gap: 8px;
}

.log-meta span {
  border: 1px solid #e8eef8;
  border-radius: 999px;
  background: #f8fbff;
  padding: 5px 9px;
}

.log-row summary {
  color: #FF6E36;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .metrics-overview,
  .logs-summary-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  .metrics-overview,
  .logs-summary-grid,
  .metrics-detail-grid,
  .generate-command-panel .row,
  .generate-context-metrics,
  .metrics-filter-panel .metrics-filter-row,
  .custom-post-form-panel .row,
  .custom-post-form-panel .editable-grid {
    grid-template-columns: 1fr;
  }

  .logs-page .toolbar-row.tight {
    width: 100%;
  }

  .logs-page .toolbar-row.tight select,
  .logs-page .toolbar-row.tight button {
    width: 100%;
  }
}

/* Model Bakeoff */
.model-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.model-check {
  align-items: flex-start;
  border: 1px solid var(--line, #e8d9be);
  border-radius: 12px;
  padding: 12px;
}
.model-check small {
  display: block;
  color: var(--muted, #746a5f);
  font-size: 12px;
  margin-top: 4px;
}
.bakeoff-actions {
  margin-top: 18px;
}
.bakeoff-results {
  display: grid;
  gap: 18px;
}
.bakeoff-result-card {
  border: 1px solid var(--line, #e8d9be);
  border-radius: 16px;
  padding: 18px;
  background: rgba(255,255,255,0.72);
}
.bakeoff-result-card header,
.bakeoff-run-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.bakeoff-meta,
.bakeoff-validation {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
  color: var(--muted, #746a5f);
}
.bakeoff-posts {
  display: grid;
  gap: 14px;
}
.bakeoff-post-preview {
  border: 1px dashed var(--line, #e8d9be);
  border-radius: 14px;
  padding: 14px;
}
.bakeoff-post-preview .post-description {
  max-height: 220px;
  overflow: auto;
  white-space: normal;
}
.bakeoff-validation .error {
  color: #b42318;
  font-weight: 700;
}
.bakeoff-validation .warning {
  color: #a15c00;
  font-weight: 700;
}
.bakeoff-validation .success {
  color: #057a45;
  font-weight: 700;
}
.review-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.review-box textarea {
  min-height: 80px;
}

/* Keep social connection actions compact inside platform cards. */
.platform-card .button-row {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.platform-card .button-row button,
.platform-card > button,
.platform-card .connect-social,
.platform-card .disconnect-social,
.platform-card .sync-previous-posts,
#savePlatforms {
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 10px 16px;
  white-space: normal;
  line-height: 1.15;
}

.platform-card .status {
  overflow-wrap: anywhere;
}
.metrics-note {
  display: block;
  margin-top: 6px;
  max-width: 420px;
  color: #a43f2d;
  font-size: 12px;
  line-height: 1.4;
}
.task-message {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #cfdbee;
  border-radius: 8px;
  background: #f6f9fe;
  color: #27334d;
}

.task-message:empty {
  display: none;
}

.task-message p {
  margin: 6px 0 0;
}

.task-message.success {
  border-color: #9bd7b1;
  background: #effaf3;
  color: #175d32;
}

.task-message.warning {
  border-color: #efcf85;
  background: #fff9e9;
  color: #704e08;
}

.task-message.error {
  border-color: #efaaaa;
  background: #fff2f2;
  color: #8b2424;
}

.top-title .notification-bell > span {
  display: block;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 18px;
  text-transform: none;
}
.format-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 18px;
}

.format-selector label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line, #dce6f5);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.format-selector input {
  width: auto;
  margin: 0;
}

.post-format-label {
  margin: 10px 0;
  color: var(--muted, #667085);
}

.carousel-slide-list {
  display: grid;
  gap: 14px;
  width: 100%;
}

.internal-fields {
  margin: 22px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border, #dfe5ef);
  border-bottom: 1px solid var(--border, #dfe5ef);
}

.internal-fields h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
}

.draft-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid #dfe5ef;
  border-bottom: 1px solid #dfe5ef;
}

.draft-toolbar label,
.draft-meta span {
  display: grid;
  gap: 7px;
}

.draft-list {
  display: grid;
}

.draft-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(360px, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid #dfe5ef;
}

.draft-main h2 {
  margin: 8px 0 7px;
  font-size: 1.12rem;
  font-weight: 600;
}

.draft-main p,
.draft-meta span {
  color: #687086;
}

.draft-state {
  color: #8b5b00;
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
}

.draft-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px 18px;
  font-size: .85rem;
}

.draft-meta strong {
  color: #171b2f;
  font-weight: 600;
}

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

.draft-empty {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 7px;
  text-align: center;
}

@media (max-width: 1100px) {
  .draft-row { grid-template-columns: 1fr; gap: 16px; }
  .draft-actions { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .draft-toolbar, .draft-meta { grid-template-columns: 1fr; }
}

.carousel-media-editor {
  display: grid;
  gap: 12px;
}

.carousel-multi-picker {
  width: max-content;
  max-width: 100%;
}

.carousel-sort-list {
  display: grid;
  gap: 10px;
}

.carousel-sort-item {
  display: grid;
  grid-template-columns: 28px 30px 88px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 6px;
  background: #fff;
  cursor: grab;
}

.carousel-sort-item.dragging {
  opacity: .5;
}

.carousel-sort-item img {
  width: 88px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
}

.carousel-sort-item .carousel-slide-number {
  position: static;
}

.carousel-drag-handle {
  color: #667085;
  font-size: 22px;
  line-height: 1;
}

.carousel-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-file-remove {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

@media (max-width: 640px) {
  .carousel-sort-item {
    grid-template-columns: 24px 28px 64px minmax(0, 1fr) 36px;
  }

  .carousel-sort-item img {
    width: 64px;
    height: 64px;
  }
}

.carousel-slide-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line, #dce6f5);
  border-radius: 8px;
  background: #fff;
}

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

.carousel-slide-card.dragging {
  opacity: .5;
}

.carousel-slide-number {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #101828;
  color: #fff;
  font-weight: 700;
}

.carousel-media-frame {
  min-height: 220px;
}

.carousel-media-picker {
  width: 100%;
}

.carousel-slide-card textarea {
  width: 100%;
}

.knowledge-guide {
  margin: 14px 0 24px;
  padding: 18px 20px;
  border: 1px solid var(--line, #dce6f5);
  border-left: 4px solid var(--primary, #1769c2);
  border-radius: 6px;
  background: #f7f9fc;
}

.knowledge-guide h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.knowledge-guide > p {
  margin: 0 0 14px;
  color: var(--muted, #667085);
}

.knowledge-guide ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.knowledge-guide li {
  padding-left: 4px;
  line-height: 1.45;
}

.knowledge-guide li::marker {
  color: var(--primary, #1769c2);
  font-weight: 800;
}

@media (min-width: 1100px) {
  .carousel-slide-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .format-selector {
    display: grid;
  }

  .format-selector label {
    width: 100%;
  }
}
.linkedin-mention-picker {
  margin-top: 18px;
  position: relative;
}

.mention-results {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid transparent;
}

.mention-results:not(:empty) {
  border-color: #dfe6f2;
  background: #fff;
  padding: 6px;
}

button.mention-result {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 0;
  padding: 10px 12px;
  border: 0;
  background: #fff;
  color: #171936;
  text-align: left;
}

button.mention-result:hover,
button.mention-result:focus-visible {
  background: #f3f7fd;
}

.mention-result span,
.mention-search-state {
  color: #6d7188;
  font-size: 13px;
}

.mention-search-state {
  padding: 10px 12px;
}

.mention-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid #cddcf0;
  background: #f3f7fd;
  color: #171936;
  font-size: 14px;
}

.mention-chip small {
  color: #6d7188;
}

.mention-chip button {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6d7188;
  font-size: 20px;
  line-height: 1;
}

.inbox-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}

.inbox-toolbar > div { min-width: 0; }
.inbox-account-summary { display: grid; gap: 7px; padding-bottom: 10px; }
.inbox-account-summary span { color: var(--muted, #667085); font-size: 13px; }
.inbox-status { margin: 18px 0; }
.inbox-view { margin-top: 18px; }
.inbox-view .section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.inbox-view .section-heading h2 { margin-bottom: 4px; }
.inbox-filters { min-width: 180px; }
.inbox-comment-list { display: grid; gap: 18px; }
.inbox-comment-thread { border-top: 1px solid #dfe6f2; padding-top: 18px; }
.inbox-comment-thread:first-child { border-top: 0; padding-top: 0; }
.inbox-post-context { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 0; }
.inbox-post-context > div { display: grid; gap: 4px; min-width: 0; }
.inbox-post-context a { width: fit-content; font-size: 13px; }
.platform-badge.linkedin { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; background: #0a66c2; color: #fff; font-weight: 700; }
.inbox-comment { padding: 16px; background: #f7f9fc; border-left: 3px solid #cbd7e8; }
.inbox-comment.reply { margin: 10px 0 0 28px; background: #fff; }
.comment-meta { display: flex; justify-content: space-between; gap: 12px; color: #667085; font-size: 13px; }
.inbox-comment p { margin: 9px 0 0; white-space: pre-wrap; line-height: 1.5; }
.comment-reply-form { display: grid; gap: 8px; margin: 14px 0 0 28px; }
.comment-reply-form textarea { min-height: 86px; }
.comment-reply-form > div { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.reply-status { color: #667085; font-size: 13px; }
.inbox-restricted-state { max-width: 720px; padding: 28px 0; }
.inbox-restricted-state p { color: #667085; line-height: 1.55; }

@media (max-width: 800px) {
  .inbox-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .inbox-toolbar button { width: 100%; }
  .inbox-view .section-heading { align-items: stretch; flex-direction: column; }
  .inbox-comment.reply, .comment-reply-form { margin-left: 14px; }
}

.credit-banner {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 1px;
  margin: 0 0 20px;
  border: 1px solid #dfe6f2;
  background: #dfe6f2;
}

.credit-banner > div,
.billing-summary-grid > div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: #fff;
}

.credit-banner strong,
.billing-summary-grid strong { color: #171936; font-size: 20px; font-weight: 600; }
.credit-banner span,
.billing-summary-grid span { color: #6d7188; font-size: 13px; }

.billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  border: 1px solid #dfe6f2;
  background: #dfe6f2;
}

.table-scroll { width: 100%; overflow-x: auto; }
.credit-ledger-table { min-width: 900px; width: 100%; border-collapse: collapse; }
.credit-ledger-table th, .credit-ledger-table td { padding: 10px 12px; border-bottom: 1px solid #dfe6f2; text-align: left; font-size: 13px; }

.ai-media-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dfe6f2;
}
.ai-media-panel textarea { min-height: 76px; }

.media-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  padding: 18px;
  overflow-y: auto;
}
.media-library-item { display: grid; gap: 8px; padding: 8px; background: #fff; color: #171936; border: 1px solid #dfe6f2; }
.media-library-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.media-library-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 800px) {
  .credit-banner, .billing-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
