/* ==================== CRM MODULE STYLES ==================== */
/* Uses main theme variables for consistency */

/* New flex layout for CRM page */
.crm-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding: 10px;
}

.crm-search-card {
    flex-shrink: 0;
    margin-bottom: 15px;
}

/* Content grid – takes remaining space */
.crm-content-grid {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* All three views fill the container */
.content-view {
    width: 100%;
    height: 100%;
    overflow: auto;
    display: none;
}
.content-view.active {
    display: block;
}

/* CRM card title icons */
.crm-card h3 i {
    color: var(--theme-accent);
    margin-right: 6px;
    font-size: 1.1rem;
}

/* CRM Cards - Using theme variables */
.crm-card {
    background: var(--theme-card-bg) !important;
    border-radius: var(--radius-lg);
    box-shadow: 6px 6px 12px var(--theme-shadow-dark), -6px -6px 12px var(--shadow-light);
    padding: 16px;
    transition: all 0.3s ease-in-out;
    border: 1px solid var(--theme-card-border);
    position: relative;
    overflow: hidden;
}

.crm-card:hover {
    box-shadow: none;
    border-color: color-mix(in srgb, var(--theme-accent) 30%, transparent);
    z-index: 2;
}

/* CRM Search Bar */
.crm-search-card {
    display: flex;
    align-items: center;
    padding: 10px 14px;
}
.crm-search-card {
    flex-shrink: 0;
    margin-bottom: 4px; /* reduced from 15px by 62% ≈ 6px */
}

.crm-search-container {
    flex: 1;
    position: relative;
}

.crm-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1rem;
}

.crm-search-input {
    padding-left: 44px;
    font-size: 1rem;
    height: 38px;
    width: 100%;
    background: white;
    box-shadow: inset 3px 3px 6px var(--theme-shadow-dark), inset -3px -3px 6px var(--shadow-light);
    border: none;
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--text-dark);
    transition: 0.3s;
    font-family: inherit;
}

.crm-search-input:focus {
    box-shadow: var(--theme-input-focus);
}

/* Manual Search Button */
.crm-manual-search-btn {
    background: var(--theme-accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 16px;
    height: 38px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.crm-manual-search-btn:hover {
    background: var(--theme-accent-light);
    box-shadow: none;
}

.crm-manual-search-btn i {
    font-size: 1rem;
}

/* Switcher layout (inside content view) – with dark orange background */
.crm-switcher-layout {
    display: grid;
    grid-template-columns: 1fr 4fr;
    gap: 20px;
    height: 100%;
    min-height: 0;
    background: color-mix(in srgb, var(--theme-accent) 15%, #fef3e9);
    border-radius: var(--radius-lg);
    padding: 16px;
}

/* Ensure Journal icon is orange */
.crm-switcher-left h3 i {
    color: var(--theme-accent) !important;
}

.crm-switcher-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
    padding: 16px 12px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    overflow-y: auto;
    height: 100%;
}

.crm-switcher-btn {
    background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-accent) 30%, transparent);
    border-radius: 8px;
    padding: 14px 12px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    width: 100%;
}

.crm-switcher-btn i {
    color: var(--theme-accent);
    font-size: 1.2rem;
    width: 24px;
}

.crm-switcher-btn.active {
    background: var(--theme-accent);
    color: white;
    border-color: var(--theme-accent);
}

.crm-switcher-btn.active i {
    color: white;
}

.crm-switcher-right {
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    overflow-y: auto;
    min-height: 0;
    height: 100%;
    width: 100%;
}

/* Content containers inside switcher */
.crm-switcher-clients,
.crm-switcher-tp,
.crm-switcher-tasks,
.crm-switcher-activities {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
}

/* Reuse existing item styles inside switcher */
.crm-switcher-clients .crm-client-item,
.crm-switcher-tasks .crm-task-item,
.crm-switcher-tp .crm-pipeline-stage {
    margin-bottom: 0;
}

/* Enhance item appearance inside switcher for large screens */
.crm-switcher-clients .crm-client-item {
    padding: 12px 16px;
}

.crm-switcher-tp .crm-pipeline-stage {
    padding: 14px 16px;
}

.crm-switcher-tasks .crm-task-item {
    padding: 12px 16px;
}

/* ==================== CRM SEARCH RESULTS VIEW ==================== */
.crm-search-results-view {
    background: var(--theme-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 6px 6px 12px var(--theme-shadow-dark), -6px -6px 12px var(--shadow-light);
    padding: 16px;
    border: 1px solid var(--theme-card-border);
    overflow-y: auto;
    overflow-x: hidden;
}

.crm-search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--theme-card-border);
}

.crm-search-results-header h3 {
    margin: 0;
    color: var(--theme-accent);
}

.unfocus-button {
    background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
    color: var(--theme-accent);
    border: 1px solid color-mix(in srgb, var(--theme-accent) 30%, transparent);
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.unfocus-button i {
    font-size: 0.9rem;
}

.unfocus-button:hover {
    background: var(--theme-accent);
    color: white;
    box-shadow: none;
}

.crm-search-results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 15px;
    width: 100%;
    min-width: 0;
}

.crm-search-results-column {
    min-width: 0;
}

.crm-search-results-contacts,
.crm-search-results-contacts-second,
.crm-search-results-companies,
.crm-search-results-companies-second {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.crm-contact-item,
.crm-company-item {
    min-width: 0;
    word-break: break-word;
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    margin-bottom: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.crm-contact-item:hover,
.crm-company-item:hover {
    background: white;
    box-shadow: none;
}

.crm-contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    margin-right: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.crm-contact-info,
.crm-company-info {
    flex: 1;
    min-width: 0;
}

.crm-contact-name,
.crm-company-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.crm-contact-company,
.crm-company-industry {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 2px;
}

.crm-contact-status,
.crm-company-contacts {
    font-size: 0.7rem;
    color: var(--theme-accent);
    font-weight: 500;
}

.crm-search-empty-full {
    grid-column: 1 / -1;
    text-align: center;
    padding: 25px;
    color: var(--text-light);
    font-style: italic;
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
    margin: 8px 0;
}

.crm-search-empty-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.crm-search-empty-buttons .crm-manual-search-btn {
    height: 38px;
    padding: 0 12px;
    font-size: 0.85rem;
}

/* ==================== CRM MANUAL SEARCH VIEW ==================== */
.crm-manual-search-view {
    background: #fef3e9;
    border-radius: var(--radius-lg);
    border: 1px solid var(--theme-card-border);
    padding: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.crm-manual-search-view .crm-manual-search-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 4fr;
    gap: 15px;
    min-height: 0;
    overflow: hidden;
}

.crm-manual-search-view .crm-manual-left {
    overflow-y: auto;
    padding-right: 5px;
}

.crm-manual-search-view .crm-manual-right {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 15px;
    overflow: hidden;
}

/* Add Contact button */
.crm-add-contact-btn {
    background: var(--theme-accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}
.crm-add-contact-btn:hover {
    background: var(--theme-accent-light);
    box-shadow: none;
}

/* Filter section – orange frame */
.crm-manual-filter-section {
    margin-top: 2px;
    margin-bottom: 5px;
    border: 2px solid var(--theme-accent);
    border-radius: var(--radius-sm);
    padding: 8px;
    background: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

/* Filter toggle – smaller */
.crm-filter-toggle-container {
    display: flex;
    justify-content: center;
    margin: 4px 0 8px;
}
.crm-filter-toggle {
    display: flex;
    gap: 4px;
    background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
    border-radius: 10px;
    padding: 2px;
    width: fit-content;
}
.crm-filter-toggle-btn {
    padding: 2px 6px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.65rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}
.crm-filter-toggle-btn.active {
    background: var(--theme-accent);
    color: white;
}

/* Badge filters – larger for touch */
.crm-filter-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}
.crm-filter-badge {
    padding: 6px 12px;
    background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-accent) 30%, transparent);
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--theme-accent);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    text-align: center;
}
.crm-filter-badge:hover {
    background: color-mix(in srgb, var(--theme-accent) 20%, transparent);
}
.crm-filter-badge.active {
    background: var(--theme-accent);
    color: white;
    border-color: var(--theme-accent);
}

/* AND/OR toggle below badges – centered */
.crm-filter-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 6px 0 3px;
    font-size: 0.75rem;
}
.crm-filter-mode-buttons {
    display: flex;
    gap: 4px;
    background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
    border-radius: 8px;
    padding: 2px;
}
.crm-filter-mode-btn {
    padding: 3px 10px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.crm-filter-mode-btn.active {
    background: var(--theme-accent);
    color: white;
}

/* Name sort toggle */
.crm-name-sort {
    display: flex;
    gap: 4px;
    background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
    border-radius: 10px;
    padding: 2px;
    width: fit-content;
}
.crm-name-sort-btn {
    padding: 2px 5px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.65rem;
    border-radius: 6px;
    cursor: pointer;
}
.crm-name-sort-btn.active {
    background: var(--theme-accent);
    color: white;
}

/* Filters tiles – orange frame */
.crm-manual-tiles {
    margin-top: 12px;
    border: 2px solid var(--theme-accent);
    border-radius: var(--radius-sm);
    padding: 8px;
    background: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}
.crm-manual-tiles h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: var(--text-dark);
}
.tile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.tile-grid.two-columns {
    grid-template-columns: repeat(2, 1fr);
}
.tile {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    transition: all 0.2s ease;
    cursor: pointer;
}
.tile:hover {
    background: white;
    box-shadow: none;
}
.tile i {
    font-size: 1.2rem;
    color: var(--theme-accent);
    margin-bottom: 4px;
}
.tile span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Manual search new two-column layout */
.crm-manual-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    height: 100%;
    min-height: 0;
}

.crm-manual-contacts-column,
.crm-manual-companies-column {
    display: flex;
    flex-direction: column;
    background: #fde5d9;
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    overflow: hidden;
    height: 100%;
}

.crm-manual-contacts-column h4,
.crm-manual-companies-column h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.crm-manual-contacts-column h4 span,
.crm-manual-companies-column h4 span {
    font-size: 0.9rem;
    color: var(--theme-accent);
    font-weight: 600;
}

.crm-manual-contacts-list,
.crm-manual-companies-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    align-content: start;
    min-height: 0;
}

/* Single alpha bar for both sections – no scroll, wrap if needed */
.crm-manual-alpha-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 0 0 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    justify-content: center;
    overflow: visible;
}
.crm-manual-alpha-bar .alpha-letter {
    width: 22px;
    height: 22px;
}

/* Company items */
.crm-manual-company-item {
    display: flex;
    align-items: center;
    padding: 6px;
    background: white;
    border-radius: 3px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
    cursor: pointer;
}
.crm-manual-company-item:hover {
    background: color-mix(in srgb, var(--theme-accent) 5%, white);
    box-shadow: none;
}
.crm-manual-company-info {
    flex: 1;
}
.crm-manual-company-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}
.crm-manual-company-industry {
    font-size: 0.65rem;
    color: var(--text-light);
}
.crm-manual-company-contacts {
    font-size: 0.6rem;
    color: var(--theme-accent);
}

/* Contact items */
.crm-manual-contact-item {
    display: flex;
    align-items: center;
    padding: 5px;
    background: white;
    border-radius: 3px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
    cursor: pointer;
}
.crm-manual-contact-item:hover {
    background: color-mix(in srgb, var(--theme-accent) 5%, white);
    box-shadow: none;
}
.crm-manual-contact-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-size: cover;
    margin-right: 5px;
}
.crm-manual-contact-info {
    flex: 1;
}
.crm-manual-contact-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}
.crm-manual-contact-company {
    font-size: 0.65rem;
    color: var(--text-light);
}

/* Empty state */
.crm-no-contacts,
.crm-no-companies {
    text-align: center;
    padding: 15px;
    color: var(--text-light);
    font-style: italic;
    background: rgba(255,255,255,0.5);
    border-radius: 4px;
    grid-column: 1 / -1;
}

/* Manual search header (back button) */
.crm-manual-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-shrink: 0;
}
.crm-manual-search-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-dark);
}
.crm-manual-search-header h3 i {
    color: var(--theme-accent);
    margin-right: 8px;
}
.crm-manual-back-btn {
    background: transparent;
    color: var(--theme-accent);
    border: 2px solid var(--theme-accent);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.crm-manual-back-btn:hover {
    background: var(--theme-accent);
    color: white;
    box-shadow: var(--theme-glow-box-hover);
}

/* ==================== TASKS VIEW SPECIFIC ==================== */
.tasks-actions {
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    padding: 15px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}
.tasks-actions h5 {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-dark);
}
.tasks-actions h5 i {
    color: var(--text-light);
}
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.task-action-btn {
    background: white;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 30%, transparent);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 50px;
}
.task-action-btn i {
    font-size: 1.37rem;
    color: var(--theme-accent);
}
.task-action-btn span {
    font-size: 0.91rem;
    font-weight: 500;
    color: var(--text-dark);
}
.task-action-btn:hover {
    background: color-mix(in srgb, var(--theme-accent) 8%, white);
    border-color: var(--theme-accent);
    box-shadow: 0 4px 8px rgba(255, 159, 67, 0.15);
}
.task-action-btn:hover i {
    color: var(--theme-accent);
}

/* Back button container – push to bottom */
#tasks-actions-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.task-back-container {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    justify-content: center;
}
.task-back-btn {
    background: transparent;
    color: var(--theme-accent);
    border: 2px solid var(--theme-accent);
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 140px;
}
.task-back-btn:hover {
    background: var(--theme-accent);
    color: white;
    box-shadow: var(--theme-glow-box-hover);
}

/* Style for past touchpoints (left column in Tasks) – more spacing */
.tasks-left-column .crm-task-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    padding: 10px 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tasks-left-column .crm-task-item:hover {
    background: white;
    box-shadow: 0 2px 6px rgba(255, 159, 67, 0.1);
}
.tasks-left-column .crm-task-item .task-priority {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.task-priority.high { background: #f44336; }
.task-priority.medium { background: #ff9800; }
.task-priority.low { background: #4caf50; }
.tasks-left-column .crm-task-item .task-icon i {
    color: var(--theme-accent);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}
.tasks-left-column .crm-task-item .task-content {
    flex: 1;
    min-width: 0;
}
.tasks-left-column .crm-task-item .task-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    display: block;
    margin-bottom: 2px;
}
.tasks-left-column .crm-task-item .task-context {
    font-size: 0.7rem;
    color: var(--text-light);
}
.tasks-left-column .crm-task-item .task-deadline {
    font-size: 0.65rem;
    color: var(--text-light);
    white-space: nowrap;
    margin-left: 8px;
    flex-shrink: 0;
}

/* ==================== PIPELINE VIEW SPECIFIC ==================== */
.crm-journal-pipeline-left .crm-pipeline-stage {
    margin-bottom: 13px;
}
.crm-pipeline-stage {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    transition: all 0.3s ease;
    margin-bottom: 10px;
}
.crm-pipeline-stage:hover {
    background: white;
    box-shadow: 0 2px 6px rgba(255, 159, 67, 0.1);
}
.deal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}
.deal-company {
    font-weight: 600;
    color: var(--text-dark);
}
.crm-stage-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-accent);
}
.crm-stage-value.blurred {
    filter: blur(5px);
    user-select: none;
}
.deal-details {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
}
.deal-details i {
    color: var(--theme-accent);
    margin-right: 2px;
}

/* ==================== CLIENTS VIEW SPECIFIC ==================== */
.crm-client-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 8px;
}
.crm-client-item:hover {
    background: white;
    box-shadow: 0 2px 6px rgba(255, 159, 67, 0.1);
}
.crm-client-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-size: cover;
    margin-right: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.crm-client-info {
    flex: 1;
    min-width: 0;
}
.crm-client-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}
.crm-client-company {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 2px;
}
.crm-client-status {
    font-size: 0.7rem;
    color: var(--theme-accent);
    font-weight: 500;
}
.crm-client-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--theme-accent);
    margin-left: 8px;
    text-shadow: none;
    flex-shrink: 0;
}
.crm-client-value.blurred {
    filter: blur(5px);
    user-select: none;
}

/* Client toggle – restored original styling */
.crm-clients-toggle {
    display: flex;
    gap: 4px;
    background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
    border-radius: 10px;
    padding: 2px;
}
.crm-clients-toggle-btn {
    padding: 3px 10px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}
.crm-clients-toggle-btn.active {
    background: var(--theme-accent);
    color: white;
}

/* ==================== ACTIVITIES VIEW SPECIFIC ==================== */
.crm-activity-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    transition: all 0.3s ease;
    gap: 12px;
}
.crm-activity-item:hover {
    background: white;
    box-shadow: 0 2px 6px rgba(255, 159, 67, 0.1);
}
.crm-activity-item > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.crm-activity-item .activity-avatar {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.crm-activity-item .activity-icon {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--theme-accent) 15%, transparent);
    color: var(--theme-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.crm-activity-item > div:last-child {
    flex: 1;
    min-width: 0;
}
.crm-activity-item .activity-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-accent);
    margin-bottom: 2px;
}
.crm-activity-item .activity-description {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 2px;
}
.crm-activity-item .activity-time {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Activity toggle and filters – ensure proper styling */
.activity-toggle {
    display: flex;
    gap: 4px;
    background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
    border-radius: 20px;
    padding: 2px;
}
.activity-toggle-btn {
    padding: 4px 12px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.activity-toggle-btn.active {
    background: var(--theme-accent);
    color: white;
}

.crm-activity-filters {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 4px 12px;
    background: rgba(255,255,255,0.3);
    border-radius: 20px;
}
.crm-activity-filters i {
    font-size: 1.1rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    padding: 6px;
    border-radius: 50%;
}
.crm-activity-filters i:hover {
    color: var(--theme-accent);
    background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
}
.crm-activity-filters i.active {
    color: white;
    background: var(--theme-accent);
}

/* Flex row for filter icons and team toggle – ensure styling */
.crm-switcher-activities > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* ==================== CRM DETAIL OVERLAY ==================== */
.crm-detail-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fef3e9;
    backdrop-filter: blur(8px);
    z-index: 1005;
    display: none;
    flex-direction: column;
    padding: 18px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--theme-card-border);
}

.crm-detail-panel.visible {
    display: flex;
}

.crm-detail-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--theme-card-border);
}

.crm-detail-panel-header h3 {
    margin: 0;
    color: var(--theme-accent);
    font-size: 1.4rem;
}

.crm-detail-header-actions {
    display: flex;
    gap: 8px;
}

/* New layout: left column (functions + touchpoints), middle column (general-info + notes), right column (boxes) */
.crm-detail-panel-content {
    flex: 1;
    display: grid;
    grid-template-columns: 0.88fr 1.84fr 2.37fr;
    gap: 15px;
    min-height: 0;
    overflow: hidden;
}

/* Left column stacked: functions (small) then touchpoints */
.crm-detail-left-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow: hidden;
}

/* Functions column - reduced height (takes only its content) */
.crm-detail-functions {
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    overflow-y: auto;
    flex-shrink: 0;
}

.crm-detail-functions h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--theme-accent);
    border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 30%, transparent);
    padding-bottom: 4px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
}

.crm-detail-functions h4 i {
    color: var(--theme-accent);
    font-size: 1rem;
}

.crm-detail-function-item {
    background: color-mix(in srgb, var(--theme-accent) 5%, transparent);
    border: 1px solid var(--theme-accent);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    color: var(--theme-accent);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    text-align: center;
}

.crm-detail-function-item i {
    width: 20px;
    font-size: 1.1rem;
}

.crm-detail-function-item:hover {
    background: var(--theme-accent);
    color: white;
    box-shadow: none;
}

/* Touchpoints in left column */
.crm-detail-touchpoints-left {
    background: rgba(255,255,255,0.7);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.crm-detail-touchpoints-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 30%, transparent);
    padding-bottom: 4px;
}

.crm-detail-touchpoints-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--theme-accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.crm-detail-touchpoints-header h4 i {
    margin-right: 4px;
}

.crm-add-touchpoint-btn {
    background: var(--theme-accent);
    color: white;
    border: none;
    border-radius: 2px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.crm-add-touchpoint-btn:hover {
    background: var(--theme-accent-light);
    box-shadow: none;
}

/* Middle column: general-info + notes */
.crm-detail-middle-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow: hidden;
}

.crm-detail-general-info {
    background: rgba(255,255,255,0.7);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    overflow-y: auto;
    flex-shrink: 0;
}

.crm-detail-notes-middle {
    background: rgba(255,255,255,0.7);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.crm-detail-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 30%, transparent);
    padding-bottom: 4px;
}

.crm-detail-notes-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--theme-accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.crm-detail-notes-header h4 i {
    margin-right: 4px;
}

.crm-add-note-btn {
    background: var(--theme-accent);
    color: white;
    border: none;
    border-radius: 2px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.crm-add-note-btn:hover {
    background: var(--theme-accent-light);
    box-shadow: none;
}

/* Right column – three boxes, each with two-column inner grid */
.crm-detail-right {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 15px;
    overflow-y: auto;
}

.crm-detail-section-box {
    background: rgba(255,255,255,0.7);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.crm-detail-section-box h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--theme-accent);
    border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 30%, transparent);
    padding-bottom: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.crm-detail-section-box h4 i {
    color: var(--theme-accent);
    font-size: 1rem;
}

/* Two-column layout inside section boxes */
.section-box-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Two-row field layout */
.crm-dummy-field {
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    break-inside: avoid;
}

.crm-dummy-field .field-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.crm-dummy-field .field-header i {
    color: var(--theme-accent);
    width: 16px;
    font-size: 0.8rem;
}

.crm-dummy-field .field-header .label {
    font-weight: 600;
    color: var(--text-light);
}

.crm-dummy-field .field-value {
    padding-left: 20px;
    color: var(--text-dark);
    word-break: break-word;
}

/* Visual separation for entries */
.crm-detail-touchpoints-left .crm-dummy-field,
.crm-detail-notes-middle .crm-dummy-field {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 4px;
    margin-bottom: 4px;
}

.crm-detail-touchpoints-left .crm-dummy-field:last-child,
.crm-detail-notes-middle .crm-dummy-field:last-child {
    border-bottom: none;
}

/* Square avatar with rounded corners - larger to fit container */
.contact-avatar-square {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    margin-right: 12px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

/* Title/gender line above name */
.contact-title-line {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 2px;
    display: flex;
    gap: 8px;
}

/* Social icons - larger and right-aligned */
.social-icons {
    display: flex;
    gap: 16px;
    margin-left: auto;
    align-items: center;
}

.social-icons i {
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.social-icons i:hover {
    transform: scale(1.1);
}

/* Header row for contact info - ensures social icons align right */
.contact-header-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.contact-name-section {
    flex: 1;
}

/* ==================== COMPACT MODIFIER FOR CRM ==================== */
.crm-card.compact {
    padding: 12px;
}
.crm-card.compact h3 {
    margin-bottom: 8px;
}
.crm-card.compact h4 {
    margin-bottom: 6px;
}
.crm-card.compact .crm-activity-list,
.crm-card.compact .crm-tasks-list,
.crm-card.compact .crm-clients-list,
.crm-card.compact .crm-pipeline {
    gap: 6px;
    margin-top: 8px;
}
.crm-card.compact .crm-client-item,
.crm-card.compact .crm-task-item,
.crm-card.compact .crm-activity-item,
.crm-card.compact .crm-pipeline-stage {
    padding: 8px 10px;
    margin-bottom: 0;
}
.crm-card.compact .crm-pipeline-stage {
    margin-bottom: 6px;
}
.crm-card.compact .crm-stage-header {
    margin-bottom: 4px;
}
.crm-card.compact .crm-stage-value {
    font-size: 1rem;
}
.crm-card.compact .crm-quick-actions {
    margin-top: 8px;
    gap: 6px;
}
.crm-card.compact .crm-quick-action {
    padding: 10px;
}

/* ==================== CRM OPTIMIZATIONS ==================== */
/* Left column in manual search – flex column so filter section can grow */
.crm-manual-left {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.crm-manual-filter-section {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Pipeline list – no independent scrolling, parent handles overflow */
.crm-pipeline-list {
    /* No overflow, let parent scroll if needed */
}

/* Activities list – fills remaining space in flex column */
.crm-activities-list {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    min-height: 0;
}

/* ==================== CRM RESPONSIVE DESIGN ==================== */
@media (max-width: 1199px) {
    .crm-switcher-layout {
        grid-template-columns: 1fr 3fr;
        gap: 12px;
    }
    
    .crm-manual-search-view .crm-manual-search-content {
        grid-template-columns: 1fr 3fr;
    }
    
    .crm-search-results-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 991px) {
    .crm-switcher-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        overflow-y: auto;
    }
    
    .crm-switcher-left {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .crm-manual-search-view .crm-manual-search-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        overflow-y: auto;
    }
    
    .crm-manual-search-view .crm-manual-left {
        display: flex;
        flex-direction: column;
        overflow-y: visible;
    }
    
    .crm-manual-search-view .crm-manual-right {
        overflow-y: auto;
    }
    
    .crm-manual-results-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
    
    .crm-search-results-grid {
        grid-template-columns: 1fr;
    }
    
    .crm-search-results-category-header {
        grid-column: span 1 !important;
    }
}

@media (max-width: 767px) {
    .crm-search-card > div {
        flex-direction: column;
    }
    
    .crm-manual-search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .crm-manual-contacts-list,
    .crm-manual-companies-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .alpha-letter {
        width: 16px;
        height: 16px;
        font-size: 0.55rem;
    }
}

/* ==================== NEW STYLES ADDED FOR TOUCHPOINTS AND TASKS ==================== */

/* ==================== TOUCHPOINTS RECENT STYLES ==================== */
.tp-recent-touchpoints {
    padding: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
}

.tp-recent-touchpoints .tp-section-title {
    font-size: 0.9rem;
    color: var(--theme-accent);
    margin: 0 0 10px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 30%, transparent);
}

.tp-recent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tp-recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 15%, transparent);
    transition: all 0.2s ease;
}

.tp-recent-item:hover {
    border-color: var(--theme-accent);
    box-shadow: 0 2px 6px rgba(255, 159, 67, 0.1);
}

.tp-recent-item i {
    color: var(--theme-accent);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.tp-recent-details {
    flex: 1;
}

.tp-recent-desc {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.tp-recent-date {
    font-size: 0.65rem;
    color: var(--text-light);
}

/* ==================== TASKS LEFT COLUMN STYLES ==================== */
.tasks-left-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 8px;
}

.tasks-list-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.tasks-bricks-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
}

/* Ensure task items inside the left column have proper spacing */
.tasks-left-column .crm-task-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tasks-left-column .crm-task-item:hover {
    background: white;
    box-shadow: 0 2px 6px rgba(255, 159, 67, 0.1);
}

.tasks-left-column .crm-task-item .task-priority {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tasks-left-column .crm-task-item .task-icon i {
    color: var(--theme-accent);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.tasks-left-column .crm-task-item .task-content {
    flex: 1;
    min-width: 0;
}

.tasks-left-column .crm-task-item .task-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    display: block;
    margin-bottom: 2px;
}

.tasks-left-column .crm-task-item .task-context {
    font-size: 0.7rem;
    color: var(--text-light);
}

.tasks-left-column .crm-task-item .task-deadline {
    font-size: 0.65rem;
    color: var(--text-light);
    white-space: nowrap;
    margin-left: 8px;
    flex-shrink: 0;
}

/* ==================== TOUCHPOINT CONFIRMATION BUTTONS ==================== */
.tp-assign-btn {
    background: var(--theme-accent);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
}

.tp-assign-btn:hover {
    background: var(--theme-accent-light);
    box-shadow: var(--theme-glow-box-hover);
}

.tp-assign-btn i {
    font-size: 1rem;
}

.tp-deselect-btn {
    background: transparent;
    color: var(--theme-accent);
    border: 1px solid var(--theme-accent);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tp-deselect-btn:hover {
    background: var(--theme-accent);
    color: white;
}

.tp-save-btn {
    background: var(--theme-accent);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tp-save-btn:hover {
    background: var(--theme-accent-light);
}

/* ==================== TP CONFIRMATION MESSAGE ==================== */
.tp-confirmation-message {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    text-align: center;
}

.tp-confirmation-message p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tp-confirmation-message strong {
    color: var(--theme-accent);
}

/* ==================== TASKS BRICKS CONTAINER ==================== */
.tasks-bricks-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
}

/* Ensure the confirmation message inside bricks container is styled */
.tasks-bricks-container .tp-confirmation-message {
    margin-top: 20px;
    border-top: 2px dashed color-mix(in srgb, var(--theme-accent) 30%, transparent);
}

/* ==================== CENTER BACK BUTTON TEXT ==================== */
.task-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ==================== TOUCHPOINT BRICKS STYLES ==================== */
.tp-sentence-step {
    background: white;
    border-radius: var(--radius-sm);
    border: 2px dashed color-mix(in srgb, var(--theme-accent) 20%, transparent);
    padding: 10px 12px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.tp-sentence-step:hover:not(.tp-current-step) {
    border-color: var(--theme-accent);
    background: color-mix(in srgb, var(--theme-accent) 5%, white);
}

.tp-sentence-step.tp-current-step {
    border: 2px solid var(--theme-accent);
    background: color-mix(in srgb, var(--theme-accent) 8%, white);
    cursor: default;
    box-shadow: 0 2px 8px rgba(255, 159, 67, 0.2);
}

.tp-step-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--theme-accent);
    font-size: 0.9rem;
}

.tp-step-icon i {
    font-size: 1.2rem;
    color: var(--theme-accent);
    width: 24px;
    text-align: center;
}

.tp-step-icon span {
    font-weight: 600;
    color: var(--text-dark);
}

.tp-step-text {
    font-size: 0.85rem;
    color: var(--text-dark);
    line-height: 1.4;
    padding-left: 32px;
}

.tp-step-text strong {
    color: var(--theme-accent);
    font-weight: 600;
}

.tp-step-connector {
    position: relative;
    height: 24px;
    margin: 2px 0 6px 20px;
    border-left: 2px dashed var(--theme-accent);
}

.tp-step-connector::after {
    content: '\f063';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: -8px;
    left: -9px;
    color: var(--theme-accent);
    background: white;
    padding: 2px 4px;
    border-radius: 50%;
    font-size: 0.75rem;
    border: 1px solid var(--theme-accent);
}

/* Ensure bricks container has proper background and spacing */
.tasks-bricks-container .tp-sentence-step:last-child {
    margin-bottom: 0;
}

.tasks-bricks-container .tp-step-connector:last-child {
    display: none;
}