@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Outfit:wght@400;500;600;700&display=swap");

/*
  VibeCurb visual-redesign surgery layer.
  Loaded after the existing styles so removing this file and its links
  returns LaunchTracker to the pre-surgery visual layer.
*/

:root {
  --gold-bg: #fafaf9;
  --gold-surface: #ffffff;
  --gold-surface-2: #f5f4f2;
  --gold-surface-3: #eeece8;
  --gold-text: #1a1a1a;
  --gold-text-2: #6b6862;
  --gold-text-3: #96928a;
  --gold-accent: #a94f32;
  --gold-accent-hover: #863b24;
  --gold-accent-soft: #f8eae4;
  --gold-accent-rgb: 169, 79, 50;
  --gold-border: rgba(54, 45, 38, 0.1);
  --gold-border-strong: rgba(54, 45, 38, 0.18);
  --gold-shadow-color: rgba(54, 38, 28, 0.08);

  --gold-font-display: "Outfit", system-ui, sans-serif;
  --gold-font-body: "Inter", system-ui, sans-serif;
  --gold-font-mono: "JetBrains Mono", monospace;

  --gold-space-1: 0.5rem;
  --gold-space-2: 0.75rem;
  --gold-space-3: 1rem;
  --gold-space-4: 1.5rem;
  --gold-space-5: 2rem;
  --gold-space-6: 3rem;

  --gold-radius-sm: 8px;
  --gold-radius-md: 12px;
  --gold-radius-lg: 16px;
  --gold-radius-full: 9999px;

  --gold-shadow-sm: 0 1px 2px rgba(54, 38, 28, 0.05);
  --gold-shadow-md: 0 12px 32px rgba(54, 38, 28, 0.08);
  --gold-shadow-lg: 0 28px 80px rgba(54, 38, 28, 0.18);

  --gold-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gold-ease-snap: cubic-bezier(0.22, 1, 0.36, 1);
  --gold-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --bg: var(--gold-bg);
  --panel: var(--gold-surface);
  --panel-soft: var(--gold-surface-2);
  --sidebar-bg: var(--gold-surface);
  --text: var(--gold-text);
  --muted: var(--gold-text-2);
  --faint: var(--gold-text-3);
  --accent: var(--gold-accent);
  --accent-strong: var(--gold-accent-hover);
  --accent-soft: var(--gold-accent-soft);
  --accent-border: rgba(var(--gold-accent-rgb), 0.34);
  --active-nav: var(--gold-accent-soft);
  --nav: var(--gold-surface-2);
  --nav-strong: var(--gold-border-strong);
  --nav-soft: var(--gold-bg);
  --nav-border: var(--gold-border);
  --nav-text: var(--gold-text);
  --cta-bg: var(--gold-accent);
  --cta-bg-hover: var(--gold-accent-hover);
  --cta-border: var(--gold-accent);
  --cta-border-hover: var(--gold-accent-hover);
  --cta-text: #ffffff;
  --action-bg: var(--gold-accent);
  --action-bg-hover: var(--gold-accent-hover);
  --action-border: var(--gold-accent);
  --action-border-hover: var(--gold-accent-hover);
  --action-text: #ffffff;
  --project-bg: var(--gold-accent-soft);
  --project-bg-hover: #f4dfd6;
  --project-bg-active: #efd2c6;
  --project-border: rgba(var(--gold-accent-rgb), 0.22);
  --project-border-hover: rgba(var(--gold-accent-rgb), 0.34);
  --project-border-active: rgba(var(--gold-accent-rgb), 0.46);
  --border: var(--gold-border);
  --border-strong: var(--gold-border-strong);
  --radius-action: var(--gold-radius-full);
  --radius-control: var(--gold-radius-sm);
  --radius-card: var(--gold-radius-md);
  --shadow-soft: var(--gold-shadow-sm);
  --shadow: var(--gold-shadow-md);
  --shadow-popover: var(--gold-shadow-md);
  --shadow-modal: var(--gold-shadow-lg);
  --focus-ring: 0 0 0 3px rgba(var(--gold-accent-rgb), 0.16);
}

/* Layer 2: typography */
html,
body {
  font-family: var(--gold-font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--gold-text);
}

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

h1,
h2,
h3,
h4,
h5,
h6,
.metric-value {
  font-family: var(--gold-font-display);
  color: var(--gold-text);
  text-wrap: balance;
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand h1 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.project-title-row h2,
#currentProjectName {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.drawer-title h3,
.edit-modal-title,
.confirm-title,
.campaign-dialog h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.settings-page-head h4 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
}

.settings-card h5,
.settings-card-title-row h5 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.metric-title {
  font-family: var(--gold-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.metric-value {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.menu-label,
.sheet-table th,
.eyebrow {
  font-family: var(--gold-font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.build-version,
.settings-count,
.platform-pill {
  font-family: var(--gold-font-mono);
}

p {
  max-width: 65ch;
}

/* Layer 3: color usage */
body {
  background-color: var(--gold-bg);
  color: var(--gold-text);
}

::selection {
  background: var(--gold-accent-soft);
  color: var(--gold-text);
}

.btn.primary,
.btn.sidebar-auth-action,
#quickAddSiteBtn {
  background: var(--gold-accent);
  border-color: var(--gold-accent);
  color: #ffffff;
}

.btn.primary:hover,
.btn.sidebar-auth-action:hover,
#quickAddSiteBtn:hover {
  background: var(--gold-accent-hover);
  border-color: var(--gold-accent-hover);
  color: #ffffff;
}

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

.brand-logo svg path:first-child {
  fill: var(--gold-accent-soft);
}

.brand-logo svg path:last-child {
  fill: #f2d8ce;
  stroke: var(--gold-accent);
}

.project-button.active,
.workspace-nav-button.active,
.category-button.active,
.view-button.active,
.campaign-segmented button.active {
  background: var(--gold-accent-soft);
  border-color: rgba(var(--gold-accent-rgb), 0.22);
  color: var(--gold-text);
}

.control-panel .category-button.active,
.views-topbar .category-button.active,
.canvas-view-toggle .view-button.active,
.campaign-segmented button.active {
  background: var(--gold-accent-soft);
  border-color: rgba(var(--gold-accent-rgb), 0.22);
  color: var(--gold-text);
}

.metric-card.active {
  background: color-mix(in srgb, var(--gold-surface) 82%, var(--gold-accent-soft));
  border-color: rgba(var(--gold-accent-rgb), 0.34);
  box-shadow: 0 0 0 1px rgba(var(--gold-accent-rgb), 0.08), var(--gold-shadow-md);
}

.help-page a,
.legal-page a,
.text-link {
  color: var(--gold-accent-hover);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Layer 4: spacing and layout rhythm */
:root {
  --control-height: 44px;
  --pill-height: 44px;
}

.app.controlled-ui {
  grid-template-columns: 264px minmax(0, 1fr);
}

.app.controlled-ui .sidebar {
  width: 264px;
  padding: 24px 18px;
  gap: 24px;
}

.content,
.project-bar,
.campaign-body,
.drawer-body,
.settings-panels,
.settings-section,
.settings-card {
  min-width: 0;
}

.project-bar {
  padding: 32px clamp(24px, 3vw, 40px) 0;
  gap: 24px;
}

.project-heading,
.project-tools,
.views-topbar,
.filters-topbar {
  gap: 12px;
}

.stats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.stats::-webkit-scrollbar {
  display: none;
}

.metric-card {
  flex: 1 0 120px;
  min-height: 64px;
  height: 64px;
  padding: 10px 14px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-title {
  font-size: 0.75rem;
  font-weight: 600;
}

.metric-value {
  flex: 0 0 auto;
  font-size: 1.65rem;
}

.control-panel {
  padding: 14px;
  gap: 12px;
}

.filters-topbar .search-wrap,
.filters-topbar .filter-toggle,
.filters-topbar .sort-control .category-button,
.canvas-view-toggle .view-toggle,
.project-tools > .btn,
.input,
.btn {
  min-height: var(--control-height);
}

.sheet-view,
.grid {
  margin: 0;
  padding: 24px clamp(24px, 3vw, 40px) 48px;
}

.sheet-view {
  max-width: 100%;
  overflow-x: auto;
}

.sheet-table {
  min-width: 880px;
  width: 100%;
}

.sheet-table th,
.sheet-table td {
  padding: 16px;
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.campaign-body {
  padding: 28px clamp(24px, 3vw, 40px) 48px;
  gap: 20px;
}

.campaign-layout,
.listening-layout {
  gap: 20px;
}

.content-board,
.channel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.content-column {
  min-height: 280px;
  padding: 20px;
}

.channel-card,
.settings-card {
  padding: 24px;
  gap: 18px;
}

.drawer-body {
  gap: 28px;
  padding: 28px;
}

.admin-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.settings-users-list,
.admin-summary-grid,
.settings-user-row,
.admin-user-row {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 1100px) {
  .app.controlled-ui {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .app.controlled-ui .sidebar {
    width: 232px;
  }

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

@media (max-width: 760px) {
  .project-bar {
    padding: 24px 16px 0;
    gap: 18px;
  }

  .campaign-body,
  .sheet-view,
  .grid {
    padding: 20px 16px 32px;
  }

  .stats,
  .campaign-layout,
  .listening-layout,
  .content-board,
  .channel-grid,
  .admin-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-card {
    min-height: 64px;
    height: 64px;
    padding: 10px 14px;
  }

  .control-panel {
    padding: 12px;
  }

  .drawer-body {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 16px;
  }

  .settings-card,
  .channel-card {
    padding: 20px;
  }

  .settings-user-row,
  .admin-user-row {
    overflow-wrap: anywhere;
  }
}

/* Layer 5: components */
.btn {
  padding: 0 20px;
  border: 1px solid var(--gold-border);
  border-radius: var(--gold-radius-full);
  background: transparent;
  color: var(--gold-text);
  font-family: var(--gold-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  box-shadow: none;
  cursor: pointer;
  transition:
    transform 0.4s var(--gold-ease-snap),
    box-shadow 0.4s var(--gold-ease-snap),
    background-color 0.3s var(--gold-ease-out),
    border-color 0.3s var(--gold-ease-out),
    color 0.3s var(--gold-ease-out);
}

.btn.btn {
  border-radius: var(--gold-radius-full);
}

.btn.compact,
.sheet-action,
.sheet-open {
  min-height: 36px;
  padding-inline: 14px;
}

.btn:hover:not(:disabled) {
  transform: none;
  box-shadow: 0 8px 20px var(--gold-shadow-color);
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

.btn.nav,
.btn:not(.primary):not(.danger) {
  background: rgba(255, 255, 255, 0.62);
  border-color: var(--gold-border);
  color: var(--gold-text);
}

.btn.nav:hover,
.btn:not(.primary):not(.danger):hover {
  background: var(--gold-surface);
  border-color: var(--gold-border-strong);
}

.btn.danger {
  background: #8f342e;
  border-color: #8f342e;
  color: #ffffff;
}

.input,
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  padding: 0 14px;
  border: 1px solid var(--gold-border);
  border-radius: var(--gold-radius-sm);
  background: var(--gold-surface);
  color: var(--gold-text);
  box-shadow: none;
  transition:
    border-color 0.3s var(--gold-ease-snap),
    box-shadow 0.3s var(--gold-ease-snap),
    background-color 0.3s var(--gold-ease-snap);
}

textarea {
  min-height: 112px;
  padding-block: 12px;
}

.input:focus,
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--gold-accent);
  box-shadow: var(--focus-ring);
}

.filters-topbar .search-wrap:focus-within {
  border-color: var(--gold-accent);
  box-shadow: var(--focus-ring);
}

.project-button,
.category-button,
.workspace-nav-button,
.settings-menu-button,
.view-button,
.campaign-segmented button {
  border-radius: var(--gold-radius-full);
  transition:
    transform 0.3s var(--gold-ease-snap),
    background-color 0.3s var(--gold-ease-snap),
    border-color 0.3s var(--gold-ease-snap),
    color 0.3s var(--gold-ease-snap);
}

.project-button:hover,
.category-button:hover,
.workspace-nav-button:hover,
.settings-menu-button:hover,
.view-button:hover,
.campaign-segmented button:hover {
  transform: none;
}

.card,
.metric-card,
.settings-card,
.content-column,
.channel-card,
.control-panel,
.sheet-table {
  border: 1px solid var(--gold-border);
  background: var(--gold-surface);
}

.card,
.metric-card,
.settings-card,
.content-column,
.channel-card {
  border-radius: var(--gold-radius-md);
}

.card {
  height: auto;
  min-height: 340px;
  box-shadow: none;
  transition:
    transform 0.4s var(--gold-ease-snap),
    box-shadow 0.4s var(--gold-ease-snap),
    border-color 0.3s var(--gold-ease-snap);
}

.card:hover,
.metric-card:hover {
  transform: none;
  border-color: var(--gold-border-strong);
  box-shadow: var(--gold-shadow-md);
}

.settings-card,
.content-column,
.channel-card {
  box-shadow: var(--gold-shadow-sm);
  transition:
    transform 0.4s var(--gold-ease-snap),
    box-shadow 0.4s var(--gold-ease-snap),
    border-color 0.3s var(--gold-ease-snap);
}

.settings-card:hover,
.content-column:hover,
.channel-card:hover,
.help-card:hover,
.help-mini-card:hover,
.legal-card:hover,
.contact-row:hover {
  transform: none;
  border-color: var(--gold-border-strong);
  box-shadow: var(--gold-shadow-md);
}

.channel-mark {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(var(--gold-accent-rgb), 0.22);
  border-radius: 10px;
  background: var(--gold-accent-soft);
  color: var(--gold-accent-hover);
  font-family: var(--gold-font-display);
  font-size: 1rem;
  font-weight: 600;
}

.channel-status {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--gold-border);
  border-radius: var(--gold-radius-full);
  background: var(--gold-surface-2);
  color: var(--gold-text-2);
}

.control-panel,
.sheet-table {
  border-radius: var(--gold-radius-md);
  box-shadow: var(--gold-shadow-sm);
}

.platform-pill,
.settings-count,
.category-count,
.project-count,
.status-pill,
.priority-pill {
  border-radius: var(--gold-radius-full);
}

.sheet-table {
  border-collapse: separate;
  border-spacing: 0;
}

.sheet-table th {
  color: var(--gold-text-3);
  background: var(--gold-surface-2);
  border-bottom-color: var(--gold-border);
}

.sheet-table td {
  color: var(--gold-text);
  border-bottom-color: rgba(54, 45, 38, 0.06);
}

.sheet-row:hover td {
  background: rgba(var(--gold-accent-rgb), 0.035);
}

.confirm-modal,
.edit-modal,
.campaign-dialog,
.drawer {
  border-radius: var(--gold-radius-lg);
  box-shadow: var(--gold-shadow-lg);
}

.edit-modal,
.confirm-modal,
.campaign-dialog {
  border: 1px solid var(--gold-border);
  background: var(--gold-surface);
}

.help-card,
.help-mini-card,
.legal-card,
.contact-row,
.status-item {
  border: 1px solid var(--gold-border);
  border-radius: var(--gold-radius-md);
  background: var(--gold-surface);
  box-shadow: var(--gold-shadow-sm);
  transition:
    transform 0.4s var(--gold-ease-snap),
    box-shadow 0.4s var(--gold-ease-snap),
    border-color 0.3s var(--gold-ease-snap);
}

.content-column:nth-child(even),
.settings-section > .settings-card:nth-of-type(even),
.help-card:nth-of-type(even) {
  background: color-mix(in srgb, var(--gold-surface) 72%, var(--gold-surface-2));
}

.help-card,
.legal-card {
  padding: clamp(24px, 4vw, 32px);
}

.help-back,
.legal-back {
  border-radius: var(--gold-radius-full);
  border-color: var(--gold-border);
  background: rgba(255, 255, 255, 0.62);
  color: var(--gold-accent-hover);
  transition:
    transform 0.4s var(--gold-ease-snap),
    box-shadow 0.4s var(--gold-ease-snap),
    background-color 0.3s var(--gold-ease-out);
}

.help-back:hover,
.legal-back:hover {
  transform: none;
  background: var(--gold-surface);
  box-shadow: 0 8px 20px var(--gold-shadow-color);
}

.sheet-actions,
.sheet-row:hover .sheet-actions,
.sheet-row:focus-within .sheet-actions,
.sheet-row.active .sheet-actions {
  transform: none;
}

/* Listening needs reading width, clear hierarchy, and preserved excerpt breaks. */
#listeningView .campaign-body {
  max-width: none;
  padding-inline: 28px;
}

@media (min-width: 1101px) {
  #listeningView .listening-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.listening-item {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 20px 0;
}

#listeningView .listening-layout,
#listeningView .settings-card,
#listeningView .listening-feed {
  min-width: 0;
}

#listeningView .listening-feed {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 1400px) {
  .app.controlled-ui {
    grid-template-columns: 317px minmax(0, 1fr);
  }

  .app.controlled-ui .sidebar {
    width: 317px;
  }

  #listeningView .listening-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 50px;
    row-gap: 50px;
    align-items: start;
  }

  #listeningView .listening-item:nth-child(2) {
    border-top: 0;
  }
}

.listening-item-head {
  display: grid;
  justify-items: start;
  justify-content: start;
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.listening-item-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.listening-item .listening-match-term {
  border: 1px solid #bfd5e5;
  background: #eaf3f8;
  color: #2f6483;
}

.listening-item h4 {
  margin-top: 14px;
  font-size: 1.0625rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.listening-item .listening-item-excerpt {
  max-width: 92ch;
  white-space: pre-line;
  color: var(--gold-text-2);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.listening-item-foot {
  justify-content: flex-start;
}

.listening-item-actions {
  justify-content: flex-start;
  gap: 16px;
}

/* Layer 6: atmosphere */
body {
  background:
    radial-gradient(ellipse at 28% 0%, rgba(211, 132, 94, 0.18) 0%, transparent 48%),
    radial-gradient(ellipse at 88% 18%, rgba(238, 204, 171, 0.14) 0%, transparent 38%),
    var(--gold-bg);
  background-attachment: fixed;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.content {
  background: transparent;
}

.app.controlled-ui .sidebar {
  background: rgba(255, 255, 255, 0.76);
  border-right: 1px solid var(--gold-border);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 12px 0 40px rgba(54, 38, 28, 0.035);
}

.drawer-backdrop,
.confirm-backdrop,
.edit-backdrop,
.campaign-dialog-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Layer 7: motion */
@keyframes gold-enter-up {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.gold-motion-ready .gold-reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
}

.gold-motion-ready .gold-reveal.is-visible {
  animation: gold-enter-up 0.7s var(--gold-ease-out) both;
  animation-delay: var(--gold-stagger, 0ms);
}

a,
button,
[role="button"],
input,
select,
textarea,
.card,
.metric-card,
.nav-link,
.platform-pill,
.status-pill {
  transition-timing-function: var(--gold-ease-snap);
}

/* Text links use the accent; sidebar navigation and footer links stay neutral. */
.app a,
.app .text-button,
.app .listening-item-actions button {
  color: var(--gold-accent);
}

.app a:hover,
.app .text-button:hover,
.app .listening-item-actions button:hover {
  color: var(--gold-accent-hover);
}

.app .sidebar a {
  color: inherit;
}

.app .sidebar a:hover {
  color: var(--gold-text);
}

*,
*::before,
*::after {
  transition-timing-function: var(--gold-ease-snap);
}

@media (prefers-reduced-motion: reduce) {
  .gold-reveal,
  .gold-reveal.is-visible {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  body.settings-open.settings-admin-open .drawer-body {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    overflow-x: hidden;
  }

  body.settings-admin-open .settings-menu,
  body.settings-admin-open .settings-panels,
  body.settings-admin-open #adminSettingsPanel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.settings-admin-open #adminSettingsPanel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  .app.controlled-ui {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 100vh;
  }

  .app.controlled-ui .sidebar {
    position: sticky;
    top: 0;
    width: 220px;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--gold-border);
    border-bottom: 0;
  }

  .content {
    display: block;
  }
}

@media (max-width: 760px) {
  .btn.compact,
  .sheet-action,
  .sheet-open,
  .text-button,
  .category-button,
  .settings-menu-button,
  .view-button,
  .campaign-segmented button {
    min-height: 44px;
  }

  .app.controlled-ui .workspace-nav-button,
  .app.controlled-ui .project-button,
  .app.controlled-ui .sidebar-add-project-link {
    min-height: 44px;
  }
}

/* Post-Op correction: compact desktop site rows without changing mobile cards. */
@media (min-width: 761px) {
  .sheet-table th {
    padding: 12px;
  }

  .sheet-table td {
    padding: 5px 12px;
  }

  .sheet-table td:last-child {
    padding-right: 12px;
  }

  .sheet-priority,
  .sheet-channel,
  .sheet-status,
  .sheet-date-control {
    min-height: 32px;
    height: 32px;
    font-size: 0.8125rem;
  }

  .sheet-priority,
  .sheet-channel,
  .sheet-status {
    padding: 0 12px;
    border-radius: var(--gold-radius-full);
  }

  .sheet-priority {
    min-width: 48px;
  }
}

/* Post-Op correction: compact, rectangular workspace controls. */
.menu-label {
  font-family: var(--gold-font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-text-2);
}

.sheet-table th,
.eyebrow {
  font-size: 12px;
  color: var(--gold-text-2);
}

.app.controlled-ui .project-button,
.app.controlled-ui .workspace-nav-button {
  border-radius: 6px;
}

@media (min-width: 761px) {
  .control-panel {
    padding: 10px;
    gap: 8px;
  }

  .filters-topbar {
    gap: 12px;
  }

  .filters-topbar .search-wrap,
  .filters-topbar .filter-toggle,
  .filters-topbar .sort-control .category-button,
  .canvas-view-toggle .view-toggle,
  .canvas-view-toggle .view-button {
    min-height: 32px;
    height: 32px;
  }

  .filters-topbar .search-wrap {
    flex-basis: 260px;
    min-width: 240px;
    max-width: 320px;
    gap: 8px;
    padding: 0 10px;
    border-radius: 6px;
  }

  .filters-topbar .search-wrap input,
  .filters-topbar .search-wrap input:focus {
    min-height: 0;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .filters-topbar .filter-panel[data-filter-panel="channel"] {
    flex-basis: 180px;
    min-width: 180px;
  }

  .filters-topbar .filter-panel[data-filter-panel="pricing"] {
    flex-basis: 180px;
    min-width: 180px;
  }

  .filters-topbar .filter-toggle {
    display: flex;
    grid-template-columns: none;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 10px;
    border-radius: 6px;
  }

  .filters-topbar .filter-toggle-value {
    flex: 0 1 auto;
    max-width: none;
    text-align: left;
    white-space: nowrap;
  }

  .filters-topbar .filter-options {
    top: calc(100% + 4px);
    width: 100%;
    min-width: 100%;
    padding: 4px;
    border-radius: 6px;
  }

  .filters-topbar .filter-options .category-button {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 4px;
    transform: none;
  }

  .filters-topbar .filter-options .category-name {
    white-space: nowrap;
  }

  .filters-topbar .filter-options .category-count {
    flex: 0 0 auto;
  }

  .filters-topbar .sort-control {
    flex-basis: 160px;
    min-width: 160px;
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 6px;
  }

  .filters-topbar .sort-control .category-button {
    padding: 0 10px;
    border-radius: 6px;
    transform: none;
  }

  .canvas-view-toggle .view-toggle {
    border-radius: 6px;
  }

  .canvas-view-toggle .view-button {
    padding: 0 12px;
    border-radius: 0;
    transform: none;
  }

  .canvas-view-toggle .view-button:first-child {
    border-radius: 5px 0 0 5px;
  }

  .canvas-view-toggle .view-button:last-child {
    border-radius: 0 5px 5px 0;
  }
}

/* Final statistics correction: always compact and horizontal. */
.app.controlled-ui .stats,
.app.controlled-ui .campaign-metrics {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 8px !important;
  overflow-x: auto;
}

.app.controlled-ui .stats > .metric-card,
.app.controlled-ui .campaign-metrics > .metric-card {
  flex: 1 0 120px !important;
  min-width: 120px !important;
  min-height: 64px !important;
  height: 64px !important;
  padding: 10px 14px !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.app.controlled-ui .stats .metric-title,
.app.controlled-ui .campaign-metrics .metric-title {
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
}

.app.controlled-ui .stats .metric-value,
.app.controlled-ui .campaign-metrics .metric-value {
  font-size: 1.65rem !important;
  line-height: 1 !important;
}

/* Destinations controls live directly on the canvas, not inside another card. */
#destinationsView .control-panel {
  padding: 0 !important;
  gap: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Destination row actions remain available without requiring hover. */
#destinationsView .sheet-actions {
  opacity: 1;
  transform: none;
}

@media (min-width: 761px) {
  #destinationsView .sheet-actions {
    gap: 5px;
  }

  #destinationsView .sheet-action {
    min-height: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 4px;
    line-height: 1;
  }

  #destinationsView .sheet-open {
    color: #101214;
  }
}
