/* ============================================================
   ALPHAVAULT CRM INTERACTIONS — crm-interactions.css v1.0
   PART 1/2 — Hero · KPI Bar · Toolbar · Timeline · Calendar
   Light mode default · Dark mode via body.crm-dark-mode
   100% responsive PC/Mobile · Matching CRM Dashboard design
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   1. HERO SECTION — Page Icon
════════════════════════════════════════════════════════════ */
.int-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--crm-primary), var(--crm-primary-dark));
    color: #fff;
    font-size: 15px;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

/* ════════════════════════════════════════════════════════════
   2. KPI BAR (4 cards)
════════════════════════════════════════════════════════════ */
.int-kpi-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.int-kpi-card {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--crm-transition);
    position: relative;
    overflow: hidden;
}

.int-kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--crm-border-hover);
    box-shadow: var(--crm-shadow);
}

.int-kpi-skeleton {
    min-height: 112px;
    animation: crmSkeletonPulse 1.5s ease-in-out infinite;
    cursor: default;
    pointer-events: none;
}

.int-kpi-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.int-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.int-kpi-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.int-kpi-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--crm-text);
    line-height: 1.2;
    word-break: break-word;
}

.int-kpi-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--crm-text-muted);
}

.int-kpi-sub {
    font-size: 10px;
    color: var(--crm-text-faint);
}

/* Light mode polish */
body:not(.crm-dark-mode) .int-kpi-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Dark mode */
body.crm-dark-mode .int-kpi-card {
    background: rgba(30, 41, 59, 0.85);
}

/* ════════════════════════════════════════════════════════════
   3. TOOLBAR — Container
════════════════════════════════════════════════════════════ */
.int-toolbar {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

body:not(.crm-dark-mode) .int-toolbar {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

body.crm-dark-mode .int-toolbar {
    background: rgba(30, 41, 59, 0.85);
}

/* ── View Switcher ─────────────────────────────────────── */
.int-view-switcher {
    display: flex;
    align-items: center;
    gap: 3px;
    background: var(--crm-input-bg);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 3px;
    flex-shrink: 0;
}

.int-view-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 7px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--crm-text-muted);
    cursor: pointer;
    transition: var(--crm-transition);
    white-space: nowrap;
    position: relative;
}

.int-view-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--crm-text);
}

body.crm-dark-mode .int-view-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.int-view-btn.active {
    background: var(--crm-surface);
    color: var(--crm-primary);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

body.crm-dark-mode .int-view-btn.active {
    background: rgba(102, 126, 234, 0.12);
    box-shadow: none;
}

.int-view-btn i { font-size: 11px; }

.int-view-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--crm-red);
    color: #fff;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    animation: crmPulse 2s ease-in-out infinite;
}

/* ── Toolbar Separator ─────────────────────────────────── */
.int-toolbar-sep {
    width: 1px;
    height: 28px;
    background: var(--crm-border);
    flex-shrink: 0;
}

/* ── Filters Bar ───────────────────────────────────────── */
.int-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.int-filter-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
    flex-shrink: 0;
}

.int-filter-label {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--crm-text-faint);
    white-space: nowrap;
}

/* Type Pills */
.int-type-pills {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.int-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 20px;
    border: 1px solid var(--crm-border);
    background: var(--crm-input-bg);
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-text-muted);
    cursor: pointer;
    transition: var(--crm-transition);
    white-space: nowrap;
}

.int-type-pill:hover {
    background: rgba(102, 126, 234, 0.08);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.2);
}

.int-type-pill.active {
    background: rgba(102, 126, 234, 0.12);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.3);
}

.int-type-pill i { font-size: 9px; }

/* Filter Select */
.int-filter-select {
    background: var(--crm-input-bg);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 5px 8px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    color: var(--crm-text);
    cursor: pointer;
    outline: none;
    transition: var(--crm-transition);
    min-width: 100px;
}

.int-filter-select:focus {
    border-color: var(--crm-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

body.crm-dark-mode .int-filter-select {
    background: rgba(255, 255, 255, 0.06);
    color: var(--crm-text);
}

/* Filter Input (contact search) */
.int-filter-input {
    background: var(--crm-input-bg);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 5px 8px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    color: var(--crm-text);
    outline: none;
    transition: var(--crm-transition);
    min-width: 130px;
}

.int-filter-input::placeholder { color: var(--crm-text-faint); }

.int-filter-input:focus {
    border-color: var(--crm-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

body.crm-dark-mode .int-filter-input {
    background: rgba(255, 255, 255, 0.06);
    color: var(--crm-text);
}

/* Contact Filter Dropdown */
.int-contact-filter-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 210px;
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    box-shadow: var(--crm-shadow-lg);
    z-index: 2000;
    overflow: hidden;
    animation: crmFadeIn 0.15s ease;
}

body.crm-dark-mode .int-contact-filter-dropdown {
    background: #1e293b;
}

.int-contact-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--crm-transition);
    border-bottom: 1px solid var(--crm-border);
}

.int-contact-filter-item:last-child { border-bottom: none; }

.int-contact-filter-item:hover { background: var(--crm-input-bg); }

.int-filter-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

/* Clear Filters Button */
.int-clear-filters-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--crm-radius);
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-red);
    cursor: pointer;
    transition: var(--crm-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.int-clear-filters-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
}

/* ── Toolbar Actions (right) ────────────────────────────── */
.int-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.int-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--crm-radius);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--crm-transition);
    border: 1px solid transparent;
    white-space: nowrap;
}

.int-action-btn-primary {
    background: linear-gradient(135deg, var(--crm-primary), var(--crm-primary-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
}

.int-action-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(102, 126, 234, 0.5);
}

.int-action-btn-ai {
    background: rgba(139, 92, 246, 0.1);
    color: var(--crm-purple);
    border-color: rgba(139, 92, 246, 0.22);
}

.int-action-btn-ai:hover {
    background: rgba(139, 92, 246, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
}

/* ════════════════════════════════════════════════════════════
   4. REMINDERS BANNER
════════════════════════════════════════════════════════════ */
.int-reminders-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg,
        rgba(239, 68, 68, 0.05),
        rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--crm-red);
    border-radius: var(--crm-radius-lg);
    margin-bottom: 16px;
    animation: crmFadeIn 0.3s ease;
}

body.crm-dark-mode .int-reminders-banner {
    background: linear-gradient(135deg,
        rgba(239, 68, 68, 0.08),
        rgba(245, 158, 11, 0.08));
    border-color: rgba(239, 68, 68, 0.3);
}

.int-reminders-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.int-reminders-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--crm-red);
    flex-shrink: 0;
    animation: crmPulse 2s ease-in-out infinite;
}

.int-reminders-text {
    font-size: 12px;
    color: var(--crm-text-muted);
    flex-shrink: 0;
    line-height: 1.5;
}

.int-reminders-text strong {
    font-weight: 800;
    color: var(--crm-red);
}

.int-reminders-contacts {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.int-reminder-contact {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px 3px 4px;
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--crm-transition);
    font-size: 11px;
    font-weight: 600;
    color: var(--crm-text-muted);
}

.int-reminder-contact:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.2);
    color: var(--crm-primary);
}

.int-reminders-dismiss {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid var(--crm-border);
    background: var(--crm-input-bg);
    color: var(--crm-text-faint);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--crm-transition);
    flex-shrink: 0;
}

.int-reminders-dismiss:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--crm-red);
    border-color: rgba(239, 68, 68, 0.2);
}

/* ════════════════════════════════════════════════════════════
   5. VIEW CONTAINER
════════════════════════════════════════════════════════════ */
.int-view { animation: crmFadeIn 0.22s ease; }

/* ════════════════════════════════════════════════════════════
   6. TIMELINE — Results Bar & Group By
════════════════════════════════════════════════════════════ */
.int-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.int-results-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--crm-text-faint);
}

.int-groupby-switch {
    display: flex;
    align-items: center;
    gap: 4px;
}

.int-groupby-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-text-faint);
    margin-right: 2px;
}

.int-groupby-btn {
    padding: 4px 10px;
    background: var(--crm-input-bg);
    border: 1px solid var(--crm-border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-text-muted);
    cursor: pointer;
    transition: var(--crm-transition);
}

.int-groupby-btn:hover { color: var(--crm-text); }

.int-groupby-btn.active {
    background: rgba(102, 126, 234, 0.1);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.25);
}

/* ════════════════════════════════════════════════════════════
   7. TIMELINE SKELETON
════════════════════════════════════════════════════════════ */
.int-timeline-skeleton {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.int-skeleton-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.int-skeleton-date {
    height: 20px;
    width: 130px;
    background: var(--crm-input-bg);
    border-radius: 6px;
    animation: crmSkeletonPulse 1.5s ease-in-out infinite;
}

.int-skeleton-item {
    height: 88px;
    background: var(--crm-input-bg);
    border-radius: var(--crm-radius-lg);
    animation: crmSkeletonPulse 1.5s ease-in-out infinite;
}

.int-skeleton-item:nth-child(2) { animation-delay: 0.2s; }
.int-skeleton-item:nth-child(3) { animation-delay: 0.4s; }

body.crm-dark-mode .int-skeleton-date,
body.crm-dark-mode .int-skeleton-item {
    background: rgba(255, 255, 255, 0.04);
}

/* ════════════════════════════════════════════════════════════
   8. TIMELINE — Groups
════════════════════════════════════════════════════════════ */
.int-timeline-container {
    display: flex;
    flex-direction: column;
}

.int-timeline-group {
    margin-bottom: 22px;
}

/* ── Group Headers ─────────────────────────────────────── */
.int-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Date label */
.int-group-date-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--crm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.int-group-date-label.today {
    color: var(--crm-green);
}

/* Contact group header */
.int-group-header-contact {
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--crm-radius);
    transition: var(--crm-transition);
}

.int-group-header-contact:hover {
    background: var(--crm-input-bg);
}

.int-group-contact-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.int-group-contact-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.int-group-contact-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--crm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.int-group-contact-company {
    font-size: 10px;
    color: var(--crm-text-faint);
}

/* Type group header */
.int-group-type-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.int-group-type-label {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Shared: count badge + separator line */
.int-group-count {
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-text-faint);
    background: var(--crm-input-bg);
    border: 1px solid var(--crm-border);
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.int-group-line {
    flex: 1;
    height: 1px;
    background: var(--crm-border);
    min-width: 20px;
}

/* Items wrapper */
.int-group-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ════════════════════════════════════════════════════════════
   9. INTERACTION CARDS
════════════════════════════════════════════════════════════ */
.int-interaction-card {
    display: flex;
    gap: 12px;
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--crm-transition);
    position: relative;
    overflow: hidden;
}

.int-interaction-card:hover {
    border-color: var(--crm-border-hover);
    transform: translateX(3px);
}

body:not(.crm-dark-mode) .int-interaction-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.crm-dark-mode .int-interaction-card {
    background: rgba(30, 41, 59, 0.7);
}

body.crm-dark-mode .int-interaction-card:hover {
    background: rgba(30, 41, 59, 0.92);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* ── Left Column : Type Icon ────────────────────────────── */
.int-card-icon-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    width: 38px;
}

.int-card-type-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: var(--crm-transition);
}

.int-interaction-card:hover .int-card-type-icon {
    transform: scale(1.08);
}

.int-card-time {
    font-size: 9px;
    font-weight: 600;
    color: var(--crm-text-faint);
    text-align: center;
    white-space: nowrap;
    line-height: 1.4;
}

/* ── Main Content ───────────────────────────────────────── */
.int-card-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Card Header */
.int-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.int-card-header-left {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.int-card-header-right {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

/* Contact name */
.int-card-contact-name {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 800;
    color: var(--crm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    flex-shrink: 0;
}

.int-card-contact-mini-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.int-card-company {
    font-size: 11px;
    font-weight: 500;
    color: var(--crm-text-faint);
    flex-shrink: 0;
}

/* Header badges */
.int-card-type-badge,
.int-card-template-badge,
.int-card-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.int-card-ai-badge {
    background: rgba(139, 92, 246, 0.1);
    color: var(--crm-purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Sentiment badge */
.int-card-sentiment-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Author */
.int-card-author {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--crm-text-faint);
    flex-shrink: 0;
}

.int-card-author-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Duration */
.int-card-duration {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 600;
    color: var(--crm-text-faint);
    flex-shrink: 0;
}

/* Quick Actions — visible on card hover */
.int-card-quick-actions {
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.int-interaction-card:hover .int-card-quick-actions { opacity: 1; }

.int-card-quick-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--crm-border);
    background: var(--crm-input-bg);
    color: var(--crm-text-faint);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--crm-transition);
    flex-shrink: 0;
}

.int-card-quick-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.25);
}

.int-card-quick-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--crm-red);
    border-color: rgba(239, 68, 68, 0.25);
}

/* Summary */
.int-card-summary {
    font-size: 12px;
    color: var(--crm-text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.int-card-read-more {
    display: inline;
    font-size: 11px;
    color: var(--crm-primary);
    font-weight: 600;
    cursor: pointer;
    margin-left: 4px;
}

/* Action Items Preview row */
.int-card-actions-preview {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.int-card-actions-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.int-card-actions-badge.overdue {
    background: rgba(239, 68, 68, 0.12);
    color: var(--crm-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.int-card-actions-badge.pending {
    background: rgba(245, 158, 11, 0.12);
    color: var(--crm-amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.int-card-actions-badge.done {
    background: rgba(16, 185, 129, 0.1);
    color: var(--crm-green);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.int-card-actions-items-preview {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.int-card-action-chip {
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--crm-input-bg);
    color: var(--crm-text-faint);
    border: 1px solid var(--crm-border);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.int-card-action-chip.done {
    text-decoration: line-through;
    opacity: 0.6;
}

.int-card-action-chip.more {
    background: rgba(102, 126, 234, 0.08);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.15);
    font-weight: 800;
}

/* Related Deal chip */
.int-card-deal {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    color: var(--crm-text-faint);
}

/* ════════════════════════════════════════════════════════════
   10. LOAD MORE BUTTON
════════════════════════════════════════════════════════════ */
.int-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 22px 0;
}

.int-load-more-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--crm-text-muted);
    cursor: pointer;
    transition: var(--crm-transition);
}

.int-load-more-btn:hover {
    background: rgba(102, 126, 234, 0.08);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
    box-shadow: var(--crm-shadow);
}

.int-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ════════════════════════════════════════════════════════════
   11. CALENDAR VIEW — Controls
════════════════════════════════════════════════════════════ */
.int-cal-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.int-cal-nav-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--crm-radius);
    border: 1px solid var(--crm-border);
    background: var(--crm-input-bg);
    color: var(--crm-text-muted);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--crm-transition);
    flex-shrink: 0;
}

.int-cal-nav-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.2);
}

.int-cal-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
}

.int-cal-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--crm-text);
    text-align: center;
}

.int-cal-mode-switch {
    display: flex;
    gap: 2px;
    background: var(--crm-input-bg);
    border: 1px solid var(--crm-border);
    border-radius: 8px;
    padding: 2px;
}

.int-cal-mode-btn {
    padding: 4px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-text-muted);
    cursor: pointer;
    transition: var(--crm-transition);
}

.int-cal-mode-btn.active {
    background: var(--crm-surface);
    color: var(--crm-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

body.crm-dark-mode .int-cal-mode-btn.active {
    background: rgba(102, 126, 234, 0.12);
}

.int-cal-today-btn {
    padding: 7px 14px;
    background: var(--crm-input-bg);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--crm-text-muted);
    cursor: pointer;
    transition: var(--crm-transition);
    flex-shrink: 0;
}

.int-cal-today-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.2);
}

/* ── Grid Wrapper ───────────────────────────────────────── */
.int-cal-grid-wrap {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
}

body:not(.crm-dark-mode) .int-cal-grid-wrap {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

body.crm-dark-mode .int-cal-grid-wrap {
    background: rgba(30, 41, 59, 0.85);
}

/* ── Month Grid ─────────────────────────────────────────── */
.int-cal-day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--crm-input-bg);
    border-bottom: 1px solid var(--crm-border);
}

.int-cal-day-header {
    padding: 8px 4px;
    text-align: center;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--crm-text-faint);
}

.int-cal-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.int-cal-cell {
    min-height: 92px;
    padding: 6px;
    border-right: 1px solid var(--crm-border);
    border-bottom: 1px solid var(--crm-border);
    cursor: pointer;
    transition: background 0.12s;
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
}

.int-cal-cell:nth-child(7n) { border-right: none; }

.int-cal-cell:hover {
    background: rgba(102, 126, 234, 0.04);
}

body.crm-dark-mode .int-cal-cell:hover {
    background: rgba(102, 126, 234, 0.07);
}

.int-cal-cell.other-month {
    background: var(--crm-input-bg);
    opacity: 0.5;
}

.int-cal-cell.today {
    background: rgba(102, 126, 234, 0.04);
}

.int-cal-cell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.int-cal-cell-day {
    font-size: 12px;
    font-weight: 700;
    color: var(--crm-text-muted);
    line-height: 1;
}

.int-cal-cell-day.today-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--crm-primary), var(--crm-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.int-cal-cell-count {
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.12);
    color: var(--crm-primary);
}

.int-cal-cell-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow: hidden;
}

.int-cal-event-chip {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.12s;
}

.int-cal-event-chip:hover { opacity: 0.8; }

.int-cal-more-events {
    font-size: 9px;
    font-weight: 700;
    color: var(--crm-primary);
    cursor: pointer;
    padding-left: 2px;
}

.int-cal-dots {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: auto;
    padding-top: 2px;
}

.int-cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.int-cal-overflow {
    font-size: 8px;
    font-weight: 800;
    color: var(--crm-text-faint);
}

/* ── Calendar Legend ────────────────────────────────────── */
.int-cal-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 4px 2px;
}

.int-cal-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    color: var(--crm-text-faint);
}

.int-cal-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Calendar Popover ───────────────────────────────────── */
.int-cal-popover {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: 16px;
    width: 280px;
    box-shadow: var(--crm-shadow-xl);
    overflow: hidden;
    animation: crmFadeIn 0.15s ease;
}

body.crm-dark-mode .int-cal-popover {
    background: #1a2235;
    border-color: rgba(255, 255, 255, 0.1);
}

.int-cal-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--crm-border);
    font-size: 12px;
    font-weight: 800;
    color: var(--crm-text);
}

.int-cal-popover-header button {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid var(--crm-border);
    background: var(--crm-input-bg);
    color: var(--crm-text-faint);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--crm-transition);
}

.int-cal-popover-header button:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--crm-red);
}

.int-cal-popover-body {
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
}

.int-cal-popover-item {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: var(--crm-radius);
    cursor: pointer;
    transition: var(--crm-transition);
    margin-bottom: 2px;
}

.int-cal-popover-item:hover { background: var(--crm-input-bg); }

.int-cal-popover-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.int-cal-popover-item-info { flex: 1; min-width: 0; }

.int-cal-popover-item-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--crm-text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.int-cal-popover-item-sub {
    display: flex;
    gap: 6px;
    font-size: 10px;
    color: var(--crm-text-faint);
    flex-wrap: wrap;
}

.int-cal-popover-item-summary {
    font-size: 10px;
    color: var(--crm-text-faint);
    margin-top: 3px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.int-cal-popover-footer {
    padding: 10px 12px;
    border-top: 1px solid var(--crm-border);
    display: flex;
    justify-content: flex-end;
}

/* ── Week Grid ──────────────────────────────────────────── */
.int-cal-week-grid { overflow-x: auto; }

.int-cal-week-headers {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    background: var(--crm-input-bg);
    border-bottom: 1px solid var(--crm-border);
    min-width: 600px;
}

.int-cal-week-time-col {
    padding: 8px;
    font-size: 9px;
    color: var(--crm-text-faint);
    text-align: center;
}

.int-cal-week-day-header {
    padding: 8px 4px;
    text-align: center;
    border-left: 1px solid var(--crm-border);
}

.int-cal-week-day-header.today {
    background: rgba(102, 126, 234, 0.05);
}

.int-cal-week-day-name {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--crm-text-faint);
    margin-bottom: 2px;
}

.int-cal-week-day-num {
    font-size: 16px;
    font-weight: 900;
    color: var(--crm-text-muted);
    line-height: 1;
}

.int-cal-week-day-num.today-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--crm-primary), var(--crm-primary-dark));
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* All-day row */
.int-cal-week-allday {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    border-bottom: 1px solid var(--crm-border);
    background: rgba(102, 126, 234, 0.02);
    min-width: 600px;
}

.int-cal-week-allday-label {
    padding: 4px 6px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--crm-text-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--crm-border);
}

.int-cal-week-allday-cell {
    border-left: 1px solid var(--crm-border);
    padding: 4px;
    min-height: 30px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Week time slots */
.int-cal-week-body {
    overflow-y: auto;
    max-height: 480px;
    min-width: 600px;
}

.int-cal-week-row {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    border-bottom: 1px solid var(--crm-border);
    min-height: 44px;
}

.int-cal-week-time {
    padding: 3px 6px 0;
    font-size: 9px;
    font-weight: 600;
    color: var(--crm-text-faint);
    text-align: right;
    border-right: 1px solid var(--crm-border);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex-shrink: 0;
}

.int-cal-week-cell {
    border-left: 1px solid var(--crm-border);
    padding: 3px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.12s;
}

.int-cal-week-cell:hover { background: rgba(102, 126, 234, 0.03); }

body.crm-dark-mode .int-cal-week-cell:hover {
    background: rgba(102, 126, 234, 0.06);
}

.int-cal-week-cell.today-col {
    background: rgba(102, 126, 234, 0.03);
}

.int-cal-week-event {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.12s;
}

.int-cal-week-event:hover { opacity: 0.85; }

/* ════════════════════════════════════════════════════════════
   12. RESPONSIVE — Tablet (≤ 1200px)
════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {

    .int-kpi-bar { grid-template-columns: repeat(2, 1fr); }

    .int-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .int-toolbar-sep { display: none; }

    .int-toolbar-actions { margin-left: 0; }

    .int-filters { flex-wrap: wrap; }
}

/* ════════════════════════════════════════════════════════════
   13. RESPONSIVE — Mobile (≤ 768px)
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* KPI Bar */
    .int-kpi-bar       { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .int-kpi-card      { padding: 14px; }
    .int-kpi-value     { font-size: 18px; }
    .int-kpi-icon      { width: 32px; height: 32px; font-size: 14px; }

    /* Toolbar */
    .int-toolbar       { padding: 10px 12px; gap: 8px; flex-direction: column; align-items: flex-start; }

    .int-view-btn span { display: none; }
    .int-view-btn      { padding: 7px 10px; }

    .int-filters {
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        width: 100%;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .int-filter-group  { flex-shrink: 0; }
    .int-type-pills    { flex-wrap: nowrap; }
    .int-type-pill     { font-size: 10px; padding: 4px 8px; }

    .int-filter-select,
    .int-filter-input  { font-size: 12px; min-width: 90px; }

    .int-toolbar-actions { width: 100%; justify-content: flex-end; }

    .int-action-btn span { display: none; }
    .int-action-btn      { padding: 8px 12px; }

    /* Reminders Banner */
    .int-reminders-banner   { flex-direction: column; align-items: flex-start; gap: 8px; }
    .int-reminders-dismiss  { align-self: flex-end; }
    .int-reminders-content  { flex-direction: column; align-items: flex-start; gap: 6px; }

    /* Results bar */
    .int-results-bar { flex-direction: column; align-items: flex-start; gap: 6px; }

    /* Cards */
    .int-interaction-card   { padding: 10px 12px; }
    .int-card-icon-col      { width: 32px; }
    .int-card-type-icon     { width: 30px; height: 30px; font-size: 11px; }
    .int-card-contact-name  { max-width: 140px; font-size: 12px; }
    .int-card-quick-actions { opacity: 1; }

    /* Calendar month */
    .int-cal-cell         { min-height: 60px; }
    .int-cal-event-chip   { display: none; }
    .int-cal-cell-count   { font-size: 8px; }
    .int-cal-dots         { display: flex; }

    /* Calendar controls */
    .int-cal-controls     { gap: 6px; }
    .int-cal-title        { font-size: 13px; }
}

/* ════════════════════════════════════════════════════════════
   14. RESPONSIVE — Small Mobile (≤ 480px)
════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    .int-kpi-bar    { grid-template-columns: 1fr 1fr; gap: 6px; }
    .int-kpi-card   { padding: 12px; }
    .int-kpi-value  { font-size: 16px; }

    .int-action-btn {
        border-radius: 50%;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    .int-cal-cell            { min-height: 48px; padding: 3px; }
    .int-cal-cell-day        { font-size: 10px; }
    .int-cal-more-events     { display: none; }
    .int-cal-day-header      { font-size: 8px; }
}

/* ════════════════════════════════════════════════════════════
   15. ULTRA WIDE (≥ 1600px)
════════════════════════════════════════════════════════════ */
@media (min-width: 1600px) {
    .int-kpi-bar { grid-template-columns: repeat(4, 1fr); }
    .int-cal-cell { min-height: 110px; }
}

/* ════════════════════════════════════════════════════════════
   END — crm-interactions.css Part 1/2
   © AlphaVault AI — All rights reserved
════════════════════════════════════════════════════════════ */

/* ============================================================
   ALPHAVAULT CRM INTERACTIONS — crm-interactions.css v1.0
   PART 2/2 — Action Items · Statistics · Forms · Modals · Dark Mode
   Light mode default · Dark mode via body.crm-dark-mode
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   16. ACTION ITEMS VIEW — Header & Filters
════════════════════════════════════════════════════════════ */
.int-actions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.int-actions-filters {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.int-actions-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--crm-input-bg);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--crm-text-muted);
    cursor: pointer;
    transition: var(--crm-transition);
    white-space: nowrap;
}

.int-actions-filter-btn:hover {
    background: rgba(102, 126, 234, 0.08);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.2);
}

.int-actions-filter-btn.active {
    background: rgba(102, 126, 234, 0.12);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.3);
}

.int-actions-filter-btn i { font-size: 10px; }

.int-actions-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--crm-input-bg);
    border: 1px solid var(--crm-border);
    color: var(--crm-text-faint);
    border-radius: 20px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}

.int-actions-filter-count.urgent {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--crm-red);
    animation: crmPulse 2s ease-in-out infinite;
}

.int-actions-sort {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ── Action Items List ──────────────────────────────────── */
.int-actions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.int-actions-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

/* ════════════════════════════════════════════════════════════
   17. ACTION ITEM CARDS
════════════════════════════════════════════════════════════ */
.int-action-item-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    padding: 14px 16px;
    transition: var(--crm-transition);
    position: relative;
}

.int-action-item-card:hover {
    border-color: var(--crm-border-hover);
    box-shadow: var(--crm-shadow);
}

body:not(.crm-dark-mode) .int-action-item-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

body.crm-dark-mode .int-action-item-card {
    background: rgba(30, 41, 59, 0.7);
}

/* State variants */
.int-action-item-card.int-action-overdue {
    background: rgba(239, 68, 68, 0.03);
    border-color: rgba(239, 68, 68, 0.2);
    border-left: 3px solid var(--crm-red);
}

body.crm-dark-mode .int-action-item-card.int-action-overdue {
    background: rgba(239, 68, 68, 0.07);
}

.int-action-item-card.int-action-due-soon {
    background: rgba(249, 115, 22, 0.03);
    border-color: rgba(249, 115, 22, 0.2);
    border-left: 3px solid var(--crm-orange);
}

body.crm-dark-mode .int-action-item-card.int-action-due-soon {
    background: rgba(249, 115, 22, 0.06);
}

.int-action-item-card.int-action-completed {
    opacity: 0.65;
    background: var(--crm-input-bg);
}

/* Check Column */
.int-action-card-check-col {
    display: flex;
    align-items: flex-start;
    padding-top: 1px;
    flex-shrink: 0;
}

.int-action-complete-toggle {
    width: 22px;
    height: 22px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--crm-text-faint);
    font-size: 18px;
    transition: var(--crm-transition);
    flex-shrink: 0;
}

.int-action-complete-toggle:hover {
    color: var(--crm-green);
    transform: scale(1.15);
}

.int-action-complete-toggle.done {
    color: var(--crm-green);
}

/* Content */
.int-action-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.int-action-card-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--crm-text);
    line-height: 1.5;
    word-break: break-word;
}

.int-action-strikethrough {
    text-decoration: line-through;
    color: var(--crm-text-faint);
}

/* Meta chips row */
.int-action-card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.int-action-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    background: var(--crm-input-bg);
    color: var(--crm-text-faint);
    border: 1px solid var(--crm-border);
    white-space: nowrap;
    transition: var(--crm-transition);
}

.int-action-contact-chip {
    cursor: pointer;
}

.int-action-contact-chip:hover {
    background: rgba(102, 126, 234, 0.08);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.2);
}

.int-action-meta-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.int-action-source-chip {
    cursor: pointer;
}

.int-action-source-chip:hover {
    background: rgba(102, 126, 234, 0.06);
    border-color: rgba(102, 126, 234, 0.15);
}

/* Card action buttons */
.int-action-card-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.int-action-item-card:hover .int-action-card-actions { opacity: 1; }

/* Complete button used in Detail Modal action list */
.int-action-complete-btn {
    width: 22px;
    height: 22px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--crm-text-faint);
    transition: var(--crm-transition);
    flex-shrink: 0;
}

.int-action-complete-btn:hover {
    color: var(--crm-green);
    transform: scale(1.12);
}

.int-action-complete-btn.done {
    color: var(--crm-green);
}

/* ════════════════════════════════════════════════════════════
   18. STATISTICS VIEW
════════════════════════════════════════════════════════════ */
.int-stats-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 14px;
}

.int-stat-card {
    /* Extends .crm-widget — no extra padding needed */
}

.int-stat-card-wide {
    grid-column: 2 / 3;
}

.int-stat-card-ai {
    grid-column: 1 / -1;
}

/* Empty chart placeholder */
.int-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    font-size: 12px;
    font-weight: 600;
    color: var(--crm-text-faint);
}

/* ── Top Contacts Table ─────────────────────────────────── */
.int-top-contacts-table {
    overflow: hidden;
}

.int-top-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.int-top-contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--crm-radius);
    cursor: pointer;
    transition: var(--crm-transition);
}

.int-top-contact-row:hover {
    background: var(--crm-input-bg);
}

.int-top-contact-rank {
    font-size: 10px;
    font-weight: 800;
    color: var(--crm-text-faint);
    min-width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.int-top-contact-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.int-top-contact-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.int-top-contact-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--crm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.int-top-contact-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.int-type-mini-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 20px;
}

.int-top-contact-bar-wrap {
    flex: 1;
    height: 4px;
    background: var(--crm-input-bg);
    border-radius: 4px;
    overflow: hidden;
    max-width: 120px;
    flex-shrink: 0;
}

.int-top-contact-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 4px;
}

.int-top-contact-count {
    font-size: 13px;
    font-weight: 900;
    color: var(--crm-text);
    min-width: 24px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Team Stats ─────────────────────────────────────────── */
.int-team-stats-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.int-team-stats-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: var(--crm-radius);
    transition: var(--crm-transition);
}

.int-team-stats-row:hover { background: var(--crm-input-bg); }

.int-team-stats-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.int-team-stats-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.int-team-stats-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--crm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stacked type color bar */
.int-team-type-bar-wrap {
    height: 3px;
    background: var(--crm-input-bg);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
}

.int-team-type-segment {
    height: 100%;
    transition: width 0.4s ease;
}

.int-team-stats-bar-wrap {
    width: 80px;
    height: 4px;
    background: var(--crm-input-bg);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.int-team-stats-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 4px;
    opacity: 0.75;
}

.int-team-stats-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: 50px;
}

.int-team-stats-count strong {
    font-size: 14px;
    font-weight: 900;
    color: var(--crm-text);
    line-height: 1;
}

.int-team-stats-count span {
    font-size: 9px;
    color: var(--crm-text-faint);
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   19. LOG INTERACTION MODAL — Form Components
════════════════════════════════════════════════════════════ */

/* Template Selector */
.int-template-selector {
    margin-bottom: 16px;
}

.int-template-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--crm-text-faint);
    margin-bottom: 8px;
    display: block;
}

.int-template-chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.int-template-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: var(--crm-input-bg);
    border: 1px solid var(--crm-border);
    border-radius: 20px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-text-muted);
    cursor: pointer;
    transition: var(--crm-transition);
    white-space: nowrap;
}

.int-template-chip:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.2);
    color: var(--crm-primary);
}

.int-template-chip.active {
    background: color-mix(in srgb, var(--chip-color, #667eea) 12%, transparent);
    border-color: color-mix(in srgb, var(--chip-color, #667eea) 35%, transparent);
    color: var(--chip-color, var(--crm-primary));
}

/* Fallback for browsers without color-mix */
.int-template-chip[data-template="general"].active    { background: rgba(100, 116, 139, 0.1); border-color: rgba(100, 116, 139, 0.3); color: #64748b; }
.int-template-chip[data-template="post_ic_call"].active { background: rgba(102, 126, 234, 0.12); border-color: rgba(102, 126, 234, 0.3); color: #667eea; }
.int-template-chip[data-template="lp_intro_meeting"].active { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.3); color: #10b981; }
.int-template-chip[data-template="portfolio_review"].active { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.3); color: #f59e0b; }
.int-template-chip[data-template="advisor_call"].active { background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.3); color: #8b5cf6; }
.int-template-chip[data-template="due_diligence"].active { background: rgba(249, 115, 22, 0.12); border-color: rgba(249, 115, 22, 0.3); color: #f97316; }

.int-form-divider {
    border: none;
    border-top: 1px solid var(--crm-border);
    margin: 14px 0;
}

/* Section fields */
.int-section-label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.int-section-textarea {
    transition: var(--crm-transition);
    border-color: var(--crm-border);
}

.int-section-textarea:focus {
    border-color: var(--crm-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Multi-contacts badges */
.int-multi-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.int-contact-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-primary);
}

.int-contact-badge button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--crm-primary);
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.int-contact-badge button:hover { opacity: 1; }

/* AI Sentiment Tag button */
.int-ai-tag-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    font-family: inherit;
    font-size: 9px;
    font-weight: 800;
    color: var(--crm-purple);
    cursor: pointer;
    transition: var(--crm-transition);
    margin-left: 6px;
    vertical-align: middle;
}

.int-ai-tag-btn:hover {
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.35);
}

/* ── Action Items Form ──────────────────────────────────── */
.int-action-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.int-add-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-green);
    cursor: pointer;
    transition: var(--crm-transition);
}

.int-add-action-btn:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.35);
}

.int-action-items-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.int-action-item-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 6px;
    align-items: center;
}

.int-action-text { flex: 1; }

.int-action-date {
    width: 130px;
    flex-shrink: 0;
}

.int-action-assignee {
    width: 110px;
    flex-shrink: 0;
}

.int-remove-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid var(--crm-border);
    background: var(--crm-input-bg);
    color: var(--crm-text-faint);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--crm-transition);
    flex-shrink: 0;
}

.int-remove-action-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--crm-red);
    border-color: rgba(239, 68, 68, 0.2);
}

/* ════════════════════════════════════════════════════════════
   20. AI MEETING NOTES MODAL
════════════════════════════════════════════════════════════ */

/* Transcript meta */
.int-transcript-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 10px;
    color: var(--crm-text-faint);
    font-weight: 600;
}

.int-transcript-clear {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: transparent;
    border: 1px solid var(--crm-border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-text-faint);
    cursor: pointer;
    transition: var(--crm-transition);
}

.int-transcript-clear:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--crm-red);
    border-color: rgba(239, 68, 68, 0.2);
}

.int-ai-analyze-btn {
    min-width: 180px;
    justify-content: center;
}

/* Analyzing State */
.int-ai-analyzing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 20px;
    text-align: center;
}

.int-ai-analyzing-icon {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.int-ai-analyzing-icon i {
    font-size: 32px;
    color: var(--crm-purple);
    z-index: 1;
    position: relative;
    animation: crmPulse 1.5s ease-in-out infinite;
}

.int-ai-pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.3);
    animation: intPulseRing 1.8s ease-out infinite;
}

@keyframes intPulseRing {
    0%   { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.int-ai-analyzing-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--crm-text);
}

.int-ai-analyzing-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    min-width: 260px;
}

.int-ai-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--crm-text-faint);
    padding: 8px 12px;
    border-radius: var(--crm-radius);
    background: var(--crm-input-bg);
    transition: var(--crm-transition);
}

.int-ai-step.active {
    color: var(--crm-purple);
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
    font-weight: 700;
}

/* AI Result */
.int-ai-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.08),
        rgba(109, 40, 217, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--crm-radius-lg);
    margin-bottom: 16px;
}

.int-ai-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--crm-purple);
}

.int-ai-result-badge i { font-size: 14px; }

.int-ai-result-redo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-purple);
    cursor: pointer;
    transition: var(--crm-transition);
}

.int-ai-result-redo:hover {
    background: rgba(139, 92, 246, 0.1);
}

.int-ai-result-section {
    margin-bottom: 16px;
}

.int-ai-result-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--crm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}

.int-editable-hint {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--crm-green);
    border-radius: 4px;
    text-transform: none;
    letter-spacing: 0;
}

.int-ai-editable {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 12px;
    line-height: 1.7;
    border-color: rgba(139, 92, 246, 0.2) !important;
    background: rgba(139, 92, 246, 0.03) !important;
}

.int-ai-editable:focus {
    border-color: var(--crm-purple) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12) !important;
}

/* AI action items list (in result) */
.int-ai-action-items-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.int-ai-action-item-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 6px;
    align-items: center;
}

.int-ai-action-check {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
}

/* Sentiment display (read-only pill) */
.int-ai-sentiment-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--crm-radius);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

/* ════════════════════════════════════════════════════════════
   21. DETAIL MODAL — Two-column layout
════════════════════════════════════════════════════════════ */
.int-detail-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 20px;
    align-items: flex-start;
}

.int-detail-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.int-detail-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* ── Meta Row ───────────────────────────────────────────── */
.int-detail-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.int-type-badge,
.int-sentiment-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.int-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    background: var(--crm-input-bg);
    color: var(--crm-text-faint);
    border: 1px solid var(--crm-border);
    flex-shrink: 0;
}

.int-meta-chip-ai {
    background: rgba(139, 92, 246, 0.1);
    color: var(--crm-purple);
    border-color: rgba(139, 92, 246, 0.2);
}

/* ── Notes & Sections ───────────────────────────────────── */
.int-detail-notes {
    font-size: 13px;
    color: var(--crm-text);
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--crm-input-bg);
    border-radius: var(--crm-radius-lg);
    padding: 14px 16px;
    border: 1px solid var(--crm-border);
}

body.crm-dark-mode .int-detail-notes {
    background: rgba(255, 255, 255, 0.04);
}

.int-detail-section {
    background: var(--crm-input-bg);
    border-radius: var(--crm-radius);
    border: 1px solid var(--crm-border);
    overflow: hidden;
}

body.crm-dark-mode .int-detail-section {
    background: rgba(255, 255, 255, 0.03);
}

.int-detail-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--crm-text-faint);
    padding: 8px 12px;
    border-bottom: 1px solid var(--crm-border);
    background: rgba(0, 0, 0, 0.02);
}

body.crm-dark-mode .int-detail-section-title {
    background: rgba(255, 255, 255, 0.02);
}

.int-detail-section-body {
    font-size: 12px;
    color: var(--crm-text-muted);
    line-height: 1.7;
    padding: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.int-ai-message {
    background: rgba(139, 92, 246, 0.04);
    border-color: rgba(139, 92, 246, 0.15);
    font-style: italic;
}

/* ── Action Items in Detail ─────────────────────────────── */
.int-detail-actions-section {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    overflow: hidden;
}

.int-detail-actions-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px;
}

.int-detail-action-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 10px;
    border-radius: var(--crm-radius);
    transition: var(--crm-transition);
}

.int-detail-action-item:hover { background: var(--crm-input-bg); }

.int-detail-action-item.completed { opacity: 0.6; }

.int-detail-action-item.overdue {
    background: rgba(239, 68, 68, 0.04);
    border-left: 3px solid var(--crm-red);
    padding-left: 8px;
}

.int-action-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.int-action-item-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--crm-text);
    line-height: 1.4;
    word-break: break-word;
}

.int-detail-action-item.completed .int-action-item-text {
    text-decoration: line-through;
    color: var(--crm-text-faint);
}

.int-action-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.int-overdue-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 800;
    color: var(--crm-red);
}

.int-deadline-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--crm-text-faint);
}

.int-assignee-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--crm-text-faint);
}

/* ── Right Sidebar Cards ────────────────────────────────── */
.int-detail-sidebar-card {
    background: var(--crm-input-bg);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.crm-dark-mode .int-detail-sidebar-card {
    background: rgba(255, 255, 255, 0.03);
}

.int-detail-sidebar-title {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--crm-text-faint);
}

/* Contact card inside sidebar */
.int-detail-contact-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--crm-radius);
    transition: var(--crm-transition);
    margin: -6px;
}

.int-detail-contact-card:hover {
    background: rgba(102, 126, 234, 0.06);
}

.int-detail-contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.int-detail-contact-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--crm-text);
    margin-bottom: 2px;
    line-height: 1.3;
}

.int-detail-contact-title {
    font-size: 10px;
    color: var(--crm-text-faint);
    margin-bottom: 2px;
}

.int-detail-contact-company {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--crm-text-muted);
    font-weight: 600;
}

/* Quick log follow-up button */
.int-quick-log-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--crm-radius);
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    color: var(--crm-green);
    cursor: pointer;
    transition: var(--crm-transition);
    width: 100%;
}

.int-quick-log-btn:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

/* Deal card in sidebar */
.int-detail-deal-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--crm-radius);
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.12);
    transition: var(--crm-transition);
}

.int-detail-deal-card:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.int-detail-deal-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--crm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.int-detail-deal-stage {
    font-size: 10px;
    font-weight: 700;
    text-transform: capitalize;
}

/* Author row */
.int-detail-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.int-detail-author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

/* Quick actions in sidebar */
.int-detail-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.int-detail-quick-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--crm-text-muted);
    cursor: pointer;
    transition: var(--crm-transition);
    text-align: left;
    width: 100%;
}

.int-detail-quick-btn:hover {
    background: rgba(102, 126, 234, 0.08);
    color: var(--crm-primary);
    border-color: rgba(102, 126, 234, 0.2);
}

.int-detail-quick-btn.danger {
    color: var(--crm-red);
}

.int-detail-quick-btn.danger:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.int-detail-quick-btn i {
    font-size: 11px;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   22. AI DRAFT RESULT
════════════════════════════════════════════════════════════ */
.int-ai-draft-result {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.int-ai-draft-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.int-ai-draft-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.12),
        rgba(109, 40, 217, 0.08));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    color: var(--crm-purple);
}

/* ════════════════════════════════════════════════════════════
   23. DARK MODE — Part 2 Adjustments
════════════════════════════════════════════════════════════ */

/* Action Items */
body.crm-dark-mode .int-action-item-card {
    background: rgba(30, 41, 59, 0.7);
}

body.crm-dark-mode .int-action-item-card.int-action-overdue {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

body.crm-dark-mode .int-action-item-card.int-action-due-soon {
    background: rgba(249, 115, 22, 0.07);
    border-color: rgba(249, 115, 22, 0.25);
}

body.crm-dark-mode .int-action-item-card.int-action-completed {
    background: rgba(255, 255, 255, 0.02);
}

body.crm-dark-mode .int-action-item-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Stats */
body.crm-dark-mode .int-top-contact-row:hover,
body.crm-dark-mode .int-team-stats-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Detail Modal */
body.crm-dark-mode .int-detail-notes {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

body.crm-dark-mode .int-detail-section {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

body.crm-dark-mode .int-detail-section-title {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

body.crm-dark-mode .int-detail-actions-section {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

body.crm-dark-mode .int-detail-action-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

body.crm-dark-mode .int-detail-action-item.overdue {
    background: rgba(239, 68, 68, 0.08);
}

body.crm-dark-mode .int-detail-sidebar-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.07);
}

body.crm-dark-mode .int-detail-quick-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

body.crm-dark-mode .int-detail-quick-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

body.crm-dark-mode .int-detail-contact-card:hover {
    background: rgba(102, 126, 234, 0.08);
}

body.crm-dark-mode .int-detail-deal-card {
    background: rgba(102, 126, 234, 0.07);
    border-color: rgba(102, 126, 234, 0.15);
}

body.crm-dark-mode .int-detail-deal-card:hover {
    background: rgba(102, 126, 234, 0.12);
}

/* Forms */
body.crm-dark-mode .int-template-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--crm-text-muted);
}

body.crm-dark-mode .int-section-textarea {
    background: rgba(255, 255, 255, 0.05);
    color: var(--crm-text);
}

body.crm-dark-mode .int-ai-editable {
    background: rgba(139, 92, 246, 0.05) !important;
    border-color: rgba(139, 92, 246, 0.2) !important;
    color: var(--crm-text) !important;
}

body.crm-dark-mode .int-action-item-row .crm-form-input {
    background: rgba(255, 255, 255, 0.05);
    color: var(--crm-text);
}

body.crm-dark-mode .int-ai-analyzing {
    background: transparent;
}

body.crm-dark-mode .int-ai-step {
    background: rgba(255, 255, 255, 0.04);
}

body.crm-dark-mode .int-ai-step.active {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
}

body.crm-dark-mode .int-ai-result-header {
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.1),
        rgba(109, 40, 217, 0.07));
    border-color: rgba(139, 92, 246, 0.2);
}

body.crm-dark-mode .int-ai-message {
    background: rgba(139, 92, 246, 0.07);
    border-color: rgba(139, 92, 246, 0.18);
}

body.crm-dark-mode .int-cal-popover-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.crm-dark-mode .int-groupby-btn.active {
    background: rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.25);
}

/* ════════════════════════════════════════════════════════════
   24. RESPONSIVE PART 2 — Tablet (≤ 1200px)
════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {

    /* Stats grid: 1 column */
    .int-stats-grid {
        grid-template-columns: 1fr;
    }

    .int-stat-card-wide,
    .int-stat-card-ai {
        grid-column: 1 / -1;
    }

    /* Detail Modal: single column */
    .int-detail-layout {
        grid-template-columns: 1fr;
    }

    .int-detail-right {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 10px;
    }
}

/* ════════════════════════════════════════════════════════════
   25. RESPONSIVE PART 2 — Mobile (≤ 768px)
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Action Items */
    .int-actions-header    { flex-direction: column; align-items: flex-start; gap: 8px; }
    .int-actions-filters   { overflow-x: auto; flex-wrap: nowrap; width: 100%; padding-bottom: 4px; }
    .int-actions-filter-btn { flex-shrink: 0; }
    .int-action-item-card  { flex-wrap: wrap; }
    .int-action-card-actions { opacity: 1; flex-direction: row; }
    .int-action-item-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    .int-remove-action-btn {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
    .int-action-date,
    .int-action-assignee { width: 100%; }

    /* Statistics */
    .int-stats-grid { gap: 10px; }
    .int-top-contact-bar-wrap { max-width: 70px; }
    .int-team-stats-bar-wrap  { width: 60px; }

    /* Detail Modal */
    .int-detail-layout { grid-template-columns: 1fr; }
    .int-detail-right  {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    /* Form */
    .int-template-chips { gap: 4px; }
    .int-template-chip  { font-size: 9px; padding: 4px 8px; }
    .int-action-item-row {
        grid-template-columns: 1fr auto;
    }
    .int-action-date,
    .int-action-assignee { min-width: 0; }

    /* AI Analyzing */
    .int-ai-analyzing { padding: 32px 16px; }
    .int-ai-analyzing-steps { min-width: auto; width: 100%; }
}

/* ════════════════════════════════════════════════════════════
   26. RESPONSIVE PART 2 — Small Mobile (≤ 480px)
════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    /* Action item rows: simplified */
    .int-action-item-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
    }

    .int-action-date,
    .int-action-assignee {
        grid-column: 1 / -1;
    }

    /* Detail modal: single col sidebar */
    .int-detail-right { grid-template-columns: 1fr; }

    /* Stats */
    .int-top-contacts-list,
    .int-team-stats-list { max-height: 240px; }

    .int-top-contact-bar-wrap { display: none; }
    .int-team-stats-bar-wrap  { display: none; }

    /* AI Result action items: simplified grid */
    .int-ai-action-item-row {
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
    }

    .int-ai-action-item-row .int-action-date,
    .int-ai-action-item-row .int-action-assignee {
        grid-column: 1 / -1;
    }

    /* Detail notes */
    .int-detail-notes { font-size: 12px; padding: 10px 12px; }

    /* Actions filter scroll */
    .int-actions-filters { padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
}

/* ════════════════════════════════════════════════════════════
   27. PRINT
════════════════════════════════════════════════════════════ */
@media print {

    .int-toolbar,
    .int-view-switcher,
    .int-toolbar-actions,
    .int-load-more-wrap,
    .int-card-quick-actions,
    .int-reminders-banner,
    .int-reminders-dismiss,
    .int-action-card-actions,
    .int-detail-quick-actions { display: none !important; }

    .int-interaction-card {
        break-inside: avoid;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .int-kpi-bar {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .int-stats-grid {
        grid-template-columns: 1fr 2fr !important;
    }

    .int-detail-layout {
        grid-template-columns: 1fr 240px !important;
    }

    body { background: #fff !important; }
}

/* ════════════════════════════════════════════════════════════
   28. ACCESSIBILITY
════════════════════════════════════════════════════════════ */
.int-view-btn:focus-visible,
.int-type-pill:focus-visible,
.int-action-btn:focus-visible,
.int-actions-filter-btn:focus-visible,
.int-action-complete-toggle:focus-visible,
.int-action-complete-btn:focus-visible,
.int-groupby-btn:focus-visible,
.int-cal-nav-btn:focus-visible,
.int-load-more-btn:focus-visible,
.int-quick-log-btn:focus-visible,
.int-detail-quick-btn:focus-visible {
    outline: 2px solid var(--crm-primary);
    outline-offset: 2px;
}

/* iOS font size zoom prevention */
@media (max-width: 768px) {
    .int-filter-select,
    .int-filter-input,
    .int-section-textarea,
    .int-ai-editable,
    .int-action-text,
    .int-action-date,
    .int-action-assignee { font-size: 16px; }

    .int-filter-select:not(:focus),
    .int-filter-input:not(:focus),
    .int-section-textarea:not(:focus),
    .int-ai-editable:not(:focus),
    .int-action-text:not(:focus),
    .int-action-date:not(:focus),
    .int-action-assignee:not(:focus) { font-size: 11px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .int-ai-analyzing-icon i,
    .int-ai-pulse-ring,
    .int-view-badge,
    .int-reminders-icon { animation: none !important; }
    .int-interaction-card,
    .int-action-item-card,
    .int-kpi-card { transition-duration: 0.01ms !important; }
}

/* ════════════════════════════════════════════════════════════
   29. UTILITIES & SCROLLBARS
════════════════════════════════════════════════════════════ */

/* Custom scrollbars for lists */
.int-top-contacts-list::-webkit-scrollbar,
.int-team-stats-list::-webkit-scrollbar,
.int-actions-list::-webkit-scrollbar,
.int-timeline-container::-webkit-scrollbar { width: 3px; }

.int-top-contacts-list::-webkit-scrollbar-thumb,
.int-team-stats-list::-webkit-scrollbar-thumb,
.int-actions-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

body.crm-dark-mode .int-top-contacts-list::-webkit-scrollbar-thumb,
body.crm-dark-mode .int-team-stats-list::-webkit-scrollbar-thumb,
body.crm-dark-mode .int-actions-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
}

.int-cal-week-body::-webkit-scrollbar { width: 4px; }
.int-cal-week-body::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.2);
    border-radius: 4px;
}

.int-cal-popover-body::-webkit-scrollbar { width: 3px; }
.int-cal-popover-body::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.15);
    border-radius: 3px;
}

/* GPU acceleration */
.int-interaction-card,
.int-action-item-card,
.int-kpi-card,
.int-cal-cell {
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Safari momentum scroll */
.int-filters,
.int-actions-filters,
.int-top-contacts-list,
.int-team-stats-list,
.int-cal-week-body,
.int-cal-popover-body { -webkit-overflow-scrolling: touch; }

/* Truncate utility */
.int-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Visually hidden (a11y) */
.int-sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ════════════════════════════════════════════════════════════
   END — crm-interactions.css v1.0 (Part 2/2)
   © AlphaVault AI — All rights reserved
════════════════════════════════════════════════════════════ */