/*
 * Outreach and Analytics pages for the EazyLimo platform panel.
 * Builds on the panel skin tokens (--ez-*) with fallbacks, dark first. Classes: el-outreach-*, el-analytics-*.
 */

.el-outreach,
.el-analytics {
    --eo-text: var(--ez-text, #f3efe6);
    --eo-muted: var(--ez-muted, #a8a49b);
    --eo-surface: var(--ez-surface, rgba(30, 30, 35, 0.52));
    --eo-strong: var(--ez-surface-strong, #17171b);
    --eo-border: var(--ez-border, rgba(243, 239, 230, 0.07));
    --eo-brass: var(--ez-brass, #b0833a);
    --eo-brass-light: var(--ez-brass-light, #d8b36e);
    --eo-go: var(--ez-go, #3f8f6a);
    --eo-signal: var(--ez-signal, #c4462d);
    --eo-hover: var(--ez-hover, rgba(243, 239, 230, 0.04));
    --eo-glow: var(--ez-glow, 0 24px 48px -30px rgba(0, 0, 0, 0.9));
    --eo-ease: var(--ez-ease, cubic-bezier(0.16, 1, 0.3, 1));
    display: grid;
    gap: 1.25rem;
    color: var(--eo-text);
}

.el-outreach small,
.el-analytics small {
    color: var(--eo-muted);
    font-size: 0.72em;
    font-weight: 500;
}

/* ---------- Stat strip ---------- */

.el-outreach-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
}

.el-analytics-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.el-outreach-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.1rem 1.05rem;
    border: 1px solid var(--eo-border);
    border-radius: 1rem;
    background: var(--eo-surface);
    box-shadow: var(--eo-glow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
}

.el-outreach-stat__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--eo-muted);
}

.el-outreach-stat__value {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.el-outreach-stat--hot {
    border-color: rgba(216, 179, 110, 0.28);
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(216, 179, 110, 0.16), transparent 60%),
        var(--eo-surface);
}

.el-outreach-stat--hot .el-outreach-stat__value {
    color: var(--eo-brass-light);
}

.el-outreach-stat--goal {
    background:
        linear-gradient(135deg, rgba(176, 131, 58, 0.14), transparent 55%),
        var(--eo-surface);
}

.el-outreach-goal {
    display: block;
    height: 0.35rem;
    margin-top: 0.3rem;
    border-radius: 999px;
    background: rgba(243, 239, 230, 0.08);
    overflow: hidden;
}

.el-outreach-goal__fill {
    display: block;
    height: 100%;
    min-width: 0.35rem;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--eo-brass), var(--eo-brass-light));
    box-shadow: 0 0 12px rgba(216, 179, 110, 0.6);
}

/* ---------- Panels ---------- */

.el-outreach-panel {
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--eo-border);
    border-radius: 1.1rem;
    background: var(--eo-surface);
    box-shadow: var(--eo-glow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    min-width: 0;
}

.el-outreach-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    margin-bottom: 0.8rem;
}

.el-outreach-panel__title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.el-outreach-panel__hint {
    font-size: 0.78rem;
    color: var(--eo-muted);
}

.el-outreach-table-wrap {
    overflow-x: auto;
    margin: 0 -0.4rem;
}

.el-outreach-funnel {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.el-outreach-funnel th,
.el-outreach-funnel td {
    padding: 0.55rem 0.7rem;
    text-align: right;
    white-space: nowrap;
}

.el-outreach-funnel thead th {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--eo-muted);
    border-bottom: 1px solid var(--eo-border);
}

.el-outreach-funnel th:first-child {
    text-align: left;
}

.el-outreach-funnel tbody th {
    font-weight: 600;
}

.el-outreach-funnel tbody tr {
    cursor: pointer;
    transition: background-color 0.25s var(--eo-ease);
}

.el-outreach-funnel tbody tr > * {
    border-bottom: 1px solid var(--eo-border);
}

.el-outreach-funnel tbody tr:last-child > * {
    border-bottom: 0;
}

.el-outreach-funnel tbody tr:hover,
.el-outreach-funnel tbody tr:focus-visible {
    background: var(--eo-hover);
    outline: none;
}

.el-outreach-funnel tbody tr.is-active {
    background: linear-gradient(90deg, rgba(216, 179, 110, 0.14), rgba(216, 179, 110, 0.02));
    box-shadow: inset 3px 0 0 var(--eo-brass-light);
}

.el-outreach-funnel tbody tr.is-empty {
    color: var(--eo-muted);
}

.el-outreach-funnel small {
    margin-left: 0.25rem;
}

.el-outreach-funnel__won {
    color: #6fcf9f;
    font-weight: 700;
}

.el-outreach-flag {
    display: inline-grid;
    place-items: center;
    min-width: 1.9rem;
    margin-right: 0.45rem;
    padding: 0.1rem 0.3rem;
    border: 1px solid var(--eo-border);
    border-radius: 0.4rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--eo-brass-light);
}

/* ---------- Toolbar ---------- */

.el-outreach-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.el-outreach-tabs,
.el-analytics-periods {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem;
    border: 1px solid var(--eo-border);
    border-radius: 999px;
    background: var(--eo-surface);
}

.el-analytics-periods {
    justify-self: start;
    padding-right: 1rem;
}

.el-analytics-periods__note {
    margin-left: 0.6rem;
    font-size: 0.75rem;
    color: var(--eo-muted);
}

.el-outreach-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--eo-muted);
    transition: color 0.2s var(--eo-ease), background-color 0.2s var(--eo-ease), box-shadow 0.2s var(--eo-ease);
}

.el-outreach-tab:hover {
    color: var(--eo-text);
    background: var(--eo-hover);
}

.el-outreach-tab:focus-visible {
    outline: 2px solid var(--eo-brass-light);
    outline-offset: 2px;
}

.el-outreach-tab.is-active {
    color: #17120a;
    background: linear-gradient(135deg, var(--eo-brass-light), var(--eo-brass));
    box-shadow: 0 8px 20px -10px rgba(216, 179, 110, 0.8);
}

.el-outreach-tab__count {
    min-width: 1.4rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    font-size: 0.7rem;
    text-align: center;
    background: rgba(243, 239, 230, 0.08);
    font-variant-numeric: tabular-nums;
}

.el-outreach-tab.is-active .el-outreach-tab__count {
    background: rgba(23, 18, 10, 0.16);
}

.el-outreach-tab--hot:not(.is-active) .el-outreach-tab__count {
    color: var(--eo-brass-light);
    background: rgba(216, 179, 110, 0.14);
}

.el-outreach-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.el-outreach-input {
    height: 2.35rem;
    padding: 0 0.85rem;
    border: 1px solid var(--eo-border);
    border-radius: 0.7rem;
    background: var(--eo-strong);
    color: var(--eo-text);
    font-size: 0.85rem;
    transition: border-color 0.2s var(--eo-ease), box-shadow 0.2s var(--eo-ease);
}

select.el-outreach-input {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23a8a49b'%3E%3Cpath d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.17l3.71-3.94a.75.75 0 1 1 1.08 1.04l-4.25 4.5a.75.75 0 0 1-1.08 0l-4.25-4.5a.75.75 0 0 1 .02-1.06Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 1rem;
}

input[type='search'].el-outreach-input {
    width: 16rem;
}

.el-outreach-input:focus {
    outline: none;
    border-color: rgba(216, 179, 110, 0.6);
    box-shadow: 0 0 0 3px rgba(216, 179, 110, 0.15);
}

.el-outreach-warning {
    padding: 0.7rem 1rem;
    border: 1px solid rgba(216, 179, 110, 0.3);
    border-radius: 0.8rem;
    background: rgba(216, 179, 110, 0.08);
    color: var(--eo-brass-light);
    font-size: 0.82rem;
}

/* ---------- Lead rows ---------- */

.el-outreach-leads {
    display: grid;
    gap: 0.55rem;
    transition: opacity 0.2s var(--eo-ease);
}

.el-outreach-leads.is-busy {
    opacity: 0.55;
}

.el-outreach-lead {
    border: 1px solid var(--eo-border);
    border-radius: 1rem;
    background: var(--eo-surface);
    transition: border-color 0.25s var(--eo-ease), background-color 0.25s var(--eo-ease), transform 0.25s var(--eo-ease);
}

.el-outreach-lead:hover {
    border-color: rgba(216, 179, 110, 0.2);
}

.el-outreach-lead.is-open {
    border-color: rgba(216, 179, 110, 0.35);
    background:
        linear-gradient(180deg, rgba(216, 179, 110, 0.06), transparent 120px),
        var(--eo-surface);
    box-shadow: var(--eo-glow);
}

.el-outreach-lead.is-closed-stage .el-outreach-lead__company {
    color: var(--eo-muted);
}

.el-outreach-lead__row {
    display: grid;
    grid-template-columns: auto minmax(12rem, 1.6fr) auto minmax(14rem, 1.3fr) minmax(7rem, 0.8fr) minmax(8rem, 0.8fr) auto;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 0.9rem 0.75rem 0.6rem;
}

.el-outreach-lead__toggle {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 0.6rem;
    color: var(--eo-muted);
    transition: transform 0.3s var(--eo-ease), color 0.2s, background-color 0.2s;
}

.el-outreach-lead__toggle:hover {
    color: var(--eo-text);
    background: var(--eo-hover);
}

.el-outreach-lead.is-open .el-outreach-lead__toggle {
    transform: rotate(90deg);
    color: var(--eo-brass-light);
}

.el-outreach-ico {
    width: 1rem;
    height: 1rem;
}

.el-outreach-lead__identity {
    min-width: 0;
}

.el-outreach-lead__company {
    display: block;
    overflow: hidden;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--eo-text);
}

.el-outreach-lead__company:hover {
    color: var(--eo-brass-light);
}

.el-outreach-lead__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.45rem;
    margin-top: 0.15rem;
    font-size: 0.76rem;
    color: var(--eo-muted);
}

.el-outreach-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}

.el-outreach-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.45rem;
    border: 1px solid var(--eo-border);
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--eo-muted);
}

.el-outreach-chip--tier1 {
    color: #7fd6ab;
    border-color: rgba(63, 143, 106, 0.45);
}

.el-outreach-chip--tier2 {
    color: #9ccbe6;
    border-color: rgba(106, 167, 201, 0.4);
}

.el-outreach-chip--real {
    color: #7fd6ab;
    border-color: rgba(63, 143, 106, 0.45);
    background: rgba(63, 143, 106, 0.12);
}

.el-outreach-stage {
    --stage: #a8a49b;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--stage);
    background: color-mix(in srgb, var(--stage) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--stage) 30%, transparent);
}

.el-outreach-stage::before {
    content: '';
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: currentColor;
}

.el-outreach-stage--contacted { --stage: #6aa7c9; }
.el-outreach-stage--replied { --stage: #9d90f7; }
.el-outreach-stage--demo { --stage: #d8b36e; }
.el-outreach-stage--proposal { --stage: #c79b52; }
.el-outreach-stage--won { --stage: #5fbf8f; }
.el-outreach-stage--lost { --stage: #d9674f; }

.el-outreach-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.el-outreach-metric {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.el-outreach-metric strong {
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.el-outreach-metric span {
    white-space: nowrap;
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--eo-muted);
}

.el-outreach-metric.is-lit strong {
    color: var(--eo-brass-light);
    text-shadow: 0 0 18px rgba(216, 179, 110, 0.45);
}

.el-outreach-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.el-outreach-signal {
    padding: 0.18rem 0.5rem;
    border-radius: 0.45rem;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    color: #9ccbe6;
    background: rgba(106, 167, 201, 0.12);
}

.el-outreach-signal--quote {
    color: #17120a;
    background: linear-gradient(135deg, var(--eo-brass-light), var(--eo-brass));
}

.el-outreach-dates {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.74rem;
    color: var(--eo-muted);
    white-space: nowrap;
}

.el-outreach-dates strong {
    color: var(--eo-text);
    font-weight: 600;
}

.el-outreach-dates .is-due,
.el-outreach-dates .is-due strong {
    color: #e8866f;
}

.el-outreach-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
}

.el-outreach-btn {
    margin: 0 0.25rem;
    padding: 0.38rem 0.75rem;
    border: 1px solid rgba(216, 179, 110, 0.4);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--eo-brass-light);
    white-space: nowrap;
    transition: background-color 0.2s var(--eo-ease), color 0.2s var(--eo-ease);
}

.el-outreach-btn:hover {
    color: #17120a;
    background: var(--eo-brass-light);
}

.el-outreach-btn--ghost {
    margin: 0.4rem 0 0;
}

/* ---------- Expanded detail ---------- */

.el-outreach-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 1.5rem;
    padding: 0.4rem 1.2rem 1.2rem 3.4rem;
    border-top: 1px solid var(--eo-border);
    animation: el-outreach-in 0.35s var(--eo-ease);
}

@keyframes el-outreach-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.el-outreach-detail__title {
    margin: 0.9rem 0 0.5rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--eo-muted);
}

.el-outreach-visit {
    position: relative;
    display: grid;
    grid-template-columns: 9.5rem 1fr;
    gap: 0.2rem 1rem;
    padding: 0.6rem 0 0.6rem 1rem;
    border-left: 2px solid var(--eo-border);
}

.el-outreach-visit::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0.95rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--eo-muted);
}

.el-outreach-visit.is-real {
    border-left-color: rgba(216, 179, 110, 0.45);
}

.el-outreach-visit.is-real::before {
    background: var(--eo-brass-light);
    box-shadow: 0 0 10px rgba(216, 179, 110, 0.7);
}

.el-outreach-visit.is-bot {
    opacity: 0.45;
}

.el-outreach-visit__when {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
}

.el-outreach-visit__when span {
    font-size: 0.72rem;
    color: var(--eo-muted);
}

.el-outreach-visit__facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.el-outreach-visit__pages {
    grid-column: 2;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    color: var(--eo-muted);
    word-break: break-word;
}

.el-outreach-event {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    font-size: 0.82rem;
    border-bottom: 1px dashed var(--eo-border);
}

.el-outreach-event span {
    color: var(--eo-muted);
}

.el-outreach-contact,
.el-outreach-notes {
    font-size: 0.84rem;
    line-height: 1.55;
}

.el-outreach-notes {
    white-space: pre-line;
}

.el-outreach-contact a {
    color: var(--eo-brass-light);
}

.el-outreach-empty-note {
    font-size: 0.82rem;
    color: var(--eo-muted);
}

.el-outreach-empty {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    padding: 3rem 1rem;
    border: 1px dashed var(--eo-border);
    border-radius: 1rem;
    text-align: center;
}

.el-outreach-empty__icon {
    width: 2.2rem;
    height: 2.2rem;
    color: var(--eo-brass-light);
    opacity: 0.8;
}

.el-outreach-empty__title {
    font-weight: 700;
}

.el-outreach-empty__body {
    max-width: 30rem;
    font-size: 0.85rem;
    color: var(--eo-muted);
}

/* ---------- Analytics ---------- */

.el-analytics-change {
    font-size: 0.72rem;
    font-weight: 600;
}

.el-analytics-change.is-up { color: #6fcf9f; }
.el-analytics-change.is-down { color: #e8866f; }
.el-analytics-change.is-flat { color: var(--eo-muted); font-weight: 500; }

.el-analytics-legend {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: var(--eo-muted);
}

.el-analytics-key {
    display: inline-block;
    width: 0.8rem;
    height: 3px;
    margin-left: 0.5rem;
    border-radius: 2px;
}

.el-analytics-key--views { background: var(--eo-brass-light); }
.el-analytics-key--visitors { background: #8fb8d3; }

.el-analytics-chart {
    display: block;
    width: 100%;
    height: 220px;
}

.el-analytics-grid {
    stroke: var(--eo-border);
    stroke-width: 1;
}

.el-analytics-line {
    fill: none;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.el-analytics-line--views { stroke: var(--eo-brass-light); }
.el-analytics-line--visitors { stroke: #8fb8d3; stroke-dasharray: 5 4; }

.el-analytics-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: var(--eo-muted);
}

.el-analytics-empty {
    padding: 2.5rem 0;
    text-align: center;
}

.el-analytics-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 1rem;
}

.el-analytics-bar {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0.6rem;
    margin-bottom: 0.3rem;
    border-radius: 0.5rem;
    font-size: 0.82rem;
    overflow: hidden;
}

.el-analytics-bar__fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(216, 179, 110, 0.2), rgba(216, 179, 110, 0.05));
}

.el-analytics-bar__label,
.el-analytics-bar__value {
    position: relative;
}

.el-analytics-bar__label {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.el-analytics-bar__value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.el-analytics-bar__value small {
    margin-left: 0.4rem;
}

.el-analytics-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    font-size: 0.84rem;
    border-bottom: 1px dashed var(--eo-border);
}

.el-analytics-row a {
    color: var(--eo-brass-light);
}

.el-analytics-row small {
    margin-left: 0.4rem;
}

.el-analytics-checklist {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
    list-style: decimal;
    font-size: 0.86rem;
    line-height: 1.6;
}

.el-analytics-checklist code {
    padding: 0 0.3rem;
    border-radius: 4px;
    background: var(--eo-border);
    font-size: 0.8rem;
}

.el-analytics-weeks {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 0.5rem;
    height: 180px;
}

.el-analytics-week {
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: end;
    justify-items: center;
    height: 100%;
    gap: 0.3rem;
}

.el-analytics-week__bar {
    align-self: end;
    width: 100%;
    max-width: 2.6rem;
    border-radius: 0.45rem 0.45rem 0.15rem 0.15rem;
    background: linear-gradient(180deg, var(--eo-brass-light), rgba(176, 131, 58, 0.35));
    box-shadow: 0 0 18px -6px rgba(216, 179, 110, 0.7);
}

.el-analytics-week__value {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--eo-brass-light);
}

.el-analytics-week__label {
    font-size: 0.66rem;
    color: var(--eo-muted);
    white-space: nowrap;
}

/* ---------- Light mode ---------- */

html:not(.dark) .el-outreach-goal { background: rgba(30, 30, 35, 0.08); }
html:not(.dark) .el-outreach-tab__count { background: rgba(30, 30, 35, 0.07); }
html:not(.dark) .el-outreach-stat--hot .el-outreach-stat__value,
html:not(.dark) .el-outreach-metric.is-lit strong,
html:not(.dark) .el-outreach-flag,
html:not(.dark) .el-outreach-btn,
html:not(.dark) .el-outreach-contact a,
html:not(.dark) .el-analytics-row a,
html:not(.dark) .el-analytics-week__value,
html:not(.dark) .el-outreach-warning { color: #8a6424; text-shadow: none; }
html:not(.dark) .el-outreach-funnel__won,
html:not(.dark) .el-analytics-change.is-up { color: #2f7a57; }

/* ---------- Responsive ---------- */

@media (max-width: 1400px) {
    .el-outreach-lead__row {
        grid-template-columns: auto minmax(12rem, 1.5fr) auto minmax(13rem, 1.2fr) auto;
    }

    .el-outreach-signals,
    .el-outreach-dates {
        grid-column: 2 / span 3;
        flex-direction: row;
        gap: 0.3rem 0.9rem;
    }

    .el-outreach-dates {
        grid-column: 2 / span 2;
    }

    .el-outreach-actions {
        grid-column: 4 / span 2;
        grid-row: 2;
    }

    .el-outreach-signals {
        grid-row: 3;
    }

    .el-outreach-signals:empty {
        display: none;
    }
}

@media (max-width: 1100px) {
    .el-outreach-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .el-analytics-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .el-outreach-lead__row {
        grid-template-columns: auto 1fr auto;
    }

    .el-outreach-metrics,
    .el-outreach-signals,
    .el-outreach-dates,
    .el-outreach-actions {
        grid-column: 2 / -1;
        grid-row: auto;
        justify-content: flex-start;
    }

    .el-outreach-detail {
        grid-template-columns: 1fr;
        padding-left: 1.2rem;
    }
}

@media (max-width: 640px) {
    .el-outreach-stats,
    .el-analytics-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    input[type='search'].el-outreach-input {
        min-width: 0;
        width: 100%;
    }

    .el-outreach-filters,
    .el-outreach-field {
        width: 100%;
    }

    .el-outreach-visit {
        grid-template-columns: 1fr;
    }

    .el-outreach-visit__pages {
        grid-column: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .el-outreach *,
    .el-analytics * {
        animation: none !important;
        transition: none !important;
    }
}

/* Automated email panel */
.el-outreach-email__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 0 1.25rem 1rem;
}
.el-outreach-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 138, 120, 0.35);
    background: rgba(148, 138, 120, 0.08);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}
.el-outreach-switch__dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    background: #8b8578;
}
.el-outreach-switch.is-on {
    border-color: rgba(63, 143, 106, 0.55);
    background: rgba(63, 143, 106, 0.14);
    color: #3f8f6a;
}
.el-outreach-switch.is-on .el-outreach-switch__dot {
    background: #3f8f6a;
    box-shadow: 0 0 0 4px rgba(63, 143, 106, 0.2);
}
.el-outreach-email__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
    font-size: 0.85rem;
    opacity: 0.9;
}
.el-outreach-email__stats strong { font-size: 1rem; margin-right: 0.2rem; }
.el-outreach-email__stats .is-good strong { color: #3f8f6a; }
.el-outreach-email__stats .is-bad strong { color: #c4462d; }
.el-outreach-email__links { display: flex; gap: 0.5rem; margin-left: auto; }
.el-outreach-mailboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.75rem;
    padding: 0 1.25rem 1.25rem;
}
.el-outreach-mailbox {
    display: grid;
    gap: 0.3rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 138, 120, 0.25);
    font-size: 0.82rem;
}
.el-outreach-mailbox__email { font-weight: 600; font-size: 0.9rem; word-break: break-all; }
.el-outreach-mailbox__bar {
    display: block;
    height: 0.3rem;
    border-radius: 999px;
    background: rgba(148, 138, 120, 0.2);
    overflow: hidden;
}
.el-outreach-mailbox__bar span { display: block; height: 100%; background: #b0833a; }
.el-outreach-mailbox__state { opacity: 0.75; }
.el-outreach-mailbox.is-off { opacity: 0.6; }
.el-outreach-mailbox.has-error { border-color: rgba(196, 70, 45, 0.45); }
.el-outreach-mailbox.has-error .el-outreach-mailbox__state { color: #c4462d; opacity: 1; }
.el-outreach-mailbox.is-throttled { border-color: rgba(176, 131, 58, 0.45); }
.el-outreach-mailbox.is-throttled .el-outreach-mailbox__state { color: #b0833a; opacity: 1; }
.el-outreach-mail {
    margin: 0 0 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.6rem;
    border-left: 3px solid #b0833a;
    background: rgba(148, 138, 120, 0.08);
    font-size: 0.82rem;
}
.el-outreach-mail.is-in { border-left-color: #3f8f6a; }
.el-outreach-mail.is-bad { border-left-color: #c4462d; }
.el-outreach-mail__head { display: flex; justify-content: space-between; gap: 0.5rem; margin: 0; }
.el-outreach-mail__head span { opacity: 0.7; }
.el-outreach-mail__subject { margin: 0.15rem 0 0; }
.el-outreach-mail__body { margin: 0.3rem 0 0; opacity: 0.8; white-space: pre-line; }
