.dashboard-v2 {
  position: relative;
  display: grid;
  gap: 8px;
}

.dashboard-v2[hidden] {
  display: none;
}

.dashboard-v2 header {
  display: flex;
  justify-content: space-between;
}

.dashboard-body {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 8px;
}

.dash-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  height: calc(100dvh - 58px);
  overflow: auto;

}

.dash-side {
  display: grid;
  grid-template-rows: 35px 1fr auto;
  gap: 8px;
  height: calc(100dvh - 58px);
}

.dash-main[hidden],
.dashboard-simple[hidden],
.dash-side[hidden] {
  display: none
}

.side-btn-row {
  display: flex;
  gap: 6px;
  background: radial-gradient(circle at top left, color-mix(in srgb, var(--primary, #7c5cff) 10%, transparent), transparent 48%),    linear-gradient(180deg, color-mix(in srgb, var(--strans) 95%, transparent), color-mix(in srgb, var(--strans) 84%, transparent));
  padding: 6px;
  border-radius: 10px;
  align-items: center;
  justify-content: space-between;
}

.greet-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dash-hero {
  align-items: center;
  border-radius: 15px;
  background: center/cover no-repeat;
}

.greet {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dash-hero h1 {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 30px);
  -webkit-text-stroke: thin;
  color: #fff;
}

.dash-hero .muted {
  margin: 0;
  color: #bcb8b8;
  font-size: 11px;
  font-weight: 500;
}

.dash-hero .quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.skeleton {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  animation: pulse 1.5s infinite;
}

.skeleton-text {
  height: 1em;
  width: 60%;
  margin-bottom: 0.5rem;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.6;
  }
}

.cards-3 {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 8px;
}

.dash-main .btn {
  background: var(--strans);
  height: auto !important;
  padding: 4px 10px;
  border-radius: 999px;
  scale: 1;
  transition: scale .3s ease-out, transform .3s ease;
  color: var(--text);
  text-wrap-mode: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.trend-controls .bits-ss-btn{min-height: 24px;height: auto;padding: 0px 10px;border: 0;background: var(--strans);border-radius:999px;}

#timeTrackCard header {
  display: flex;
  justify-content: space-between
}

.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.dash-card-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==============================================================
   Unified dashboard card grid (4 columns)
   - Each card is grid-1 or grid-2 via data-span
   - JS inserts .dash-filler so each row always sums to 4
   ============================================================== */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: 1fr 1fr 1fr;
  gap: 8px;
  min-height: 0;
  height: -webkit-fill-available;
  overflow: clip;
  align-content: start;
}

.dash-grid>*[data-span="2"] {
  grid-column: span 2;
}

.dash-grid .dash-filler {
  border-radius: 15px;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  min-height: 48px;
}

.dashboard-v2.is-editing .dash-grid .dash-filler {
  opacity: .35;
  border: 1px dashed var(--line);
  background: color-mix(in srgb, var(--surface), transparent 45%);
}

.mini-card {
  border-radius: 15px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: -webkit-fill-available;
  background: radial-gradient(circle at top left, color-mix(in srgb, var(--primary, #7c5cff) 10%, transparent), transparent 48%),    linear-gradient(180deg, color-mix(in srgb, var(--strans) 55%, transparent), color-mix(in srgb, var(--strans) 84%, transparent));
  background-blend-mode: var(--blend);
}

.mini-card header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.mini-card[hidden],
.dashboard-v2 .card[hidden] {
  display: none
}

.dash-main .btn:hover {
  scale: 1.05;
  transform: translateY(-1px);
  transition: scale .3s ease-in, transform .3s ease;
}

h1,
h2, 
h3 {
  margin: 0 !important;
}

.side-card {
  background: radial-gradient(circle at top left, color-mix(in srgb, var(--primary, #7c5cff) 10%, transparent), transparent 48%),    linear-gradient(180deg, color-mix(in srgb, var(--strans) 95%, transparent), color-mix(in srgb, var(--strans) 84%, transparent));
  background-blend-mode: var(--blend);
  padding: 5px;
  border-radius: 12px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 5px;
  min-height: 0;
}

@media (max-width: 900px) {
  .cards-3 {
    grid-template-columns: 1fr;
  }
}

.dashboard-v2 .card {
  padding: 6px 10px;
  border-radius: 18px;
  display: block;
  height: -webkit-fill-available;
  overflow: auto;
  /* border: var(--line); */
  background: radial-gradient(circle at top left, color-mix(in srgb, var(--primary, #7c5cff) 10%, transparent), transparent 48%),    linear-gradient(180deg, color-mix(in srgb, var(--strans) 95%, transparent), color-mix(in srgb, var(--strans) 84%, transparent));
  background-blend-mode: var(--blend);
}

.greet-card {
  background: var(--surface);
  border-radius: 15px;
  border: none !important;
  display: flex !important;
  justify-content: space-between !important;
  height: 37px !important;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.card .btn-row {
  gap: 2px;
  padding: 0;
}

.card {
  border-radius: 18px;
  padding: 12px;
  margin: 0;
}

#autoListPage {
  display: grid;
  grid-template-rows: 70vh 20.6vh;
  gap: 2px;
}

.notes.card {
  height: 91vh;
  display: grid;
  grid-template-rows: 35px 1fr;
}

#noteTop {
  height: 5vh;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

#notesList .item {
  display: grid;
  grid-template-rows: 20px 20px 1fr;
  gap: 2px;
  border-radius: 10px;
  overflow: hidden;
  padding: 5px;
  background: linear-gradient(10deg, var(--bg), var(--primary-faded));
}

.dash-mini.list {
  overflow: auto;
  gap: 3px;
  border-radius: 10px;
  height: -webkit-fill-available;
  min-width: 0;
}
#myTasks .item{display:flex;font-size: 11px;padding: 2px 5px;/* background:linear-gradient(10deg,var(--bg),var(--primary-faded)); */justify-content: space-between;flex-direction: row-reverse;}
#myTasks .muted{font-size:10px}

/* Unified Inbox Triage */
.triage-card{
  display:grid;
  grid-template-rows: auto minmax(0, 1fr);
  height:-webkit-fill-available;
  min-height: 0;
  gap: 2px;
}

.triage-card .triage-head {
  display: flex;
  gap: 6px;
  flex-direction: row;
  justify-content: space-between;
}

.triage-card .triage-head h2 {
  margin: 0;
  font-size: 15px;
}

.triage-filters {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

/* Triage filter (Bits.SingleSelect) */
.triage-filters .triage-select {
  width: 100%;
}

.triage-filters .bits-ss {
  width: 100%;
}

.triage-filters .bits-ss-btn {
  width: 100%;
  min-width: 0;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
}

.triage-filters .bits-ss-list {
  min-width: 180px;
}

.triage-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 5px !important;
  font-size: 11px;
  border-radius: 999px;
  border: var(--line);
}

.triage-chip i {
  font-size: 12px;
  opacity: .9;
}

.triage-chip span {
  line-height: 1;
}

.triage-chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  border-color: var(--primary);
}

.triage-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0px;
  overflow: auto;
  padding-right: 3px;
  margin-right: -5px;
}

.dashboard-simple .triage-list {
  gap: 5px;
  height: auto;
  min-height: 0;
}

.dash-inbox-item {
  list-style: none;
  padding: 2px 0;
}

.dash-inbox-btn {
  --src: var(--primary);
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 4px 6px;
  border: var(--line);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  text-align: left;
}

.dash-inbox-btn[data-source="chat"] {
  --src: var(--success, var(--primary));
}

.dash-inbox-btn[data-source="email"] {
  --src: var(--warning, var(--primary));
}

.dash-inbox-btn[data-source="social"] {
  --src: var(--primary-light, var(--primary));
}

.dash-inbox-btn:hover {
  background: color-mix(in srgb, var(--src) 6%, var(--surface));
  transform: translateY(-1px);
  box-shadow: inset 1px 0 0 color-mix(in srgb, var(--src) 60%, transparent);
  transition: transform .15s ease, background .15s ease;
}

.dash-inbox-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--src) 55%, transparent);
  outline-offset: 2px;
}

.dash-inbox-icon {
  flex: 0 0 28px;
  width: 20px;
  height: 25px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  background: color-mix(in srgb, var(--src) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--src) 30%, var(--line));
}

.dash-inbox-icon .bi {
  font-size: 12px;
  color: var(--src);
  opacity: .95;
}

.dash-inbox-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dash-inbox-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.dash-inbox-right {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.dash-inbox-sender {
  font-size: 10px;
  font-weight: 500;
  width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-inbox-time {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: .9;
}

.dash-inbox-bottom {
  display: flex;
  gap: 6px;
  min-width: 0;
  align-items: baseline;
}

.dash-inbox-heading {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}

.dash-inbox-details {
  font-size: 10px;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.dash-inbox-badge {
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--src) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--src) 30%, var(--line));
  color: var(--src);
}

.dash-inbox-empty {
  list-style: none;
  color: var(--text-muted);
  padding: 8px 6px;
}

#calendarEvents .item {
  display: flex;
  padding: 4px 5px;
  flex-direction: column-reverse;
  justify-content: space-between;
  border: none;
  /* background: var(--surface); */
}

#calendarEvents span {
  text-overflow: ellipsis;
  text-wrap-mode: nowrap;
  overflow: hidden;
  font-size: 10px;
  display: flex;
}

#filesPanel {
  height: 91vh;
}

.file-card .sm {
  align-content: center;
  height: 20px !important;
  padding: 0 5px;
  font-size: 12px;
}

.card.file-card {
  background: var(--bg);
  max-height: 30vh;
  border: var(--line);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px 5px;
}

.card.file-card:hover {
  border-bottom: inset 1px var(--primary-faded);
  transition: border-bottom .5s ease
}

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

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-template-rows: repeat(auto-fill, max(190px));
  gap: .5rem;
  min-height: 140px;
  overflow: auto;
  position: relative;
  padding: 10px 0 35px 0;
}

.files-actions-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  position: absolute;
  bottom: 3px;
  z-index: 10;
}

#splitCloudPicker {
  padding: 2px;
  width: 16px;
  height: 16px;
  display: flex;
}

.card header h2, .dashboard-v2 header h2 {
  margin: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 68px);
  margin-top: 4px;
  gap: 3px;
}

.kpi {
  padding: 5px;
  border-radius: 10px;
  background: var(--bg);
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  overflow: hidden;
}

.kpi-num {
  font-variant-numeric: tabular-nums;
  font-size: 20px;
}

.kpi-label {
  color: var(--muted);
  font-size: 12px;
}

.monitor-week {
  display: flex;
  gap: 6px;
}

.monitor-week .day-pill {
  position: relative;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.monitor-week .day-pill::before {
  content: attr(data-slot);
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  line-height: 1.5em;
  text-align: center;
  border-radius: 999px;
  margin-right: 6px;
  background: var(--surface-2);
}

.monitor-week .day-pill .after {
  font: inherit;
  border-radius: 999px;
  padding: 2px 6px;
  margin-left: 6px;
  border: 1px solid var(--line);
  opacity: .85;
}

.monitor-week .day-pill[style*="green"] {
  background: #0f03/0;
}

.monitor-week .day-pill[style*="orange"] {
  background: #fa0/0;
}

.monitor-week .day-pill[style*="red"] {
  background: #f44/0;
}

/* =================================================================== */
/* Mini Calendar Widget (Consolidated and Refactored)                  */
/* =================================================================== */

/* --- Main Widget Container --- */
.mini-cal {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  overflow: hidden;
  /* Crucial for height animation */
  /* The smooth height animation */
  transition: height 0.4s ease-in-out;
}

/* --- State: Compact (Default) --- */
.mini-cal.compact {
  height: 25vh;
}

/* --- State: Expanded --- */
.mini-cal.expanded {
  height: 51vh;
  /* A large value to accommodate the grid */
}

/* --- Compact View: Specific Elements --- */
.mini-cal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-weight: 600;
  color: var(--primary-light);
  /* Fade animation */
  text-decoration: underline;
  text-shadow: 1px 0px black;
  transition: opacity 0.3s ease-out;
}

.mini-cal__date {
  font-size: 1.75rem;
  /* Larger date text */
  font-weight: 700;
  line-height: 1;

  /* Fade animation */
  transition: font-size .3s ease, opacity 0.3s ease-out;
}

.mini-cal__meta {
  font-size: 0.9em;
  margin-top: 5px;
  display: grid;
  gap: 4px;
  /* Fade animation */
  transition: opacity 0.3s ease-out;
}

.mini-cal__ongoing {
  margin-top: 5px;
  color: #fff;
}

.mini-cal__weather {
  display: grid;
  align-items: center;
  grid-template-columns: repeat(1, 30px 1fr);
  gap: 0 5px;
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  margin-left: -8px;
}


/* --- Expand/Collapse Button --- */
.mini-cal__expand {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  opacity: 0;
  /* Hidden by default */
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.mini-cal .mini-cal__expand {
  opacity: 0;
}

/* Show button when hovering on the entire widget */
.mini-cal:hover .mini-cal__expand {
  opacity: 1 !important;
  pointer-events: all;
}

.mini-cal__expand:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mini-cal.expanded .mini-cal__expand {
  position: absolute;
  top: 2%;
  right: 6%;
  width: 25px;
  height: 25px;
  border-radius: 10px
}

/* Change icon to 'collapse' when expanded */
.mini-cal.expanded .mini-cal__expand::before {
  content: "\f27d";
  /* Bootstrap icon class for 'arrows-collapse' */
}

.mini-cal.expanded .mini-cal__weather {
  display: none;
}

/* --- Content Fading Logic --- */
.mini-cal.expanded .mini-cal__date {
  font-size: 25px;
  line-height: 1
}

.mini-cal.expanded .mini-cal__ongoing {
  opacity: 1;
  pointer-events: none;
  /* Prevents interaction with invisible elements */
}

.mini-cal.compact .mini-cal__grid {
  opacity: 0;
  pointer-events: none;
}

/* --- Expanded View: The Calendar Grid --- */
/* NOTE: Using the unified class name `.mini-cal__grid` from the JS */
.mini-cal__grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  /* Fade animation (with a slight delay on fade-in) */
  transition: opacity 0.3s ease-out 0.1s;
}

.mini-cal__grid[hidden] {
  display: none
}

/* Using the unified class name `.mini-cal__cell` from the JS */
.mini-cal__cell {
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: default;
  -webkit-backdrop-filter: var(--backdrop);
  backdrop-filter: var(--backdrop);
  isolation: isolate;
}

.mini-cal__cell.empty {
  opacity: .13;
  background: transparent;
  border: 2px dashed;
}

/* Event indicator styles */
.mini-cal__cell.day.low {
  background: var(--primary-faded);
  border-color: rgba(82, 182, 154, .35);
}

.mini-cal__cell.day.mid {
  background: rgba(255, 186, 73, .18);
  border-color: rgba(255, 186, 73, .35);
}

.mini-cal__cell.day.hi {
  background: rgba(244, 67, 54, .16);
  border-color: rgba(244, 67, 54, .35);
}

.mini-cal__cell.day:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
  transform: translateY(-1px);
  transition: all .15s ease-in-out;
}

.mini-cal__cell.is-today {
  outline: 2px solid var(--primary-light);
  border-radius: 6px;
  font-weight: 600;
}

/* === [PATCH] Weather overlay effects for dashboard hero === */
.dash-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
}

.dash-hero .wx-effect {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Sunshine: soft radial glow and slow spin */
.dash-hero .wx-effect.wx-sunshine::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 200, .35), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 200, .2), transparent 55%);
  animation: wxSpin 60s linear infinite;
  opacity: .25;
}

/* Rainfall: diagonal streaks */
.dash-hero .wx-effect.wx-rainfall::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image: repeating-linear-gradient(120deg, rgba(255, 255, 255, .25) 0 2px, transparent 2px 12px);
  animation: wxSlideY 800ms linear infinite;
  opacity: .22;
}

/* Cloudy: gentle moving haze */
.dash-hero .wx-effect.wx-cloudy::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse at top left, rgba(255, 255, 255, .18), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(255, 255, 255, .12), transparent 60%);
  animation: wxDrift 18s ease-in-out infinite;
  opacity: 1;
}

/* Snowfall: soft flakes */
.dash-hero .wx-effect.wx-snowfall::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .9) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, .7) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px);
  background-size: 12px 12px, 18px 18px, 24px 24px;
  background-position: 0 0, 6px -6px, -6px 6px;
  animation: wxFall 3s linear infinite;
  opacity: .20;
}

/* Stormy: occasional lightning flash */
.dash-hero .wx-effect.wx-stormy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .0);
  animation: wxFlash 6s steps(1, end) infinite;
  opacity: .0;
}

@keyframes wxSpin {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes wxSlideY {
  from {
    transform: translateY(-15px);
  }

  to {
    transform: translateY(15px);
  }
}

@keyframes wxDrift {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(6px, -6px);
  }
}

@keyframes wxFall {
  from {
    background-position: 0 0, 6px -6px, -6px 6px;
  }

  to {
    background-position: 0 24px, 6px 18px, -6px 30px;
  }
}

@keyframes wxFlash {

  0%,
  85%,
  100% {
    background: rgba(255, 255, 255, 0);
  }

  86% {
    background: rgba(255, 255, 255, .35);
  }

  87% {
    background: rgba(255, 255, 255, 0);
  }

  93% {
    background: rgba(255, 255, 255, .2);
  }

  94% {
    background: rgba(255, 255, 255, 0);
  }
}

/* Swipe animations (preserved from your original CSS) */
.mini-cal__grid.swipe-left {
  animation: swipeLeft .25s ease;
}

.mini-cal__grid.swipe-right {
  animation: swipeRight .25s ease;
}

@keyframes swipeLeft {
  from {
    transform: translateX(0)
  }

  to {
    transform: translateX(-12px);
    opacity: .9
  }
}

@keyframes swipeRight {
  from {
    transform: translateX(0)
  }

  to {
    transform: translateX(12px);
    opacity: .9
  }
}

/* Activity Trend */
.activity-trend-card {
  padding: 8px 12px;
}

.trend-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.trend-title {
  font-weight: 600;
}

.trend-legend {
  display: flex;
  gap: 12px;
  align-items: center;
}

.legend-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.legend-dot::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.dot-updates::before {
  background: var(--accent-3, #6a5acd);
}

.legend-dot.dot-conversations::before {
  background: var(--accent-2, #1e90ff);
}

.legend-dot.dot-triggers::before {
  background: var(--accent-1, #2ecc71);
}

.trend-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.trend-controls .bits-ss-btn{min-height: 0;height: 20px;}
.seg {
  display: inline-flex;
  border: var(--line);
  border-radius: 10px;
  padding: 3px;
  overflow: hidden;
}

.seg-btn {
  padding: 4px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.seg-btn[aria-pressed="true"] {
  background: var(--primary);
}

.trend-body {
  position: relative;
  height: 130px;
  border-radius: 20px;
}

.trend-svg {
  width: 100%;
  height: 145px;
}

.trend-svg text {
  font-size: 20px !important;
  font-weight: 800;
  text-transform: lowercase;
  color: var(--text);
}

.trend-svg .line {
  fill: none;
  stroke-width: 2.5;
}

.trend-svg .line.updates {
  stroke: var(--accent-3, #6a5acd);
}

.trend-svg .line.conversations {
  stroke: var(--accent-2, #1e90ff);
}

.trend-svg .line.triggers {
  stroke: var(--accent-1, #2ecc71);
}

.trend-svg .dot {
  pointer-events: all;
  stroke-width: 2px;
  stroke: transparent;
}

.trend-svg .dot.updates {
  stroke: var(--accent-3, #6a5acd);
}

.trend-svg .dot.conversations {
  stroke: var(--accent-2, #1e90ff);
}

.trend-svg .dot.triggers {
  stroke: var(--accent-1, #2ecc71);
}

.trend-svg .gx {
  stroke: var(--line);
  opacity: .25;
}

.trend-tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  pointer-events: none;
}

/* Overlay for Activity Highlight */
.trend-overlay {
  position: absolute;
  top: -20px;
  inset: 2px -4px -20px;
  margin: auto;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary-faded), transparent 25%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  isolation: isolate;
  border-radius: 15px;
}

.trend-overlay[hidden] {
  display: none;
}

.overlay-inner {
  block-size: 100%;
  border-radius: 12px;
  padding: 2px 4px;
  display: flex;
  gap: 5px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hl {
  border: var(--line);
  border-radius: 10px;
  padding: 5px;
  display: grid;
  grid-template-areas:
    "n n btn"
    "l l btn";
  align-items: center;
  gap: 2px 0;
  background: color-mix(in srgb, var(--primary), transparent 93%);
}

.hl .n {
  grid-area: n;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.hl .l {
  grid-area: l;
  color: var(--bgblur);
  font-size: 12px;
}

.hl .route {
  grid-area: btn;
  justify-self: end;
  border: none;
  background: transparent;
  cursor: pointer;
  display: block;
  height: auto;
  padding: 0;
  border-radius: 0;
}

.hl-updates {
  background: color-mix(in srgb, var(--accent-3), transparent 93%);
}

.hl-conversations {
  background: color-mix(in srgb, var(--accent-2), transparent 93%);
}

.hl-triggers {
  background: color-mix(in srgb, var(--primary), transparent 93%);
}

/* Activity Trend overlay: show a compact 2-up header + source segments */
.trend-overlay .grid-3 {
  grid-template-columns: 1fr 1fr;
  min-height: 0;
  gap: 5px;
}

.trend-segments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: -webkit-fill-available;
  gap: 4px;
}

.trend-segments .seg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  border: var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary-faded), transparent 45%);
  font-size: 12px;
}

.trend-segments .seg-row .n {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

/* Project progress (dashboard Projects card) */
.proj-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  block-size: 100%;
  padding: 6px 4px;
}

.proj-gauge {
  position: relative;
  width: 100%;
  max-width: 240px;
  height: 85px;
  display: grid;
  place-items: center;
}

.proj-gauge-svg {
  width: 100%;
  height: auto;
  display: block;
}

.proj-gauge-track {
  fill: none;
  stroke: var(--primary-faded);
  stroke-width: 18;
  stroke-linecap: round;
  opacity: .18;
}

.proj-gauge-seg {
  fill: none;
  stroke-width: 30px;
  /* stroke-linecap: round; */
  stroke-dasharray: 0 251;
  stroke-dashoffset: 0;
  transition: stroke-dasharray .6s ease, stroke-dashoffset .6s ease;
}

.proj-gauge-seg.done {
  stroke: var(--primary-light);
}

/* completed */
.proj-gauge-seg.prog {
  stroke: var(--primary);
}

/* in progress */
.proj-gauge-seg.pend {
  stroke: url(#projPendingHatch);
}

/* pending */
.proj-gauge-center {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -30%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.proj-gauge-pct {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: .2px;
}

.proj-gauge-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.proj-legend {
  width: -webkit-fill-available;
  display: grid;
  gap: 4px;
  overflow: hidden;
}

.proj-legend-top,
.proj-legend-bottom {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 5px;
}

.proj-legend-item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 4px 4px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--primary-faded), transparent 40%);
  font-size: 11px;
}
.proj-legend-item span{
    text-overflow: ellipsis;
    overflow: hidden;
}
.proj-legend-val {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 11px;
}

.proj-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.proj-dot.done {
  background: var(--primary-light);
}

.proj-dot.prog {
  background: var(--primary);
}

.proj-dot.pend {
  background: repeating-linear-gradient(45deg, var(--primary-faded), var(--primary-faded) 2px, transparent 2px, transparent 4px);
  border: 1px solid var(--primary-faded);
}

/* Donna (AI) card */
.donna-card {
  position: relative;
  overflow: visible;
  display: flex !important;
  flex-direction: column;
  gap: 2px;
}

.donna-card header {
  display: flex;
  justify-content: space-between
}

.donna-assistant {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
}

.donna-bubbles {
  position: absolute;
  left: 0;
  right: 0;
  top: -45px;
  pointer-events: none;
  z-index: 20;
}

.donna-bubble {
  position: absolute;
  max-width: 250px;
  background: var(--side), radial-gradient(300px 300px at -87% 10%, var(--primary-faded), var(--bg));
  border: 1px solid var(--primary-faded);
  border-bottom:0;
  border-radius: 20px;
  padding: 10px;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  isolation: isolate;
  animation: donnaPop 3.6s ease forwards;
}

.donna-bubble::after {
  content: '';
  position: absolute;
  left: 14px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: var(--side), linear-gradient(145deg, transparent 20%, var(--primary-dark)100%);
  border-right: 1px solid var(--primary-dark);
  border-bottom: 2px solid var(--primary-faded);
  transform: rotate(45deg);
}

@keyframes donnaPop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }

  12% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-14px) scale(1);
  }
}

.donna-body {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-direction: column;
}

.donna-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--side), radial-gradient(300px 300px at -87% 10%, var(--primary-faded), transparent);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  flex: 0 0 auto;
  border: 1px solid var(--primary-faded);
}

.donna-copy {
  min-width: 0;
  display: flex;
  gap: 6px;
}

.donna-copy .btn-row {
  gap: 6px;
}

.donna-copy .btn-row .btn {
  height: 24px;
  padding: 0 10px;
}

.donna-assistant .assistant-out {
  overflow: auto;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary-faded), transparent 55%);
  font-size: 12px;

  height: 65px;
}

/* Monitor card */
.mon-head {
  display: flex;
  justify-content: space-between;
}

.mon-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px;
  font-size: 11px;
  min-width: 0;
  width: -webkit-fill-available;
  padding: 2px 0;
}
.mon-meta .value{overflow: hidden;width: -webkit-fill-available;text-overflow:ellipsis}
.mon-meta .mono {
  color: var(--muted);
}

.mon-pills {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  height: -webkit-fill-available;
}

.mon-pill {
  display: grid;
  grid-template-rows: 1fr auto;
  text-align: center;
  justify-items: center;
}

.mon-pill .pill {
  width: 80%;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  background: var(--bg);
  border: none;
  border-top: var(--line);
}

.mon-pill .pill::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: var(--h, 20%);
  border-radius: 999px;
  background: var(--primary-faded);
}

.mon-pill .pill::before {
  content: '';
  position: absolute;
  inset: 5px 5px auto 5px;
  height: 11px;
  z-index: 1;
  border-radius: 999px;
  background: var(--ok, #22c55e);
}

.mon-pill .lbl {
  font-size: 7px;
  color: var(--text);
}

/* Revenue card */
.rev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rev-svg {
  width: 100%;
  height: 66%;
}

.rev.line {
  fill: none;
  stroke-width: 2.5;
}

.rev.line.billed {
  stroke: #16a34a;
}

/* green upward zig */
.rev.line.collected {
  stroke: #0ea5e9;
}

/* blue compare */
.rev-svg .gx {
  stroke: var(--line);
  opacity: .25;
}

/* === Time & Automations row === */
.cards-2 {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 2px;
}

/* --- Time card layout --- */
.time-card .time-card-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 8px;
  height: 16vh;
}

.time-card .clock-dock {
  height: 0;
  /* visual docking target, anim uses it for end position */
}

.stopwatch {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  height: 100px;
}

.sw-analog {
  width: 100px;
  height: 100px;
  background: var(--bg);
  border-radius: 20px;
}

.sw-ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 6;
}

.sw-ticks rect {
  fill: var(--text-muted);
  opacity: .5;
}

.sw-hand rect {
  fill: var(--primary);
}

.sw-hub {
  fill: var(--primary);
}

.sw-digital[hidden] {
  display: none;
}

.sw-analog[hidden] {
  display: none !important;
}

.sw-digital {
  display: grid;
  gap: 2px;
}

.swRow {
  position: relative;
  padding: 2px;
  border-radius: 15px;
}

.swRow .digits {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.swRow.swHours {
  padding-right: 40px;
}

.swRow .swSec {
  position: absolute;
  top: 6px;
  right: 12px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  opacity: .8;
}

.time-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.sw-controls {
  display: flex;
  gap: 2px;
}

.time-card .sw-controls .btn {
  margin-right: 4px;
}

/* --- Weekly average semi donut --- */
.avg-pill {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
}

.avg-semi {
  width: 110px;
  height: 65px;
}

.avg-arc-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 14;
  stroke-linecap: round;
}

.avg-arc-fg {
  fill: none;
  stroke: var(--primary);
  stroke-width: 14;
  stroke-linecap: round;
}

.avgNum {
  font-weight: 700;
}

.avgLabel,
.avg-text {
  color: var(--text-muted);
  font-size: 12px;
}

.avgLabel {
  background: var(--bg);
  border-radius: 20px;
  padding: 2px 4px;
  cursor: pointer;
}

/* --- Floating hover panel (opened by top-bar clock) --- */
.floating-timecard {
  position: fixed;
  top: 96px;
  right: 12px;
  width: 360px;
  z-index: 999;
  background: var(--surface), radial-gradient(100px 100px at 10% 10%, var(--primary-faded) -68%, var(--bg));
  background-blend-mode: var(--blend);
  border-radius: 16px;
}

.floating-timecard .hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  cursor: move;
}

.floating-timecard .hdr .title {
  font-weight: 600;
}

.floating-timecard .hdr .x {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.time-card-body {
  display: flex
}

/* edge stickiness */
.floating-timecard.stick-left {
  left: 12px;
  right: auto;
}

.floating-timecard.stick-right {
  right: 12px;
  left: auto;
}

/* --- Automations carousel --- */
#autoCarouselCard header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-direction: row;
}

.auto-card .auto-carousel {
  position: relative;
  overflow: clip;
  height: 85%;
  align-items: flex-start;
  width: 100%;
}

.auto-card .carTrack {
  display: flex;
  transition: transform .4s ease;
  will-change: transform;
}

.auto-card .carSlide {
  flex: 0 0 100%;
  padding: 2px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.carSlide .muted {
  font-size: 10px;
  text-wrap-mode: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  min-width: 0;
  width: -webkit-fill-available;
}

.auto-card .wf {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 2px;
  width: 100%;
  border: 1px dashed var(--strans);
  border-radius: 12px;
  align-items: center;
  justify-content: space-between;
}

.auto-card .wf .node {
  padding: 0px 5px;
  border-radius: 15px;
  background: var(--surface);
  border: var(--line);
  font-size: 9px;
  width: 30px;
  height: 30px;
  overflow: hidden;
  min-inline-size: auto;
  position: relative;
  padding-inline: 4px;
}

.auto-card .wf .arrow {
  opacity: .6;
}

.auto-card .carNav {
  position: absolute;
  bottom: 0;
  border: 0;
  background: var(--primary-faded);
  border-radius: 999px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .15);
  z-index: 1;
}

.auto-card .carNav.left {
  left: 6px;
}

.auto-card .carNav.right {
  right: 6px;
}

.auto-card .carDots {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  display: flex;
  gap: 6px;
  justify-content: center;
}

.auto-card .carDots button {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: var(--bgblur);
  opacity: .7;
  cursor: pointer;
}

.auto-card .carDots button[aria-selected="true"] {
  background: var(--primary);
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────────
   DASHBOARD CUSTOMIZATION LAYER
   ───────────────────────────────────────────────────────────── */

/* Reposition (edit) mode visuals */
.dashboard-v2.is-editing .dash-grid .dash-card, .file-grid .file-card.select-mode {
  position: relative;
  animation: jiggle .18s ease-in-out infinite alternate;
  user-select: none;
}

.dashboard-v2.is-editing .dash-grid .dash-card header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dashboard-v2.is-editing .dash-grid .dash-card header h2 {
  flex: 1;
  min-width: 0;
}

.dashboard-v2.is-editing .dash-grid .dash-card header :is(.btn-row, .trend-controls, button.btn) {
  margin-left: auto;
}

.dashboard-v2.is-editing .dash-grid .dash-card:hover {
  outline: 1px dashed var(--primary);
}

.dash-handle {
  display: none;
  width: 24px;
  height: 24px;
  border-radius: 10px;
  place-items: center;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface), transparent 5%);
  color: var(--text);
}

.dashboard-v2.is-editing .dash-handle {
  display: grid;
  cursor: grab;
  touch-action: none;
}

.dashboard-v2.is-editing .dash-handle:active {
  cursor: grabbing;
}

@keyframes jiggle {
  from {
    transform: rotate(-0.8deg) translateY(-0.4px);
  }

  to {
    transform: rotate(0.8deg) translateY(0.4px);
  }
}

/* Ghost placeholder during drag */
.dash-drop-placeholder,
.dash-placeholder {
  border: 2px dashed var(--primary);
  border-radius: 12px;
  min-height: 48px;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--primary) 10%, transparent) 0 8px, transparent 8px 16px);
}

/* Floating dragged card */
.dash-dragging-card {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  animation: none !important;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .25);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line));
}

body.dash-dragging {
  user-select: none;
  cursor: grabbing;
}

/* Smooth reflow while dragging (FLIP) */
body.dash-dragging .dashboard-v2.is-editing .dash-grid> :not(.dash-placeholder) {
  transition: transform 170ms cubic-bezier(.2, 0, 0, 1);
  will-change: transform;
}

body.dash-dragging .dashboard-v2.is-editing .dash-grid .dash-card {
  animation: none !important;
}

.dash-placeholder {
  pointer-events: none;
}

/* Prevent accidental clicks while editing (leave handle usable) */
.dashboard-v2.is-editing .dash-grid :is([data-nav], a, button, input, textarea, select) {
  pointer-events: none !important;
}

.dashboard-v2.is-editing .dash-grid .dash-handle {
  pointer-events: auto !important;
}

/* Simple view (rebuilt) */
.dashboard-simple {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 8px;
  padding-bottom: 0;
  border-radius: 15px;
  height: 91vh;
}

.simple-hero {
  height: clamp(110px, 20vh, 170px);
  border-radius: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, transparent), transparent),
    var(--dots);
  display: flex;
}

.simple-hero-inner {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.simple-hero-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-width: 160px;
}

.simple-hero-kicker {
  font-size: 12px;
  color: var(--text-muted);
}

.simple-hero-title {
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.simple-hero-sub {
  font-size: 12px;
}

.simple-hero-actions {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.simple-updates .updates-list {
  margin: 0;
  padding-left: 1rem;
}

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

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

.simple-grid>*[data-span="2"] {
  grid-column: 1 / -1;
}


.simple-grid .simple-cell,
.simple-grid .simple-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 6px;
}

.simple-grid :is(.simple-cell, .simple-panel):hover {
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

.simple-grid :is(.simple-cell.no-nav, .simple-panel.no-nav) {
  cursor: default;
  opacity: .92;
}

.simple-cell-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline
}

.simple-cell-title {
  font-weight: 800;
  font-size: 13px;
  margin: 0
}

.simple-cell-desc {
  color: var(--text-muted);
  font-size: 12px
}

.simple-cell-stat {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  opacity: .92
}

.simple-mini-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px
}

.simple-mini-list li {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.simple-mini-list .mini-meta {
  opacity: .85;
  margin-right: 6px
}

.simple-mini-list .mini-title {
  color: var(--text);
  font-weight: 700
}

.simple-kpi {
  display: flex;
  justify-content: space-between;
  gap: 10px
}

.simple-kpi>div {
  display: grid;
  gap: 2px
}

.simple-kpi strong {
  font-size: 12px;
  letter-spacing: .01em
}

/* The three mod-action buttons (top greet) */
.greet-card .mod-actions {
  display: flex;
  gap: 6px;
}

.icon-btn.mod-btn {
  width: 25px;
  height: 25px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: var(--line);
  background: var(--primary-faded);
}

.icon-btn.mod-btn:active {
  transform: scale(0.98);
}

/* Right-click tiny popover */
.mod-pop {
  position: absolute;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  box-shadow: var(--shadow);
}

.mod-pop button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--primary);
  cursor: pointer;
}

/* Add-cards panel (slides over dash-side) */
#cardPicker[open],
#cardPicker.open {
  display: flex;
  flex-direction: column;
}

#cardPicker {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: clamp(240px, 25vw, 360px);
  z-index: 40;
  background: var(--pans) var(--bg);
  backdrop-filter: var(--backdrop);
  border-left: var(--line);
  padding: 10px;
  overflow: auto;
  border-radius: 14px;
  display: none;
}

#cardPicker header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#cardPicker .cap {
  font-size: 12px;
  color: var(--text-muted);
}

#cardPicker .list {
  margin: 8px -5px 0;
  display: grid;
  gap: 5px;
  min-height: 0;
  overflow: auto;
  padding-right: 3px;
  margin-right: -10px;
}

#cardPicker .row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: var(--line);
  border-radius: 12px;
  padding: 6px 4px;
}

#cardPicker .row:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

#cardPicker .row .meta {
  font-size: 12px;
  color: var(--text-muted);
}

#cardPicker header, #cardPicker .actions {
  display: flex;
  padding: 5px 0 0;
  justify-content: space-between;
}

#cardPicker .hl-1fr,
#cardPicker .hl-2fr {
  display: none;
}

#cardPicker[data-size="1"] .hl-1fr,
#cardPicker[data-size="2"] .hl-2fr {
  display: inline;
}

/* Highlight 2-span targets when choosing replacement */
.dash-main .highlight-span-2 {
  outline: 2px solid var(--primary);
}

/* Dashboard loading overlay */
/* Dashboard optimistic skeletons */
.dash-skel {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.dash-skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: dash-shimmer 1.5s infinite;
}

@keyframes dash-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.dash-skel-text {
  height: 12px;
  margin-bottom: 8px;
  width: 100%;
}

.dash-skel-title {
  height: 18px;
  margin-bottom: 12px;
  width: 40%;
}

.dash-skel-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.dash-skel-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

/* Hide loading overlay as it's no longer used */
.dash-loading {
  display: none !important;
}

/* Simple view: floating controls */
.simple-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}


/* Social card */
.social-card .dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  position: relative;
}

.social-card-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px;
  min-height: 0;
  height: -webkit-fill-available;
  overflow: auto;
}

.social-left {
  position: relative;
}

.phone-mock {
  position: relative;
  width: 100px;
  max-width: 100%;
  height: 100%;
}

.phone-bezel {
  border-radius: 15px;
  padding: 0 2px;
  height: -webkit-fill-available;
}

.phone-notch {
  width: 50px;
  height: 10px;
  position: absolute;
  justify-self: anchor-center;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, .08);
  margin: 8px auto 4px;
  z-index: 1;
}

.phone-screen {
  border-radius: 15px;
  background: var(--ubp-bg);
  border: var(--line);
  height: -webkit-fill-available;
  position: relative;
}

.phone-topbar {
  display: flex;
  gap: 6px;
  padding: 1px 3px;
  opacity: .8;
  justify-content: space-between;
}

.phone-topbar .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
}

.phone-feed {
  padding: 2px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ph-block {
  border-radius: 12px;
  background: var(--surface);
  border: var(--line);
  height: 100px;
}

.ph-block.b2 {
  height: 40px;
  opacity: .9;
}

.ph-row {
  height: 12px;
  border-radius: 999px;
  background: var(--surface);
  border: var(--line);
}

.ph-row.r1 {
  width: 82%;
}

.ph-row.r2 {
  width: 74%;
}

.ph-row.r3 {
  width: 65%;
}

.social-rays {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .9;
}

.social-icons {
  position: absolute;
  left: 5px;
  bottom: 3%;
  /* display: grid; */
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  display: flex;
}

.social-icons .sicon {
  width: 20px;
  height: 20px;
  border-radius: 50px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  transform: translateZ(0);
  animation: socPulse 3.2s ease-in-out infinite;
}

.social-icons .sicon i {
  font-size: 10px;
  opacity: 1;
  color: var(--primary-light);
}

@keyframes socPulse {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

.social-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.s-metric {
  border: var(--line);
  background: var(--bg);
  border-radius: 14px;
  padding: 2px 4px;
}

.s-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

.s-top .lbl {
  font-weight: 400;
  font-size: 10px;
}

.s-top .chip {
  font-size: 8px;
  padding: 2px 4px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: rgba(255, 255, 255, .04);
  opacity: .9;
  white-space: nowrap;
}

.s-metric .val {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.s-metric .sub {
  margin-top: 2px;
  font-size: 10px;
}

.social-slider {
  padding-right: 2px;
}

.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.slider-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, .06);
  display: flex;
}

.slider-track .seg {
  height: 100%;
  float: left;
}

.slider-track .seg.spend {
  background: var(--primary);
}

.slider-track .seg.results {
  background: var(--primary-light);
}

.slider-foot {
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.slider-foot .muted {
  font-size: 10px
}

@media (max-width: 980px) {
  .social-card-body {
    grid-template-columns: 1fr;
  }

  .social-icons {
    left: 6px;
    top: 12px;
    flex-direction: row;
  }

  .social-left {
    min-height: 190px;
  }

  .phone-screen {
    min-height: 190px;
  }
}

/* Visibility card */
.visibility-card {
  overflow: hidden;
}

.vis-flip {
  position: relative;
  min-height: 330px;
  perspective: 1100px;
}

.vis-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

.vis-flip.is-flipped .vis-flip-inner {
  transform: rotateY(180deg);
}

.vis-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
}

.vis-back {
  transform: rotateY(180deg);
}

.vis-map-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vis-map {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  display: block;
}

.vis-bg {
  fill: rgba(255, 255, 255, .02);
  stroke: rgba(255, 255, 255, .06);
}

/* Flat dotted world trace */
.vis-land-dot {
  fill: rgba(255, 255, 255, .07);
  opacity: .55;
}

/* Regional dotted highlights (fed by Reports) */
.vis-zone {
  cursor: pointer;
}

.vis-zone:focus-visible {
  outline: none;
}

.vis-halo {
  fill: var(--primary-faded);
  opacity: .06;
  filter: url(#visGlow);
}

.vis-ring {
  fill: none;
  stroke: var(--primary-faded);
  stroke-width: 2;
  opacity: .58;
  stroke-dasharray: 2 7;
}

.vis-node {
  fill: var(--primary);
  filter: url(#visGlow);
}

.vis-zone.is-origin .vis-node {
  fill: var(--primary-light);
}

.vis-zone.is-active .vis-ring {
  opacity: .95;
  stroke-width: 2.2;
}

.vis-zone.is-active .vis-halo {
  opacity: .10;
}

.vis-zone.is-active .vis-node {
  filter: url(#visGlow);
}

.vis-legend {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
  flex-wrap: wrap;
}

.vis-legend .lg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  opacity: .9;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .02);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  color: inherit;
  font: inherit;
}

.vis-legend .lg-item:hover {
  background: rgba(255, 255, 255, .03);
}

.vis-legend .lg-item:active {
  transform: translateY(1px);
}

.vis-legend .lg-item:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary-faded), transparent 35%);
  outline-offset: 2px;
}

.vis-legend .lg-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vis-legend .lg-val {
  font-variant-numeric: tabular-nums;
}

.lg-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  background: var(--primary-faded);
  box-shadow: 0 0 14px color-mix(in srgb, var(--primary-faded), transparent 55%);
}

.vis-detail {
  /* padding:10px 12px 12px; */
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.vis-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.vis-mini {
  border: 1px solid rgba(255, 255, 255, .08);
  background: color-mix(in srgb, var(--primary-faded), transparent 88%);
  border-radius: 12px;
  padding: 3px 5px;
}

.vis-mini-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vis-mini-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vis-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  background: var(--primary-faded);
  box-shadow: 0 0 12px color-mix(in srgb, var(--primary-faded), transparent 55%);
}

.vis-mini-val {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.vis-mini-sub {
  font-size: 10px;
}

.vis-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}

.vis-foot-right {
  font-size: 12px;
  opacity: .8;
}

/* ────────────────────────────────────────────────────────────────────────────
   BOARD OVERHAUL: Handles, Connectors, Popups
   ──────────────────────────────────────────────────────────────────────────── */

/* Resize Handles (Corner Expand) */
#boardsShell .expand-handle {
  cursor: nwse-resize;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: all;
}

#boardsShell .draggable:hover .expand-handle,
#boardsShell .selected .expand-handle,
#boardsShell .expand-handle:hover {
  opacity: 1;
}

#boardsShell .expand-handle-bg {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1px;
}

#boardsShell .expand-handle-icon {
  stroke: var(--text);
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Resize Handles (Line Endpoints) */
#boardsShell .resize-handle {
  fill: var(--bg);
  stroke: var(--primary);
  stroke-width: 2px;
  cursor: grab;
  transition: fill 0.1s, stroke 0.1s, filter 0.1s;
}

#boardsShell .resize-handle:hover {
  fill: var(--primary);
  filter: drop-shadow(0 0 4px var(--primary));
}

/* Connection Ports */
#boardsShell .node-port {
  fill: var(--bg);
  stroke: var(--text-faded);
  stroke-width: 1.5px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: crosshair;
  opacity: 0;
  /* Hidden by default until hover */
}

/* The Primary "Bottom" Dot - always visible-ish or on hover? 
   User said "single visible dot at bottom". Let's make it subtle. */
#boardsShell .node-port.primary {
  opacity: 1;
  fill: var(--card-bg);
  stroke: var(--line);
}

#boardsShell .draggable:hover .node-port.primary {
  stroke: var(--primary);
  fill: var(--primary-faded);
}

/* The "Add" Port (+ sign) */
#boardsShell .node-port.add-port {
  opacity: 0;
  pointer-events: none;
  fill: var(--primary);
  stroke: none;
}

#boardsShell .node-port.add-port.show {
  opacity: 1;
  pointer-events: all;
}

#boardsShell .node-port-plus {
  pointer-events: none;
  fill: #fff;
  font-size: 10px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s;
}

#boardsShell .node-port-plus.show {
  opacity: 1;
}

/* Connectors */
#boardsShell path[data-type="connector"] {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
  transition: stroke 0.2s, stroke-width 0.2s;
}

#boardsShell path[data-type="connector"]:hover {
  stroke: var(--primary) !important;
  filter: drop-shadow(0 0 2px var(--primary));
  cursor: pointer;
}

#boardsShell .connector-arrow-body {
  fill: var(--text-faded);
  pointer-events: none;
}

/* Popups & Menus */
.flow-popup,
.connector-style-popup,
.connector-menu {
  position: fixed;
  z-index: 1000;
  background: rgba(20, 20, 20, 0.85);
  /* Dark glass */
  backdrop-filter: blur(12px);
  isolation: isolate;
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
  animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light Theme Override */
:root[data-theme="light"] .flow-popup,
:root[data-theme="light"] .connector-style-popup,
:root[data-theme="light"] .connector-menu {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #333;
}

.connector-menu {
  min-width: auto;
  flex-direction: row;
  padding: 6px;
  border-radius: 8px;
  gap: 4px;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(4px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.flow-popup input,
.flow-popup textarea,
.connector-style-popup input,
.connector-style-popup select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  border-radius: 6px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: inherit;
  outline: none;
  width: 100%;
}

.flow-popup input:focus,
.flow-popup textarea:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="light"] .flow-popup input,
:root[data-theme="light"] .flow-popup textarea {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.flow-popup label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  margin-bottom: 2px;
}

/* Comment Bubble */
#boardsShell .comment-badge {
  fill: var(--primary);
  stroke: var(--bg);
  stroke-width: 2px;
  cursor: pointer;
  transition: transform 0.2s;
}

#boardsShell .comment-badge:hover {
  transform: scale(1.1);
}

#boardsShell .comment-text {
  fill: #fff;
  font-size: 10px;
  pointer-events: none;
  font-weight: bold;
}

:root[data-theme="light"] #boardsShell .comment-text {
  fill: #fff;
  /* Still white on primary badge */
}

/* Dragging State */
#boardsShell.board-dragging {
  cursor: grabbing !important;
  user-select: none;
}

#boardsShell.board-dragging * {
  pointer-events: none !important;
  /* Pass through to SVG root */
}

/* Guides */
#boardsShell .guide-line {
  stroke: var(--primary);
  stroke-width: 1px;
  stroke-dasharray: 4 2;
  opacity: 0.8;
}

/* -------------------------------------------------------------------------- */
/* Simple dashboard v3 layout (control panel carousel + horizontal card strip) */
/* -------------------------------------------------------------------------- */

.dash-simple-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 10px;
  align-items: start;
  overflow: auto;
  min-height: 0;
  height: -webkit-fill-available;
}

.dash-simple-main {
  display: grid;
  height: -webkit-fill-available;
}

.dash-simple-main > * {
  min-height: 0;
}

.dash-simple-side {
  display: flex;
  flex-direction: column;
  height: -webkit-fill-available;
  gap: 2px;
  overflow: auto;
}

.dashboard-simple .card{padding:6px 10px}
.dashboard-simple .btn{padding:0px 10px; font-size:11px; min-height:24px}

/* Control panel carousel */
.dash-control-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  min-height: 320px;
}

/* Weather cutout (top notch on the control panel carousel) */
.dash-control-panel .cp-weather-cutout {
  position: absolute;
  top: -4px;
  left: 39%;
  z-index: 6;
  padding: 3px 10px;
  border-radius: 0 0 15px 15px;
  border: var(--line);
  background: var(--strans);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  isolation: isolate;
}

.dash-control-panel .cp-weather-cutout .cp-weather {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.dash-control-panel .cp-weather-cutout .cp-weather img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
}

.dash-control-panel .u-carousel-viewport,
.dash-control-panel .u-carousel-track,
.dash-control-panel .u-carousel-slide {
  height: 100%;
}

.dash-control-panel .u-carousel-slide {
  padding: 14px;
}

.dash-control-panel .cp-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  z-index: 3;
}

.dash-simple-controls {
  position: relative;
  display: flex;
  gap: 3px;
  z-index: 4;
}

.dash-simple-controls .btn.sm {
  padding: 6px 10px;
  font-size: 12px;
}

.cp-panel {
  height: 100%;
  border-radius: 16px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--strans);
  color: #fff;
  border: var(--line);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  isolation: isolate;
}

.cp-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cp-kicker {
  font-size: 12px;
  opacity: 0.85;
}

.cp-title {
  font-size: 22px;
  font-weight: 760;
  line-height: 1.1;
}

.cp-progress {
  font-size: 12px;
  opacity: 0.9;
}

.cp-link {
  opacity: 0.9;
  font-weight: 650;
  text-decoration: none;
}

.cp-link:hover {
  text-decoration: underline;
}

.cp-body {
  display: grid;
  gap: 10px;
}

.cp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Getting started checklist */
.gs-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
}

.gs-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary), white 10%);
}

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

.gs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.gs-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.gs-check {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
}

.gs-item.is-done .gs-check::before {
  content: "✓";
  font-size: 12px;
  font-weight: 800;
}

.gs-meta {
  display: grid;
  min-width: 0;
}

.gs-step {
  font-size: 11px;
  opacity: 0.75;
}

.gs-text {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-sub {
  font-size: 11px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  flex: 0 0 auto;
}

.gs-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* AI panel */
.cp-ai .ai-title {
  font-size: 22px;
  font-weight: 820;
}

.cp-ai .ai-donna-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  margin-right: 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.cp-ai .ai-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cp-ai input {
  width: 100%;
  border-radius: 999px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.20);
  color: var(--text);
  outline: none;
}

.cp-ai .ai-send {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  cursor: pointer;
}

.cp-ai .ai-send:hover {
  background: rgba(255, 255, 255, 0.16);
}

.cp-ai .ai-sub {
  opacity: 0.85;
  line-height: 1.35;
}

.cp-ai .ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-ai .ai-chip {
  border-radius: 999px;
  padding: 8px;
  font-size: 11px;
  border: var(--line);
  background: var(--strans);
  color: #fff;
  cursor: pointer;
}

.cp-ai .ai-chip:hover {
  background: rgba(255, 255, 255, 0.12);
}

.cp-ai .ai-response {
  margin-top: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  min-height: 54px;
}

.cp-ai .ai-response:empty {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.cp-ai .ai-response .donna-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cp-ai .ai-response .donna-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.cp-ai .ai-response .donna-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.35;
}

.cp-ai .ai-response .donna-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-ai .ai-response .donna-actions .ai-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  cursor: pointer;
}

.cp-ai .ai-response .donna-actions .ai-action:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Integrations slide */
.int-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.int-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-weight: 650;
}

.int-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Row 2: horizontal card strip */
.dash-simple-strip {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 0px 0 10px;
  background: color-mix(in srgb, var(--surface), transparent 35%);
  overflow: hidden;
}

.dash-strip-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  height: -webkit-fill-available;
}

.dash-strip-scroll::-webkit-scrollbar {
  height: 10px;
}

.dash-strip-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

/* When the real dashboard grid is moved into the strip, convert it to a horizontal row */
.dashboard-simple .dash-grid {
  display: flex;
  gap: 10px;
  height: -webkit-fill-available;
  overflow: auto;

  align-items: stretch;
}

.dashboard-simple .dash-grid > * {
  scroll-snap-align: start;
}

.dashboard-simple .dash-grid .dash-filler,
.dashboard-simple .dash-grid .dash-gap {
  display: none !important;
}

.dashboard-simple .dash-grid > *[data-span="2"] {
  min-width: 400px;
  height: 26vh;
  overflow: hidden;
  border: var(--line);
}

.dashboard-simple .dash-grid > *:not([data-span="2"]) {
  min-width: 200px;
  height: 26vh;
  padding: 2px 8px;
  border: var(--line);
  display: flex;
  flex-direction: column;
  overflow: auto;
}
