/**
 * COBWEB CRM – Page design system (quotes-style)
 * Shared: quotes index, employee card, attendance manage.
 * Page header, stat cards, table section, mobile cards.
 */

/* Modern Professional Page Header */
.page-header-section,
.calendar-hero {
    background: linear-gradient(140deg, #ffffff 0%, #fbfdff 48%, #f1f8ff 100%);
    border-radius: 24px;
    padding: 2.25rem 1.75rem;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
    position: relative;
    /* Visible so header dropdowns are not clipped; bubbles clip on ::before/::after. */
    overflow: visible;
    margin-bottom: 2.5rem;
}

.page-header-section::before,
.calendar-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle 145px at calc(100% - 50px) 50px, rgba(56, 189, 248, 0.18) 0%, rgba(56, 189, 248, 0.04) 62%, transparent 100%);
    pointer-events: none;
}

.page-header-section::after,
.calendar-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle 150px at 30px calc(100% - 30px), rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.header-content,
.calendar-hero-content {
    display: flex;
    align-items: flex-start;
    gap: 1.75rem;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.header-icon,
.calendar-hero-icon {
    width: 64px;
    height: 64px;
    font-size: 1.85rem;
    color: #0369a1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 64px;
    background: linear-gradient(140deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.18);
    flex-shrink: 0;
}

.header-text,
.calendar-hero-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.header-text .page-title,
.calendar-hero-title {
    font-size: 2.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.15;
}

.header-text .page-subtitle,
.calendar-hero-subtitle {
    font-size: 1rem;
    color: #475569;
    margin: 0;
    line-height: 1.45;
}

.header-actions,
.calendar-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    margin-right: auto;
    flex-wrap: wrap;
}

.btn-gradient-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    border: 1px solid transparent;
    padding: 0.7rem 1.05rem;
    min-height: 44px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.2);
    text-decoration: none;
}

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.28);
    color: white;
}

/* Secondary action in hero (create / edit forms) */
.calendar-hero-actions .btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.65rem 1.05rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

.calendar-hero-actions .btn-back:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    text-decoration: none;
}

/* Page shell: hero + list (quotes, Eliran workflow, sales create) */
.crm-page-with-hero {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.crm-page-with-hero > .calendar-hero {
    width: 100%;
    box-sizing: border-box;
}

.crm-page-with-hero .sales-main-container {
    width: 100%;
}

/* Dashboard / Stat Cards */
.dashboard-cards-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .dashboard-cards-horizontal {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.75rem;
    }
}

.dashboard-cards-horizontal .stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
    .dashboard-cards-horizontal .stat-card {
        padding: 2.25rem 2rem;
    }
}

.dashboard-cards-horizontal .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

@media (min-width: 768px) {
    .dashboard-cards-horizontal .stat-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
}

.dashboard-cards-horizontal .stat-card.primary .stat-icon {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.dashboard-cards-horizontal .stat-card.warning .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.dashboard-cards-horizontal .stat-card.info .stat-icon {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.dashboard-cards-horizontal .stat-card.success .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.dashboard-cards-horizontal .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    color: #1f2937;
}

@media (min-width: 768px) {
    .dashboard-cards-horizontal .stat-value {
        font-size: 2.75rem;
    }
}

.dashboard-cards-horizontal .stat-label {
    font-size: 0.875rem;
    color: #64748B;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 768px) {
    .dashboard-cards-horizontal .stat-label {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

.dashboard-cards-horizontal .stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 0.75rem;
    border-radius: 12px;
    margin-top: auto;
}

@media (min-width: 768px) {
    .dashboard-cards-horizontal .stat-change {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

.dashboard-cards-horizontal .stat-change.positive {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #059669;
}

/* Table Section */
.table-section {
    margin-bottom: 2rem;
}

.table-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

@media (min-width: 768px) {
    .table-card {
        padding: 1.5rem;
    }
}

.table-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.table-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.table-title h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-title .sales-count,
.table-title .table-count {
    font-size: 0.875rem;
    color: #64748b;
    margin-right: 0.5rem;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
}

.table-modern th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 2px solid #e5e7eb;
}

.table-modern td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9375rem;
}

.table-modern tr {
    transition: background 0.2s;
}

.table-modern tbody tr {
    cursor: default;
}

.table-modern tbody tr:hover {
    background: #f9fafb;
}

.actions-cell {
    position: relative;
    text-align: center;
    width: 50px;
}

.kebab-menu-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #6b7280;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.kebab-menu-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Mobile Cards (stacked layout) */
.mobile-cards-wrap {
    display: none;
}

@media (max-width: 768px) {
    .desktop-table {
        display: none !important;
    }

    .mobile-cards-wrap,
    .mobile-quotes-cards {
        display: block !important;
    }

    .mobile-quote-card,
    .mobile-employee-card,
    .mobile-attendance-card {
        background: white;
        border-radius: 12px;
        padding: 1.25rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        border: 1px solid #e5e7eb;
    }

    .mobile-quote-card:hover,
    .mobile-employee-card:hover,
    .mobile-attendance-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .mobile-card-header {
        margin-bottom: 1rem;
    }

    .mobile-title-section {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .mobile-title-avatar {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        color: white;
        flex-shrink: 0;
    }

    .mobile-title-text h4 {
        font-size: 1rem;
        font-weight: 600;
        margin: 0 0 0.25rem 0;
        color: #1e293b;
    }

    .mobile-contact-info,
    .mobile-info-row {
        font-size: 0.875rem;
        color: #64748b;
    }

    .mobile-info-row {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-info-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .mobile-info-item i {
        width: 1.25rem;
        color: #64748b;
    }

    .mobile-info-label {
        color: #64748b;
    }

    .mobile-card-actions {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #e5e7eb;
    }

    .mobile-kebab-btn {
        width: 100%;
        padding: 0.75rem 1rem;
        min-height: 44px;
        border-radius: 8px;
        background: #f3f4f6;
        color: #1f2937;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        border: none;
        cursor: pointer;
    }
}

/* Actions Modal */
.lead-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: right;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.action-btn:hover {
    border-color: #f59e0b;
    background: #fef9e7;
    transform: translateX(-4px);
}

.action-btn-view {
    border-color: #94a3b8;
}

.action-btn-view:hover {
    background: #f1f5f9;
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: #f3f4f6;
    color: #1f2937;
}

.action-btn-view .action-icon {
    background: #f1f5f9;
    color: #475569;
}

.action-btn-edit .action-icon {
    background: #fef3c7;
    color: #d97706;
}

.action-btn-revise .action-icon {
    background: #dbeafe;
    color: #2563eb;
}

.action-btn-revise:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.action-btn-convert .action-icon {
    background: #d1fae5;
    color: #059669;
}

.action-btn-delete .action-icon {
    background: #fee2e2;
    color: #dc2626;
}

.action-content {
    flex: 1;
    text-align: right;
}

.action-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.action-description {
    font-size: 0.875rem;
    color: #6b7280;
}

.action-arrow {
    color: #9ca3af;
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .empty-state {
        padding: 3rem;
    }
}

.btn-gradient-refresh {
    background: #f3f4f6;
    border: none;
    padding: 0.5rem 1rem;
    min-height: 44px;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-gradient-refresh:hover {
    background: #e5e7eb;
}

/* Danger button (e.g. bulk reject) */
.btn-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    min-height: 44px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-gradient-danger:hover {
    color: white;
    opacity: 0.95;
}

/* Success button (e.g. bulk approve) */
.btn-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    min-height: 44px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-gradient-success:hover {
    color: white;
    opacity: 0.95;
}

/* Badges (status) */
.page-design-badge {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    color: white;
}

.bg-secondary { background-color: #6b7280; }
.bg-info { background-color: #475569; }
.bg-success { background-color: #10b981; }
.bg-danger { background-color: #ef4444; }
.bg-warning { background-color: #f59e0b; }

.pagination-wrapper {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-item {
    display: flex;
}

.page-link {
    padding: 0.5rem 1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
}

.page-item.active .page-link {
    background: #334155;
    color: white;
    border-color: #334155;
}

.page-link:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Mobile: stack header and full-width actions (skip .page-header-mobile-compact — see crm-page-header.css) */
@media (max-width: 768px) {
    .page-header-section:not(.page-header-mobile-compact),
    .calendar-hero:not(.page-header-mobile-compact) {
        padding: 1.25rem 1rem;
        border-radius: 16px;
        margin-bottom: 1.25rem;
    }

    .page-header-section:not(.page-header-mobile-compact)::before,
    .page-header-section:not(.page-header-mobile-compact)::after,
    .calendar-hero:not(.page-header-mobile-compact)::before,
    .calendar-hero:not(.page-header-mobile-compact)::after {
        opacity: 0.55;
        transform: scale(0.75);
    }

    .page-header-section:not(.page-header-mobile-compact) .header-content,
    .calendar-hero:not(.page-header-mobile-compact) .calendar-hero-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .page-header-section:not(.page-header-mobile-compact) .header-icon,
    .calendar-hero:not(.page-header-mobile-compact) .calendar-hero-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        font-size: 1.35rem;
        border-radius: 14px;
    }

    .page-header-section:not(.page-header-mobile-compact) .header-actions,
    .calendar-hero:not(.page-header-mobile-compact) .calendar-hero-actions {
        width: 100%;
        margin-right: 0;
    }

    .page-header-section:not(.page-header-mobile-compact) .header-actions .btn-gradient-primary,
    .calendar-hero:not(.page-header-mobile-compact) .calendar-hero-actions .btn-gradient-primary {
        width: 100%;
        justify-content: center;
    }

    .page-header-section:not(.page-header-mobile-compact) .header-text .page-title,
    .calendar-hero:not(.page-header-mobile-compact) .calendar-hero-title {
        font-size: 1.5rem;
    }

    .page-header-section:not(.page-header-mobile-compact) .header-text .page-subtitle,
    .calendar-hero:not(.page-header-mobile-compact) .calendar-hero-subtitle {
        font-size: 0.95rem;
    }
}

/* Sales create: use full content width on desktop */
@media (min-width: 769px) {
    .sales-create-quote-style.fcrm-clean-mode.quote-create-page {
        max-width: none;
        width: 100%;
        margin: 0;
        padding-left: clamp(1rem, 1.5vw, 1.5rem);
        padding-right: clamp(1rem, 1.5vw, 1.5rem);
    }
}

/* Sales create: minimal hero on mobile (form visible above the fold) */
@media (max-width: 768px) {
    .sales-create-quote-style.fcrm-clean-mode.quote-create-page {
        padding: 0.5rem 0.5rem 5rem;
    }

    .sales-create-quote-style.fcrm-clean-mode .calendar-hero {
        padding: 0.65rem 0.85rem;
        margin-bottom: 0.65rem;
        border-radius: 12px;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    }

    .sales-create-quote-style.fcrm-clean-mode .calendar-hero::before,
    .sales-create-quote-style.fcrm-clean-mode .calendar-hero::after {
        display: none;
    }

    .sales-create-quote-style.fcrm-clean-mode .calendar-hero-content {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.5rem;
    }

    .sales-create-quote-style.fcrm-clean-mode .calendar-hero-icon {
        display: none;
    }

    .sales-create-quote-style.fcrm-clean-mode .calendar-hero-text {
        flex: 1;
        min-width: 0;
        gap: 0;
    }

    .sales-create-quote-style.fcrm-clean-mode .calendar-hero-title {
        font-size: 1.125rem;
        font-weight: 700;
        line-height: 1.25;
    }

    .sales-create-quote-style.fcrm-clean-mode .calendar-hero-subtitle {
        display: none;
    }

    .sales-create-quote-style.fcrm-clean-mode .calendar-hero-actions {
        width: auto;
        margin-right: 0;
        flex-shrink: 0;
    }

    .sales-create-quote-style.fcrm-clean-mode .calendar-hero-actions .btn-back {
        min-height: 40px;
        padding: 0.4rem 0.65rem;
        font-size: 0.8125rem;
        white-space: nowrap;
    }

}

/* Customer name autocomplete (sales create + quotes create) */
.sales-customer-autocomplete {
    position: relative;
    z-index: 2;
}

.sales-customer-autocomplete.is-open {
    z-index: 50;
}

.sales-customer-autocomplete .form-control {
    position: relative;
    z-index: 1;
}

.sales-customer-details-row,
.sales-customer-details-row > [class*="col-"],
.sales-customer-details-row .form-group,
.quote-customer-card,
.quote-customer-card .card-body {
    overflow: visible;
}

.quote-customer-card.has-customer-suggestions {
    position: relative;
    z-index: 40;
}

.sales-customer-suggestions {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    left: 0;
    z-index: 1080;
    max-height: 18rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--cw-surface, #ffffff);
    border: 1px solid var(--cw-border, #e5e7eb);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    padding: 0.35rem;
}

.sales-customer-suggestions.is-open,
.sales-customer-suggestions:not([hidden]) {
    display: block;
}

.sales-customer-suggestion {
    width: 100%;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--cw-text, #111827);
    text-align: right;
    cursor: pointer;
}

.sales-customer-suggestion:hover,
.sales-customer-suggestion.is-active {
    background: var(--cw-surface-muted, #f1f5f9);
}

.sales-customer-suggestion-name {
    font-weight: 700;
}

.sales-customer-suggestion-meta {
    font-size: 0.875rem;
    color: var(--cw-text-muted, #6b7280);
    word-break: break-word;
}

/* Quote create: compact floating action bar + dialogs */
.quote-create-page.sales-create-quote-style {
    padding-bottom: 5.5rem;
}

/* Sales create shares quote action-bar styles */
.sales-create-quote-style .quote-create-action-bar {
    position: sticky;
}

.quote-create-action-bar {
    position: sticky;
    bottom: 0.65rem;
    z-index: 60;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    pointer-events: none;
}

.quote-create-action-bar > * {
    pointer-events: auto;
}

.quote-create-action-bar__status.quote-draft-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 42%;
    margin: 0;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.92);
    color: #64748b;
    font-family: 'Rubik', 'Assistant', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.quote-create-action-bar__status.quote-draft-status.is-saving {
    color: #92400e;
    background: rgba(255, 251, 235, 0.95);
    border-color: rgba(251, 191, 36, 0.45);
}

.quote-create-action-bar__status.quote-draft-status.is-saved {
    color: #166534;
    background: rgba(236, 253, 245, 0.95);
    border-color: rgba(134, 239, 172, 0.55);
}

.quote-create-action-bar__actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    align-items: center;
    justify-content: flex-end;
    margin-inline-start: auto;
}

.quote-create-action-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.quote-create-action-btn-row--end {
    justify-content: flex-end;
    margin-bottom: 0;
}

.quote-create-action-btn,
.quote-create-action-bar .quote-create-action-btn,
.quote-create-dialog .quote-create-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 42px;
    margin: 0;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    font-family: 'Rubik', 'Assistant', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
    transform: none !important;
    white-space: nowrap;
}

.quote-create-action-btn:hover,
.quote-create-action-bar .quote-create-action-btn:hover,
.quote-create-dialog .quote-create-action-btn:hover {
    transform: none !important;
}

.quote-create-action-btn--close,
.quote-create-action-bar .quote-create-action-btn--close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: rgba(254, 242, 242, 0.96);
    color: #dc2626;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.12);
}

.quote-create-action-btn--close:hover,
.quote-create-action-btn--close:focus-visible,
.quote-create-action-bar .quote-create-action-btn--close:hover,
.quote-create-action-bar .quote-create-action-btn--close:focus-visible {
    background: #fee2e2;
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.55);
    text-decoration: none;
}

.quote-create-action-btn--ghost,
.quote-create-action-bar .quote-create-action-btn--ghost,
.quote-create-dialog .quote-create-action-btn--ghost {
    background: rgba(248, 250, 252, 0.95);
    color: #334155;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.quote-create-action-btn--ghost:hover,
.quote-create-action-bar .quote-create-action-btn--ghost:hover,
.quote-create-dialog .quote-create-action-btn--ghost:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.quote-create-action-btn--preview,
.quote-create-action-bar .quote-create-action-btn--preview {
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.quote-create-action-btn--preview:hover,
.quote-create-action-bar .quote-create-action-btn--preview:hover {
    background: #f8fafc;
    color: #0f172a;
}

.quote-create-action-btn--primary,
.quote-create-action-bar .quote-create-action-btn--primary,
.quote-create-dialog .quote-create-action-btn--primary {
    background: #0284c7;
    color: #fff;
    border: 1px solid #0284c7;
}

.quote-create-action-btn--primary:hover,
.quote-create-action-bar .quote-create-action-btn--primary:hover,
.quote-create-dialog .quote-create-action-btn--primary:hover {
    background: #0369a1;
    color: #fff;
    border-color: #0369a1;
}

.quote-create-action-btn--preview[aria-pressed="true"],
.quote-create-action-btn--ghost[aria-pressed="true"],
.quote-create-action-btn--preview.active,
.quote-create-action-btn--ghost.active {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

.quote-notes-deposit {
    padding-top: 0.85rem;
    border-top: 1px solid #e5e7eb;
}

/* Optional products table — modern, comfortable rows */
.quote-products-optional .card-header h3 {
    font-family: 'Rubik', 'Assistant', sans-serif;
    font-weight: 700;
    color: #0f172a;
}

.quote-products-optional .quote-products-add-btn {
    min-height: 40px;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-family: 'Rubik', 'Assistant', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}

.quote-products-optional .quote-products-add-btn:hover {
    background: #0369a1;
    border-color: #0369a1;
    color: #fff;
}

.quote-products-optional__body {
    padding-top: 1rem;
}

.quote-products-optional__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    padding: 0.35rem;
}

.quote-products-optional__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.45rem;
    margin: 0;
    font-family: 'Rubik', 'Assistant', sans-serif;
}

.quote-products-optional__table thead th {
    font-family: 'Rubik', 'Assistant', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.01em;
    padding: 0.35rem 0.75rem 0.55rem;
    border: 0;
    white-space: nowrap;
    text-align: right;
    background: transparent;
    text-transform: none;
}

.quote-products-optional__table .ptr-th-total {
    text-align: left;
}

.quote-products-optional__table .ptr-th-actions {
    text-align: center;
}

.quote-products-optional__table .quote-product-line td {
    background: #ffffff;
    border: 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.7rem 0.65rem;
    vertical-align: middle;
}

.quote-products-optional__table .quote-product-line td:first-child {
    border-right: 1px solid #e2e8f0;
    border-radius: 0 12px 12px 0;
}

.quote-products-optional__table .quote-product-line td:last-child {
    border-left: 1px solid #e2e8f0;
    border-radius: 12px 0 0 12px;
}

.quote-products-optional__table .quote-product-line:hover td {
    background: #fbfdff;
    border-color: #cbd5e1;
}

.quote-products-optional__table .form-control,
.quote-products-optional__table .form-select {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid #dbe3ee;
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Rubik', 'Assistant', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: none;
}

.quote-products-optional__table .form-control:focus,
.quote-products-optional__table .form-select:focus {
    border-color: #38bdf8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.quote-products-optional__table .product-name {
    font-weight: 600;
}

.quote-products-optional__table .product-desc {
    min-height: 36px;
    font-size: 0.8125rem;
    font-weight: 400;
    color: #475569;
}

.quote-product-price-wrap {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.quote-product-price-prefix {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
}

.quote-product-price-wrap .product-price {
    flex: 1;
    min-width: 0;
}

.quote-products-optional__table .quote-line-discount-wrap {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
}

.quote-products-optional__table .product-discount-type {
    width: 3.4rem;
    flex-shrink: 0;
    padding-inline: 0.2rem;
    text-align: center;
}

.quote-products-optional__table .product-total-display {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 0.65rem;
    border-radius: 10px;
    background: #f1f5f9;
    color: #0f172a;
    font-family: 'Rubik', 'Assistant', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.quote-product-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #dc2626;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.quote-product-remove-btn:hover,
.quote-product-remove-btn:focus-visible {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.quote-products-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding: 0.75rem 0.95rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.quote-products-total__label {
    font-family: 'Rubik', 'Assistant', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.quote-products-total__value {
    font-family: 'Rubik', 'Assistant', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

@media (max-width: 768px) {
    .quote-products-optional__table-wrap {
        border: 0;
        background: transparent;
        padding: 0;
        overflow: visible;
    }

    .quote-products-optional__table,
    .quote-products-optional__table thead,
    .quote-products-optional__table tbody,
    .quote-products-optional__table tr,
    .quote-products-optional__table th,
    .quote-products-optional__table td {
        display: block;
        width: 100%;
    }

    .quote-products-optional__table {
        border-spacing: 0;
    }

    .quote-products-optional__table thead {
        display: none;
    }

    .quote-products-optional__table .quote-product-line {
        margin-bottom: 0.75rem;
        padding: 0.85rem;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    }

    .quote-products-optional__table .quote-product-line td,
    .quote-products-optional__table .quote-product-line td:first-child,
    .quote-products-optional__table .quote-product-line td:last-child {
        border: 0;
        border-radius: 0;
        background: transparent;
        padding: 0.4rem 0;
    }

    .quote-products-optional__table .quote-product-line td[data-label]:not([data-label=""])::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.3rem;
        font-family: 'Rubik', 'Assistant', sans-serif;
        font-size: 0.75rem;
        font-weight: 700;
        color: #64748b;
    }

    .quote-products-optional__table .ptr-cell-name {
        padding-bottom: 0.55rem;
    }

    .quote-products-optional__table .ptr-cell-total {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        margin-top: 0.35rem;
        padding-top: 0.65rem;
        border-top: 1px solid #e2e8f0;
    }

    .quote-products-optional__table .ptr-cell-actions {
        display: flex;
        justify-content: flex-end;
        padding-top: 0.35rem;
    }

    .quote-products-optional__table .product-total-display {
        width: auto;
    }
}

body.quote-create-overlay-open {
    overflow: hidden;
}

.quote-create-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.quote-create-overlay[hidden] {
    display: none !important;
}

.quote-create-dialog {
    width: min(100%, 26rem);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.quote-create-dialog__body {
    padding: 1.5rem 1.35rem 1rem;
    text-align: center;
}

.quote-create-dialog__title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.quote-create-dialog__text {
    margin: 0;
    color: #64748b;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.quote-create-dialog__actions {
    display: flex;
    gap: 0.5rem;
    justify-content: stretch;
    padding: 0 1.15rem 1.15rem;
}

.quote-create-dialog__actions .quote-create-action-btn {
    flex: 1;
}

.quote-create-dialog__actions .quote-create-action-btn--close {
    flex: 0 0 42px;
}

.quote-create-overlay--preview {
    align-items: stretch;
    padding: 0.75rem;
}

.quote-create-preview {
    width: min(100%, 56rem);
    max-height: calc(100vh - 1.5rem);
    margin: auto;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.quote-create-preview__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.75);
}

.quote-create-preview__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.quote-create-preview__hint {
    margin: 0.15rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
}

.quote-create-preview__frame {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
    background: #f8fafc;
}

.quote-preview-doc {
    max-width: 44rem;
    margin: 0 auto;
    padding: 1.25rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.quote-preview-doc__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.quote-preview-doc__kicker {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.quote-preview-doc__number {
    margin: 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.quote-preview-doc__date {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

.quote-preview-doc__logo {
    max-width: 7rem;
    max-height: 3.5rem;
    object-fit: contain;
}

.quote-preview-doc__details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.quote-preview-doc__details h4,
.quote-preview-doc__items h4,
.quote-preview-doc__notes h4 {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.quote-preview-doc__details dl {
    margin: 0;
    display: grid;
    gap: 0.45rem;
}

.quote-preview-doc__details dl > div {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 0.5rem;
    align-items: start;
}

.quote-preview-doc__details dt {
    margin: 0;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
}

.quote-preview-doc__details dd {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    word-break: break-word;
}

.quote-preview-doc__items table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.quote-preview-doc__items th,
.quote-preview-doc__items td {
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
    vertical-align: top;
}

.quote-preview-doc__items th {
    color: #64748b;
    font-weight: 600;
    font-size: 0.8rem;
}

.quote-preview-doc__num {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.quote-preview-doc__empty {
    color: #94a3b8;
    text-align: center;
}

.quote-preview-doc__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 0.85rem 0.75rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 1rem;
}

.quote-preview-doc__notes {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.6;
}

.quote-preview-doc__footer {
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e2e8f0;
    color: #94a3b8;
    font-size: 0.78rem;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .quote-create-action-bar {
        bottom: 1rem;
    }

    .quote-create-action-bar__status.quote-draft-status {
        max-width: none;
    }

    .quote-preview-doc {
        padding: 1.75rem;
    }

    .quote-preview-doc__details {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 767px) {
    .quote-create-action-btn-row {
        flex-direction: column;
        align-items: stretch;
    }

    .quote-create-action-btn-row .quote-create-action-btn {
        width: 100%;
        min-height: 44px;
        white-space: normal;
    }

    .quote-create-page.sales-create-quote-style {
        padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    }

    body.has-mobile-bottom-nav .quote-create-page.sales-create-quote-style {
        padding-bottom: calc(5.25rem + 56px + env(safe-area-inset-bottom, 0px));
    }

    .quote-create-action-bar {
        position: fixed;
        left: 0.5rem;
        right: 0.5rem;
        bottom: calc(0.45rem + env(safe-area-inset-bottom, 0px));
        z-index: 95;
        gap: 0;
        margin: 0;
        width: auto;
        max-width: none;
        pointer-events: none;
    }

    body.has-mobile-bottom-nav .quote-create-action-bar {
        bottom: calc(56px + 0.45rem + env(safe-area-inset-bottom, 0px));
    }

    .quote-create-action-bar__status.quote-draft-status {
        display: none !important;
    }

    .quote-create-action-bar__actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.4rem;
        width: 100%;
        margin: 0;
        flex: 1 1 auto;
        justify-content: stretch;
        min-width: 0;
        pointer-events: auto;
    }

    .quote-create-action-bar .quote-create-action-btn--close {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        flex: 0 0 auto;
    }

    .quote-create-action-bar .quote-create-action-btn--preview,
    .quote-create-action-bar .quote-create-action-btn--primary {
        flex: 1 1 0;
        min-width: 0;
        min-height: 44px;
        padding: 0.55rem 0.6rem;
        font-size: 0.8125rem;
    }

    .quote-create-action-btn--primary {
        grid-column: auto;
    }

    .quote-create-dialog__actions {
        flex-direction: column-reverse;
    }

    .quote-create-overlay--preview {
        padding: 0;
        align-items: stretch;
    }

    .quote-create-preview {
        width: 100%;
        max-height: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }

    .quote-create-preview__toolbar {
        position: sticky;
        top: 0;
        z-index: 2;
    }
}

/* Quotes follow-up picker modal + sent badge + toast */
.quote-followup-sent-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-inline-start: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.quote-followup-sent-badge i {
    color: #16a34a;
}

.quote-toast-container {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: min(92vw, 420px);
    pointer-events: none;
}

.quote-toast {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.quote-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.quote-toast-success {
    background: #16a34a;
    border: 1px solid #15803d;
}

.quote-toast-error {
    background: #dc2626;
    border: 1px solid #b91c1c;
}

.quote-toast.hide {
    opacity: 0;
    transform: translateY(-6px);
}

.modal.crm-followup-picker .crm-followup-picker__header {
    align-items: flex-start;
    gap: 0.75rem;
}

.crm-followup-picker__title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.crm-followup-picker__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.crm-followup-picker__subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
}

.crm-followup-picker__body {
    padding-top: 0.5rem;
}

.crm-followup-picker__hint {
    margin: 0 0 0.85rem;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.45;
}

.crm-followup-picker__bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.crm-followup-picker__bulk-actions .btn {
    min-height: 40px;
}

.crm-followup-picker__list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: min(52vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-inline-end: 0.15rem;
}

.crm-followup-picker__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    margin: 0;
}

.crm-followup-picker__item:has(.ready-followup-checkbox:checked) {
    border-color: #86efac;
    background: #f0fdf4;
}

.crm-followup-picker__item .ready-followup-checkbox {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    flex-shrink: 0;
}

.crm-followup-picker__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    flex-shrink: 0;
}

.crm-followup-picker__details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.crm-followup-picker__quote-num {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.crm-followup-picker__customer {
    color: #334155;
    font-size: 0.9rem;
}

.crm-followup-picker__meta {
    color: #64748b;
    font-size: 0.78rem;
}

.crm-followup-picker__partition {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0.35rem 0;
}

.crm-followup-picker__partition::before,
.crm-followup-picker__partition::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.crm-followup-picker__empty {
    text-align: center;
    padding: 1.5rem 0.75rem;
}

.crm-followup-picker__empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #16a34a;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.crm-followup-picker__empty-title {
    margin: 0 0 0.35rem;
    font-weight: 700;
    color: #1e293b;
}

.crm-followup-picker__empty-text {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.crm-followup-picker__footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.crm-followup-picker__selection-count {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    text-align: center;
}

.crm-followup-picker__footer-actions {
    display: flex;
    gap: 0.65rem;
}

.crm-followup-picker__cancel-btn,
.crm-followup-picker__send-btn {
    min-height: 44px;
    flex: 1;
}

.crm-followup-picker__send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.crm-followup-picker__send-btn.is-loading {
    opacity: 0.75;
    pointer-events: none;
}

.crm-followup-picker__send-btn.is-loading .crm-followup-picker__send-label::after {
    content: '...';
}

@media (max-width: 768px) {
    .modal.crm-followup-picker .modal-dialog {
        display: flex;
        align-items: flex-end;
        min-height: 100%;
        max-width: 100%;
        height: 100%;
        margin: 0;
    }

    .modal.crm-followup-picker .modal-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
        border: none;
        box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
    }

    .modal.crm-followup-picker .crm-followup-picker__body {
        flex: 1;
        overflow-y: auto;
    }

    .crm-followup-picker__list {
        max-height: none;
    }

    .crm-followup-picker__footer-actions {
        flex-direction: column-reverse;
    }

    .crm-followup-picker__cancel-btn,
    .crm-followup-picker__send-btn {
        width: 100%;
    }
}

/* Form controls inside table-card (e.g. attendance manage location form) */
.table-card .form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.table-card .form-control {
    min-height: 44px;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    color: #1e293b;
    background: #fff;
}

.table-card .form-control:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    outline: none;
}

.table-card .form-select {
    min-height: 44px;
    padding: 0.625rem 2rem 0.625rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    color: #1e293b;
    background-color: #fff;
}

.table-card .form-select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    outline: none;
}

.table-card .form-check-input:checked {
    background-color: #f59e0b;
    border-color: #f59e0b;
}

.table-card .form-check-label {
    font-size: 0.9375rem;
    color: #475569;
}

/* —— Customer list: category color bookmarks (shared with /customers) —— */
.customers-page-layout {
    margin-inline: 0;
}

@media (min-width: 992px) {
    .customers-category-sidebar {
        position: sticky;
        top: 1rem;
    }
}

.customers-category-nav .list-group-item {
    border-inline: none;
    padding: 0.55rem 1rem;
    font-size: 0.9375rem;
}

.customers-category-nav .list-group-item.active {
    font-weight: 600;
}

.customers-category-nav-swatch {
    width: 0.45rem;
    min-width: 0.45rem;
    height: 1.35rem;
    border-radius: 0.2rem;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.customers-category-nav-swatch--none {
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
}

.customers-category-nav-swatch--primary {
    background: var(--bs-primary);
}

.customers-category-nav-swatch--secondary {
    background: var(--bs-secondary);
}

.customers-category-nav-swatch--success {
    background: var(--bs-success);
}

.customers-category-nav-swatch--danger {
    background: var(--bs-danger);
}

.customers-category-nav-swatch--warning {
    background: var(--bs-warning);
}

.customers-category-nav-swatch--info {
    background: var(--bs-info);
}

.customers-category-nav-swatch--indigo {
    background: #6366f1;
}

.customers-category-nav-swatch--purple {
    background: #9333ea;
}

.customers-category-nav-swatch--teal {
    background: #14b8a6;
}

.customers-category-nav-swatch--orange {
    background: #ea580c;
}

.customers-category-nav-swatch--pink {
    background: #db2777;
}

.customers-bulk-toolbar-wrap {
    min-width: 0;
}

.customers-bulk-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
}

.customers-bulk-toolbar-hint {
    margin-top: 0.4rem;
    padding-inline-start: 0.1rem;
}

.customers-bulk-toolbar-cat-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 0;
}

.customers-bulk-toolbar-cat-select {
    min-width: 11rem;
    max-width: 16rem;
    width: auto;
}

.customers-bulk-toolbar-cat-group .customers-bulk-toolbar-cat-select {
    max-width: 14rem;
}

.customers-bulk-toolbar .form-select {
    min-width: 10rem;
    max-width: 100%;
}

.customer-name-with-bookmark {
    display: flex;
    align-items: stretch;
    gap: 0.625rem;
    min-width: 0;
}

.customer-name-cell {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.customer-name-link {
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    cursor: inherit;
}

.customer-name-link:hover {
    color: #1e293b;
    text-decoration: none;
}

.customers-list-row.is-selected .customer-name-link {
    color: #0f172a;
}

.customer-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.customer-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f8fafc;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.customer-category-tag .customers-category-nav-swatch {
    width: 0.5rem;
    min-width: 0.5rem;
    height: 0.75rem;
    border-radius: 0.2rem;
}

.customer-cat-dropdown .dropdown-menu {
    max-height: 16rem;
    overflow-y: auto;
}

.customer-cat-bookmark-btn {
    width: 0.75rem;
    min-width: 0.75rem;
    min-height: 2.75rem;
    padding: 0;
    border: none;
    border-radius: 0.375rem 0 0 0.375rem;
    cursor: pointer;
    flex-shrink: 0;
    align-self: center;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.customer-cat-bookmark-btn:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.customer-cat-bookmark--none {
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
}

.customer-cat-bookmark--primary {
    background: var(--bs-primary);
}

.customer-cat-bookmark--secondary {
    background: var(--bs-secondary);
}

.customer-cat-bookmark--success {
    background: var(--bs-success);
}

.customer-cat-bookmark--danger {
    background: var(--bs-danger);
}

.customer-cat-bookmark--warning {
    background: var(--bs-warning);
}

.customer-cat-bookmark--info {
    background: var(--bs-info);
}

.customer-cat-bookmark--indigo {
    background: #6366f1;
}

.customer-cat-bookmark--purple {
    background: #9333ea;
}

.customer-cat-bookmark--teal {
    background: #14b8a6;
}

.customer-cat-bookmark--orange {
    background: #ea580c;
}

.customer-cat-bookmark--pink {
    background: #db2777;
}

.customer-card-bookmark-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.customer-card-bookmark-row .customer-cat-bookmark-btn {
    min-height: 3rem;
}

@media (max-width: 768px) {
    .customers-bulk-toolbar {
        flex-wrap: nowrap;
    }

    .customers-bulk-toolbar .customers-bulk-toolbar-cat-select {
        max-width: 12rem;
        flex: 0 0 auto;
    }

    .customers-bulk-toolbar-cat-group {
        flex: 0 0 auto;
    }

    .customers-bulk-toolbar .btn {
        flex: 0 0 auto;
        min-width: auto;
    }
}

.customers-table-select-col {
    width: 2.75rem;
}

/* Quote details: tabbed workspace */
.quote-detail-page {
    width: 100%;
    margin: 0;
}

.quote-header-amount {
    font-weight: 700;
    color: #0f172a;
    margin-inline: 0.25rem;
}

.quote-detail-workspace {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.quote-detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.quote-detail-tab {
    min-height: 40px;
    padding: 0.4rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.quote-detail-tab:hover {
    background: #fff;
    border-color: #e2e8f0;
    color: #0f172a;
}

.quote-detail-tab.is-active {
    background: #fff;
    border-color: #7dd3fc;
    color: #0369a1;
    box-shadow: 0 1px 4px rgba(14, 165, 233, 0.12);
}

.quote-detail-panels {
    padding: 1.25rem;
}

.quote-detail-panel {
    display: none;
}

.quote-detail-panel.is-active {
    display: block;
}

.quote-overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .quote-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.quote-overview-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.125rem;
    background: #fff;
}

.quote-overview-card__title {
    margin: 0 0 0.75rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
}

.quote-dl {
    margin: 0;
}

.quote-dl__row {
    display: grid;
    grid-template-columns: minmax(100px, 130px) 1fr;
    gap: 0.5rem 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.quote-dl__row:last-child {
    border-bottom: 0;
}

.quote-dl__row dt {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
}

.quote-dl__row dd {
    margin: 0;
    font-size: 0.9375rem;
    color: #0f172a;
}

.quote-dl__amount {
    font-weight: 800;
    font-size: 1.125rem;
}

.quote-sheet-column--single {
    max-width: 640px;
}

.quote-page-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #dbeafe;
}

.quote-page-header::before {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.16) 0%, rgba(2, 132, 199, 0.08) 100%);
}

.quote-unified-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    padding: 1rem;
}

.quote-unified-top {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.quote-number {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.quote-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    color: #475569;
    font-size: 0.9375rem;
}

.quote-meta-separator {
    color: #94a3b8;
}

.quote-unified-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quote-unified-actions .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quote-main-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.quote-sheet-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.quote-sheet-column {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    padding: 0 0.875rem;
}

.quote-info-row {
    display: grid;
    grid-template-columns: minmax(110px, 140px) 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.quote-info-row:last-child {
    border-bottom: 0;
}

.quote-info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.quote-info-value {
    font-size: 1rem;
    color: #0f172a;
    line-height: 1.45;
    word-break: break-word;
    text-align: left;
    direction: ltr;
}

.quote-info-value a {
    color: #334155;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.quote-text-block {
    white-space: pre-wrap;
    text-align: right;
    direction: rtl;
}

.quote-note-block {
    margin-top: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.875rem;
    background: #ffffff;
}

.cloth-catalog-ref-card .info-card-body {
    padding-top: 0.5rem;
}

.cloth-catalog-ref-img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--border-color, #e2e8f0);
    display: block;
}

.cloth-catalog-ref-pdf {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted, #64748b);
}

.cloth-catalog-ref-pdf .fa-file-pdf {
    font-size: 1.5rem;
    color: var(--danger, #ef4444);
}

@media (min-width: 768px) {
    .quote-unified-block {
        padding: 1.5rem;
    }

    .quote-unified-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .quote-unified-actions {
        justify-content: flex-end;
    }

    .quote-sheet-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .quote-page-header .header-actions {
        width: 100%;
    }

    .quote-page-header .header-actions .btn {
        width: 100%;
    }

    .quote-unified-actions .btn {
        width: 100%;
    }

    .quote-main-amount {
        font-size: 1.35rem;
    }

    .quote-info-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .quote-info-value {
        text-align: right;
        direction: rtl;
    }
}

/* Legacy — nagaria/cloth action modals (.actions-modal-pro + grids) */
.actions-modal-pro .modal-dialog {
    max-width: 700px;
    margin: 1.25rem auto;
}

.actions-modal-pro .modal-content {
    border: 1px solid #dbe3ed;
    border-radius: 18px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.actions-modal-pro .modal-header {
    border-bottom: 1px solid #e5edf5;
    padding: 1.1rem 1.25rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.actions-modal-pro .modal-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    color: #0b1524;
    letter-spacing: 0;
}

.actions-modal-pro .modal-body {
    padding: 0.9rem;
    background: #f5f8fc;
}

.actions-modal-pro .modal-footer {
    border-top: 1px solid #e5edf5;
    background: #ffffff;
    padding: 0.85rem 1rem;
}

.actions-modal-pro .lead-actions-grid,
.actions-modal-pro .quote-actions-grid,
.actions-modal-pro .sales-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.actions-modal-pro .action-btn {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 18px !important;
    align-items: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
    min-height: 58px !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 12px !important;
    padding: 0.7rem 0.8rem !important;
    background: #ffffff !important;
    text-decoration: none !important;
    color: #0f172a !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease !important;
}

.actions-modal-pro .action-btn:hover {
    border-color: #c4d2e2 !important;
    background: #fdfefe !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
    transform: translateY(-1px) !important;
}

.actions-modal-pro .action-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    background: #eef3f8 !important;
    color: #334155 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
}

.actions-modal-pro .action-content {
    min-width: 0;
    text-align: right !important;
}

.actions-modal-pro .action-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 0.13rem !important;
    line-height: 1.35 !important;
}

.actions-modal-pro .action-description {
    font-size: 0.83rem !important;
    color: #64748b !important;
    line-height: 1.35 !important;
}

.actions-modal-pro .action-arrow {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #94a3b8 !important;
    font-size: 0.9rem !important;
}

.actions-modal-pro .action-btn-delete .action-icon {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.actions-modal-pro .action-btn-delete {
    border-color: #f3d6d6 !important;
}

.actions-modal-pro .action-btn-delete:hover {
    border-color: #e6bcbc !important;
    background: #fffafa !important;
}

@media (max-width: 768px) {
    .actions-modal-pro .modal-dialog {
        width: 100%;
        max-width: 100%;
        height: 100%;
        margin: 0;
    }

    .actions-modal-pro .modal-content {
        height: 100%;
        border-radius: 0;
        border: none;
    }

    .actions-modal-pro .modal-header {
        padding: 0.9rem 1rem;
    }

    .actions-modal-pro .modal-body {
        padding: 0.8rem;
        overflow-y: auto;
    }

    .actions-modal-pro .modal-footer {
        padding: 0.75rem 0.8rem;
    }

    .actions-modal-pro .action-btn {
        min-height: 56px !important;
        padding: 0.68rem 0.7rem !important;
    }

    .actions-modal-pro .action-title {
        font-size: 0.92rem !important;
    }

    .actions-modal-pro .action-description {
        font-size: 0.8rem !important;
    }
}

/* CRM list filter bar (leads statuses, customer categories, etc.) */
.crm-filter-preview-bar {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.crm-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.5rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.crm-filter-pill:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #111827;
}

.crm-filter-pill.active {
    background: #334155;
    border-color: #334155;
    color: #ffffff;
}

.crm-filter-pill--add {
    border-style: dashed;
    border-color: #94a3b8;
    background: #f8fafc;
    color: #334155;
    gap: 0.35rem;
    cursor: pointer;
}

.crm-filter-pill--add:hover,
.crm-filter-pill--add:focus-visible {
    border-color: #64748b;
    background: #f1f5f9;
    color: #0f172a;
}

/* Table column edit controls */
.btn-columns-toggle,
.btn-columns-save {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-columns-toggle.active {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.table-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.header-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.column-remove-btn {
    border: none;
    background: transparent;
    color: #dc2626;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.column-remove-btn:hover {
    background: #fee2e2;
}

.customer-add-columns-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}

.customer-add-columns-panel__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}

.column-add-btn {
    min-height: 36px;
    padding: 0.35rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.column-add-btn:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.customer-category-column-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    height: 28px;
    margin-inline-start: auto;
    padding: 0;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    background: #ffffff;
    color: #2563eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.customer-category-column-add-btn:hover,
.customer-category-column-add-btn:focus-visible {
    border-color: #2563eb;
    background: #eff6ff;
}

.customer-category-column-header {
    cursor: grab;
}

.customer-category-column-header.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.customer-category-column-header.is-drag-over {
    box-shadow: inset 0 -3px 0 #2563eb;
}

.customer-column-drag-handle {
    color: #94a3b8;
    font-size: 0.75rem;
    cursor: grab;
}

.customers-actions-header .header-label {
    width: 100%;
}

.customer-category-column-remove {
    margin-inline-start: auto;
}

@media (max-width: 768px) {
    .crm-filter-preview-bar {
        padding: 0.625rem;
        gap: 0.5rem;
    }

    .crm-filter-pill {
        min-height: 38px;
        padding: 0.45rem 0.75rem;
        font-size: 0.8125rem;
    }

    .crm-filter-pill--add-label {
        display: none;
    }
}

/* Filter bar quick edit (pen toggle + bin delete) */
.crm-filter-bar-edit-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crm-filter-bar-edit-toggle:hover,
.crm-filter-bar-edit-toggle:focus-visible {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #0f172a;
}

.crm-filter-bar-edit-toggle.active {
    border-color: #334155;
    background: #334155;
    color: #ffffff;
}

.crm-filter-pill-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.crm-filter-pill-delete {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: #fee2e2;
    color: #dc2626;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.crm-filter-pill-delete:hover,
.crm-filter-pill-delete:focus-visible {
    background: #fecaca;
    color: #b91c1c;
}

.crm-filter-bar--edit-mode .crm-filter-pill-delete {
    display: inline-flex;
}

.crm-filter-bar--edit-mode .crm-filter-pill-wrap .crm-filter-pill,
.crm-filter-bar--edit-mode .crm-filter-pill-wrap .lead-status-pill {
    pointer-events: none;
}

.crm-filter-bar--edit-mode .crm-filter-pill-wrap .crm-filter-pill[data-filter-deletable="1"],
.crm-filter-bar--edit-mode .crm-filter-pill-wrap .lead-status-pill[data-filter-deletable="1"] {
    pointer-events: auto;
    cursor: pointer;
}

.crm-filter-bar--edit-mode[data-filter-rename-url] .crm-filter-pill-wrap .lead-status-pill[data-filter-deletable="1"]:hover,
.crm-filter-bar--edit-mode[data-filter-rename-url] .crm-filter-pill-wrap .crm-filter-pill[data-filter-deletable="1"]:hover {
    border-color: #64748b;
    background: #f1f5f9;
}

@media (max-width: 768px) {
    .crm-filter-bar-edit-toggle {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }

    .crm-filter-pill-delete {
        width: 30px;
        min-width: 30px;
        height: 30px;
    }
}
