:root {
  --cc-bg: #0d0d0f;
  --cc-bg-elevated: #141416;
  --cc-surface: #1a1a1e;
  --cc-surface-hover: #222228;
  --cc-border: rgba(255, 255, 255, 0.07);
  --cc-border-strong: rgba(255, 255, 255, 0.12);
  --cc-ink: #f4f4f5;
  --cc-ink-soft: #a1a1aa;
  --cc-muted: #71717a;
  --cc-blue: #3b82f6;
  --cc-blue-soft: rgba(59, 130, 246, 0.16);
  --cc-green: #22c55e;
  --cc-green-soft: rgba(34, 197, 94, 0.14);
  --cc-red: #ef4444;
  --cc-red-soft: rgba(239, 68, 68, 0.14);
  --cc-orange: #f97316;
  --cc-orange-soft: rgba(249, 115, 22, 0.14);
  --cc-purple: #a855f7;
  --cc-purple-soft: rgba(168, 85, 247, 0.14);
  --cc-yellow: #eab308;
  --cc-yellow-soft: rgba(234, 179, 8, 0.14);
  --cc-radius: 12px;
  --cc-radius-sm: 8px;
  --cc-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --cc-sidebar-width: 240px;
  --cc-font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --cc-font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  /* legacy aliases used across pages */
  --cc-ink: #f4f4f5;
  --cc-charcoal: #f4f4f5;
  --cc-teal: #3b82f6;
  --cc-teal-deep: #60a5fa;
  --cc-mint: #60a5fa;
  --cc-mint-soft: rgba(59, 130, 246, 0.16);
  --cc-line: var(--cc-border);
  --cc-surface-solid: var(--cc-surface);
  --cc-warn: var(--cc-orange);
  --cc-danger: var(--cc-red);
  --cc-sidebar: #111114;
  --cc-sidebar-edge: var(--cc-border);
}

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

html { -webkit-text-size-adjust: 100%; }

body.cc-app {
  margin: 0;
  min-height: 100vh;
  font-family: var(--cc-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--cc-ink);
  background: var(--cc-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.cc-app.is-sidebar-open {
  overflow: hidden;
}

.cc-app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(59, 130, 246, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 0%, rgba(168, 85, 247, 0.05), transparent 50%),
    var(--cc-bg);
}

.cc-app > *:not(.cc-app-bg):not(.cc-palette):not(.cc-ai-drawer):not(.cc-toast) {
  position: relative;
  z-index: 1;
}

.cc-app-frame {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: stretch;
}

/* —— Sidebar —— */
.cc-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: var(--cc-sidebar-width);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.75rem 0.85rem;
  background: var(--cc-sidebar);
  color: var(--cc-ink);
  border-right: 1px solid var(--cc-border);
}

.cc-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  padding: 0.4rem 0.5rem 1rem;
  border-bottom: 1px solid var(--cc-border);
  margin-bottom: 0.65rem;
}

.cc-sidebar-mark {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  position: relative;
}

.cc-sidebar-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 3px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
}

.cc-sidebar-brand-text strong {
  display: block;
  font-family: var(--cc-font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff;
}

.cc-sidebar-brand-text small {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--cc-muted);
}

.cc-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.1rem 0;
  min-height: 0;
}

.cc-sidebar-label {
  margin: 0.4rem 0.55rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cc-muted);
}

.cc-sidebar-link {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--cc-ink-soft);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: left;
  text-decoration: none;
  padding: 0.62rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cc-sidebar-link svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  opacity: 0.75;
}

.cc-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.cc-sidebar-link:hover svg {
  opacity: 1;
}

.cc-sidebar-link.is-active {
  background: var(--cc-blue);
  color: #fff;
  font-weight: 600;
}

.cc-sidebar-link.is-active svg {
  opacity: 1;
}

.cc-sidebar-link--quiet {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--cc-muted);
}

.cc-sidebar-foot {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cc-border);
}

.cc-sidebar-account {
  position: relative;
}

.cc-sidebar-user {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.55rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cc-sidebar-user:hover,
.cc-sidebar-account.is-open .cc-sidebar-user {
  background: rgba(255, 255, 255, 0.05);
}

.cc-sidebar-user-caret {
  flex: 0 0 auto;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: auto;
  border-right: 1.5px solid var(--cc-muted);
  border-bottom: 1.5px solid var(--cc-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease, border-color 0.15s ease;
  opacity: 0.7;
}

.cc-sidebar-account.is-open .cc-sidebar-user-caret {
  transform: rotate(-135deg);
  border-color: var(--cc-blue);
  opacity: 1;
}

.cc-sidebar-account-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 0.4rem);
  z-index: 5;
  padding: 0.35rem;
  background: var(--cc-surface);
  border: 1px solid var(--cc-border-strong);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  animation: cc-menu-up 0.16s ease;
}

.cc-sidebar-account-menu[hidden] {
  display: none !important;
}

.cc-sidebar-account-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.7rem;
  border-radius: 8px;
  color: #fca5a5;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.cc-sidebar-account-item:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.cc-sidebar-account-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.9;
}

@keyframes cc-menu-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.cc-sidebar-avatar {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--cc-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.cc-sidebar-user-meta {
  min-width: 0;
  flex: 1;
}

.cc-sidebar-user-meta strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.cc-sidebar-user-meta .cc-role {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cc-blue);
  background: var(--cc-blue-soft);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.cc-sidebar-user-meta small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: var(--cc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-sidebar-hello {
  margin: 0 0.55rem 0.35rem;
  font-family: var(--cc-font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-blue);
}

.cc-sidebar-backdrop {
  display: none;
}

/* —— Main column —— */
.cc-main {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: var(--cc-sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cc-bg);
}

.cc-mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: rgba(13, 13, 15, 0.92);
  border-bottom: 1px solid var(--cc-border);
  backdrop-filter: blur(14px);
}

.cc-mobile-title {
  margin: 0;
  flex: 1 1 auto;
  font-family: var(--cc-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

.cc-mobile-menu {
  appearance: none;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  background: var(--cc-surface);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
}

.cc-mobile-menu span {
  display: block;
  width: 1rem;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.cc-mobile-voice {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--cc-blue);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

/* —— Page header (desktop) —— */
.cc-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.5rem 0;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.cc-topbar-copy h1 {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.2;
}

.cc-topbar-copy p {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: var(--cc-muted);
}

.cc-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.cc-filter {
  appearance: none;
  border: 1px solid var(--cc-border);
  background: var(--cc-surface);
  color: var(--cc-ink-soft);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 2rem 0.5rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}

.cc-icon-action {
  appearance: none;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  background: var(--cc-surface);
  color: var(--cc-ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.cc-icon-action:hover {
  background: var(--cc-surface-hover);
  color: #fff;
}

.cc-icon-action .cc-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--cc-red);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--cc-bg);
}

.cc-topbar-date {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--cc-muted);
  padding: 0.35rem 0.25rem;
  white-space: nowrap;
}

.cc-shell {
  padding: 1.15rem 1.5rem 2.75rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 960px) {
  .cc-sidebar {
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  body.cc-app.is-sidebar-open .cc-sidebar {
    transform: translateX(0);
  }

  .cc-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
  }

  .cc-sidebar-backdrop[hidden] {
    display: none !important;
  }

  .cc-main {
    margin-left: 0;
  }

  .cc-mobile-bar {
    display: flex;
  }

  .cc-topbar {
    padding: 1rem 1rem 0;
  }

  .cc-shell {
    padding: 1rem 1rem 2.25rem;
  }

  .cc-topbar-date {
    display: none;
  }
}

/* —— Hero (legacy / secondary pages) —— */
.cc-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--cc-radius);
  padding: 1.5rem 1.5rem 1.35rem;
  margin-bottom: 1.25rem;
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  color: #fff;
  animation: cc-fade-up 0.45s ease both;
}

.cc-hero-glow {
  display: none;
}

.cc-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 38rem;
}

.cc-brand {
  margin: 0 0 0.35rem;
  font-family: var(--cc-font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cc-blue);
}

.cc-headline {
  margin: 0 0 0.45rem;
  font-family: var(--cc-font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #fff;
}

.cc-lead {
  margin: 0 0 1rem;
  color: var(--cc-ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 34rem;
}

.cc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.cc-btn:hover {
  transform: translateY(-1px);
}

.cc-btn-primary {
  background: var(--cc-blue);
  color: #fff;
}

.cc-btn-primary:hover {
  background: #2563eb;
}

.cc-btn-ghost {
  background: transparent;
  border-color: var(--cc-border-strong);
  color: var(--cc-ink);
}

.cc-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.cc-panel .cc-btn-ghost,
.cc-pulse .cc-btn-ghost,
.cc-ai-body .cc-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--cc-border);
  color: var(--cc-ink-soft);
}

.cc-btn-block {
  width: 100%;
  justify-content: center;
}

.cc-btn kbd {
  font-size: 0.7rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  font-family: inherit;
}

/* —— KPI stats —— */
.cc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.cc-stat {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.5rem;
  align-items: start;
  padding: 1rem 1rem 0.95rem;
  border-radius: var(--cc-radius);
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  text-decoration: none;
  color: inherit;
  animation: cc-fade-up 0.45s ease both;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  min-width: 0;
}

.cc-stat:nth-child(1) { animation-delay: 0.03s; }
.cc-stat:nth-child(2) { animation-delay: 0.06s; }
.cc-stat:nth-child(3) { animation-delay: 0.09s; }
.cc-stat:nth-child(4) { animation-delay: 0.12s; }
.cc-stat:nth-child(5) { animation-delay: 0.15s; }
.cc-stat:nth-child(6) { animation-delay: 0.18s; }
.cc-stat:nth-child(7) { animation-delay: 0.21s; }

.cc-stat:hover {
  border-color: var(--cc-border-strong);
  background: var(--cc-surface-hover);
  transform: translateY(-2px);
}

.cc-stat.is-pulse::after {
  content: "";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cc-orange);
  box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5);
  animation: cc-pulse 1.6s ease infinite;
}

.cc-stat-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cc-stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cc-muted);
}

.cc-stat-value {
  font-family: var(--cc-font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #fff;
}

.cc-stat-note {
  font-size: 0.72rem;
  color: var(--cc-muted);
  line-height: 1.3;
}

.cc-stat-note.is-warn {
  color: var(--cc-orange);
  font-weight: 600;
}

.cc-stat-note.is-up {
  color: var(--cc-green);
}

.cc-stat-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.cc-stat-icon svg {
  width: 16px;
  height: 16px;
}

.cc-stat-icon--blue { background: var(--cc-blue-soft); color: var(--cc-blue); }
.cc-stat-icon--purple { background: var(--cc-purple-soft); color: var(--cc-purple); }
.cc-stat-icon--green { background: var(--cc-green-soft); color: var(--cc-green); }
.cc-stat-icon--red { background: var(--cc-red-soft); color: var(--cc-red); }
.cc-stat-icon--orange { background: var(--cc-orange-soft); color: var(--cc-orange); }
.cc-stat-icon--teal { background: rgba(20, 184, 166, 0.14); color: #14b8a6; }

/* —— Activity columns —— */
.cc-activity {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.cc-activity-col {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  padding: 1rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  animation: cc-fade-up 0.5s ease both;
  animation-delay: 0.1s;
}

.cc-activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.cc-activity-head h2 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-ink-soft);
}

.cc-count-badge {
  display: inline-flex;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.cc-count-badge--blue { background: var(--cc-blue); }
.cc-count-badge--green { background: var(--cc-green); }
.cc-count-badge--orange { background: var(--cc-orange); }

.cc-activity-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--cc-border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.cc-activity-item:last-child {
  border-bottom: 0;
}

.cc-activity-item:hover .cc-activity-name {
  color: var(--cc-blue);
}

.cc-activity-id {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cc-blue);
  margin-bottom: 0.15rem;
}

.cc-activity-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}

.cc-activity-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--cc-muted);
}

.cc-activity-date {
  font-size: 0.75rem;
  color: var(--cc-muted);
  white-space: nowrap;
  padding-top: 1.15rem;
}

.cc-activity-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cc-muted);
  font-size: 0.88rem;
  text-align: center;
  padding: 1.5rem 0.5rem;
}

/* —— Grid / panels —— */
.cc-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.85rem;
}

.cc-panel {
  grid-column: span 12;
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  padding: 1.05rem 1.1rem 1rem;
  animation: cc-fade-up 0.55s ease both;
  animation-delay: 0.12s;
  min-width: 0;
}

.cc-span-4,
.cc-span-5,
.cc-span-6,
.cc-span-7,
.cc-span-8,
.cc-span-12 {
  grid-column: span 12;
}

@media (min-width: 900px) {
  .cc-span-4 { grid-column: span 4; }
  .cc-span-5 { grid-column: span 5; }
  .cc-span-6 { grid-column: span 6; }
  .cc-span-7 { grid-column: span 7; }
  .cc-span-8 { grid-column: span 8; }
  .cc-span-12 { grid-column: span 12; }
}

.cc-page-hero {
  margin-bottom: 1.15rem;
}

.cc-page-hero .cc-brand {
  color: var(--cc-blue);
}

.cc-page-title {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--cc-font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: #fff;
}

.cc-page-lead {
  margin: 0;
  color: var(--cc-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 42rem;
}

.cc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
  align-items: center;
}

.cc-input {
  flex: 1 1 220px;
  min-width: 0;
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font: inherit;
  background: var(--cc-bg-elevated);
  color: var(--cc-ink);
}

.cc-input::placeholder {
  color: var(--cc-muted);
}

.cc-btn-ghost-light {
  appearance: none;
  border: 1px solid var(--cc-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cc-ink-soft);
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

.cc-table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.cc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 520px;
}

.cc-table th,
.cc-table td {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid var(--cc-border);
  vertical-align: middle;
}

.cc-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cc-muted);
  font-weight: 600;
  white-space: nowrap;
}

.cc-table td {
  color: var(--cc-ink-soft);
}

.cc-table td strong,
.cc-table a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.cc-table a:hover {
  color: var(--cc-blue);
}

.cc-td-actions {
  width: 2.5rem;
  text-align: right;
}

.cc-more {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.cc-more-btn {
  appearance: none;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cc-more-btn span {
  display: block;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 50%;
  background: #a1a1aa;
}

.cc-more-btn:hover,
.cc-more.is-open .cc-more-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--cc-border);
}

.cc-more-btn:hover span,
.cc-more.is-open .cc-more-btn span {
  background: #fff;
}

.cc-more-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  z-index: 20;
  min-width: 8.5rem;
  padding: 0.3rem;
  background: #16161a;
  border: 1px solid var(--cc-border-strong);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  animation: cc-menu-up 0.14s ease;
}

.cc-more-menu[hidden] {
  display: none !important;
}

.cc-more-form {
  margin: 0;
}

.cc-more-item {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #f4f4f5;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.7rem;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
}

.cc-more-item:hover {
  background: rgba(59, 130, 246, 0.16);
  color: #fff;
}

.cc-more-item--danger {
  color: #fca5a5;
}

.cc-more-item--danger:hover {
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.cc-lead-card-top-right {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.cc-pill {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--cc-blue-soft);
  color: var(--cc-blue);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.cc-pill--pending { background: var(--cc-red-soft); color: var(--cc-red); }
.cc-pill--active { background: var(--cc-yellow-soft); color: var(--cc-yellow); }
.cc-pill--done { background: var(--cc-green-soft); color: var(--cc-green); }
.cc-pill--warn { background: var(--cc-orange-soft); color: var(--cc-orange); }

.cc-pct {
  font-weight: 700;
  font-size: 0.85rem;
}

.cc-pct--low { color: var(--cc-red); }
.cc-pct--mid { color: var(--cc-yellow); }
.cc-pct--high { color: var(--cc-green); }

.cc-eff {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 110px;
}

.cc-eff-bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cc-eff-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--cc-blue);
}

.cc-eff-val {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cc-ink-soft);
  min-width: 2.5rem;
}

.cc-delta-up { color: var(--cc-green); font-size: 0.78rem; font-weight: 600; }
.cc-delta-flat { color: var(--cc-muted); font-size: 0.78rem; }

.cc-dl {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.cc-dl > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
}

.cc-dl dt {
  margin: 0;
  color: var(--cc-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.cc-dl dd {
  margin: 0;
  font-weight: 600;
  color: #fff;
}

.cc-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cc-flash {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: var(--cc-blue-soft);
  color: var(--cc-blue);
  font-weight: 600;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cc-flash.is-hiding {
  opacity: 0;
  transform: translateY(-6px);
}

.cc-flash--error {
  background: var(--cc-red-soft);
  color: var(--cc-red);
}

.cc-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  padding: 0.12rem 0.35rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.cc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.cc-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.cc-th-actions {
  text-align: right;
}

.cc-table--users {
  min-width: 760px;
  table-layout: auto;
}

.cc-table--users th.cc-th-actions,
.cc-table--users td.cc-table-actions {
  width: auto;
  min-width: 11.5rem;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.cc-user-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.cc-user-actions .cc-btn {
  transform: none;
  flex: 0 0 auto;
}

.cc-user-actions .cc-btn:hover {
  transform: none;
}

.cc-btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  border-radius: 7px;
  line-height: 1.2;
}

.cc-table .cc-user-actions a.cc-btn {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.cc-table .cc-user-actions a.cc-btn:hover {
  color: inherit;
  text-decoration: none;
}

.cc-select-sm {
  font: inherit;
  font-size: 0.78rem;
  border: 1px solid var(--cc-border);
  border-radius: 7px;
  padding: 0.3rem 0.45rem;
  background: var(--cc-bg);
  color: var(--cc-ink);
  max-width: 9rem;
}

.cc-link-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cc-blue);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.cc-link-btn:hover {
  text-decoration: underline;
}

.cc-btn-danger {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.cc-btn-danger:hover {
  background: rgba(239, 68, 68, 0.28);
  color: #fecaca;
}

.cc-link-btn--danger {
  color: #f87171;
}

.cc-lead-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cc-lead-card-actions .cc-btn {
  flex: 1 1 auto;
}

.cc-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cc-pill.is-ok {
  background: var(--cc-green-soft);
  color: var(--cc-green);
}

.cc-user-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  margin-bottom: 1rem;
}

.cc-user-hero-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.cc-user-hero-avatar {
  width: 3rem;
  height: 3rem;
  font-size: 1.05rem;
}

.cc-user-hero-name {
  margin: 0 0 0.25rem;
  font-family: var(--cc-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.cc-user-hero-stats {
  display: flex;
  gap: 0.75rem;
}

.cc-user-hero-stats div {
  min-width: 4.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.18);
  text-align: center;
}

.cc-user-hero-stats strong {
  display: block;
  font-size: 1.15rem;
  color: #fff;
}

.cc-user-hero-stats span {
  font-size: 0.72rem;
  color: var(--cc-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.cc-lead-history {
  margin-top: 1rem;
}

.cc-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cc-history-item {
  position: relative;
  display: flex;
  gap: 0.85rem;
  padding: 0 0 1.1rem 0.15rem;
}

.cc-history-item:last-child {
  padding-bottom: 0;
}

.cc-history-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 1.1rem;
  bottom: 0;
  width: 1px;
  background: rgba(59, 130, 246, 0.25);
}

.cc-history-dot {
  flex: 0 0 auto;
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.2rem;
  border-radius: 50%;
  background: var(--cc-blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.cc-history-body {
  min-width: 0;
  flex: 1;
}

.cc-history-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.cc-history-time {
  font-size: 0.8rem;
  color: var(--cc-ink-soft);
  font-weight: 500;
}

.cc-history-comment {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #fff;
  line-height: 1.4;
}

.cc-history-meta {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
  color: var(--cc-muted);
}

@media (max-width: 700px) {
  .cc-form-row {
    grid-template-columns: 1fr;
  }

  .cc-row-actions {
    flex-wrap: wrap;
  }
}

.cc-row.is-focus {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.cc-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cc-panel-head h2 {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.cc-panel-head p {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--cc-muted);
}

.cc-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cc-blue);
  text-decoration: none;
  white-space: nowrap;
}

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

.cc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem 0.75rem;
  align-items: start;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.cc-row:hover {
  border-color: var(--cc-border);
  background: rgba(255, 255, 255, 0.05);
}

.cc-row.is-overdue {
  border-color: rgba(239, 68, 68, 0.25);
  background: var(--cc-red-soft);
}

.cc-row-main {
  min-width: 0;
}

.cc-row-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

.cc-row-title:hover {
  color: var(--cc-blue);
}

.cc-row-meta {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--cc-muted);
  line-height: 1.35;
}

.cc-row-hint {
  margin: 0.25rem 0 0;
  font-size: 0.74rem;
  color: var(--cc-orange);
}

.cc-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.cc-chip {
  appearance: none;
  border: 1px solid var(--cc-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cc-ink-soft);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.cc-chip:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: var(--cc-blue-soft);
  color: var(--cc-blue);
}

.cc-chip--primary {
  border-color: rgba(59, 130, 246, 0.45);
  background: var(--cc-blue-soft);
  color: var(--cc-blue);
}

.cc-chip--primary:hover {
  border-color: rgba(59, 130, 246, 0.7);
  background: rgba(59, 130, 246, 0.22);
  color: #fff;
}

.cc-task-update-summary {
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--cc-border);
}

.cc-task-update-desc {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--cc-ink-soft);
  white-space: pre-wrap;
}

.cc-empty {
  margin: 0.5rem 0 0;
  padding: 1rem;
  text-align: center;
  color: var(--cc-muted);
  font-size: 0.88rem;
  border: 1px dashed var(--cc-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.cc-pulse {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cc-pulse-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--cc-border);
  text-decoration: none;
  color: var(--cc-ink-soft);
  font-size: 0.88rem;
}

.cc-pulse-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.cc-pulse-row strong {
  font-family: var(--cc-font-display);
  color: #fff;
}

.cc-chat-jump {
  margin-bottom: 0.75rem;
}

.cc-badge {
  display: inline-flex;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--cc-blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Palette */
.cc-palette[hidden],
.cc-ai-drawer[hidden],
.cc-toast[hidden] {
  display: none !important;
}

.cc-palette {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.cc-palette-backdrop,
.cc-ai-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cc-palette-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100% - 2rem));
  margin: 12vh auto 0;
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: 14px;
  box-shadow: var(--cc-shadow);
  overflow: hidden;
  animation: cc-scale-in 0.2s ease;
}

.cc-palette-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--cc-border);
  padding: 1rem 1.1rem;
  font: inherit;
  font-size: 1.05rem;
  outline: none;
  background: transparent;
  color: #fff;
}

.cc-palette-input::placeholder {
  color: var(--cc-muted);
}

.cc-palette-results {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  max-height: 320px;
  overflow: auto;
}

.cc-palette-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.cc-palette-item:hover,
.cc-palette-item.is-active {
  background: var(--cc-blue-soft);
}

.cc-palette-item strong {
  display: block;
  font-size: 0.9rem;
  color: #fff;
}

.cc-palette-item span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.76rem;
  color: var(--cc-muted);
}

.cc-palette-hint {
  margin: 0;
  padding: 0.55rem 1rem 0.75rem;
  font-size: 0.75rem;
  color: var(--cc-muted);
  border-top: 1px solid var(--cc-border);
}

/* AI modal (centered popup) */
.cc-ai-drawer {
  position: fixed;
  inset: 0;
  z-index: 1210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.cc-ai-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(90vh, 640px);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(59, 130, 246, 0.14), transparent 60%),
    var(--cc-bg-elevated);
  border: 1px solid var(--cc-border-strong);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cc-modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.cc-ai-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0.85rem;
  color: #fff;
}

.cc-ai-head-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.cc-ai-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cc-blue);
  font-weight: 700;
}

.cc-ai-head h2 {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.cc-icon-btn {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

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

.cc-ai-body {
  padding: 0.5rem 1.25rem 1.35rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cc-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cc-ink-soft);
  min-width: 0;
  width: 100%;
}

.cc-field input,
.cc-field select,
.cc-field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-weight: 500;
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  background: var(--cc-bg);
  color: var(--cc-ink);
  resize: vertical;
}

.cc-field input[type="datetime-local"],
.cc-field input[type="date"] {
  min-height: 2.6rem;
  -webkit-appearance: none;
  appearance: none;
}

.cc-field input:focus,
.cc-field select:focus,
.cc-field textarea:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
}

.cc-field small {
  font-weight: 500;
  color: var(--cc-muted);
}

.cc-ai-note {
  margin: 0;
  font-size: 0.76rem;
  color: var(--cc-muted);
  line-height: 1.4;
}

.cc-ai-note code {
  font-size: 0.72rem;
  background: rgba(59, 130, 246, 0.12);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  color: var(--cc-blue);
}

.cc-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 1300;
  background: #fff;
  color: #0d0d0f;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--cc-shadow);
  animation: cc-fade-up 0.25s ease;
}

@keyframes cc-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cc-scale-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes cc-slide-in {
  from { transform: translateX(100%); }
  to { transform: none; }
}

@keyframes cc-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes cc-pulse {
  0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

/* Voice */
.cc-voice {
  margin-bottom: 0;
  padding: 0.9rem;
  border-radius: var(--cc-radius);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.cc-voice-in-drawer {
  margin: 0;
  padding: 1.35rem 1.1rem 1.2rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.04));
  border: 1px solid rgba(59, 130, 246, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: none;
}

.cc-voice-in-drawer .cc-voice-mic {
  width: 5rem;
  height: 5rem;
}

.cc-voice-in-drawer .cc-voice-log {
  max-height: 140px;
}

.cc-voice-in-drawer .cc-voice-log:empty {
  display: none;
}

.cc-ai-divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.35rem 0 0.15rem;
  color: var(--cc-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cc-ai-divider::before,
.cc-ai-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--cc-border);
}

.cc-voice-main {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: center;
  text-align: center;
}

.cc-voice-mic {
  position: relative;
  flex: 0 0 auto;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, #60a5fa, #2563eb 55%, #1d4ed8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 6px rgba(59, 130, 246, 0.12),
    0 12px 28px rgba(37, 99, 235, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: cc-mic-invite 2s ease-in-out infinite;
}

.cc-voice-mic:hover {
  transform: scale(1.06);
  animation: none;
  box-shadow:
    0 0 0 10px rgba(59, 130, 246, 0.18),
    0 14px 32px rgba(37, 99, 235, 0.55);
}

.cc-voice-mic.is-listening {
  background: linear-gradient(145deg, #f87171, #dc2626 55%, #991b1b);
  box-shadow:
    0 0 0 6px rgba(239, 68, 68, 0.15),
    0 0 0 0 rgba(239, 68, 68, 0.4);
  animation: cc-mic-pulse 1.4s ease infinite;
}

.cc-voice-mic-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.45);
  opacity: 0.7;
  pointer-events: none;
  animation: cc-mic-ripple 2s ease-out infinite;
}

.cc-voice-mic-ring::before,
.cc-voice-mic-ring::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.28);
  animation: cc-mic-ripple 2s ease-out infinite;
  animation-delay: 0.45s;
}

.cc-voice-mic-ring::after {
  inset: -16px;
  border-color: rgba(59, 130, 246, 0.16);
  animation-delay: 0.9s;
}

.cc-voice-mic.is-listening .cc-voice-mic-ring {
  opacity: 1;
  border-color: rgba(248, 113, 113, 0.55);
  animation: cc-ring 1.4s ease infinite;
}

.cc-voice-mic.is-listening .cc-voice-mic-ring::before,
.cc-voice-mic.is-listening .cc-voice-mic-ring::after {
  display: none;
}

.cc-voice-hint {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #60a5fa;
  animation: cc-hint-blink 1.6s ease-in-out infinite;
}

.cc-voice-main:has(.cc-voice-mic.is-listening) .cc-voice-hint {
  visibility: hidden;
}

.cc-voice-meta {
  min-width: 0;
  width: 100%;
}

.cc-voice-toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.2rem;
}

.cc-voice-title {
  margin: 0 0 0.35rem;
  font-family: var(--cc-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.cc-voice-lang {
  appearance: none;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: var(--cc-blue-soft);
  color: var(--cc-blue);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cc-voice-lang:hover {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(59, 130, 246, 0.5);
}

.cc-voice-status {
  margin: 0;
  font-size: 0.86rem;
  color: var(--cc-ink-soft);
}

.cc-voice-transcript {
  margin: 0.55rem 0 0;
  padding: 0.65rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.cc-voice-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 22px;
  margin-top: 0.75rem;
}

.cc-voice-wave span {
  width: 4px;
  height: 6px;
  border-radius: 4px;
  background: var(--cc-blue);
  animation: cc-bar 0.9s ease-in-out infinite;
}

.cc-voice-wave span:nth-child(2) { animation-delay: 0.1s; }
.cc-voice-wave span:nth-child(3) { animation-delay: 0.2s; }
.cc-voice-wave span:nth-child(4) { animation-delay: 0.3s; }
.cc-voice-wave span:nth-child(5) { animation-delay: 0.4s; }

.cc-voice-log {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 160px;
  overflow: auto;
  text-align: left;
}

.cc-voice-log-item {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--cc-border);
  background: rgba(255, 255, 255, 0.03);
}

.cc-voice-log-item.is-ok {
  border-color: rgba(34, 197, 94, 0.3);
}

.cc-voice-log-item.is-wait {
  border-color: rgba(249, 115, 22, 0.3);
}

.cc-voice-log-said,
.cc-voice-log-reply {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.cc-voice-log-said {
  color: #fff;
  font-weight: 600;
}

.cc-voice-log-reply {
  margin-top: 0.2rem;
  color: var(--cc-muted);
}

.cc-voice-tips {
  margin: 0.75rem 0 0;
  font-size: 0.76rem;
  color: var(--cc-muted);
  line-height: 1.45;
}

.cc-voice-tips em {
  font-style: normal;
  color: var(--cc-blue);
  font-weight: 600;
}

@keyframes cc-mic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes cc-mic-invite {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 0 6px rgba(59, 130, 246, 0.12),
      0 12px 28px rgba(37, 99, 235, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow:
      0 0 0 14px rgba(59, 130, 246, 0.18),
      0 16px 36px rgba(37, 99, 235, 0.55);
  }
}

@keyframes cc-mic-ripple {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes cc-hint-blink {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes cc-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 0; }
}

@keyframes cc-bar {
  0%, 100% { height: 5px; }
  50% { height: 16px; }
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .cc-activity {
    grid-template-columns: 1fr;
  }

  .cc-leads-table,
  .cc-table-wrap.cc-leads-table {
    display: none !important;
  }

  .cc-lead-cards {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
  }

  .cc-lead-card {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.95rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--cc-border);
    background: rgba(255, 255, 255, 0.03);
  }

  .cc-lead-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .cc-lead-card-assign .cc-assign-wrap,
  .cc-lead-card-assign .cc-assign-form {
    width: 100%;
    display: flex;
  }

  .cc-lead-card-assign .cc-assign-select {
    flex: 1;
    max-width: none;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .cc-shell {
    padding: 0.85rem 0.85rem 2rem;
  }

  .cc-topbar {
    padding: 0.85rem 0.85rem 0;
  }

  .cc-topbar-actions {
    width: 100%;
  }

  .cc-filter {
    flex: 1 1 auto;
  }

  .cc-hero {
    padding: 1.2rem 1.1rem;
  }

  .cc-headline {
    font-size: clamp(1.4rem, 7vw, 1.75rem);
  }

  .cc-row {
    grid-template-columns: 1fr;
  }

  .cc-row-actions {
    justify-content: flex-start;
  }

  .cc-voice-main {
    align-items: center;
  }

  .cc-activity-col {
    min-height: 0;
  }

  .cc-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .cc-panel,
  .cc-span-4,
  .cc-span-5,
  .cc-span-6,
  .cc-span-7,
  .cc-span-8,
  .cc-span-12 {
    grid-column: auto;
    width: 100%;
  }

  .cc-panel {
    padding: 0.95rem 0.9rem;
  }

  .cc-dl > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--cc-border);
  }

  .cc-dl > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .cc-form .cc-btn {
    width: 100%;
  }

  .cc-toolbar {
    flex-wrap: wrap;
  }

  .cc-toolbar .cc-input,
  .cc-toolbar .cc-btn {
    flex: 1 1 auto;
  }
}

.cc-leads-panel {
  padding-top: 1rem;
  overflow: visible;
}

.cc-table-wrap.cc-leads-table {
  overflow: visible;
}

.cc-table--leads {
  min-width: 640px;
}

.cc-table--leads.is-user {
  min-width: 520px;
}

.cc-table--leads th,
.cc-table--leads td {
  padding: 0.45rem 0.55rem;
  vertical-align: middle;
}

.cc-table--leads th {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.cc-lead-name {
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.cc-lead-name:hover {
  color: #93c5fd;
}

.cc-lead-phone {
  margin-top: 0.1rem;
  font-size: 0.74rem;
  color: var(--cc-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.cc-lead-added {
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--cc-muted);
}

.cc-assignee-tag {
  display: inline-flex;
  align-items: center;
  max-width: 11rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--cc-border);
  color: #e4e4e7;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-action-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cc-border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: #fff !important;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cc-action-btn:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.4);
  color: #fff !important;
}

.cc-action-btn--danger {
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

.cc-action-btn--danger:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca !important;
}

.cc-pill.is-new {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
}

.cc-pill.is-followup {
  background: rgba(249, 115, 22, 0.16);
  color: #fdba74;
}

.cc-pill.is-meeting {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.cc-pill.is-warn {
  background: rgba(234, 179, 8, 0.14);
  color: #fde047;
}

.cc-pill.is-muted {
  background: rgba(113, 113, 122, 0.2);
  color: #a1a1aa;
}

.cc-lead-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--cc-muted);
}

.cc-lead-cards {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cc-assign-wrap {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.cc-assign-form {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}

.cc-assign-select {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  color: #f4f4f5;
  background-color: #0d0d0f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 0.28rem 1.5rem 0.28rem 0.5rem;
  cursor: pointer;
  max-width: 9.5rem;
  min-width: 6.5rem;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cc-assign-select option {
  background-color: #141416;
  color: #f4f4f5;
}

.cc-assign-select option:checked,
.cc-assign-select option:hover {
  background-color: #2563eb;
  color: #ffffff;
}

.cc-assign-select:hover,
.cc-assign-select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.7);
  background-color: #111827;
}

.cc-assign-mic {
  appearance: none;
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cc-assign-mic:hover {
  background: rgba(59, 130, 246, 0.28);
}

.cc-assign-mic.is-listening {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  animation: cc-mic-pulse 1.4s ease infinite;
}

.cc-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cc-assign-wrap--block {
  display: flex;
  width: 100%;
}

.cc-assign-wrap--block .cc-assign-form {
  width: 100%;
}

.cc-assign-wrap--block .cc-assign-select {
  flex: 1;
  max-width: none;
  width: 100%;
}

.cc-field select {
  color-scheme: dark;
}

.cc-field select option {
  background-color: #141416;
  color: #f4f4f5;
}

.cc-lead-card-assign {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cc-lead-card-assign .cc-assign-form {
  width: 100%;
}

.cc-lead-card-assign .cc-assign-select {
  max-width: none;
  flex: 1;
}

@media (min-width: 901px) {
  .cc-lead-cards {
    display: none !important;
  }

  .cc-leads-table,
  .cc-table-wrap.cc-leads-table {
    display: block !important;
  }
}

@media (min-width: 961px) and (max-width: 1100px) {
  :root {
    --cc-sidebar-width: 220px;
  }
}
