/* Shared Cerebral visual language, loaded after each page's base styles. */
:root {
  --accent: #ed9b67;
  --accent-dark: #ffa66b;
}
.dashboard-page {
  --dash-sidebar: #101010;
  --dash-surface: #101010;
  --dash-panel: #202020;
  --dash-panel-soft: #242424;
  --dash-field: #262626;
  --dash-border: #ffffff24;
  --dash-muted: #aaa;
  --dash-cyan: #ed9b67;
  background: #101010;
  color: #fff;
}
.dashboard-page .sidebar-brand img,
.dashboard-page .mobile-brand img {
  content: url('/images/brand/cerebral-logo.svg');
  width: 48px;
  height: 26px;
  filter: none;
}
.dashboard-page .sidebar-nav a {
  color: #aaa;
}
.dashboard-page .sidebar-nav a.active {
  color: #f49b69;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.dashboard-page .sidebar-nav a.active .nav-icon {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(74%) sepia(24%) saturate(1333%) hue-rotate(328deg) brightness(101%)
    contrast(91%);
}
.dashboard-page .sidebar-nav a:hover {
  color: #ed9b67;
}
.cerebral-page-hero {
  background:
    linear-gradient(to bottom, #10101000 35%, #10101080 70%, #101010 100%),
    linear-gradient(90deg, #101010dc, #1010109c),
    url('/images/brand/city-background.webp') center/cover;
  border-radius: 0;
  padding: 28px 38px 35px;
  margin: -46px -68px 12px;
}
.cerebral-breadcrumb {
  color: #bbb;
  font-size: 13px;
  margin: 0 0 30px;
}
.cerebral-eyebrow {
  color: #bbb;
  font-size: 11px;
  letter-spacing: 2px;
  margin: 0;
}
.cerebral-page-hero h1 {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -1.4px;
  font-weight: 500;
  margin: 12px 0 11.7px;
}
.cerebral-hero-description {
  font-size: 18px;
  color: #bbb;
  margin: 0;
}
.dashboard-page .dashboard-panel,
.dashboard-page .dashboard-metrics article,
.dashboard-page .agent-overview article,
.dashboard-page .comment-summary-card,
.dashboard-page .social-platform-card {
  background: linear-gradient(180deg, #242424, #1c1c1c);
  border: 1px solid #ffffff24;
  border-radius: 24px;
}
.dashboard-page .dashboard-media-card,
.dashboard-page .dashboard-reply-card {
  background: #242424;
  border: 1px solid #ffffff24;
  border-radius: 16px;
  overflow: hidden;
}
.dashboard-page .dashboard-media-card img,
.dashboard-page .dashboard-media-card video {
  border-radius: 14px;
}
.dashboard-page button.primary,
.dashboard-page a.primary {
  background: #eee;
  border-color: #eee;
  color: #161616;
  font-weight: 400;
}
.dashboard-page button.primary:hover,
.dashboard-page a.primary:hover {
  background: #fff;
}
.dashboard-page button.secondary,
.dashboard-page button.ghost {
  background: transparent;
  border-color: #ffffff40;
  color: #ddd;
  font-weight: 400;
}
.dashboard-page button.secondary:hover,
.dashboard-page button.ghost:hover {
  color: #ed9b67;
  border-color: #ed9b67;
}
.dashboard-page input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
.dashboard-page select,
.dashboard-page textarea {
  background: #262626;
  color: #eee;
  border-color: #ffffff30;
}
.dashboard-page :is(input, select, textarea, button, a):focus-visible {
  outline: 2px solid #ed9b67;
  outline-offset: 4px;
}
.dashboard-page .calendar-controls a,
.dashboard-page .calendar-today-link {
  border-radius: 999px;
}
.dashboard-page .calendar-day.is-today {
  background: #ffffff08;
}
.dashboard-page .calendar-post {
  background: #292929;
  border-color: #ffffff30;
  border-radius: 10px;
}
.dashboard-page .modal-card {
  background: #202020;
  border: 1px solid #ffffff30;
  border-radius: 24px;
}
.auth-page {
  background: #101010;
  color: #fff;
}
.auth-page .auth-panel {
  background: #191919;
}
.auth-page .auth-logo {
  content: url('/images/brand/cerebral-logo.svg');
  width: 48px;
  height: 26px;
  filter: none;
  object-fit: contain;
}
.auth-page .auth-form input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #ffffff55;
  border-radius: 0;
  color: #fff;
}
.auth-page .auth-form input:focus-visible {
  outline: 2px solid #ed9b67;
  outline-offset: 4px;
}
.auth-page .auth-form .primary,
.auth-page .trial-link {
  border-radius: 999px;
  font-weight: 400;
}
.auth-page .auth-text-link:hover {
  color: #ed9b67;
}
@media (max-width: 1100px) {
  .cerebral-page-hero {
    margin: -46px -68px 12px;
  }
}
@media (max-width: 900px) {
  .cerebral-page-hero {
    margin: 0 0 12px;
    padding: 24px 20px;
  }
  .cerebral-page-hero h1 {
    font-size: 44px;
  }
}
.auth-page .auth-image-panel > img {
  content: url('/images/brand/city-background.webp');
  object-fit: cover;
  filter: brightness(0.65);
}
.dashboard-page .dashboard-shell {
  max-width: none;
}
@media (max-width: 900px) {
  .dashboard-page .dashboard-shell {
    transition:
      transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .dashboard-page:has(.mobile-nav-toggle:checked) .dashboard-shell {
    transform: translateX(calc(-1 * min(84vw, 340px)));
    filter: brightness(0.4);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-page .dashboard-shell {
    transition: none;
  }
}

/* Keep headers compact, with consistent artwork and content spacing. */
.dashboard-page .cerebral-page-hero,
.posts-page .posts-hero {
  box-sizing: border-box;
  min-height: 0;
  align-self: start;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.dashboard-page .dashboard-shell { align-content: start; }
@media (max-width: 900px) {
  .dashboard-page .cerebral-page-hero {
    margin: 0 -18px 12px;
    padding: 24px 20px;
  }
}


/* Align dashboard cards with the hero text gutters. */
.dashboard-page .dashboard-home-shell {
  padding-left: 38px;
  padding-right: 38px;
}
.dashboard-home-shell .cerebral-page-hero {
  margin-left: -38px;
  margin-right: -38px;
}
@media (max-width: 900px) {
  .dashboard-page .dashboard-home-shell {
    padding-left: 20px;
    padding-right: 20px;
  }
  .dashboard-page .dashboard-home-shell .cerebral-page-hero {
    margin-left: -20px;
    margin-right: -20px;
  }
}

/* Shared content gutters align every section with its header. */
.dashboard-page .dashboard-shell:not(.posts-shell) {
  padding-left: 38px;
  padding-right: 38px;
}
.dashboard-page .dashboard-shell > .cerebral-page-hero {
  margin-left: -38px;
  margin-right: -38px;
}
@media (max-width: 900px) {
  .dashboard-page .dashboard-shell:not(.posts-shell) {
    padding-left: 20px;
    padding-right: 20px;
  }
  .dashboard-page .dashboard-shell > .cerebral-page-hero {
    margin-left: -20px;
    margin-right: -20px;
  }
}

.dashboard-page .dashboard-home-shell > .cerebral-page-hero {
  padding-bottom: 16px;
  margin-bottom: 0;
}

.dashboard-page .dashboard-shell > .cerebral-page-hero,
.dashboard-page.posts-page .posts-shell > .posts-hero {
  padding-bottom: 16px;
  margin-bottom: 0;
}

/* Extend the artwork behind section content without increasing header height. */
.dashboard-page .dashboard-shell {
  background-color: #101010;
  background-image:
    linear-gradient(to bottom, #10101000 25%, #10101080 65%, #101010 100%),
    linear-gradient(90deg, #101010dc, #1010109c),
    url('/images/brand/city-background.webp');
  background-size: 100% 720px, 100% 720px, auto 720px;
  background-position: center top;
  background-repeat: no-repeat;
}
.dashboard-page .dashboard-shell > .cerebral-page-hero,
.dashboard-page.posts-page .posts-shell > .posts-hero {
  background: transparent;
}
@media (max-width: 760px) {
  .dashboard-page .dashboard-shell {
    background-size: 100% 560px, 100% 560px, auto 560px;
  }
}

/* Translucent content surfaces let the workspace artwork show through. */
.dashboard-page .dashboard-shell :is(
  .dashboard-panel:not(.posts-list-panel),
  .dashboard-metrics article,
  .agent-overview article,
  .comment-summary-card,
  .social-platform-card,
  .scheduled-post-row
) {
  background: linear-gradient(180deg, #28282880, #18181899);
  border-color: #ffffff24;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px #00000014;
}
.dashboard-page .dashboard-shell :is(
  .dashboard-media-card,
  .dashboard-reply-card,
  .dashboard-empty-state,
  .comment-card,
  .calendar-day,
  .story-card
) {
  background: #22222255;
  border-color: #ffffff24;
}
.dashboard-page .calendar-day.is-outside-month { background: #10101040; }

.dashboard-page .sidebar-brand { margin-bottom: 27.04px; }
@media (max-width: 900px) {
  .dashboard-page .sidebar-brand { margin-bottom: 40.56px; }
}

.dashboard-home-page .dashboard-overview-panel {
  padding: 16px;
  gap: 12px;
}
.dashboard-home-page .dashboard-overview-heading {
  padding-bottom: 12px;
}
.dashboard-home-page .dashboard-overview-heading h2,
.dashboard-home-page .dashboard-overview-heading > a {
  font-weight: 500;
}

/* Match the top and side insets of every section header. */
.dashboard-page .dashboard-shell > .cerebral-page-hero,
.dashboard-page.posts-page .posts-shell > .posts-hero {
  padding-top: 38px;
}
.dashboard-page .cerebral-page-hero h1,
.dashboard-page.posts-page .posts-hero h1 {
  margin-top: 0;
}
.dashboard-page.posts-page .posts-hero-heading {
  align-items: flex-start;
}
.dashboard-page.posts-page .posts-heading-actions {
  align-self: flex-start;
  margin-top: 0;
}
@media (max-width: 900px) {
  .dashboard-page .dashboard-shell > .cerebral-page-hero {
    padding-top: 20px;
  }
}
@media (max-width: 760px) {
  .dashboard-page.posts-page .posts-shell > .posts-hero {
    padding-top: 20px;
  }
}

.section-hero-with-actions { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.section-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dashboard-page .section-hero-actions a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  min-width: 140px;
  padding: 11px 22px;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  border: 1px solid #ffffff50;
  border-radius: 999px;
  background: #ffffff0d;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.dashboard-page .section-hero-actions a:hover { color: #ed9b67; }

.campaign-action-arrow {
  display: inline-block;
  transform: translateX(-15%);
  margin-right: 0.3em;
}

.dashboard-page .section-hero-actions a,
.dashboard-page.posts-page .posts-heading-actions button {
  font-weight: 500;
}

/* Medium typography for pill actions throughout the workspace. */
.dashboard-page.dashboard-page :is(
  button.primary, button.secondary, button.ghost,
  a.primary, a.secondary,
  .section-hero-actions a,
  .posts-heading-actions button,
  .post-drawer-actions button,
  .carousel-add-files,
  .calendar-controls a,
  .calendar-today-link,
  .actions button,
  .action-recheck,
  .scheduled-post-actions button
),
.auth-page .auth-form .primary,
.auth-page .trial-link {
  font-weight: 500;
}

/* Consistent dropdowns, including a fully styled native picker where supported. */
body.dashboard-page.dashboard-page select {
  appearance: none;
  color-scheme: dark;
  background-color: #1b1b1b;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23cccccc' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  border: 1px solid #ffffff40;
  border-radius: 6px;
  padding: 11px 44px 11px 16px;
  color: #eee;
  cursor: pointer;
}
body.dashboard-page.dashboard-page select:focus-visible {
  border-color: #ed9b67;
  outline: 1px solid #ed9b67;
  outline-offset: 2px;
}
body.dashboard-page.dashboard-page select:disabled { opacity: .5; cursor: not-allowed; }
@supports (appearance: base-select) {
  body.dashboard-page.dashboard-page select,
  body.dashboard-page.dashboard-page select::picker(select) {
    appearance: base-select;
  }
  body.dashboard-page.dashboard-page select {
    background-image: none;
    padding-right: 16px;
    gap: 20px;
  }
  body.dashboard-page.dashboard-page select::picker-icon {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #ccc;
    border-bottom: 1.5px solid #ccc;
    rotate: 45deg;
    margin-left: auto;
    margin-right: 3px;
    margin-top: -4px;
    flex-shrink: 0;
  }
  body.dashboard-page.dashboard-page select::picker(select) {
    margin-top: 6px;
    padding: 6px;
    background: #202020;
    color: #eee;
    border: 1px solid #ffffff40;
    border-radius: 8px;
    box-shadow: 0 12px 32px #0007;
    max-height: 320px;
    overflow-y: auto;
  }
  body.dashboard-page.dashboard-page select option {
    padding: 10px 12px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #eee;
    font: inherit;
    cursor: pointer;
    gap: 10px;
  }
  body.dashboard-page.dashboard-page select option:is(:hover, :focus) {
    background: #ffffff0d;
    color: #fff;
    outline: none;
  }
  body.dashboard-page.dashboard-page select option:checked {
    background: #ed9b671f;
    color: #ffb584;
    font-weight: 500;
  }
  body.dashboard-page.dashboard-page select option::checkmark { color: #ed9b67; }
  body.dashboard-page.dashboard-page select option:disabled { opacity: .45; cursor: not-allowed; }
}

@supports (appearance: base-select) {
  body.dashboard-page.dashboard-page select option::checkmark {
    display: none;
  }
  body.dashboard-page.dashboard-page select option {
    gap: 0;
  }
}

@supports (appearance: base-select) {
  body.dashboard-page.dashboard-page select {
    align-items: center;
  }
  body.dashboard-page.dashboard-page select::picker-icon {
    width: 16px;
    height: 16px;
    border: 0;
    rotate: none;
    margin: 0 0 0 auto;
    align-self: center;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23cccccc' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  }
}

/* Cerebral sign-in: one continuous backdrop and a restrained glass form. */
.auth-page.login-page {
  background: linear-gradient(90deg, #10101085, #101010b8),
    linear-gradient(0deg, #101010, #10101000 70%),
    url('/images/brand/city-background.webp') center / cover fixed;
}
.login-page .auth-shell {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 56px clamp(24px, 5vw, 72px);
  min-height: 100svh;
}
.login-brand-panel { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-width: 0; }
.login-brand { display: inline-flex; align-items: center; gap: 16px; color: #fff; text-decoration: none; font-size: 18px; font-weight: 500; }
.login-brand img { width: 48px; height: 26px; }
.login-brand-copy h1 { margin: 0 0 24px; font-size: clamp(40px, 4.7vw, 68px); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; }
.login-brand-copy p { color: #ccc; font-size: 20px; line-height: 1.5; margin: 0; }
.login-brand-note { color: #aaa; font-size: 14px; margin: 0; }
.login-page .auth-panel {
  background: linear-gradient(180deg, #28282899, #181818b3);
  border: 1px solid #ffffff24;
  border-radius: 24px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  width: 100%; min-width: 0; max-width: none;
  min-height: 0; padding: 36px; gap: 28px;
  box-shadow: 0 16px 60px #0003;
}
.login-page .auth-intro { gap: 10px; width: 100%; }
.login-page .auth-intro h2 { margin: 0; font-size: 32px; font-weight: 500; line-height: 1.15; letter-spacing: -.025em; }
.login-page .auth-intro p { margin: 0; color: #bbb; font-size: 16px; line-height: 1.5; }
.login-page .auth-form { width: 100%; gap: 10px; }
.login-page .auth-form label { color: #ccc; font-size: 14px; font-weight: 500; }
.login-page .auth-form label:not(:first-child) { margin-top: 10px; }
.login-page .auth-form input { width: 100%; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid #ffffff40; border-radius: 6px; background: #10101033; font-size: 16px; }
.login-page .auth-form .password-field input { padding-right: 48px; }
.login-page .auth-form input:focus-visible { border-color: #ed9b67; outline: 1px solid #ed9b67; outline-offset: 2px; }
.login-page .auth-form .primary,
.login-page .trial-link { height: 46px; padding: 0 22px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; background: #ffffff08; color: #fff; font-size: 16px; font-weight: 500; text-decoration: none; }
.login-page .auth-form .primary { margin-top: 14px; border: 1px solid #ed9b67; }
.login-page .auth-form .primary:hover, .login-page .trial-link:hover { color: #ffb584; background: #ed9b6714; border-color: #ed9b67; }
.login-signup { border-top: 1px solid #ffffff20; padding-top: 22px; display: grid; gap: 12px; }
.login-signup p { text-align: center; color: #aaa; font-size: 14px; margin: 0; }
.login-page .trial-link { width: 100%; border: 1px solid #ffffff40; }
.login-page .alert { margin: 0; border: 1px solid #ee747470; border-radius: 6px; padding: 12px 14px; color: #ffd4d4; background: #8e252533; font-size: 14px; }
.login-page a:focus-visible, .login-page button:focus-visible { outline: 2px solid #ed9b67; outline-offset: 4px; }
@media (max-width: 900px) {
  .login-page .auth-shell { grid-template-columns: 1fr; max-width: 560px; gap: 28px; padding: 32px 24px; align-content: center; }
  .login-brand-panel { gap: 24px; }
  .login-brand-copy h1 { font-size: 38px; margin-bottom: 12px; }
  .login-brand-copy p { font-size: 16px; }
  .login-brand-note { display: none; }
  .login-page .auth-panel { padding: 28px; }
}
@media (max-width: 480px) {
  .login-page .auth-shell { padding: 24px 20px; }
  .login-page .auth-panel { padding: 24px 20px; border-radius: 18px; }
  .login-brand-copy h1 { font-size: 36px; }
}

/* Minimal sign-in layout: logo above a centered form. */
.login-page .auth-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  max-width: none;
  padding: 100px 24px;
}
.login-page .login-brand-panel {
  position: absolute;
  top: 36px;
  left: 38px;
  display: block;
}
.login-page .auth-panel { max-width: 460px; }
@media (max-width: 600px) {
  .login-page .auth-shell { padding: 90px 20px; }
  .login-page .login-brand-panel { top: 28px; left: 24px; }
}

.login-page .auth-intro h2 {
  font-size: 56px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -1.4px;
}
.login-page .auth-form input {
  background: transparent;
  border: 1px solid #ffffff40;
  border-radius: 6px;
  color: #eee;
}
.login-page .auth-form input:is(:autofill, :-webkit-autofill) {
  -webkit-text-fill-color: #eee;
  caret-color: #eee;
  -webkit-box-shadow: 0 0 0 1000px #202020 inset;
  box-shadow: 0 0 0 1000px #202020 inset;
}
@media (max-width: 900px) {
  .login-page .auth-intro h2 { font-size: 44px; }
}

.login-page .auth-form input {
  border-color: #4a4a4a;
}
.login-page .auth-form input:focus-visible {
  border-color: #ed9b67;
}

/* Keep the field and focus ring on the same rounded contour. */
.login-page .auth-form input {
  border-radius: 6px;
  background-clip: padding-box;
}
.login-page .auth-form input:focus-visible {
  outline: none;
  outline-offset: 0;
  border-color: #ed9b67;
  box-shadow: 0 0 0 1px #ed9b67;
}
.login-page .auth-form input:is(:autofill, :-webkit-autofill):focus-visible {
  -webkit-box-shadow: 0 0 0 1000px #202020 inset, 0 0 0 1px #ed9b67;
  box-shadow: 0 0 0 1000px #202020 inset, 0 0 0 1px #ed9b67;
}

/* Medium section headings on Agent and Settings; preserve hero typography. */
body.dashboard-page:is(.agent-page, .settings-page) :is(h1, h2, h3, h4, h5, h6, legend, summary):not(.cerebral-page-hero *) {
  font-weight: 500;
}

.sidebar-account-switcher { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid #ffffff24; margin-bottom: 8px; }
.sidebar-account-switcher label { font-size: 13px; color: #aaa; }
body.dashboard-page.dashboard-page .sidebar-account-switcher select { width: 100%; min-width: 0; font-size: 14px; }
.dashboard-page .sidebar-account-switcher button { justify-content: center; border: 1px solid #ffffff40; border-radius: 999px; font-weight: 500; }
.sidebar-user-popover { max-height: min(520px, 75vh); overflow-y: auto; }

.workspace-access-panel { display: grid; gap: 16px; }
.workspace-access-panel h2, .workspace-access-panel p { margin: 0; }
.workspace-access-panel p { color: #bbb; }
.workspace-access-form, .workspace-manager-row { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; }
.workspace-access-form label { flex: 1; min-width: 180px; display: grid; gap: 8px; }
.workspace-manager-row { align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid #ffffff24; }
.workspace-manager-row span { overflow-wrap: anywhere; }
.workspace-access-panel button { border-radius: 999px; border: 1px solid #ffffff40; padding: 10px 22px; font-weight: 500; }
