/* =========================================================
   BASEOS DESIGN SYSTEM V1
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f4f4f1;
  --bg-soft: #f8f8f5;

  --surface: #ffffff;
  --surface-soft: #fafaf8;
  --surface-raised: #ffffff;

  --sidebar: #101011;
  --sidebar-soft: #18181a;
  --sidebar-hover: #202022;

  --text: #151515;
  --text-soft: #5f5f5c;
  --muted: #90908b;
  --faint: #b8b8b2;

  --border: #e7e7e2;
  --border-strong: #dcdcd6;

  --black: #111111;
  --white: #ffffff;

  --danger: #c64037;
  --danger-bg: #fff1ef;

  --warning: #956a23;
  --warning-bg: #fff6e7;

  --success: #337347;
  --success-bg: #eef8f0;

  --info: #49668e;
  --info-bg: #eef4ff;

  --accent: #ff3b30;

  --shadow-xs:
    0 1px 2px rgba(0, 0, 0, 0.025);

  --shadow-sm:
    0 4px 18px rgba(0, 0, 0, 0.035);

  --shadow-md:
    0 18px 50px rgba(0, 0, 0, 0.08);

  --radius-xs: 8px;
  --radius-sm: 11px;
  --radius-md: 15px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  --sidebar-width: 252px;
  --page-max: 1560px;

  --transition:
    160ms cubic-bezier(.2, .7, .2, 1);
}


/* =========================================================
   DOCUMENT
   ========================================================= */

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;

  background:
    radial-gradient(
      circle at 85% -10%,
      rgba(255, 255, 255, .95),
      transparent 29%
    ),
    var(--bg);

  color: var(--text);

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Segoe UI",
    sans-serif;

  font-size: 14px;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  color: inherit;
}

button,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(17, 17, 17, .14);
  outline-offset: 2px;
}

::selection {
  background: #191919;
  color: white;
}


/* =========================================================
   APP SHELL
   ========================================================= */

.baseos {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;

  inset:
    0 auto 0 0;

  z-index: 100;

  width: var(--sidebar-width);
  height: 100dvh;

  display: flex;
  flex-direction: column;

  padding:
    22px 14px 17px;

  overflow: hidden;

  background:
    linear-gradient(
      180deg,
      #111112 0%,
      #0d0d0e 100%
    );

  color: white;

  border-right:
    1px solid rgba(255, 255, 255, .035);
}

.main {
  width:
    calc(
      100% - var(--sidebar-width)
    );

  min-width: 0;

  margin-left:
    var(--sidebar-width);

  padding:
    0 34px 72px;
}


/* =========================================================
   BRAND
   ========================================================= */

.brand {
  display: flex;
  align-items: center;

  gap: 11px;

  padding:
    4px 8px 21px;

  margin-bottom: 9px;

  border-bottom:
    1px solid rgba(255, 255, 255, .07);
}

.brand-logo {
  width: 37px;
  height: 37px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 11px;

  background: white;
  color: #111;

  font-size: 15px;
  font-weight: 850;
  letter-spacing: -.5px;

  box-shadow:
    0 8px 25px rgba(0, 0, 0, .22);
}

.brand-copy {
  min-width: 0;

  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 13px;
  font-weight: 720;

  letter-spacing: -.25px;
}

.brand-copy span {
  margin-top: 2px;

  color: #6f6f73;

  font-size: 8px;
  font-weight: 500;
}


/* =========================================================
   SIDEBAR NAVIGATION
   ========================================================= */

.navigation {
  flex: 1;

  padding:
    8px 0;

  overflow-y: auto;
  overscroll-behavior: contain;

  scrollbar-width: none;
}

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

.nav-section {
  margin:
    7px 0 18px;
}

.nav-heading {
  display: block;

  margin:
    0 10px 7px;

  color: #55555a;

  font-size: 7px;
  line-height: 1;

  font-weight: 750;

  letter-spacing: 1.35px;

  text-transform: uppercase;
}

.nav-item {
  width: 100%;
  min-height: 39px;

  display: flex;
  align-items: center;

  gap: 10px;

  margin:
    2px 0;

  padding:
    9px 10px;

  border: 0;
  border-radius: 10px;

  background: transparent;
  color: #87878c;

  font-size: 10px;
  font-weight: 520;

  text-align: left;

  cursor: pointer;

  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition);
}

.nav-item:hover {
  background:
    rgba(255, 255, 255, .055);

  color: #e4e4e5;

  transform:
    translateX(1px);
}

.nav-item.active {
  background:
    linear-gradient(
      180deg,
      #29292b,
      #222224
    );

  color: white;

  box-shadow:
    inset 0 0 0 1px
    rgba(255, 255, 255, .045);
}

.nav-icon {
  width: 19px;

  flex: 0 0 19px;

  display: grid;
  place-items: center;

  color: inherit;

  font-size: 12px;
}


/* =========================================================
   SIDEBAR USER
   ========================================================= */

.sidebar-user {
  display: flex;
  align-items: center;

  gap: 9px;

  margin-top: 10px;

  padding:
    15px 8px 3px;

  border-top:
    1px solid rgba(255, 255, 255, .07);
}

.user-avatar {
  width: 33px;
  height: 33px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border:
    1px solid rgba(255, 255, 255, .07);

  border-radius: 50%;

  background: #202022;
  color: #e5e5e5;

  font-size: 8px;
  font-weight: 750;
}

.sidebar-user > div:last-child {
  min-width: 0;

  display: flex;
  flex-direction: column;
}

.sidebar-user strong {
  overflow: hidden;

  font-size: 9px;
  font-weight: 650;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-user span {
  margin-top: 2px;

  overflow: hidden;

  color: #66666b;

  font-size: 7px;

  white-space: nowrap;
  text-overflow: ellipsis;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
  position: sticky;

  top: 0;

  z-index: 70;

  min-height: 82px;

  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 20px;

  max-width: var(--page-max);

  margin:
    0 auto 20px;

  padding:
    18px 2px 13px;

  background:
    linear-gradient(
      180deg,
      rgba(244, 244, 241, .96) 0%,
      rgba(244, 244, 241, .92) 80%,
      rgba(244, 244, 241, 0) 100%
    );

  backdrop-filter:
    blur(16px);
}

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

.eyebrow {
  margin-bottom: 5px;

  color: var(--muted);

  font-size: 7px;
  line-height: 1;

  font-weight: 780;

  letter-spacing: 1.35px;

  text-transform: uppercase;
}

.topbar h1,
#page-title {
  color: var(--text);

  font-size: 21px;
  line-height: 1.05;

  font-weight: 690;

  letter-spacing: -.75px;
}

.topbar-actions {
  display: flex;
  align-items: center;

  gap: 7px;
}

.icon-button {
  position: relative;

  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  border:
    1px solid var(--border);

  border-radius: 12px;

  background: rgba(255, 255, 255, .82);

  color: #4e4e4b;

  cursor: pointer;

  box-shadow:
    var(--shadow-xs);

  transition:
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.icon-button:hover {
  background: white;

  border-color:
    var(--border-strong);

  transform:
    translateY(-1px);
}

.ask-base-button {
  min-height: 38px;

  padding:
    0 15px;

  border: 0;
  border-radius: 12px;

  background:
    linear-gradient(
      180deg,
      #1a1a1b,
      #0d0d0e
    );

  color: white;

  font-size: 9px;
  font-weight: 650;

  cursor: pointer;

  box-shadow:
    0 5px 16px
    rgba(0, 0, 0, .12);

  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.ask-base-button:hover {
  transform:
    translateY(-1px);

  box-shadow:
    0 8px 22px
    rgba(0, 0, 0, .16);
}


/* =========================================================
   PAGE CONTENT
   ========================================================= */

.app-content {
  width: 100%;
  max-width: var(--page-max);

  margin: 0 auto;

  animation:
    baseosFadeIn 180ms ease both;
}

@keyframes baseosFadeIn {
  from {
    opacity: 0;

    transform:
      translateY(3px);
  }

  to {
    opacity: 1;

    transform:
      translateY(0);
  }
}


/* =========================================================
   GLOBAL MODULE STRUCTURE
   ========================================================= */

.tasks-module,
.tasks-live-module,
.clients-module,
.businesses-module,
.content-module,
.crm-module,
.campaigns-module,
.team-module,
.knowledge-module,
.reports-module,
.automation-module,
.base-ai-module,
.ai-module,
.base-creations-module,
.bc-module,
.command-centre {
  display: flex;
  flex-direction: column;

  gap: 17px;
}

.module-header {
  display: flex;

  justify-content: space-between;
  align-items: flex-end;

  gap: 20px;

  margin-bottom: 2px;
}

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

.module-header h2 {
  margin-bottom: 5px;

  color: var(--text);

  font-size: 29px;
  line-height: 1;

  font-weight: 680;

  letter-spacing: -1.2px;
}

.module-subtext {
  max-width: 660px;

  color: var(--muted);

  font-size: 10px;
  line-height: 1.6;
}

.section-heading {
  display: flex;

  justify-content: space-between;
  align-items: flex-end;

  gap: 15px;

  margin-bottom: 10px;
}

.section-heading h3 {
  margin-top: 3px;

  font-size: 14px;
  line-height: 1.2;

  font-weight: 650;

  letter-spacing: -.25px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.primary-action {
  min-height: 38px;

  flex: 0 0 auto;

  padding:
    0 15px;

  border: 0;
  border-radius: 11px;

  background:
    linear-gradient(
      180deg,
      #1a1a1a,
      #101010
    );

  color: white;

  font-size: 9px;
  font-weight: 650;

  cursor: pointer;

  box-shadow:
    0 5px 16px
    rgba(0, 0, 0, .1);

  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.primary-action:hover {
  transform:
    translateY(-1px);

  box-shadow:
    0 8px 22px
    rgba(0, 0, 0, .14);
}

.danger-action {
  color: var(--danger) !important;
}


/* =========================================================
   UNIVERSAL SURFACES
   ========================================================= */

.task-summary-card,
.tasks-summary-card,
.client-summary-card,
.business-summary-card,
.team-summary-card,
.knowledge-summary-card,
.crm-summary-card,
.campaign-summary-card,
.reports-summary-card,
.automation-summary-card,
.content-status-summary-card,
.command-stat-card {
  min-width: 0;

  padding: 14px;

  background:
    rgba(255, 255, 255, .92);

  border:
    1px solid var(--border);

  border-radius: var(--radius-md);

  box-shadow:
    var(--shadow-xs);
}

.task-summary-card span,
.tasks-summary-card span,
.client-summary-card span,
.business-summary-card span,
.team-summary-card span,
.knowledge-summary-card span,
.crm-summary-card span,
.campaign-summary-card span,
.reports-summary-card span,
.automation-summary-card span,
.content-status-summary-card span,
.command-stat-card span {
  display: block;

  margin-bottom: 5px;

  color: var(--muted);

  font-size: 7px;
  line-height: 1.3;
}

.task-summary-card strong,
.tasks-summary-card strong,
.client-summary-card strong,
.business-summary-card strong,
.team-summary-card strong,
.knowledge-summary-card strong,
.crm-summary-card strong,
.campaign-summary-card strong,
.reports-summary-card strong,
.automation-summary-card strong,
.content-status-summary-card strong,
.command-stat-card strong {
  display: block;

  overflow: hidden;

  color: var(--text);

  font-size: 18px;
  line-height: 1.1;

  font-weight: 680;

  letter-spacing: -.55px;

  text-overflow: ellipsis;
}


/* =========================================================
   SUMMARY GRIDS
   ========================================================= */

.task-summary,
.tasks-live-summary,
.client-summary,
.business-summary,
.team-summary,
.knowledge-summary,
.crm-summary,
.campaign-summary,
.reports-summary,
.automation-summary {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 8px;
}

.content-status-summary {
  display: grid;

  grid-template-columns:
    repeat(
      7,
      minmax(0, 1fr)
    );

  gap: 6px;
}


/* =========================================================
   PILLS / TABS / FILTERS
   ========================================================= */

.task-toolbar,
.tasks-live-filters,
.content-brand-tabs,
.knowledge-filters {
  display: flex;

  gap: 6px;

  flex-wrap: wrap;
}

.task-filter,
.tasks-live-filters button,
.content-brand-tab,
.knowledge-filter,
.knowledge-filters button {
  min-height: 32px;

  padding:
    0 10px;

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-pill);

  background:
    rgba(255, 255, 255, .88);

  color: #666662;

  font-size: 8px;
  font-weight: 520;

  cursor: pointer;

  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.task-filter:hover,
.tasks-live-filters button:hover,
.content-brand-tab:hover,
.knowledge-filter:hover,
.knowledge-filters button:hover {
  background: white;

  border-color:
    var(--border-strong);
}

.task-filter.active,
.tasks-live-filters button.active,
.content-brand-tab.active,
.knowledge-filter.active,
.knowledge-filters button.active {
  background: var(--black);

  border-color: var(--black);

  color: white;
}


/* =========================================================
   CLIENT / BUSINESS / TEAM / KNOWLEDGE CARDS
   ========================================================= */

.client-grid,
.business-grid,
.team-grid,
.knowledge-grid,
.reports-grid,
.reports-live-grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 10px;
}

.client-card,
.business-card,
.team-card,
.knowledge-card,
.report-card,
.reports-live-card {
  min-width: 0;

  padding: 17px;

  background: var(--surface);

  border:
    1px solid var(--border);

  border-radius: var(--radius-lg);

  box-shadow:
    var(--shadow-xs);

  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.client-card:hover,
.business-card:hover,
.team-card:hover,
.knowledge-card:hover,
.report-card:hover,
.reports-live-card:hover {
  border-color:
    var(--border-strong);

  box-shadow:
    var(--shadow-sm);

  transform:
    translateY(-1px);
}

.client-card h3,
.business-card h3,
.team-card h3,
.knowledge-card h3,
.report-card h3,
.reports-live-card h3 {
  color: var(--text);

  font-weight: 650;
}


/* =========================================================
   STATUS PILLS
   ========================================================= */

.client-status,
.business-stage,
.knowledge-state,
.report-status,
.campaign-status,
.team-workload-badge {
  display: inline-flex;

  align-items: center;

  width: fit-content;
  height: fit-content;

  padding:
    5px 8px;

  border-radius:
    var(--radius-pill);

  background: #f2f2ef;

  color: #666;

  font-size: 7px;
  font-weight: 680;
}

.client-status,
.knowledge-state,
.workload-available {
  background:
    var(--success-bg);

  color:
    var(--success);
}

.workload-normal {
  background:
    var(--info-bg);

  color:
    var(--info);
}

.workload-busy {
  background:
    var(--warning-bg);

  color:
    var(--warning);
}

.workload-heavy {
  background:
    var(--danger-bg);

  color:
    var(--danger);
}


/* =========================================================
   TASKS — LIVE LIST
   ========================================================= */

.tasks-live-list {
  display: flex;
  flex-direction: column;

  gap: 7px;
}

.tasks-live-card {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 18px;

  padding: 14px;

  background:
    rgba(255, 255, 255, .94);

  border:
    1px solid var(--border);

  border-radius: var(--radius-md);

  box-shadow:
    var(--shadow-xs);

  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.tasks-live-card:hover {
  border-color:
    var(--border-strong);

  box-shadow:
    var(--shadow-sm);
}

.tasks-live-card.task-is-overdue {
  border-color:
    #efcfcb;

  box-shadow:
    inset 3px 0 0
    var(--danger);
}

.tasks-live-main {
  min-width: 0;
}

.tasks-live-main h3 {
  margin:
    6px 0 4px;

  font-size: 10px;
  line-height: 1.45;

  font-weight: 630;
}

.tasks-live-main p {
  max-width: 720px;

  margin-bottom: 7px;

  color: var(--text-soft);

  font-size: 8px;
  line-height: 1.55;
}

.tasks-live-badges {
  display: flex;

  gap: 4px;

  flex-wrap: wrap;
}

.tasks-live-badges span {
  display: inline-flex;
  align-items: center;

  padding:
    4px 6px;

  border-radius:
    var(--radius-pill);

  background: #f3f3f0;

  color: #777;

  font-size: 6px;
  line-height: 1;

  font-weight: 620;
}

.priority-high,
.priority-urgent {
  background:
    var(--danger-bg) !important;

  color:
    var(--danger) !important;
}

.priority-medium {
  background:
    var(--warning-bg) !important;

  color:
    var(--warning) !important;
}

.priority-low {
  background:
    #f3f3f0 !important;

  color:
    #888 !important;
}

.task-due-badge.due-overdue {
  background:
    var(--danger-bg) !important;

  color:
    var(--danger) !important;
}

.task-due-badge.due-today {
  background:
    var(--warning-bg) !important;

  color:
    var(--warning) !important;
}

.task-due-badge.due-upcoming {
  background:
    var(--info-bg) !important;

  color:
    var(--info) !important;
}

.tasks-live-meta {
  display: flex;

  gap: 12px;

  flex-wrap: wrap;

  color: var(--muted);

  font-size: 7px;
}

.tasks-live-meta strong {
  color: #666;
}

.tasks-live-actions {
  flex: 0 0 auto;

  display: flex;
  align-items: center;

  gap: 5px;
}

.tasks-live-actions select,
.tasks-live-actions button {
  min-height: 31px;

  padding:
    0 8px;

  border:
    1px solid var(--border);

  border-radius: 8px;

  background: var(--surface-soft);

  color: #555;

  font-size: 7px;

  cursor: pointer;
}

.tasks-live-actions button {
  background: white;
}

.tasks-live-actions
.task-delete {
  color: var(--danger);
}


/* =========================================================
   OLD TASK / CRM BOARDS
   ========================================================= */

.task-board,
.crm-board {
  display: grid;

  gap: 10px;

  padding-bottom: 10px;

  overflow-x: auto;
}

.task-board {
  grid-template-columns:
    repeat(
      6,
      minmax(220px, 1fr)
    );
}

.crm-board {
  grid-template-columns:
    repeat(
      9,
      minmax(220px, 1fr)
    );
}

.task-column,
.crm-column {
  min-height: 350px;

  padding: 10px;

  border:
    1px solid #ecece7;

  border-radius: var(--radius-md);

  background: #eeeeeb;
}

.task-card,
.crm-card {
  padding: 13px;

  border:
    1px solid var(--border);

  border-radius: 12px;

  background: white;

  box-shadow:
    var(--shadow-xs);
}


/* =========================================================
   CONTENT
   ========================================================= */

.content-overview {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 18px;

  padding: 15px 17px;

  background: white;

  border:
    1px solid var(--border);

  border-radius: var(--radius-lg);

  box-shadow:
    var(--shadow-xs);
}

.content-overview h3 {
  font-size: 17px;
  font-weight: 660;

  letter-spacing: -.45px;
}

.content-pillars {
  display: flex;

  gap: 5px;

  flex-wrap: wrap;
}

.content-pillars span {
  padding:
    5px 8px;

  border-radius:
    var(--radius-pill);

  background: #eeeeeb;

  color: #686864;

  font-size: 7px;
}

.content-grid {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 9px;
}

.content-card {
  min-height: 170px;

  display: flex;
  flex-direction: column;

  padding: 15px;

  background: white;

  border:
    1px solid var(--border);

  border-radius: var(--radius-md);

  box-shadow:
    var(--shadow-xs);
}

.content-card-top {
  display: flex;

  justify-content: space-between;

  gap: 8px;

  margin-bottom: 12px;
}

.content-type,
.content-status {
  padding:
    4px 7px;

  border-radius:
    var(--radius-pill);

  font-size: 6px;
  font-weight: 650;
}

.content-type {
  background: #f2f2ef;

  color: #666;
}

.content-status {
  background:
    var(--warning-bg);

  color:
    var(--warning);
}

.content-card h4 {
  margin-bottom: 6px;

  font-size: 10px;
  line-height: 1.45;
}

.content-card p {
  color: var(--muted);

  font-size: 8px;
}

.content-card-footer {
  margin-top: auto;

  padding-top: 12px;

  border-top:
    1px solid var(--border);
}

.content-card-footer button {
  border: 0;

  background: transparent;

  font-size: 7px;
  font-weight: 650;

  cursor: pointer;
}


/* =========================================================
   TEAM
   ========================================================= */

.team-card {
  display: flex;
  flex-direction: column;

  gap: 14px;
}

.team-card-header {
  position: relative;

  display: flex;
  align-items: center;

  gap: 10px;
}

.team-avatar {
  width: 39px;
  height: 39px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: var(--black);
  color: white;

  font-size: 9px;
  font-weight: 720;
}

.team-card-header h3 {
  margin-bottom: 2px;

  font-size: 12px;
}

.team-card-header p {
  color: var(--muted);

  font-size: 8px;
}

.team-workload {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 6px;
}

.team-workload div {
  min-width: 0;

  padding: 9px;

  border-radius: 10px;

  background: var(--bg-soft);
}

.team-workload span {
  display: block;

  margin-bottom: 4px;

  color: var(--muted);

  font-size: 6px;
}

.team-workload strong {
  font-size: 13px;
}

.team-task-list {
  display: flex;
  flex-direction: column;

  gap: 3px;
}

.team-section-label {
  margin-bottom: 4px;

  color: var(--muted);

  font-size: 6px;
  font-weight: 750;

  letter-spacing: .75px;

  text-transform: uppercase;
}

.team-task-row {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 10px;

  padding:
    8px 0;

  border-bottom:
    1px solid var(--border);
}

.team-task-row:last-child {
  border-bottom: 0;
}

.team-task-row > div {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 2px;
}

.team-task-row strong {
  font-size: 8px;
  line-height: 1.4;
}

.team-task-row div span {
  color: var(--muted);

  font-size: 6px;
}

.team-task-row select {
  min-height: 29px;

  flex: 0 0 auto;

  padding:
    0 7px;

  border:
    1px solid var(--border);

  border-radius: 8px;

  background: var(--bg-soft);

  font-size: 7px;
}

.team-review-box {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 10px;

  padding: 9px;

  border-radius: 10px;

  background:
    var(--warning-bg);
}

.team-review-box span,
.team-review-box strong {
  font-size: 7px;
}

.team-card-footer {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 10px;

  margin-top: auto;

  padding-top: 11px;

  border-top:
    1px solid var(--border);
}

.team-card-footer span {
  color: var(--muted);

  font-size: 7px;
}

.team-card-footer button {
  border: 0;

  background: transparent;

  font-size: 7px;
  font-weight: 650;

  cursor: pointer;
}


/* =========================================================
   CAMPAIGNS
   ========================================================= */

.campaign-list {
  display: flex;
  flex-direction: column;

  gap: 9px;
}

.campaign-card,
.campaign-detail-card {
  padding: 16px;

  background: white;

  border:
    1px solid var(--border);

  border-radius: var(--radius-lg);

  box-shadow:
    var(--shadow-xs);
}

.campaign-card-header,
.campaign-detail-header {
  display: flex;

  justify-content: space-between;
  align-items: flex-start;

  gap: 15px;
}

.campaign-card-header h3,
.campaign-detail-header h3 {
  margin:
    4px 0;

  font-size: 13px;
  font-weight: 650;
}

.campaign-card-header p {
  color: var(--muted);

  font-size: 7px;
}

.campaign-metrics,
.campaign-performance-grid {
  display: grid;

  grid-template-columns:
    repeat(
      5,
      minmax(0, 1fr)
    );

  gap: 6px;

  margin-top: 12px;
}

.campaign-metric {
  min-width: 0;

  padding: 10px;

  border-radius: 10px;

  background: var(--black);

  color: white;
}

.campaign-metric span {
  display: block;

  margin-bottom: 4px;

  color: #747474;

  font-size: 6px;
}

.campaign-metric strong {
  display: block;

  overflow: hidden;

  color: white;

  font-size: 10px;

  text-overflow: ellipsis;
}

.campaign-data-grid {
  display: grid;

  grid-template-columns:
    repeat(
      5,
      minmax(0, 1fr)
    );

  gap: 6px;
}

.campaign-data-item {
  min-width: 0;

  padding: 10px;

  border-radius: 10px;

  background: var(--bg-soft);
}

.campaign-data-item span {
  display: block;

  margin-bottom: 4px;

  color: var(--muted);

  font-size: 6px;
}

.campaign-data-item strong {
  font-size: 8px;
  line-height: 1.4;
}


/* =========================================================
   KNOWLEDGE
   ========================================================= */

.knowledge-controls {
  display: flex;
  flex-direction: column;

  gap: 8px;
}

.knowledge-controls > input,
.knowledge-search {
  width: 100%;
  max-width: 420px;

  min-height: 37px;

  padding:
    0 11px;

  border:
    1px solid var(--border);

  border-radius: 10px;

  background: white;

  font-size: 8px;
}

.knowledge-card {
  display: flex;
  flex-direction: column;

  gap: 10px;
}

.knowledge-card-top {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 8px;

  color: var(--muted);

  font-size: 6px;
}

.knowledge-card h3 {
  font-size: 12px;
}

.knowledge-card p {
  color: var(--text-soft);

  font-size: 8px;
  line-height: 1.6;
}

.knowledge-meta {
  display: flex;
  flex-direction: column;

  gap: 3px;

  color: var(--muted);

  font-size: 6px;
}

.knowledge-actions {
  display: flex;

  justify-content: space-between;

  margin-top: auto;

  padding-top: 9px;

  border-top:
    1px solid var(--border);
}

.knowledge-actions button {
  border: 0;

  background: transparent;

  font-size: 7px;
  font-weight: 650;

  cursor: pointer;
}


/* =========================================================
   REPORTS
   ========================================================= */

.reports-live-section {
  display: flex;
  flex-direction: column;

  gap: 9px;
}

.reports-agency-card,
.agency-report-card {
  padding: 18px;

  border-radius: var(--radius-lg);

  background:
    linear-gradient(
      145deg,
      #171718,
      #0c0c0d
    );

  color: white;

  box-shadow:
    0 18px 45px
    rgba(0, 0, 0, .09);
}

.reports-agency-grid,
.agency-report-grid {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 6px;

  margin-top: 13px;
}

.reports-dark-metric,
.agency-report-metric {
  min-width: 0;

  padding: 10px;

  border:
    1px solid #29292c;

  border-radius: 10px;

  background: #1d1d1f;
}

.reports-dark-metric span,
.agency-report-metric span {
  display: block;

  margin-bottom: 4px;

  color: #777;

  font-size: 6px;
}

.reports-dark-metric strong,
.agency-report-metric strong {
  display: block;

  overflow: hidden;

  color: white;

  font-size: 10px;

  text-overflow: ellipsis;
}


/* =========================================================
   AUTOMATION
   ========================================================= */

.automation-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 1.2fr)
    minmax(300px, .8fr);

  gap: 10px;

  align-items: start;
}

.automation-panel,
.automation-workflows,
.integration-panel {
  padding: 16px;

  background: white;

  border:
    1px solid var(--border);

  border-radius: var(--radius-lg);

  box-shadow:
    var(--shadow-xs);
}

.automation-alert-list,
.automation-rule-list {
  display: flex;
  flex-direction: column;

  gap: 6px;
}

.automation-alert {
  display: grid;

  grid-template-columns:
    8px 1fr auto;

  gap: 9px;

  align-items: center;

  padding: 10px;

  border-radius: 10px;

  background: var(--bg-soft);
}

.automation-alert-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--muted);
}

.automation-critical
.automation-alert-dot {
  background: var(--danger);
}

.automation-warning
.automation-alert-dot {
  background: #b5822d;
}

.automation-info
.automation-alert-dot {
  background: var(--info);
}

.automation-alert-content strong {
  display: block;

  font-size: 8px;
}

.automation-alert-content p {
  margin-top: 3px;

  color: var(--muted);

  font-size: 6px;
  line-height: 1.5;
}

.automation-alert button {
  min-height: 29px;

  padding:
    0 7px;

  border:
    1px solid var(--border);

  border-radius: 7px;

  background: white;

  font-size: 6px;
  font-weight: 650;

  cursor: pointer;
}

.automation-rule {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 14px;

  padding: 10px;

  border-radius: 10px;

  background: var(--bg-soft);
}

.automation-rule strong {
  display: block;

  font-size: 8px;
}

.automation-rule p {
  margin-top: 3px;

  color: var(--muted);

  font-size: 6px;
  line-height: 1.5;
}


/* =========================================================
   COMMAND CENTRE
   ========================================================= */

.cc-hero {
  position: relative;

  overflow: hidden;

  display: grid;

  grid-template-columns:
    minmax(0, 1.15fr)
    minmax(380px, .85fr);

  gap: 28px;

  padding: 26px;

  border-radius: var(--radius-xl);

  background:
    radial-gradient(
      circle at 84% -20%,
      rgba(255, 255, 255, .11),
      transparent 36%
    ),
    linear-gradient(
      145deg,
      #181819,
      #0b0b0c
    );

  color: white;

  box-shadow:
    0 25px 65px
    rgba(0, 0, 0, .1);
}

.cc-hero-copy h2 {
  max-width: 620px;

  margin:
    5px 0 9px;

  font-size: clamp(
    25px,
    3vw,
    36px
  );

  line-height: .98;

  font-weight: 650;

  letter-spacing: -1.55px;
}

.cc-hero-copy > p {
  max-width: 570px;

  color: #909094;

  font-size: 9px;
  line-height: 1.65;
}

.cc-date {
  margin-top: 17px;

  color: #67676b;

  font-size: 7px;
}

.cc-hero-stats {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 6px;
}

.cc-hero-stat {
  min-width: 0;

  padding: 11px;

  border:
    1px solid #29292c;

  border-radius: 11px;

  background:
    rgba(255, 255, 255, .055);
}

.cc-hero-stat span {
  display: block;

  margin-bottom: 4px;

  color: #747478;

  font-size: 6px;
}

.cc-hero-stat strong {
  display: block;

  color: white;

  font-size: 13px;
  font-weight: 650;
}

.cc-section,
.cc-panel {
  padding: 15px;

  background:
    rgba(255, 255, 255, .93);

  border:
    1px solid var(--border);

  border-radius: var(--radius-lg);

  box-shadow:
    var(--shadow-xs);
}

.cc-section-heading,
.cc-panel-heading {
  display: flex;

  justify-content: space-between;
  align-items: flex-start;

  gap: 10px;

  margin-bottom: 10px;
}

.cc-section-heading h3,
.cc-panel-heading h3 {
  margin-top: 2px;

  font-size: 12px;

  font-weight: 650;
}

.cc-section-count {
  padding:
    5px 8px;

  border-radius:
    var(--radius-pill);

  background: #f0f0ed;

  color: #777;

  font-size: 6px;
}

.cc-command-list {
  display: flex;
  flex-direction: column;

  gap: 5px;
}

.cc-command-card {
  display: grid;

  grid-template-columns:
    29px 1fr auto;

  gap: 10px;

  align-items: center;

  padding: 10px;

  border:
    1px solid transparent;

  border-radius: 10px;

  background: var(--bg-soft);

  transition:
    border-color var(--transition),
    background var(--transition);
}

.cc-command-card:hover {
  background: white;

  border-color:
    var(--border);
}

.cc-command-number {
  color: #b4b4af;

  font-size: 8px;
  font-weight: 700;
}

.cc-command-meta {
  display: flex;

  align-items: center;

  gap: 5px;

  color: var(--muted);

  font-size: 6px;
}

.cc-command-main h4 {
  margin:
    4px 0 2px;

  font-size: 9px;
  line-height: 1.35;
}

.cc-command-main p {
  color: var(--muted);

  font-size: 6px;
  line-height: 1.45;
}

.cc-priority {
  padding:
    3px 5px;

  border-radius:
    var(--radius-pill);
}

.cc-priority-urgent {
  background:
    var(--danger-bg);

  color:
    var(--danger);
}

.cc-priority-high {
  background:
    var(--warning-bg);

  color:
    var(--warning);
}

.cc-priority-medium {
  background:
    var(--info-bg);

  color:
    var(--info);
}

.cc-priority-low {
  background: #eeeeeb;

  color: #777;
}

.cc-command-actions {
  display: flex;

  justify-content: flex-end;

  gap: 4px;

  flex-wrap: wrap;
}

.cc-command-actions button {
  min-height: 27px;

  padding:
    0 7px;

  border:
    1px solid var(--border);

  border-radius: 7px;

  background: white;

  font-size: 6px;
  font-weight: 650;

  cursor: pointer;

  transition:
    background var(--transition),
    border-color var(--transition);
}

.cc-command-actions button:hover {
  background: #f2f2ef;

  border-color:
    var(--border-strong);
}

.cc-command-actions
.cc-command-open {
  background: var(--black);

  border-color: var(--black);

  color: white;
}

.cc-two-column {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 9px;
}

.cc-mini-list {
  display: flex;
  flex-direction: column;

  gap: 4px;
}

.cc-mini-row {
  width: 100%;

  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 10px;

  padding: 9px;

  border: 0;
  border-radius: 9px;

  background: var(--bg-soft);

  color: inherit;

  text-align: left;

  font-family: inherit;
}

button.cc-mini-row {
  cursor: pointer;

  transition:
    background var(--transition);
}

button.cc-mini-row:hover {
  background: #f0f0ed;
}

.cc-mini-row strong {
  display: block;

  margin-bottom: 2px;

  font-size: 8px;
}

.cc-mini-row span {
  color: var(--muted);

  font-size: 6px;
}

.cc-approval-grid {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 6px;
}

.cc-approval-card {
  padding: 10px;

  border-radius: 10px;

  background: var(--bg-soft);
}

.cc-approval-card > span {
  color: var(--muted);

  font-size: 6px;
}

.cc-approval-card h4 {
  margin:
    5px 0 3px;

  font-size: 8px;
}

.cc-approval-card p {
  color: var(--muted);

  font-size: 6px;
}

.cc-approval-actions {
  display: flex;

  gap: 4px;

  flex-wrap: wrap;

  margin-top: 7px;
}

.cc-approval-actions button {
  min-height: 27px;

  padding:
    0 7px;

  border:
    1px solid var(--border);

  border-radius: 7px;

  background: white;

  font-size: 6px;
  font-weight: 650;

  cursor: pointer;
}

.cc-quick-actions {
  display: grid;

  grid-template-columns:
    repeat(
      6,
      minmax(0, 1fr)
    );

  gap: 6px;
}

.cc-quick-actions button {
  min-width: 0;

  min-height: 72px;

  padding: 11px;

  border:
    1px solid transparent;

  border-radius: 10px;

  background: var(--bg-soft);

  text-align: left;

  cursor: pointer;

  transition:
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.cc-quick-actions button:hover {
  background: white;

  border-color:
    var(--border);

  transform:
    translateY(-1px);
}

.cc-quick-actions strong {
  display: block;

  margin-bottom: 4px;

  font-size: 8px;
}

.cc-quick-actions span {
  color: var(--muted);

  font-size: 6px;
  line-height: 1.45;
}


/* =========================================================
   BASE AI
   ========================================================= */

.base-ai-hero {
  position: relative;

  overflow: hidden;

  display: flex;

  justify-content: space-between;
  align-items: flex-start;

  gap: 28px;

  padding: 25px;

  border-radius: var(--radius-xl);

  background:
    radial-gradient(
      circle at 90% -25%,
      rgba(255, 255, 255, .13),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #181819,
      #0b0b0c
    );

  color: white;

  box-shadow:
    0 25px 65px
    rgba(0, 0, 0, .1);
}

.base-ai-hero h2 {
  margin:
    4px 0 7px;

  font-size: 30px;
  line-height: 1;

  font-weight: 650;

  letter-spacing: -1.4px;
}

.base-ai-hero p {
  max-width: 650px;

  color: #8c8c91;

  font-size: 9px;
  line-height: 1.65;
}

.base-ai-status {
  flex: 0 0 auto;

  display: flex;
  align-items: center;

  gap: 6px;

  padding:
    7px 10px;

  border:
    1px solid #2c2c2f;

  border-radius:
    var(--radius-pill);

  background:
    rgba(255, 255, 255, .05);

  color: #999;

  font-size: 7px;
  font-weight: 600;
}

.base-ai-status-dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: #56bd6b;
}

.base-ai-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    255px;

  gap: 10px;

  align-items: start;
}

.base-ai-main {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 9px;
}

.base-ai-input-card,
.base-ai-response,
.base-ai-sidebar {
  background: white;

  border:
    1px solid var(--border);

  border-radius: var(--radius-lg);

  box-shadow:
    var(--shadow-xs);
}

.base-ai-input-card {
  padding: 14px;
}

.base-ai-input-card textarea {
  width: 100%;
  min-height: 86px;

  resize: vertical;

  border: 0;
  outline: 0;

  background: transparent;

  color: var(--text);

  font-size: 11px;
  line-height: 1.55;
}

.base-ai-input-card
textarea::placeholder {
  color: #aaa;
}

.base-ai-input-footer {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 12px;

  padding-top: 11px;

  border-top:
    1px solid var(--border);
}

.base-ai-input-footer span {
  color: var(--muted);

  font-size: 6px;
}

.base-ai-response {
  min-height: 245px;

  padding: 17px;
}

.base-ai-welcome h3,
.base-ai-answer h3 {
  margin:
    5px 0 9px;

  font-size: 16px;

  letter-spacing: -.35px;
}

.base-ai-welcome > p,
.base-ai-answer-body > p {
  max-width: 720px;

  color: var(--text-soft);

  font-size: 8px;
  line-height: 1.65;
}

.base-ai-sidebar {
  position: sticky;

  top: 95px;

  padding: 14px;
}

.base-ai-command-list {
  display: flex;
  flex-direction: column;

  gap: 5px;

  margin-top: 9px;
}

.base-ai-command-list button {
  width: 100%;

  padding: 9px;

  border: 0;
  border-radius: 8px;

  background: var(--bg-soft);

  color: #555;

  font-size: 7px;
  line-height: 1.4;

  text-align: left;

  cursor: pointer;

  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition);
}

.base-ai-command-list button:hover {
  background: var(--black);

  color: white;

  transform:
    translateX(2px);
}

.base-ai-metric-grid {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 6px;

  margin:
    11px 0 15px;
}

.base-ai-metric-grid > div {
  min-width: 0;

  padding: 9px;

  border-radius: 9px;

  background: var(--bg-soft);
}

.base-ai-metric-grid span {
  display: block;

  margin-bottom: 4px;

  color: var(--muted);

  font-size: 6px;
}

.base-ai-metric-grid strong {
  display: block;

  overflow: hidden;

  font-size: 10px;

  text-overflow: ellipsis;
}


/* =========================================================
   BASE CREATIONS / SYSTEM
   ========================================================= */

.bc-hero,
.base-creations-hero {
  display: grid;

  grid-template-columns:
    minmax(0, 1.2fr)
    minmax(320px, .8fr);

  gap: 25px;

  padding: 24px;

  border-radius: var(--radius-xl);

  background:
    linear-gradient(
      145deg,
      #181819,
      #0b0b0c
    );

  color: white;

  box-shadow:
    0 25px 65px
    rgba(0, 0, 0, .1);
}

.bc-area-grid,
.bc-portfolio-grid,
.base-creations-grid {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 8px;
}

.bc-area-card,
.bc-portfolio-card,
.base-area-card,
.base-creations-panel {
  padding: 15px;

  background: white;

  border:
    1px solid var(--border);

  border-radius: var(--radius-md);

  box-shadow:
    var(--shadow-xs);
}

.bc-system-card {
  padding: 17px;

  background: white;

  border:
    1px solid var(--border);

  border-radius: var(--radius-lg);

  box-shadow:
    var(--shadow-xs);
}

.bc-system-info {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 6px;
}

.bc-system-info > div {
  min-width: 0;

  padding: 10px;

  border-radius: 10px;

  background: var(--bg-soft);
}


/* =========================================================
   MODALS
   ========================================================= */

.base-modal {
  position: fixed;

  inset: 0;

  z-index: 1200;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 24px;

  overflow-y: auto;

  background:
    rgba(10, 10, 11, .46);

  backdrop-filter:
    blur(7px);

  animation:
    modalFade 140ms ease both;
}

@keyframes modalFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.base-modal-card {
  position: relative;

  width: 100%;
  max-width: 470px;

  max-height:
    calc(
      100dvh - 48px
    );

  display: flex;
  flex-direction: column;

  gap: 10px;

  margin: auto;

  padding: 22px;

  overflow-y: auto;

  border:
    1px solid rgba(255, 255, 255, .8);

  border-radius: 22px;

  background:
    rgba(255, 255, 255, .985);

  box-shadow:
    0 35px 100px
    rgba(0, 0, 0, .22);

  animation:
    modalCardIn 180ms
    cubic-bezier(
      .2,
      .75,
      .2,
      1
    )
    both;
}

@keyframes modalCardIn {
  from {
    opacity: 0;

    transform:
      translateY(8px)
      scale(.99);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }
}

.base-modal-card h3 {
  margin-bottom: 2px;

  font-size: 18px;

  font-weight: 670;

  letter-spacing: -.55px;
}

.base-modal-card input,
.base-modal-card select,
.base-modal-card textarea {
  width: 100%;

  min-height: 41px;

  padding:
    10px 11px;

  border:
    1px solid var(--border);

  border-radius: 10px;

  background: var(--surface-soft);

  color: var(--text);

  font-size: 9px;

  outline: 0;

  transition:
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.base-modal-card textarea {
  min-height: 92px;

  resize: vertical;
}

.base-modal-card input:focus,
.base-modal-card select:focus,
.base-modal-card textarea:focus {
  border-color:
    #c4c4bd;

  background: white;

  box-shadow:
    0 0 0 3px
    rgba(17, 17, 17, .035);
}

.base-modal-close {
  position: sticky;

  top: 0;

  z-index: 5;

  width: 29px;
  height: 29px;

  flex: 0 0 auto;

  align-self: flex-end;

  margin-bottom: -27px;

  border: 0;
  border-radius: 50%;

  background: #f0f0ed;

  color: #555;

  font-size: 15px;

  cursor: pointer;
}

.task-field-label,
.team-form-label,
.campaign-form-label,
.knowledge-form-label,
.cc-form-label,
.bc-form-label {
  display: block;

  margin:
    9px 0 4px;

  color: #666;

  font-size: 7px;

  font-weight: 680;
}

.task-modal-row,
.campaign-form-row,
.campaign-form-grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 7px;
}


/* =========================================================
   NOTIFICATIONS
   ========================================================= */

.notification-button {
  position: relative;
}

.notification-count {
  position: absolute;

  top: -4px;
  right: -4px;

  min-width: 16px;
  height: 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding:
    0 4px;

  border:
    2px solid var(--bg);

  border-radius:
    var(--radius-pill);

  background: var(--accent);

  color: white;

  font-size: 6px;
  font-weight: 800;
}

.notification-count.hidden {
  display: none;
}


/* =========================================================
   EMPTY STATES
   ========================================================= */

.tasks-empty,
.crm-empty,
.campaign-empty,
.campaign-empty-state,
.knowledge-empty,
.base-empty-state,
.automation-empty,
.cc-small-empty,
.cc-clear-state {
  padding: 26px;

  border:
    1px solid var(--border);

  border-radius: var(--radius-md);

  background: white;

  color: var(--muted);

  font-size: 8px;
  line-height: 1.55;

  text-align: center;
}


/* =========================================================
   MOBILE DRAWER SUPPORT
   app.js controls open state
   ========================================================= */

.baseos-mobile-menu {
  display: none;
}

.baseos-mobile-overlay {
  display: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1180px) {

  .main {
    padding:
      0 24px 60px;
  }

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

  .campaign-metrics,
  .campaign-data-grid,
  .campaign-performance-grid {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

  .cc-quick-actions {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

  .bc-area-grid,
  .bc-portfolio-grid,
  .base-creations-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 900px) {

  html,
  body {
    width: 100%;
    max-width: 100%;

    overflow-x: hidden;
  }

  .baseos {
    display: block;
  }

  .sidebar {
    z-index: 1001;

    width:
      min(
        82vw,
        288px
      );

    height: 100dvh;

    padding:
      19px 13px 16px;

    transform:
      translateX(-105%);

    transition:
      transform 220ms
      cubic-bezier(
        .2,
        .75,
        .2,
        1
      );

    box-shadow:
      25px 0 70px
      rgba(0, 0, 0, .22);
  }

  body.baseos-mobile-nav-open
  .sidebar {
    transform:
      translateX(0);
  }

  .baseos-mobile-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000;

    background:
      rgba(8, 8, 9, .37);

    backdrop-filter:
      blur(4px);
  }

  body.baseos-mobile-nav-open
  .baseos-mobile-overlay {
    display: block;
  }

  .main {
    width: 100%;

    margin-left: 0 !important;

    padding:
      0 14px 45px;
  }

  .topbar {
    min-height: 67px;

    margin-bottom: 11px;

    padding:
      10px 0;

    background:
      rgba(244, 244, 241, .94);
  }

  .baseos-mobile-menu {
    width: 38px;
    height: 38px;

    flex: 0 0 auto;

    display: block;

    padding: 0;

    border:
      1px solid var(--border);

    border-radius: 11px;

    background: white;

    cursor: pointer;
  }

  .baseos-mobile-menu span {
    display: block;

    width: 14px;
    height: 1.5px;

    margin: 3px auto;

    border-radius:
      var(--radius-pill);

    background: #111;
  }

  .topbar h1,
  #page-title {
    overflow: hidden;

    font-size: 17px;

    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .ask-base-button {
    width: 38px;
    height: 38px;

    padding: 0;

    overflow: hidden;

    font-size: 0;
  }

  .ask-base-button::before {
    content: "✦";

    font-size: 12px;
  }

  .app-content {
    padding-bottom: 20px;
  }

  .module-header {
    align-items: flex-start;
    flex-direction: column;

    gap: 10px;
  }

  .module-header h2 {
    font-size: 25px;
  }

  .module-header
  .primary-action {
    width: 100%;
  }

  .task-summary,
  .tasks-live-summary,
  .client-summary,
  .business-summary,
  .team-summary,
  .knowledge-summary,
  .crm-summary,
  .campaign-summary,
  .reports-summary,
  .automation-summary {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .client-grid,
  .business-grid,
  .team-grid,
  .knowledge-grid,
  .reports-grid,
  .reports-live-grid {
    grid-template-columns:
      1fr;
  }

  .content-brand-tabs,
  .tasks-live-filters,
  .knowledge-filters,
  .task-toolbar {
    flex-wrap: nowrap;

    overflow-x: auto;

    padding-bottom: 3px;

    scrollbar-width: none;
  }

  .content-brand-tabs::-webkit-scrollbar,
  .tasks-live-filters::-webkit-scrollbar,
  .knowledge-filters::-webkit-scrollbar,
  .task-toolbar::-webkit-scrollbar {
    display: none;
  }

  .content-brand-tab,
  .tasks-live-filters button,
  .knowledge-filters button,
  .task-filter {
    flex: 0 0 auto;
  }

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

  .content-overview {
    align-items: flex-start;
    flex-direction: column;
  }

  .tasks-live-card {
    align-items: stretch;
    flex-direction: column;

    gap: 11px;
  }

  .tasks-live-actions {
    width: 100%;

    display: grid;

    grid-template-columns:
      1fr 1fr 1fr;
  }

  .tasks-live-actions
  select,
  .tasks-live-actions
  button {
    width: 100%;
  }

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

  .team-task-row {
    align-items: stretch;
    flex-direction: column;
  }

  .team-task-row select {
    width: 100%;
  }

  .campaign-card-header,
  .campaign-detail-header {
    flex-direction: column;
  }

  .campaign-metrics,
  .campaign-data-grid,
  .campaign-performance-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .automation-layout {
    grid-template-columns:
      1fr;
  }

  .cc-hero {
    grid-template-columns:
      1fr;

    gap: 18px;

    padding: 20px;
  }

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

  .cc-two-column,
  .cc-approval-grid {
    grid-template-columns:
      1fr;
  }

  .cc-command-card {
    grid-template-columns:
      25px 1fr;

    align-items: flex-start;
  }

  .cc-command-actions {
    grid-column:
      1 / -1;

    justify-content: flex-start;

    padding-left: 35px;
  }

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

  .base-ai-hero {
    flex-direction: column;

    padding: 20px;
  }

  .base-ai-layout {
    grid-template-columns:
      1fr;
  }

  .base-ai-sidebar {
    position: static;
  }

  .base-ai-command-list {
    display: grid;

    grid-template-columns:
      repeat(
        2,
        1fr
      );
  }

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

  .bc-hero,
  .base-creations-hero {
    grid-template-columns:
      1fr;

    padding: 20px;
  }

  .bc-area-grid,
  .bc-portfolio-grid,
  .base-creations-grid {
    grid-template-columns:
      1fr;
  }

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

  .base-modal {
    align-items: flex-end;

    padding: 0;
  }

  .base-modal-card {
    width: 100%;
    max-width: none;

    max-height: 92dvh;

    margin: 0;

    padding:
      19px 16px
      calc(
        18px +
        env(
          safe-area-inset-bottom
        )
      );

    border-radius:
      22px 22px 0 0;
  }

  .base-modal-card input,
  .base-modal-card select,
  .base-modal-card textarea,
  .base-modal-card
  .primary-action {
    min-height: 44px;
  }

  .task-modal-row,
  .campaign-form-row,
  .campaign-form-grid {
    grid-template-columns:
      1fr;
  }

}


/* =========================================================
   SMALL PHONE
   ========================================================= */

@media (max-width: 520px) {

  .main {
    padding:
      0 10px 35px;
  }

  .topbar {
    gap: 7px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .icon-button,
  .baseos-mobile-menu,
  .ask-base-button {
    width: 36px;
    height: 36px;
  }

  .module-header h2 {
    font-size: 23px;
  }

  .cc-hero-copy h2 {
    font-size: 25px;
  }

  .cc-command-actions {
    padding-left: 0;
  }

  .cc-command-actions button {
    flex:
      1 1 auto;

    min-height: 32px;
  }

  .cc-quick-actions,
  .base-ai-command-list {
    grid-template-columns:
      1fr;
  }

  .campaign-metrics,
  .campaign-data-grid,
  .campaign-performance-grid {
    grid-template-columns:
      1fr 1fr;
  }

  .bc-system-info {
    grid-template-columns:
      1fr;
  }

}


/* =========================================================
   MOTION ACCESSIBILITY
   ========================================================= */

@media (
  prefers-reduced-motion:
  reduce
) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration:
      .01ms !important;

    animation-iteration-count:
      1 !important;

    transition-duration:
      .01ms !important;
  }

}