/* Canvastify Current Workspace header */
.cvws-header {
    margin: 12px 20px 4px 2px;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-left: 5px solid var(--cvws-color, #2563eb);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.cvws-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    flex-wrap: wrap;
}
.cvws-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cvws-logo {
    width: 46px; height: 46px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #f3f4f6; flex: 0 0 auto;
    border: 1px solid #eceef0;
}
.cvws-logo img { width: 100%; height: 100%; object-fit: contain; }
.cvws-logo-emoji { font-size: 24px; background: color-mix(in srgb, var(--cvws-color, #2563eb) 14%, #fff); }
.cvws-titles { min-width: 0; }
.cvws-eyebrow {
    font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: #6b7280; line-height: 1;
}
.cvws-name-row { display: flex; align-items: center; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
.cvws-name { font-size: 16px; font-weight: 700; color: #111827; line-height: 1.2; }
.cvws-id { font-size: 11px; color: #6b7280; font-weight: 600; }
.cvws-status {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: 2px 7px; border-radius: 999px;
}
.cvws-status.is-live { background: #e7f6ec; color: #1a7f37; }
.cvws-status.is-draft { background: #fdf1dc; color: #bf8700; }
.cvws-status.is-other { background: #eef0f2; color: #6b7280; }
.cvws-subrow { display: flex; align-items: center; gap: 10px; margin-top: 2px; flex-wrap: wrap; }
.cvws-domain { font-size: 12px; color: var(--cvws-color, #2563eb); text-decoration: none; }
.cvws-domain:hover { text-decoration: underline; }
.cvws-industry { font-size: 12px; color: #6b7280; }
.cvws-industry::before { content: "•"; margin-right: 10px; color: #cbd0d6; }

.cvws-domain-pick { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cvws-domain-pick__label { font-size: 12px; color: #6b7280; }
.cvws-domain-pick__opt,
.cvws-domain-pick__suggest {
    font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
    border: 1px solid var(--cvws-color, #2563eb); background: #fff;
    color: var(--cvws-color, #2563eb); cursor: pointer; font-family: inherit;
}
.cvws-domain-pick__opt:hover,
.cvws-domain-pick__suggest:hover { background: var(--cvws-color, #2563eb); color: #fff; }
.cvws-domain-pick__opt:disabled,
.cvws-domain-pick__suggest:disabled { opacity: .6; cursor: not-allowed; }

.cvws-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cvws-action {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 8px;
    font-size: 12px; font-weight: 600; text-decoration: none;
    color: #374151; background: #f6f7f8; border: 1px solid #e5e7eb;
}
.cvws-action:hover { background: #eef1f4; color: #111827; }
.cvws-action-icon { font-size: 13px; }

/* Switcher */
.cvws-switcher { position: relative; }
.cvws-switch-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 8px; cursor: pointer;
    font-size: 12px; font-weight: 700;
    color: #fff; background: var(--cvws-color, #2563eb); border: 0;
}
.cvws-switch-btn:hover { filter: brightness(.95); }
.cvws-caret { font-size: 10px; }
.cvws-panel {
    position: absolute; right: 0; top: calc(100% + 6px);
    width: 320px; max-width: 88vw; z-index: 9999;
    background: #fff; border: 1px solid #e2e4e7; border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
    overflow: hidden;
}
.cvws-search { padding: 10px; border-bottom: 1px solid #eef0f2; }
.cvws-search-input {
    width: 100%; padding: 7px 10px; border: 1px solid #d7dade; border-radius: 8px;
    font-size: 13px; box-sizing: border-box;
}
.cvws-list { max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; }
.cvws-item { margin: 0; }
.cvws-divider { height: 1px; background: #eef0f2; margin: 6px 4px; }
.cvws-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 8px; border-radius: 8px; text-decoration: none; color: #1f2937;
}
.cvws-link:hover { background: #f3f4f6; }
.cvws-item.is-current .cvws-link { background: color-mix(in srgb, var(--cvws-color, #2563eb) 10%, #fff); }
.cvws-avatar {
    width: 30px; height: 30px; border-radius: 7px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: #f3f4f6; font-size: 15px;
}
.cvws-avatar img { width: 100%; height: 100%; object-fit: contain; }
.cvws-avatar-emoji { color: #fff; }
.cvws-meta { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.cvws-meta .cvws-name { font-size: 13px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvws-sub { font-size: 11px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvws-check { color: var(--cvws-color, #2563eb); font-weight: 700; }
.cvws-empty { padding: 14px; text-align: center; color: #9aa0a6; font-size: 12px; }
.cvws-footer { padding: 8px; border-top: 1px solid #eef0f2; }
.cvws-new {
    display: flex; align-items: center; gap: 6px; justify-content: center;
    padding: 8px; border-radius: 8px; text-decoration: none;
    font-size: 12px; font-weight: 700; color: var(--cvws-color, #2563eb);
    background: #f6f7f8;
}
.cvws-new:hover { background: #eef1f4; }

@media (max-width: 782px) {
    .cvws-header { margin: 10px 12px 4px; }
    .cvws-action-label { display: none; }
}

/* ── Status dot + tagline ─────────────────────────────────────────── */
.cvws-status { display: inline-flex; align-items: center; gap: 5px; }
.cvws-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.cvws-tagline { font-size: 12px; color: #6b7280; font-style: italic; }
.cvws-tagline::before { content: "•"; margin-right: 10px; color: #cbd0d6; font-style: normal; }

/* ── Snapshot metrics ─────────────────────────────────────────────── */
.cvws-snapshot {
    display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap;
    padding: 10px 16px 12px; border-top: 1px solid #eef0f2;
}
.cvws-snapshot-eyebrow {
    align-self: center; font-size: 10px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: #9aa0a6; margin-right: 4px;
}
.cvws-metric {
    display: flex; flex-direction: column; align-items: flex-start;
    min-width: 74px; padding: 6px 12px; border-radius: 8px;
    background: #f6f7f8; border: 1px solid #e5e7eb; text-decoration: none;
    border-left: 3px solid #cbd0d6;
}
a.cvws-metric:hover { background: #eef1f4; }
.cvws-metric-value { font-size: 17px; font-weight: 800; color: #111827; line-height: 1.1; }
.cvws-metric-label { font-size: 11px; color: #6b7280; margin-top: 2px; }
.cvws-metric--good { border-left-color: #1a7f37; }
.cvws-metric--mid  { border-left-color: #bf8700; }
.cvws-metric--bad  { border-left-color: #cf222e; }
.cvws-metric--neutral { border-left-color: var(--cvws-color, #2563eb); }

/* Health chips */
.cvws-health {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
    background: #f1f3f5; color: #4b5563; align-self: center;
}
.cvws-health-dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa0a6; }
.cvws-health--good .cvws-health-dot { background: #1a7f37; }
.cvws-health--warn .cvws-health-dot { background: #bf8700; }
.cvws-health--bad .cvws-health-dot  { background: #cf222e; }

/* ── Agency cards (All Workspaces) ────────────────────────────────── */
.cvws-agency { padding: 12px 16px 14px; border-top: 1px solid #eef0f2; }
.cvws-agency-head {
    font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: #6b7280; margin-bottom: 10px;
}
.cvws-agency-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px;
}
.cvws-card {
    display: block; text-decoration: none; color: inherit;
    border: 1px solid #e2e4e7; border-left: 4px solid var(--cvws-color, #2563eb);
    border-radius: 10px; padding: 10px 12px; background: #fff;
    transition: box-shadow .12s ease, transform .12s ease;
}
.cvws-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }
.cvws-card-head { display: flex; align-items: center; gap: 10px; }
.cvws-card-titles { min-width: 0; }
.cvws-card-name { display: block; font-size: 13px; font-weight: 700; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvws-card-domain { display: block; font-size: 11px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvws-card-stats { display: flex; gap: 14px; margin-top: 10px; }
.cvws-card-stat { display: flex; flex-direction: column; font-size: 10px; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.cvws-card-stat b { font-size: 16px; color: #111827; letter-spacing: 0; }
