:root {
  --bg: #f5f7f7;
  --panel: #ffffff;
  --ink: #1f2628;
  --muted: #687477;
  --line: #dce3e4;
  --soft: #eef4f2;
  --green: #06c755;
  --green-dark: #049741;
  --accent: #4a6fa5;
  --accent-dark: #3d5d8a;
  --charcoal: #20242a;
  --sidebar-bg: #ffffff;
  --sidebar-ink: #111827;
  --sidebar-muted: #5f6875;
  --blue: #4a6fa5;
  --pink: #f7387a;
  --radius: 20px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  transition: grid-template-columns 180ms ease;
}

.sidebar {
  position: relative;
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  padding: 27px 18px 24px;
  border-right: 1px solid #e7eaee;
  box-shadow: 12px 0 34px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  transition: background 180ms ease, color 180ms ease, padding 180ms ease, box-shadow 180ms ease;
}

.brand {
  display: grid;
  gap: 6px;
  justify-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 8px;
  margin: 0 0 23px;
}

.brand-logo {
  width: 95px !important;
  min-width: 95px;
  max-width: 95px;
  height: auto;
  display: block;
  margin: 0;
}

.nav {
  display: grid;
  gap: 2px;
}

.nav-item {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 0 16px;
  text-align: left;
  color: var(--sidebar-ink);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 15px;
  font-weight: 400;
}

.nav-item span:last-child {
  font-weight: 400;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
  line-height: 1;
}

.nav-icon img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.nav-item.active {
  color: var(--accent);
  background: #eff3ff;
  font-weight: 600;
}

.nav-item:hover {
  color: var(--sidebar-ink);
  background: #f0f1f3;
}

.nav-item.active:hover {
  background: #eff3ff;
}

.sidebar-toggle {
  position: absolute;
  right: -12px;
  bottom: 22px;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 18px;
  line-height: 24px;
  transition: transform 180ms ease, background 180ms ease;
  z-index: 6;
}

.sidebar-toggle-mark {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.sidebar-toggle:hover {
  background: var(--accent-dark);
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 68px 1fr;
}

body.sidebar-collapsed .sidebar {
  padding: 18px 8px 20px;
  color: #f8fafc;
  background: #2f3a4d;
  border-right: 0;
  box-shadow: 12px 0 34px rgba(15, 23, 42, 0.18);
}

body.sidebar-collapsed .brand {
  padding: 0;
  margin: 0 0 20px;
}

body.sidebar-collapsed .brand-logo {
  width: 42px !important;
  min-width: 42px;
  max-width: 42px;
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

body.sidebar-collapsed .nav {
  gap: 10px;
  justify-items: center;
}

body.sidebar-collapsed .nav-item {
  width: 48px;
  min-height: 48px;
  padding: 0;
  justify-content: center;
  border-radius: 12px;
  color: #f8fafc;
}

body.sidebar-collapsed .nav-item span:last-child {
  display: none;
}

body.sidebar-collapsed .nav-icon,
body.sidebar-collapsed .nav-icon img {
  width: 22px;
  height: 22px;
}

body.sidebar-collapsed .nav-icon img {
  filter: brightness(0) invert(1);
  opacity: 0.86;
}

body.sidebar-collapsed .nav-item.active {
  background: #151c2c;
}

body.sidebar-collapsed .nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

body.sidebar-collapsed .nav-item.active:hover {
  background: #151c2c;
}

.main {
  min-width: 0;
  background: var(--bg);
}

.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 50px 0 22px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 620px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.toolbar input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.primary-button,
.ai-button,
.ghost-button,
.text-button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 15px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: var(--accent);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.ai-button {
  color: var(--pink);
  background: #fff5f9;
  border-color: #ffd3e2;
}

.topbar .ai-button {
  margin-left: auto;
}

.icon-only {
  width: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 18px;
}

.ghost-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.text-button {
  min-height: auto;
  color: var(--accent);
  background: transparent;
}

.view {
  display: none;
  padding: 28px;
}

.view.active {
  display: block;
}

#integrations {
  padding: 40px 44px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-head h1,
.placeholder h1 {
  margin: 4px 0 0;
  font-size: 26px;
  letter-spacing: 0;
}

#integrations .page-head {
  margin-bottom: 28px;
}

#integrations .eyebrow {
  display: none;
}

#integrations .page-head h1 {
  margin: 0;
  font-size: 27px;
  font-weight: 500;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card,
.panel,
.rule-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 18px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 8px 0;
  font-size: 34px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel h2,
.rule-card h2 {
  margin: 0;
  font-size: 18px;
}

.setup-list {
  display: grid;
  gap: 12px;
}

.setup-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.setup-item span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
}

.setup-item.done {
  color: var(--muted);
  background: #f8f9fb;
}

.setup-item.done span {
  background: #b8c5d5;
}

.setup-item p,
.assistant-card p,
.rule-card p,
.placeholder p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.setup-item button {
  min-height: 34px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--accent);
  background: transparent;
  font-weight: 700;
}

.suggestions button,
.related-panel button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
}

.assistant-card {
  padding: 20px;
  border-radius: 16px;
  background: #f8f9fb;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #fff;
}

.detail-tabs button.active {
  color: #fff;
  background: var(--charcoal);
}

.contacts-header {
  border-bottom: 1px solid #e5e7eb;
  margin: -28px -28px 0;
  padding: 0 28px;
  background: #fff;
}

.contacts-header-tabs {
  display: flex;
  gap: 0;
}

.contacts-header-tab {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 0 18px;
  font-size: 14px;
  color: #6b7280;
  cursor: pointer;
  font-weight: 500;
}

.contacts-header-tab:hover {
  color: #111827;
}

.contacts-header-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.contacts-title-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0 16px;
}

.contacts-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}

.contacts-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid #c7d7fe;
  background: #eff3ff;
}

.contacts-title-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.contacts-btn-outline {
  min-height: 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}

.contacts-btn-outline:hover {
  background: #f9fafb;
}

.contacts-btn-primary {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.contacts-btn-primary:hover {
  background: var(--accent-dark);
}

.contacts-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.contacts-filter-left {
  display: flex;
  gap: 0;
}

.contacts-smart-tab {
  min-height: 36px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 0 14px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
}

.contacts-smart-tab.active {
  color: #111827;
  border-bottom-color: #111827;
  font-weight: 600;
}

.contacts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.contacts-toolbar-left {
  display: flex;
  gap: 8px;
}

.contacts-toolbar-btn {
  min-height: 34px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.contacts-toolbar-btn:hover {
  background: #f3f4f6;
}

.contacts-toolbar-right {
  display: flex;
  gap: 10px;
}

.contacts-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #9ca3af;
  min-width: 200px;
}

.contacts-search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.contacts-table-wrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
}

.contacts-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.contacts-table th,
.contacts-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  font-size: 13px;
}

.contacts-table th {
  color: #6b7280;
  background: #f9fafb;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.sort-icon {
  color: #d1d5db;
  font-size: 11px;
}

.contacts-table tr:hover td {
  background: #f9fafb;
}

.col-name {
  min-width: 200px;
}

.contact-name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-weight: 600;
  font-size: 13px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.contact-name:hover {
  color: var(--accent);
}

.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 10px;
  border: 1px solid;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.mini-avatar,
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
}

.mini-avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 4px;
  padding: 0 8px;
  color: #374151;
  background: #f3f4f6;
  font-size: 11px;
  font-weight: 600;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 4px;
  padding: 0 8px;
  color: #245368;
  background: #e2f4fb;
  font-size: 11px;
  font-weight: 600;
}

.status.warn {
  color: #8a4d00;
  background: #fff1d3;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 300px;
  gap: 18px;
}

.profile-card,
.related-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.profile-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}


.back-button {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.avatar {
  width: 72px;
  height: 72px;
  font-size: 28px;
}

.profile-card h1 {
  margin: 0;
  font-size: 24px;
}

.profile-card p {
  margin: -8px 0 0;
  color: var(--muted);
}

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

.quick-actions button {
  width: 56px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-list div {
  display: grid;
  gap: 4px;
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
}

.info-list dd {
  margin: 0;
  font-weight: 700;
}

.timeline-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.detail-tabs {
  display: flex;
  gap: 8px;
}

.summary {
  margin: 0;
  padding: 16px;
  border: 1px solid #ffd0df;
  border-radius: 12px;
  background: #fff9fb;
  line-height: 1.7;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item time {
  color: var(--muted);
  font-size: 13px;
}

.timeline-item strong {
  display: block;
  margin-bottom: 4px;
}

.compact {
  box-shadow: none;
}

.compact p {
  margin: 8px 0 0;
  color: var(--muted);
}

.form-panel {
  display: grid;
  max-width: 780px;
  gap: 12px;
}

.form-panel label {
  font-weight: 800;
}

.form-panel select,
.form-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.rule-card {
  padding: 18px;
}

.rule-card span {
  display: inline-flex;
  margin-bottom: 12px;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--accent);
  background: #eff3ff;
  font-weight: 700;
}

.rule-card.muted {
  opacity: 0.75;
}

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 24px;
}

.integration-card {
  min-height: 300px;
  border: 1px solid #d7dbdf;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.integration-card.active {
  border-color: #cbd5dc;
  background: #fff;
}

.integration-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0;
  color: #111827;
  background: #f3f5f6;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.integration-logo.line {
  color: inherit;
  background: transparent;
}

.integration-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.integration-logo.work {
  color: inherit;
  background: transparent;
}

.integration-logo.ghl {
  color: #fff;
  background: #ff6f2c;
}

.integration-card h2 {
  margin: 0 0 4px;
  color: #171b20;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
}

.integration-provider {
  margin: 0 0 14px;
  color: #6a7178;
  font-size: 12px;
  line-height: 1.5;
}

.integration-description {
  margin: 0;
  color: #20242a;
  font-size: 13.5px;
  line-height: 1.65;
}

.integration-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.integration-tags span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: #22272d;
  background: #f1f2f3;
  font-size: 10.5px;
  font-weight: 700;
}

.placeholder {
  min-height: calc(100vh - 68px);
}

@media (max-width: 1180px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px;
  }

  .brand {
    padding: 0;
  }

  .nav {
    display: flex;
    min-width: max-content;
  }

  .nav-item {
    min-width: 78px;
    text-align: center;
    font-size: 15px;
  }

  .topbar,
  .page-head,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-grid,
  .two-col,
  .rules-grid,
  .integrations-grid {
    grid-template-columns: 1fr;
  }
}

.broadcast-header {
  border-bottom: 1px solid #e5e7eb;
  margin: -28px -28px 24px;
  padding: 0 28px;
  background: #fff;
}

.broadcast-tabs {
  display: flex;
  gap: 0;
}

.broadcast-tab {
  min-height: 48px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 0 20px;
  font-size: 15px;
  color: #6b7280;
  cursor: pointer;
  font-weight: 500;
}

.broadcast-tab:hover {
  color: #111827;
}

.broadcast-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.broadcast-panel {
  display: none;
}

.broadcast-panel.active {
  display: block;
}

.email-campaign-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  background: #fff;
}

.email-campaign-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.email-campaign-table th,
.email-campaign-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  font-size: 13px;
}

.email-campaign-table th {
  color: #6b7280;
  background: #f9fafb;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.email-campaign-table tr:hover td {
  background: #f9fafb;
}

.campaign-title-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  font-weight: 600;
  color: #111827;
  line-height: 1.5;
}

.campaign-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}

.campaign-icon.draft {
  background: #f3f4f6;
  color: #6b7280;
}

.campaign-icon.sent {
  background: #ecfdf5;
  color: #059669;
}

.campaign-type {
  font-size: 12px;
  color: #6b7280;
}

.campaign-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

.campaign-status.draft {
  color: #6b7280;
  background: #f3f4f6;
}

.campaign-status.sent {
  color: #059669;
  background: #ecfdf5;
}

.campaign-action-btn {
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.campaign-action-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.campaign-title-link {
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.5;
}

.campaign-title-link:hover {
  color: var(--accent);
}

.mini-avatar img,
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.mini-avatar {
  overflow: hidden;
}

.avatar {
  overflow: hidden;
}

.empty-row {
  color: #8a94a6;
  text-align: center;
  padding: 24px 12px;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.tag-removable {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 6px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.tag-removable .tag-remove {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: inherit;
  background: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
}

.tag-removable .tag-remove:hover {
  background: rgba(255, 255, 255, 0.5);
}

.tag-picker {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.tag-picker-search {
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.tag-picker-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
}

.tag-picker-search input:focus {
  border-color: var(--accent);
}

.tag-picker-list {
  max-height: 180px;
  overflow-y: auto;
}

.tag-picker-item {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.tag-picker-item:hover {
  background: #f5f8ff;
}

.tag-picker-item.assigned {
  opacity: 0.5;
}

.tag-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tag-create-button {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #f8faf9;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}

.tag-create-button:hover {
  background: #eff3ff;
}

.tag-create-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  max-width: 500px;
}

.tag-create-form input[type="text"] {
  flex: 1;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.tag-create-form input[type="color"] {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  cursor: pointer;
}

.tags-list-page {
  display: grid;
  gap: 8px;
  max-width: 500px;
}

.tag-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.tag-list-item .tag-color-dot {
  width: 16px;
  height: 16px;
}

.tag-list-item-name {
  flex: 1;
  font-weight: 700;
}

.tag-list-item-count {
  color: var(--muted);
  font-size: 13px;
}

.tag-delete-button {
  border: 0;
  background: transparent;
  color: #e53e3e;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.tag-delete-button:hover {
  background: #fff5f5;
}

.ws-switcher-sidebar {
  position: relative;
  margin-bottom: 16px;
}

.ws-switcher-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #2a3142;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 150ms;
}

.ws-switcher-btn:hover {
  background: #343d52;
}

.ws-switcher-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #4a5568;
  color: #e2e8f0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.ws-switcher-label {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.ws-switcher-hint {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.ws-switcher-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-switcher-arrows {
  font-size: 14px;
  color: #94a3b8;
  flex-shrink: 0;
}

.ws-switcher-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 340px;
  max-height: 420px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  z-index: 200;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ws-switcher-search {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.ws-switcher-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.ws-switcher-search input:focus {
  border-color: var(--accent);
}

.ws-switcher-section {
  padding: 10px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.04em;
}

.ws-switcher-list {
  overflow-y: auto;
}

.ws-switcher-item {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 100ms;
}

.ws-switcher-item:hover {
  background: #f3f4f6;
}

.ws-switcher-item.active {
  background: #eff6ff;
}

.ws-switcher-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #374151;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.ws-switcher-item-info {
  flex: 1;
  min-width: 0;
}

.ws-switcher-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-switcher-item-slug {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-switcher-manage {
  width: 100%;
  border: 0;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
  flex-shrink: 0;
}

.ws-switcher-manage:hover {
  background: #eff3ff;
}

body.sidebar-collapsed .ws-switcher-sidebar {
  display: none;
}

.ws-create-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  max-width: 600px;
}

.ws-create-form input[type="text"] {
  flex: 1;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.ws-list {
  display: grid;
  gap: 10px;
  max-width: 600px;
}

.ws-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.ws-list-item.current {
  border-color: var(--accent);
  background: #f5f8ff;
}

.ws-list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.ws-list-item-info {
  flex: 1;
}

.ws-list-item-name {
  font-weight: 700;
  font-size: 15px;
}

.ws-list-item-slug {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.ws-list-item-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
}

.ws-list-item-select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ws-list-item-select:hover {
  background: #f5f8ff;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.user-email {
  font-size: 12px;
  color: var(--muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .ghost-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}
