/* ============================================
   CRM – Detail klienta (klientská stránka)
   ============================================ */

body.crm-on-client-detail .crm-section.is-active {
    max-width: none;
    padding: 0;
}

.crm-client-detail-page {
    background: transparent;
}

.crm-client-detail-root {
    width: 100%;
    min-height: calc(100vh - 4.5rem);
}

.cd-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 3rem;
    animation: office-panel-in 0.45s ease-out both;
}

.cd-topbar {
    margin-bottom: 1.25rem;
}

.cd-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border: 1px solid var(--office-brand-border);
    border-radius: 999px;
    background: rgba(212, 188, 130, 0.06);
    color: var(--office-brand);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.cd-back-btn:hover {
    background: rgba(212, 188, 130, 0.14);
    border-color: var(--brand-gold);
}

.cd-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    padding: 2rem 2.25rem;
    border-radius: 20px;
    background:
        radial-gradient(ellipse 80% 70% at 0% 0%, rgba(212, 188, 130, 0.12) 0%, transparent 55%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid var(--office-glass-border);
    box-shadow: var(--office-shadow), var(--office-glow);
    margin-bottom: 1.75rem;
}

.cd-hero-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--office-brand);
    margin-bottom: 0.5rem;
}

.cd-hero-name {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--office-text);
    line-height: 1.15;
    margin-bottom: 0.85rem;
}

.cd-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.cd-hero-badge--gold,
.cd-hero-badge--advisor {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--brand-gold-soft);
    border: 1px solid var(--brand-gold-border);
    color: var(--brand-gold-bright);
    font-size: 0.8rem;
    font-weight: 600;
}

.cd-hero-badge--advisor {
    letter-spacing: 0.01em;
}

.cd-client-activity,
.cd-client-tier {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.cd-client-activity--active {
    color: #1a4d2e;
    background: rgba(52, 168, 97, 0.22);
    border: 1px solid rgba(52, 168, 97, 0.45);
}

.cd-client-activity--pipeline {
    color: #5c4a12;
    background: rgba(234, 179, 8, 0.28);
    border: 1px solid rgba(202, 138, 4, 0.5);
}

.cd-client-activity--none {
    color: #8b2e2e;
    background: rgba(214, 85, 85, 0.18);
    border: 1px solid rgba(185, 60, 60, 0.4);
}

.cd-client-tier {
    color: var(--office-brand-bright);
    background: var(--brand-gold-soft);
    border: 1px solid var(--brand-gold-border);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.cd-client-tier--standard {
    color: #e8eef8;
    background: rgba(100, 140, 220, 0.18);
    border-color: rgba(100, 140, 220, 0.45);
}

.cd-client-tier--vip {
    color: #f5ecd0;
    background: linear-gradient(135deg, rgba(180, 140, 60, 0.35) 0%, rgba(120, 90, 40, 0.25) 100%);
    border-color: rgba(212, 188, 130, 0.65);
}

.cd-hero-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem 1.5rem;
}

.cd-hero-contact dt {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--office-label, var(--office-text-muted));
    margin-bottom: 0.25rem;
}

.cd-hero-contact dd {
    font-size: 0.98rem;
    color: var(--office-text);
    font-weight: 600;
}

.cd-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: stretch;
    min-width: 200px;
}

.cd-btn-primary,
.cd-btn-secondary,
.cd-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.15rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.cd-btn-primary {
    background: linear-gradient(135deg, #c9ad72 0%, #d4bc82 50%, #e8d5a8 100%);
    color: #1a1408;
    border-color: rgba(212, 188, 130, 0.5);
}

.cd-btn-primary:hover {
    filter: brightness(1.06);
}

.cd-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--office-glass-border);
    color: var(--office-text);
}

.cd-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--brand-gold-border);
}

.cd-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--office-brand);
    padding: 0.45rem 0.75rem;
}

.cd-btn-ghost:hover {
    background: rgba(212, 188, 130, 0.08);
}

.cd-summary-grid-lead {
    font-size: 0.82rem;
    color: var(--office-text-muted);
    margin-bottom: 0.85rem;
    padding-left: 0.15rem;
}

.cd-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.cd-summary-card {
    position: relative;
    padding: 1.35rem 1.5rem;
    border-radius: 16px;
    background: var(--office-bg-card);
    border: 1px solid var(--office-glass-border);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    cursor: default;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    outline: none;
    z-index: 1;
}

.cd-summary-card:hover,
.cd-summary-card:focus,
.cd-summary-card:focus-within {
    z-index: 40;
}

.cd-summary-card:hover,
.cd-summary-card:focus,
.cd-summary-card:focus-within {
    border-color: var(--brand-gold-border);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(212, 188, 130, 0.12);
}

.cd-summary-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.cd-summary-card h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--office-text-secondary);
    letter-spacing: 0.02em;
    margin: 0;
}

.cd-summary-detail-icon {
    flex-shrink: 0;
    color: var(--office-brand);
    font-size: 0.85rem;
    opacity: 0.7;
    transition: transform 0.2s, opacity 0.2s;
}

.cd-summary-card:hover .cd-summary-detail-icon,
.cd-summary-card:focus .cd-summary-detail-icon,
.cd-summary-card:focus-within .cd-summary-detail-icon {
    opacity: 1;
    transform: rotate(180deg);
}

.cd-summary-value {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--office-brand-bright);
    line-height: 1.2;
}

.cd-summary-sub {
    font-size: 0.8rem;
    color: var(--office-text-muted);
    margin-top: 0.15rem;
}

.cd-summary-meta {
    font-size: 0.78rem;
    color: var(--office-text-secondary);
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cd-summary-tooltip {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 280px;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    background: linear-gradient(155deg, #1a1f2b 0%, #12161f 100%);
    border: 1px solid var(--brand-gold-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 188, 130, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 50;
    pointer-events: none;
}

.cd-summary-tooltip::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: -6px;
    width: 12px;
    height: 12px;
    background: #1a1f2b;
    border-left: 1px solid var(--brand-gold-border);
    border-top: 1px solid var(--brand-gold-border);
    transform: rotate(45deg);
}

.cd-summary-tooltip-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--office-brand);
    margin-bottom: 0.55rem;
}

.cd-summary-breakdown-body {
    max-height: 240px;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.cd-summary-breakdown {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cd-summary-breakdown-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.1rem 0.65rem;
    padding: 0.5rem 0.55rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cd-summary-breakdown-main {
    grid-column: 1;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--office-text);
    line-height: 1.3;
}

.cd-summary-breakdown-sub {
    grid-column: 1;
    font-size: 0.74rem;
    color: var(--office-text-muted);
    line-height: 1.35;
}

.cd-summary-breakdown-amt {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--office-brand-bright);
    white-space: nowrap;
}

.cd-summary-breakdown-item--has-detail .cd-summary-breakdown-amt {
    grid-row: 1;
    align-self: start;
    padding-top: 0.1rem;
}

.cd-summary-breakdown-detail {
    grid-column: 1 / -1;
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0.4rem 0.45rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.cd-summary-breakdown-detail li {
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--office-text-secondary);
}

.cd-summary-breakdown-detail-label {
    font-weight: 700;
    color: var(--office-text-muted);
    margin-right: 0.25rem;
}

.cd-summary-breakdown-group {
    margin-bottom: 0.65rem;
}

.cd-summary-breakdown-group:last-child {
    margin-bottom: 0;
}

.cd-summary-breakdown-group-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--office-text-secondary);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cd-summary-breakdown-empty {
    font-size: 0.8rem;
    color: var(--office-text-muted);
    font-style: italic;
    margin: 0;
}

.cd-summary-breakdown-footer {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--office-brand);
}

.cd-summary-card:hover .cd-summary-tooltip,
.cd-summary-card:focus .cd-summary-tooltip,
.cd-summary-card:focus-within .cd-summary-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Na desktopu se rozpad zobrazuje v plovoucí vrstvě — lze scrollovat a myš zůstane uvnitř */
@media (min-width: 901px) {
    .cd-summary-card .cd-summary-tooltip {
        display: none;
    }

    .cd-summary-card--tip-open {
        z-index: 40;
    }
}

.cd-summary-tip-floating {
    position: fixed;
    z-index: 25000;
    min-width: 280px;
    max-width: min(420px, calc(100vw - 24px));
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    background: linear-gradient(155deg, #1a1f2b 0%, #12161f 100%);
    border: 1px solid var(--brand-gold-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 188, 130, 0.1);
    pointer-events: auto;
}

.cd-summary-tip-floating.hidden {
    display: none !important;
}

.cd-summary-tip-floating::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: -6px;
    width: 12px;
    height: 12px;
    background: #1a1f2b;
    border-left: 1px solid var(--brand-gold-border);
    border-top: 1px solid var(--brand-gold-border);
    transform: rotate(45deg);
}

.cd-summary-tip-floating.cd-summary-tip-floating--above::before {
    top: auto;
    bottom: -6px;
    border-left: none;
    border-top: none;
    border-right: 1px solid var(--brand-gold-border);
    border-bottom: 1px solid var(--brand-gold-border);
}

.cd-summary-tip-floating .cd-summary-breakdown-body {
    max-height: min(320px, calc(100vh - 120px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 188, 130, 0.35) transparent;
}

.cd-summary-tip-floating .cd-summary-breakdown-body::-webkit-scrollbar {
    width: 6px;
}

.cd-summary-tip-floating .cd-summary-breakdown-body::-webkit-scrollbar-thumb {
    background: rgba(212, 188, 130, 0.35);
    border-radius: 3px;
}

@media (max-width: 900px) {
    .cd-summary-tooltip {
        position: static;
        margin-top: 0.85rem;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
    }

    .cd-summary-tooltip::before {
        display: none;
    }
}

.cd-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cd-tab {
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--office-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.cd-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--office-text);
}

.cd-tab.is-active {
    background: var(--brand-gold-soft);
    color: var(--brand-gold-bright);
    box-shadow: inset 0 0 0 1px var(--brand-gold-border);
}

.cd-tab-panel {
    display: none;
}

.cd-tab-panel.is-active {
    display: block;
    animation: office-panel-in 0.35s ease-out both;
}

.cd-panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--office-text);
    margin-bottom: 0.35rem;
}

.cd-panel-lead {
    color: var(--office-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.cd-panel-lead--compact {
    margin-top: -0.35rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.cd-record-section + .cd-record-section {
    margin-top: 2rem;
}

.cd-panel-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--office-text);
    margin: 1.5rem 0 0.85rem;
}

.cd-open-deals {
    margin-top: 0.5rem;
}

.cd-finance-map {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.cd-finance-map-block {
    padding: 1.25rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.cd-finance-map-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--office-brand);
    margin-bottom: 0.85rem;
}

.cd-finance-map-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cd-finance-map-item {
    font-size: 0.85rem;
    color: var(--office-text-secondary);
    padding-left: 0.85rem;
    position: relative;
}

.cd-finance-map-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--office-text-muted);
}

.cd-finance-map-item--active::before { background: var(--success-color); }
.cd-finance-map-item--pipeline::before { background: #fbbf24; }

/* --- Majetkové centrum (Přehled) --- */

.cd-wealth-center {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.cd-section-head {
    margin-bottom: 1.25rem;
}

.cd-section-title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
    font-weight: 700;
    color: var(--office-text);
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.cd-section-lead {
    margin: 0;
    font-size: 0.9rem;
    color: var(--office-text-secondary);
    max-width: 52ch;
}

.cd-overview-hero-row {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.25rem;
    align-items: stretch;
}

.cd-exec-summary,
.cd-next-step-card {
    padding: 1.5rem 1.65rem;
    border-radius: 18px;
    background: var(--office-bg-card);
    border: 1px solid var(--office-glass-border);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
}

.cd-exec-summary {
    background:
        radial-gradient(ellipse 70% 55% at 100% 0%, rgba(212, 188, 130, 0.14) 0%, transparent 55%),
        var(--office-bg-card);
}

.cd-exec-summary-eyebrow,
.cd-next-step-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--office-brand);
    margin: 0 0 0.4rem;
}

.cd-exec-summary-title,
.cd-next-step-title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--office-text);
    margin: 0 0 1rem;
}

.cd-exec-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.cd-exec-summary-grid dt {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--office-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.cd-exec-summary-grid dd {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--office-brand-bright);
    margin: 0;
    line-height: 1.3;
}

.cd-exec-hint {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--office-text-muted);
    margin-top: 0.15rem;
}

.cd-exec-highlight {
    color: var(--office-text) !important;
    font-size: 1rem !important;
}

.cd-next-step-card {
    border-color: rgba(212, 188, 130, 0.45);
    background:
        radial-gradient(ellipse 90% 70% at 0% 100%, rgba(212, 188, 130, 0.18) 0%, transparent 60%),
        linear-gradient(155deg, rgba(30, 28, 24, 0.95) 0%, rgba(18, 16, 14, 0.98) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cd-next-step-message {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--office-text);
}

.cd-wealth-compass {
    position: relative;
}

.cd-wealth-compass-head {
    margin-bottom: 1.5rem;
}

.cd-compass-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.cd-compass-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    min-height: 100%;
    padding: 1.15rem 1.1rem 1.05rem 1.25rem;
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, transparent 42%),
        linear-gradient(168deg, rgba(28, 26, 22, 0.98) 0%, rgba(12, 11, 10, 0.99) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.22);
    transition:
        border-color 0.24s ease,
        box-shadow 0.24s ease,
        transform 0.24s ease;
    overflow: hidden;
}

.cd-compass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 50% at 0% 0%, rgba(212, 188, 130, 0.07) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.cd-compass-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 188, 130, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 12px 30px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(212, 188, 130, 0.06);
}

.cd-compass-card:hover::after {
    opacity: 1;
}

.cd-compass-card-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 16px 0 0 16px;
    background: rgba(212, 188, 130, 0.45);
}

.cd-compass-card--resolved .cd-compass-card-accent {
    background: linear-gradient(180deg, #6fd49a 0%, #3a9a62 100%);
}

.cd-compass-card--pipeline .cd-compass-card-accent {
    background: linear-gradient(180deg, #f0d998 0%, #b8944a 100%);
}

.cd-compass-card--unresolved .cd-compass-card-accent {
    background: linear-gradient(180deg, #f0a0a0 0%, #c45c5c 100%);
}

.cd-compass-card--not-relevant .cd-compass-card-accent {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.cd-compass-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.cd-compass-card-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--office-brand-bright, #d4bc82);
    background:
        radial-gradient(circle at 32% 28%, rgba(212, 188, 130, 0.2) 0%, rgba(212, 188, 130, 0.04) 72%),
        rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(212, 188, 130, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.18);
}

.cd-compass-icon {
    width: 1.55rem;
    height: 1.55rem;
    display: block;
}

.cd-compass-card-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.38rem;
    padding-top: 0.1rem;
}

.cd-compass-card-title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--office-text);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.cd-compass-state {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.cd-compass-badge-icon {
    width: 0.72rem;
    height: 0.72rem;
    flex-shrink: 0;
}

.cd-compass-state--resolved {
    color: #8fd9a8;
    background: rgba(52, 168, 97, 0.1);
    border-color: rgba(52, 168, 97, 0.28);
}

.cd-compass-state--pipeline {
    color: #e8cc88;
    background: rgba(212, 188, 130, 0.1);
    border-color: rgba(212, 188, 130, 0.3);
}

.cd-compass-state--unresolved {
    color: #f0a0a0;
    background: rgba(196, 92, 92, 0.1);
    border-color: rgba(196, 92, 92, 0.28);
}

.cd-compass-state--not-relevant {
    color: var(--office-text-muted);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.cd-compass-topics {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.7rem;
    padding: 0 0 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cd-compass-topics li {
    font-size: 0.64rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--office-text-muted);
    letter-spacing: 0.01em;
}

.cd-compass-explanation {
    margin: 0;
    margin-top: auto;
    font-size: 0.76rem;
    line-height: 1.55;
    color: var(--office-text-secondary);
}

@media (max-width: 1100px) {
    .cd-compass-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 560px) {
    .cd-compass-grid {
        grid-template-columns: 1fr;
    }

    .cd-compass-card {
        padding: 1.05rem 1rem 0.95rem 1.15rem;
    }
}

.cd-journey-timeline {
    list-style: none;
    margin: 0;
    padding: 1.25rem 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(212, 188, 130, 0.06) 0%, rgba(0, 0, 0, 0.15) 100%);
    border: 1px solid var(--office-glass-border);
}

.cd-journey-step {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    padding-left: 0.25rem;
}

.cd-journey-node {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    padding: 0.65rem 0;
}

.cd-journey-marker {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 0.2rem;
    border-radius: 50%;
    border: 2px solid rgba(212, 188, 130, 0.5);
    background: var(--office-bg-card);
}

.cd-journey-step--done .cd-journey-marker {
    background: #34a861;
    border-color: #34a861;
    box-shadow: 0 0 0 3px rgba(52, 168, 97, 0.2);
}

.cd-journey-step--in_progress .cd-journey-marker {
    background: #fbbf24;
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.cd-journey-step--next .cd-journey-marker {
    background: var(--office-brand-bright);
    border-color: var(--office-brand);
    box-shadow: 0 0 0 4px rgba(212, 188, 130, 0.25);
    animation: cd-journey-pulse 2s ease-in-out infinite;
}

@keyframes cd-journey-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(212, 188, 130, 0.25); }
    50% { box-shadow: 0 0 0 8px rgba(212, 188, 130, 0.12); }
}

.cd-journey-connector {
    display: block;
    width: 2px;
    height: 1.25rem;
    margin-left: 6px;
    background: linear-gradient(180deg, rgba(212, 188, 130, 0.45), rgba(212, 188, 130, 0.1));
}

.cd-journey-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--office-text);
}

.cd-journey-state {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--office-brand);
}

.cd-journey-step--next .cd-journey-title {
    color: var(--office-brand-bright);
}

.cd-overview-stats-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.25rem;
    align-items: start;
}

.cd-cooperation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.85rem;
}

.cd-cooperation-item {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cd-cooperation-item dt {
    font-size: 0.72rem;
    color: var(--office-text-muted);
    margin-bottom: 0.25rem;
}

.cd-cooperation-item dd {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--office-brand-bright);
    margin: 0;
}

.cd-service-chip-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
}

.cd-service-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cd-service-chip-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.cd-service-chip--on {
    background: rgba(52, 168, 97, 0.12);
    border-color: rgba(52, 168, 97, 0.35);
    color: #9ee0b4;
}

.cd-service-chip--off {
    background: rgba(255, 255, 255, 0.03);
    color: var(--office-text-muted);
    opacity: 0.75;
}

@media (max-width: 960px) {
    .cd-overview-hero-row,
    .cd-overview-stats-row {
        grid-template-columns: 1fr;
    }

    .cd-exec-summary-grid {
        grid-template-columns: 1fr;
    }
}

.cd-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.15rem;
}

.cd-property-card {
    border-color: rgba(120, 168, 130, 0.28);
    background:
        radial-gradient(ellipse 90% 60% at 0% 0%, rgba(72, 140, 96, 0.1) 0%, transparent 55%),
        var(--office-bg-card);
}

.cd-property-card .cd-product-card-title::before {
    content: '⌂ ';
    color: rgba(120, 168, 130, 0.9);
}

.cd-product-card {
    padding: 1.35rem;
    border-radius: 16px;
    background: var(--office-bg-card);
    border: 1px solid var(--office-glass-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cd-product-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.cd-product-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--office-text);
}

.cd-product-card-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.cd-product-card-status--active {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
}

.cd-product-card-status--other {
    background: rgba(255, 255, 255, 0.06);
    color: var(--office-text-secondary);
}

.cd-product-card-meta {
    display: grid;
    gap: 0.5rem;
}

.cd-product-card-meta div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.82rem;
}

.cd-product-card-meta dt {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--office-label, var(--office-text-muted));
}

.cd-product-card-meta dd {
    color: var(--office-text);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: right;
}

.cd-product-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cd-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--office-text-muted);
    font-size: 0.95rem;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.15);
}

.cd-panel-toolbar {
    margin-bottom: 1.25rem;
}

.cd-request-list,
.cd-insurance-list,
.cd-anniv-list,
.cd-doc-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.cd-request-card,
.cd-insurance-card,
.cd-anniv-card,
.cd-doc-card {
    padding: 1.15rem 1.35rem;
    border-radius: 14px;
    background: var(--office-bg-card);
    border: 1px solid var(--office-glass-border);
}

.cd-request-card-head,
.cd-insurance-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.cd-request-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--brand-gold-soft);
    color: var(--brand-gold-bright);
}

.cd-request-note {
    font-size: 0.88rem;
    color: var(--office-text-secondary);
    margin-bottom: 0.5rem;
}

.cd-request-date {
    font-size: 0.78rem;
    color: var(--office-text-muted);
}

.cd-request-status-select {
    margin-top: 0.75rem;
    width: 100%;
    max-width: 220px;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--office-glass-border);
    background: var(--bg-input);
    color: var(--office-text);
    font-size: 0.85rem;
}

.cd-insurance-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.65rem 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(212, 188, 130, 0.1) 0%, rgba(212, 188, 130, 0.03) 100%);
    border: 1px solid var(--brand-gold-border);
}

.cd-insurance-summary-label {
    font-size: 0.9rem;
    color: var(--office-text-secondary);
}

.cd-insurance-summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--office-brand-bright);
}

.cd-insurance-card-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem;
    margin: 0.75rem 0;
    font-size: 0.82rem;
}

.cd-insurance-card-meta dt {
    color: var(--office-label, var(--office-text-muted));
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cd-insurance-card-meta dd {
    color: var(--office-text);
    font-weight: 600;
    font-size: 0.9rem;
}

.cd-anniv-card {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
}

.cd-potential-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.85rem;
}

.cd-potential-tile {
    padding: 1.15rem;
    border-radius: 14px;
    border: 1px solid var(--office-glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.cd-potential-tile h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--office-text);
    margin-bottom: 0.5rem;
}

.cd-potential-status {
    font-size: 0.78rem;
    font-weight: 600;
}

.cd-potential-tile--resolved { border-color: rgba(74, 222, 128, 0.25); }
.cd-potential-tile--resolved .cd-potential-status { color: #4ade80; }
.cd-potential-tile--opportunity { border-color: rgba(212, 188, 130, 0.35); }
.cd-potential-tile--opportunity .cd-potential-status { color: var(--brand-gold-bright); }
.cd-potential-tile--review { border-color: rgba(251, 191, 36, 0.3); }
.cd-potential-tile--review .cd-potential-status { color: #fbbf24; }
.cd-potential-tile--none .cd-potential-status { color: var(--office-text-muted); }

.cd-notes-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--office-text-secondary);
    margin-bottom: 0.5rem;
}

.cd-notes-textarea {
    width: 100%;
    min-height: 160px;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    border: 1px solid var(--office-glass-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--office-text);
    font-size: 0.95rem;
    line-height: 1.55;
    resize: vertical;
}

.cd-notes-textarea:focus {
    outline: none;
    border-color: var(--brand-gold-border);
    box-shadow: 0 0 0 3px var(--ui-glow-focus);
}

.cd-ai-guide {
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    background:
        radial-gradient(ellipse 60% 80% at 100% 0%, rgba(212, 188, 130, 0.08) 0%, transparent 60%),
        rgba(0, 0, 0, 0.28);
    border: 1px solid var(--brand-gold-border);
}

.cd-ai-guide-head {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.cd-ai-guide-icon {
    font-size: 1.5rem;
    color: var(--office-brand);
}

.cd-ai-guide-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--office-text);
    margin-bottom: 0.25rem;
}

.cd-ai-guide-text {
    font-size: 0.88rem;
    color: var(--office-text-secondary);
    line-height: 1.5;
}

.cd-ai-guide-questions {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.cd-ai-question-btn {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--office-text-secondary);
    font-size: 0.8rem;
    cursor: not-allowed;
    opacity: 0.85;
}

.cd-ai-guide-hint {
    font-size: 0.75rem;
    color: var(--office-text-muted);
    font-style: italic;
}

body.authenticated.crm-on-client-detail .crm-app-header {
    border-bottom-color: rgba(212, 188, 130, 0.15);
}

body.authenticated.crm-on-client-detail .crm-shell {
    background: var(--office-canvas);
}

@media (max-width: 900px) {
    .cd-hero {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .cd-hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cd-anniv-card {
        grid-template-columns: 1fr;
    }
}

html[data-theme='light'] .cd-hero {
    background:
        radial-gradient(ellipse 80% 70% at 0% 0%, rgba(180, 150, 90, 0.1) 0%, transparent 55%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.9) 0%, rgba(250, 247, 240, 0.95) 100%);
}

html[data-theme='light'] .cd-summary-card,
html[data-theme='light'] .cd-product-card,
html[data-theme='light'] .cd-request-card,
html[data-theme='light'] .cd-insurance-card {
    background: rgba(255, 255, 255, 0.85);
}
