.kim-ep {
    --kim-ep-accent: var(--wp--preset--color--primary, var(--e-global-color-primary, #222));
    --kim-ep-surface: #ffffff;
    --kim-ep-soft: #f7f8fb;
    --kim-ep-line: #e4e7ec;
    --kim-ep-text-muted: #667085;
    width: min(1200px, calc(100vw - 40px));
    max-width: 1600px;
    margin: 40px auto;
    padding: 20px;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
}

.kim-ep-dashboard-panel {
    background: var(--kim-ep-surface);
    border: 1px solid var(--kim-ep-line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.04);
}

.kim-ep-metrics-panel {
    padding: 16px;
    margin-bottom: 16px;
}

.kim-ep-filter-panel {
    padding: 16px;
    background: #f8fafc;
}

.kim-ep-table-panel {
    padding: 0;
    overflow-y: hidden;
    overflow-x: auto;
}

.kim-ep-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.kim-ep-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.kim-ep-header h1 {
    margin: 0;
    font-size: 30px;
}

.kim-ep-header p {
    margin: 5px 0 0;
    color: #777;
}

.kim-ep-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #222;
    color: #fff !important;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 5px;
    line-height: 1;
    white-space: nowrap;
}

.kim-ep-manual-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--kim-ep-accent);
    color: #fff !important;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 5px;
    line-height: 1;
    white-space: nowrap;
}

.kim-ep-manual-button:hover,
.kim-ep-manual-button:focus {
    color: #fff !important;
    filter: brightness(0.95);
}

.kim-ep-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.kim-ep-stats > div {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid var(--kim-ep-line);
    border-radius: 7px;
    padding: 18px 16px;
    text-align: center;
}

.kim-ep-stats strong {
    display: block;
    color: var(--kim-ep-accent);
    font-size: 30px;
    line-height: 1;
    margin-bottom: 8px;
}

.kim-ep-stats span {
    font-size: 14px;
    color: var(--kim-ep-text-muted);
}

.kim-ep-stat-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid var(--kim-ep-line);
}

.kim-ep-stat-badges span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 7px 11px;
    border: 1px solid #dde3ee;
    border-radius: 999px;
    background: #f8fafc;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.kim-ep-stat-badges strong {
    color: var(--kim-ep-accent);
    font-size: 16px;
    line-height: 1;
}

.kim-ep-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.kim-ep-filters input,
.kim-ep-filters select {
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.kim-ep-filters input {
    flex: 1 1 240px;
}

.kim-ep-filters select {
    flex: 0 1 150px;
}

.kim-ep-filters button {
    border: 0;
    background: var(--kim-ep-accent);
    color: #fff !important;
    padding: 0 20px;
    border-radius: 6px;
    cursor: pointer;
    min-height: 42px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.kim-ep-filters .kim-ep-export {
    background: #222;
    color: #fff !important;
}

.kim-ep-active-tracking-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #c8d7f9;
    border-radius: 5px;
    background: #f0f6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.kim-ep-active-tracking-filter a {
    color: #1d4ed8;
    text-decoration: underline;
}

.kim-ep-error {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-left: 4px solid #d63638;
    background: #fff5f5;
    color: #7a1b1d;
}

.kim-ep-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--kim-ep-line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.04);
}

.kim-ep-table-wrap.kim-ep-dashboard-panel {
    margin-top: 0;
}

.kim-ep-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid #ededed;
    background: #fff;
}

.kim-ep-pagination span {
    color: #666;
    font-size: 14px;
    margin-right: auto;
}

.kim-ep-pagination a {
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #222;
    line-height: 1;
    padding: 9px 12px;
    text-decoration: none;
    white-space: nowrap;
}

.kim-ep-pagination a:hover,
.kim-ep-pagination a:focus {
    border-color: var(--kim-ep-accent);
    color: var(--kim-ep-accent);
}

.kim-ep-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.kim-ep-table th,
.kim-ep-table td {
    padding: 12px 14px;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-bottom: 1px solid #ededed;
    text-align: left;
    vertical-align: middle;
    line-height: 1.35;
}

.kim-ep-table > tbody > tr > td > p {
    display: inline;
    margin: 0;
    padding: 0;
}

.kim-ep-table > tbody > tr > td > br {
    display: none;
}

.kim-ep-table th {
    background: #f8fafc;
    border-bottom-color: var(--kim-ep-line);
    color: #475467;
    font-size: 13px;
    font-weight: 700;
}

.kim-ep-table tr:last-child td {
    border-bottom: 0;
}

.kim-ep-table tbody tr {
    background: #fff;
}

.kim-ep-table tbody tr:nth-child(even) {
    background: #fcfcfc;
}

.kim-ep-table tbody tr:hover {
    background: #f8fafc;
}

.kim-ep-table tbody td {
    box-shadow: none;
        background-color: #fff !important;
}

.kim-ep-table th:nth-child(1),
.kim-ep-table td:nth-child(1) {
    width: 165px;
}

.kim-ep-table th:nth-child(2),
.kim-ep-table td:nth-child(2) {
 
    width: 260px;
}

.kim-ep-table th:nth-child(3),
.kim-ep-table td:nth-child(3) {
    width: 96px;
}

.kim-ep-table th:nth-child(4),
.kim-ep-table td:nth-child(4) {
    width: 185px;
}

.kim-ep-table th:nth-child(5),
.kim-ep-table td:nth-child(5) {
    width: 150px;
}

.kim-ep-table th:nth-child(6),
.kim-ep-table td:nth-child(6) {
    width: 68px;
}

.kim-ep-table th:nth-child(7),
.kim-ep-table td:nth-child(7) {
    width: 76px;
}

.kim-ep-enquiries-table {
    min-width: 1260px;
    table-layout: fixed;
}

.kim-ep-enquiries-table th:nth-child(1),
.kim-ep-enquiries-table td:nth-child(1) {
    width: 46px;
}

.kim-ep-enquiries-table th:nth-child(2),
.kim-ep-enquiries-table td:nth-child(2) {
    width: 165px;
}

.kim-ep-enquiries-table th:nth-child(3),
.kim-ep-enquiries-table td:nth-child(3) {
    width: 250px;
}

.kim-ep-enquiries-table th:nth-child(4),
.kim-ep-enquiries-table td:nth-child(4) {
    width: 160px;
}

.kim-ep-enquiries-table th:nth-child(5),
.kim-ep-enquiries-table td:nth-child(5) {
    width: 125px;
}

.kim-ep-enquiries-table th:nth-child(6),
.kim-ep-enquiries-table td:nth-child(6) {
    width: 180px;
}

.kim-ep-enquiries-table th:nth-child(7),
.kim-ep-enquiries-table td:nth-child(7) {
    width: 270px;
}

.kim-ep-select-col {
    text-align: center;
    vertical-align: middle;
}

.kim-ep-select-col input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.kim-ep-date,
.kim-ep-contact,
.kim-ep-name,
.kim-ep-email,
.kim-ep-phone {
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kim-ep-date {
    white-space: nowrap;
}

.kim-ep-name strong {
    display: block;
    font-size: 16px;
    line-height: 1.3;
    white-space: nowrap;
}

.kim-ep-contact {
    display: grid;
    gap: 3px;
}

.kim-ep-contact strong,
.kim-ep-contact span,
.kim-ep-contact a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kim-ep-contact strong {
    font-size: 15px;
}

.kim-ep-contact span {
    color: #555;
    font-size: 12px;
}

.kim-ep-email a,
.kim-ep-phone a,
.kim-ep-contact a {
    color: var(--kim-ep-accent);
    white-space: nowrap;
}

.kim-ep-modal-open,
.kim-ep-modal-close,
.kim-ep-print-open,
.kim-ep-quick-action {
    border: 1px solid var(--kim-ep-accent);
    color: var(--kim-ep-accent);
    background: #fff;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 5px;
    cursor: pointer;
    font: inherit;
}

.kim-ep-modal-open:not(.kim-ep-manual-button),
.kim-ep-print-open,
.kim-ep-quick-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-top: 0;
    padding: 0;
    border-color: #ddd;
    color: #333;
    background: #fff;
    vertical-align: middle;
    margin-right: 0;
}

.kim-ep-manual-button.kim-ep-modal-open {
    width: auto;
    height: auto;
    min-height: 42px;
    margin: 0;
    padding: 10px 18px;
    border-color: var(--kim-ep-accent);
    background: var(--kim-ep-accent);
    color: #fff !important;
    font-weight: 700;
}

.kim-ep-modal-open:hover,
.kim-ep-modal-open:focus,
.kim-ep-print-open:hover,
.kim-ep-print-open:focus,
.kim-ep-quick-action:hover,
.kim-ep-quick-action:focus {
    border-color: var(--kim-ep-accent);
    color: var(--kim-ep-accent);
    outline: 0;
}

.kim-ep-modal-open.kim-ep-quote-open-created {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.kim-ep-modal-open.kim-ep-quote-open-created:hover,
.kim-ep-modal-open.kim-ep-quote-open-created:focus {
    border-color: #15803d;
    background: #15803d;
    color: #fff;
}

.kim-ep-modal-open svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kim-ep-quick-action svg,
.kim-ep-print-open svg,
.kim-ep-crm-retry-form svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kim-ep-quick-action[aria-label="Open WhatsApp"] {
    border-color: #25d366;
    color: #25d366;
}

.kim-ep-quick-action[aria-label="Send email"] {
    border-color: #2563eb;
    color: #2563eb;
}

.kim-ep-copy-summary {
    border-color: #7c3aed;
    color: #7c3aed;
}

.kim-ep-print-open {
    border-color: #dc2626;
    color: #dc2626;
}

.kim-ep-icon-view-action {
    border-color: #0891b2;
    color: #0891b2;
}

.kim-ep-icon-edit-action {
    border-color: #d97706;
    color: #d97706;
}

.kim-ep-quick-action[aria-label="Open WhatsApp"] span,
.kim-ep-quick-action[aria-label="Send email"] span,
.kim-ep-copy-summary span,
.kim-ep-print-open span {
    display: none;
}

.kim-ep-quick-action[aria-label="Open WhatsApp"]::before,
.kim-ep-quick-action[aria-label="Send email"]::before,
.kim-ep-copy-summary::before,
.kim-ep-print-open::before,
.kim-ep-crm-retry-form button::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    background: currentColor;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}

.kim-ep-quick-action[aria-label="Open WhatsApp"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 11.5a8 8 0 0 1-11.8 7l-3.2.9.9-3.1a8 8 0 1 1 14.1-4.8zM9.5 8.5c.2 2.8 2.2 5 5 5.8l1.2-1.2 2 .5c.2.1.3.3.3.5-.1 1.1-.9 2-2 2.2-4.3.4-8.6-3.8-8.2-8.2.1-1.1 1-1.9 2.1-2 .2 0 .4.1.5.3l.5 2-1.4 1.1z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 11.5a8 8 0 0 1-11.8 7l-3.2.9.9-3.1a8 8 0 1 1 14.1-4.8zM9.5 8.5c.2 2.8 2.2 5 5 5.8l1.2-1.2 2 .5c.2.1.3.3.3.5-.1 1.1-.9 2-2 2.2-4.3.4-8.6-3.8-8.2-8.2.1-1.1 1-1.9 2.1-2 .2 0 .4.1.5.3l.5 2-1.4 1.1z'/%3E%3C/svg%3E");
}

.kim-ep-quick-action[aria-label="Send email"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6h16v12H4zM4 7l8 6 8-6' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6h16v12H4zM4 7l8 6 8-6' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.kim-ep-copy-summary::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 8h10v12H8zM6 16H4V4h12v2' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 8h10v12H8zM6 16H4V4h12v2' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

.kim-ep-print-open::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 3h7l4 4v14H7zM14 3v5h5M9 15h6M9 18h4' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 3h7l4 4v14H7zM14 3v5h5M9 15h6M9 18h4' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

.kim-ep-print-open,
.kim-ep-quick-action {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}

.kim-ep-quick-action {
    line-height: 1;
}

.kim-ep-muted {
    color: #999;
}

.kim-ep-actions-cell {
    white-space: nowrap;
}

.kim-ep-status-cell,
.kim-ep-priority-cell,
.kim-ep-score-cell,
.kim-ep-owner-cell,
.kim-ep-lead-info-cell,
.kim-ep-tools-cell {
    white-space: normal;
}

.kim-ep-tools-cell {
    white-space: normal;
}

.kim-ep-lead-info-cell {
    display: flex;
    align-items: center;
    align-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.kim-ep-lead-info-cell > span {
    width: fit-content;
    max-width: 100%;
}

.kim-ep-actions-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 38px;
}

.kim-ep-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    background: #fff;
    border: 1px solid var(--kim-ep-accent);
    border-radius: 5px;
    color: var(--kim-ep-accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    padding: 6px 9px;
    margin-right: 0;
    max-width: 100%;
    text-align: center;
    white-space: normal;
}

.kim-ep-status-new {
    border-color: var(--kim-ep-accent);
    color: var(--kim-ep-accent);
}

.kim-ep-status-contacted {
    border-color: #2563eb;
    color: #2563eb;
}

.kim-ep-status-quoted {
    border-color: #7c3aed;
    color: #7c3aed;
}

.kim-ep-status-follow-up {
    border-color: #f59e0b;
    color: #b45309;
}

.kim-ep-status-won {
    border-color: #16a34a;
    color: #16a34a;
}

.kim-ep-status-lost {
    border-color: #6b7280;
    color: #6b7280;
}

.kim-ep-status-spam {
    border-color: #111827;
    color: #111827;
}

.kim-ep-crm-status,
.kim-ep-workflow-badge,
.kim-ep-priority,
.kim-ep-score,
.kim-ep-tags {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #555;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 8px;
    white-space: nowrap;
}

.kim-ep-priority-normal,
.kim-ep-score-unscored {
    border-color: #d1d5db;
    color: #374151;
}

.kim-ep-priority-low {
    border-color: #6b7280;
    color: #6b7280;
}

.kim-ep-priority-high {
    border-color: #f59e0b;
    color: #b45309;
}

.kim-ep-priority-urgent {
    border-color: #dc2626;
    color: #dc2626;
}

.kim-ep-score-hot {
    border-color: #dc2626;
    color: #dc2626;
}

.kim-ep-score-warm {
    border-color: #f59e0b;
    color: #b45309;
}

.kim-ep-score-cold {
    border-color: #2563eb;
    color: #2563eb;
}

.kim-ep-score-low-quality {
    border-color: #6b7280;
    color: #6b7280;
}

.kim-ep-score-cell .kim-ep-score {
    max-width: 100%;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
}

.kim-ep-bulk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #fff;
}

.kim-ep-bulk-actions select,
.kim-ep-bulk-actions button {
    min-height: 40px;
    border-radius: 6px;
}

.kim-ep-bulk-actions select {
    max-width: 190px;
    border: 1px solid #cfd6df;
    background: #fff;
}

.kim-ep-bulk-actions button {
    border: 0;
    background: var(--kim-ep-accent);
    color: #fff;
    font-weight: 700;
    padding: 0 18px;
    cursor: pointer;
}

.kim-ep-bulk-actions span {
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

.kim-ep-tags {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kim-ep-workflow-badge {
    border-color: #d1d5db;
    color: #374151;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kim-ep-follow-up-due-today {
    border-color: #f59e0b;
    color: #b45309;
}

.kim-ep-follow-up-overdue {
    border-color: #dc2626;
    color: #dc2626;
}

.kim-ep-follow-up-upcoming {
    border-color: #2563eb;
    color: #2563eb;
}

.kim-ep-crm-status-sent {
    border-color: #16a34a;
    color: #16a34a;
}

.kim-ep-crm-status-failed {
    border-color: #dc2626;
    color: #dc2626;
}

.kim-ep-crm-status-pending {
    border-color: #6b7280;
    color: #6b7280;
}

.kim-ep-crm-retry-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.kim-ep-crm-retry-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    border: 1px solid #dc2626;
    border-radius: 5px;
    background: #fff;
    color: #dc2626 !important;
    cursor: pointer;
    font: inherit;
    font-size: 0;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    white-space: nowrap;
}

.kim-ep-crm-retry-form button::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 12a8 8 0 0 1-13.6 5.7M4 12A8 8 0 0 1 17.6 6.3M17 2v5h-5M7 22v-5h5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 12a8 8 0 0 1-13.6 5.7M4 12A8 8 0 0 1 17.6 6.3M17 2v5h-5M7 22v-5h5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.kim-ep-modal {
    width: min(720px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 36px);
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-radius: 14px;
    padding: 0;
    background: #f6f8fb;
    color: #1d2327;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.32);
}

.kim-ep-modal,
.kim-ep-modal * {
    box-sizing: border-box;
}

.kim-ep-modal:not([open]) {
    display: none;
}

.kim-ep-modal::backdrop {
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(2px);
}

.kim-ep-modal .kim-ep-update,
.kim-ep-modal-inner {
    width: 100%;
    max-width: 100%;
    padding: 0 24px 24px;
    overflow-x: hidden;
}

.kim-ep-info-modal {
    width: min(1040px, calc(100vw - 36px));
}

.kim-ep-modal-header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 -24px 20px;
    padding: 18px 24px;
    border-bottom: 1px solid #e4e7ec;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.kim-ep-modal-header strong {
    color: #111827;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: 0;
}

.kim-ep-modal-close {
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}

.kim-ep-followup-modal {
    width: min(760px, calc(100vw - 32px));
}

.kim-ep-followup-list {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.kim-ep-followup-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #fff;
}

.kim-ep-followup-card > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.kim-ep-followup-card strong,
.kim-ep-followup-card b {
    color: #111827;
}

.kim-ep-followup-card span,
.kim-ep-followup-card p {
    color: #667085;
    margin: 0;
}

.kim-ep-followup-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 6px;
    background: var(--kim-ep-accent);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
}

.kim-ep-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 8px 6px 0;
    padding: 4px 9px 4px 5px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    vertical-align: middle;
}

.kim-ep-source-badge span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.kim-ep-source-facebook span {
    background: #1877f2;
}

.kim-ep-source-instagram span {
    background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.kim-ep-source-google span {
    background: #4285f4;
}

.kim-ep-source-bing span {
    background: #008373;
}

.kim-ep-source-linkedin span {
    background: #0a66c2;
}

.kim-ep-source-whatsapp span {
    background: #25d366;
}

.kim-ep-source-youtube span {
    background: #ff0000;
}

.kim-ep-source-twitter span {
    background: #111827;
}

.kim-ep-source-tiktok span {
    background: #000;
}

.kim-ep-source-pinterest span {
    background: #e60023;
}

.kim-ep-modal-customer {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin: -6px 0 18px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.kim-ep-manual-form label {
    display: grid;
    gap: 6px;
    color: #333;
    font-weight: 700;
}

.kim-ep-manual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.kim-ep-manual-grid p,
.kim-ep-manual-form p {
    margin: 0 0 12px;
}

.kim-ep-manual-form input,
.kim-ep-manual-form select,
.kim-ep-manual-form textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
    font-weight: 400;
}

.kim-ep-manual-form textarea {
    resize: vertical;
}

.kim-ep-manual-form > button[type="submit"] {
    margin-top: 4px;
    border: 0;
    border-radius: 6px;
    background: var(--kim-ep-accent);
    color: #fff !important;
    padding: 11px 18px;
    cursor: pointer;
    font-weight: 700;
}

.kim-ep-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 0;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    padding: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.kim-ep-info-grid p,
.kim-ep-info-block p {
    display: block;
    margin: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    color: #344054;
    font-size: 14px;
    line-height: 1.55;
}

.kim-ep-info-grid p {
    min-height: 74px;
    border: 1px solid #edf0f4;
    border-radius: 10px;
    background: #fff;
    padding: 12px;
}

.kim-ep-info-grid p b {
    display: block;
    margin-bottom: 4px;
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
}

.kim-ep-info-block br {
    display: initial;
}

.kim-ep-info-block {
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    margin-top: 16px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.kim-ep-info-block > *:not(b) {
    margin-left: 16px;
    margin-right: 16px;
}

.kim-ep-info-block > b {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #101828;
    font-size: 15px;
    line-height: 1.35;
    letter-spacing: 0;
    padding: 13px 16px;
}

.kim-ep-quote-section-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: var(--kim-ep-accent);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.kim-ep-info-block summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #101828;
    font-size: 15px !important;
    line-height: 1.35;
    padding: 13px 16px !important;
    list-style: none;
}

.kim-ep-info-block summary::-webkit-details-marker {
    display: none;
}

.kim-ep-info-block summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--kim-ep-accent);
    font-size: 18px;
    line-height: 1;
}

.kim-ep-info-block[open] summary::after {
    content: "-";
}

.kim-ep-info-block input[type="text"],
.kim-ep-info-block textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #101828;
    padding: 10px 12px;
    font: inherit;
}

.kim-ep-info-block .wp-editor-wrap {
    margin-top: 10px;
}

.kim-ep-info-block .wp-editor-container,
.kim-ep-info-block .quicktags-toolbar {
    border-color: #d0d5dd;
}

.kim-ep-info-block .button,
.kim-ep-info-block button {
    border-radius: 8px;
}

.kim-ep-info-block p + p {
    margin-top: 10px;
}

.kim-ep-info-block > p:last-child,
.kim-ep-info-block > div:last-child {
    margin-bottom: 16px;
}

.kim-ep-ai-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    border-top: 1px solid #eef2f7;
    margin-top: 12px;
    padding-top: 12px;
}

.kim-ep-ai-details-grid p {
    border: 1px solid #eef2f7;
    border-radius: 8px;
    background: #fbfdff;
    padding: 10px;
}

.kim-ep-ai-reply-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.kim-ep-ai-reply-controls textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.kim-ep-ai-reply-controls .kim-ep-generate-ai {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 8px;
    padding: 8px 15px;
    white-space: nowrap;
}

.kim-ep-chat-transcript {
    display: grid;
    gap: 12px;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 4px 10px;
    overflow-x: hidden;
}

.kim-ep-chat-message {
    display: grid;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.kim-ep-chat-user {
    justify-self: end;
    text-align: right;
}

.kim-ep-chat-assistant {
    justify-self: start;
    text-align: left;
}

.kim-ep-chat-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #667085;
    font-size: 12px;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 0 4px;
}

.kim-ep-chat-user .kim-ep-chat-meta {
    justify-content: flex-end;
}

.kim-ep-chat-bubble {
    justify-self: start;
    width: fit-content;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 10px 14px;
    background: #eff6ff;
    color: #1e3a8a;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
    max-width: min(85%, calc(100% - 8px));
    box-sizing: border-box;
    text-align: left;
}

.kim-ep-chat-user .kim-ep-chat-bubble {
    justify-self: end;
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.kim-ep-history {
    display: grid;
    gap: 10px;
}

.kim-ep-history-entry {
    border: 1px solid #e4e7ec;
    border-left: 4px solid var(--kim-ep-accent);
    border-radius: 10px;
    padding: 11px 12px;
    background: #fbfcfe;
}

.kim-ep-history-entry p {
    margin: 0;
}

.kim-ep-history-entry p + p {
    margin-top: 6px;
}

.kim-ep-quote-badge {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.kim-ep-quote-open {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: var(--kim-ep-accent);
    font-weight: 800;
}

/* Redesigned Modern Quote Modal */
.kim-ep-quote-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.kim-ep-quote-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.kim-ep-card-icon {
    width: 18px;
    height: 18px;
    stroke: #4f46e5;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kim-ep-mini-icon {
    width: 13px;
    height: 13px;
    stroke: #64748b;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    vertical-align: middle;
}

/* Client Details Grid (Side by Side in 2/4 columns) */
.kim-ep-quote-client-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.kim-ep-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.kim-ep-field-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-transform: none;
    margin: 0;
}

.kim-ep-field-group input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    padding: 8px 12px;
    font: inherit;
    font-size: 13px !important;
    font-weight: 400 !important;
    transition: all 0.2s ease;
}

.kim-ep-field-group input:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    outline: none;
}

.kim-ep-quote-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    color: #64748b;
    font-size: 12px;
}

.kim-ep-quote-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.kim-ep-quote-meta strong {
    color: #0f172a;
}

/* Single Table Header for Line Items (Non-Bold, Elegant) */
.kim-ep-quote-line-header {
    display: grid;
    grid-template-columns: minmax(150px, 1.4fr) minmax(160px, 1.5fr) 68px 90px 78px 72px 105px 36px;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 8px;
}

.kim-ep-quote-line-editor {
    display: grid;
    gap: 8px;
}

.kim-ep-quote-line {
    display: grid;
    grid-template-columns: minmax(150px, 1.4fr) minmax(160px, 1.5fr) 68px 90px 78px 72px 105px 36px;
    gap: 8px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.kim-ep-quote-line:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.kim-ep-mobile-lbl {
    display: none;
}

.kim-ep-quote-line input[type="text"],
.kim-ep-quote-line input[type="number"],
.kim-ep-quote-line textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
    padding: 7px 9px;
    font: inherit;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.35;
    transition: all 0.2s ease;
}

.kim-ep-quote-line input:focus,
.kim-ep-quote-line textarea:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
    outline: none;
}

.kim-ep-quote-line textarea {
    min-height: 35px;
    height: 35px;
    resize: vertical;
}

.kim-ep-cell-item {
    position: relative;
}

.kim-ep-quote-service-suggestions {
    display: none;
    position: absolute;
    z-index: 20;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.kim-ep-quote-service-suggestions.is-visible {
    display: block;
}

.kim-ep-quote-edit-details {
    margin: 16px 0;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #f8fafc;
}

.kim-ep-quote-edit-details summary {
    cursor: pointer;
    padding: 12px 14px;
    color: #1e3a8a;
    font-weight: 700;
}

.kim-ep-quote-edit-form {
    border-top: 1px solid #dbe4f0;
    padding: 16px;
}

.kim-ep-quote-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.kim-ep-quote-edit-grid label {
    color: #475569;
    display: grid;
    font-size: 12px;
    font-weight: 600;
    gap: 5px;
}

.kim-ep-quote-edit-grid input,
.kim-ep-quote-edit-grid textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    padding: 8px 10px;
}

.kim-ep-quote-edit-grid textarea {
    resize: vertical;
}

.kim-ep-quote-edit-notes label {
    grid-column: span 1;
}

.kim-ep-quote-edit-items {
    margin: 16px 0;
    padding-top: 16px;
    border-top: 1px solid #dbe4f0;
}

.kim-ep-quote-edit-title {
    margin-bottom: 10px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
}

.kim-ep-quote-edit-items .kim-ep-quote-remove-line {
    width: auto;
    padding: 0 8px;
    font-size: 11px;
}

.kim-ep-quote-edit-items .kim-ep-discount-label input {
    width: 100px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 7px 8px;
    text-align: right;
}

.kim-ep-quote-suggestion {
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f7;
    color: #1e293b;
}

.kim-ep-quote-suggestion:last-child {
    border-bottom: 0;
}

.kim-ep-quote-suggestion:hover,
.kim-ep-quote-suggestion:focus {
    outline: 0;
    background: #eef2ff;
}

.kim-ep-quote-suggestion strong {
    font-size: 13px;
    font-weight: 700;
}

.kim-ep-quote-suggestion span {
    color: #667085;
    font-size: 12px;
    font-weight: 400;
}

.kim-ep-cell-total output {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 35px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
    padding: 6px 8px;
    font-size: 13px;
    font-weight: 700;
}

.kim-ep-quote-remove-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: 1px solid #fee2e2;
    border-radius: 6px;
    background: #fff;
    color: #ef4444;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.kim-ep-quote-remove-line:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #dc2626;
    transform: scale(1.05);
}

.kim-ep-trash-icon {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Action Bar: Add Item & Compact Discount */
.kim-ep-quote-actions-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.kim-ep-quote-add-line {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: #eef2ff;
    color: #4338ca;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    transition: all 0.2s ease;
}

.kim-ep-quote-add-line:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
    color: #3730a3;
    transform: translateY(-1px);
}

.kim-ep-add-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kim-ep-quote-discount-wrapper {
    margin: 0;
}

.kim-ep-discount-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.kim-ep-discount-input-box input {
    width: 110px;
    height: 35px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    padding: 6px 10px;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-align: right;
    transition: all 0.2s ease;
}

.kim-ep-discount-input-box input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
    outline: none;
}

/* Calculation Summary Chips */
.kim-ep-quote-live-totals {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.kim-ep-total-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    padding: 7px 12px;
    font-size: 12px;
}

.kim-ep-total-label {
    font-weight: 500;
}

.kim-ep-total-chip strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.kim-ep-quote-live-totals .kim-ep-quote-grand-total {
    border-color: #4338ca !important;
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
    color: #e0e7ff !important;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.kim-ep-quote-live-totals .kim-ep-quote-grand-total .kim-ep-total-label {
    color: #c7d2fe;
}

.kim-ep-quote-live-totals .kim-ep-quote-grand-total strong {
    color: #ffffff !important;
    font-size: 14px;
}

.kim-ep-modern-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 12px;
    font: inherit;
    font-size: 13px;
    color: #0f172a;
    background: #f8fafc;
    resize: vertical;
    transition: all 0.2s ease;
}

.kim-ep-modern-textarea:focus {
    background: #fff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    outline: none;
}

.kim-ep-quote-submit-bar {
    margin-top: 20px;
}

.kim-ep-btn-save-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 20px;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
}

.kim-ep-btn-save-quote:hover {
    background: linear-gradient(135deg, #4338ca, #3730a3);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.kim-ep-btn-icon {
    width: 17px;
    height: 17px;
    stroke: #ffffff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
    gap: 14px;
    margin-top: 14px;
    color: #667085;
    font-size: 13px;
}

.kim-ep-quote-meta span {
    display: inline-flex;
    gap: 4px;
}

.kim-ep-quote-items-table-wrap {
    overflow-x: auto;
}

.kim-ep-quote-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.kim-ep-quote-email-form {
    margin: 0;
}

.kim-ep-quote-share-actions .kim-ep-quote-email-form button.kim-ep-quote-action {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 0;
    border: 1px solid #4f46e5 !important;
    border-radius: 7px;
    background: #4f46e5 !important;
    box-shadow: none;
    color: #fff !important;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    padding: 8px 12px;
    text-decoration: none;
}

.kim-ep-quote-share-actions .kim-ep-quote-email-form button.kim-ep-quote-action:hover,
.kim-ep-quote-share-actions .kim-ep-quote-email-form button.kim-ep-quote-action:focus {
    background: #4338ca !important;
    color: #fff !important;
}

.kim-ep-quote-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    border: 1px solid #4f46e5;
    border-radius: 7px;
    background: #4f46e5;
    color: #fff;
    cursor: pointer;
    padding: 8px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.kim-ep-quote-action:hover,
.kim-ep-quote-action:focus {
    background: #4338ca;
    color: #fff;
}

.kim-ep-quote-action-secondary {
    border-color: #cbd5e1;
    background: #fff;
    color: #334155;
}

.kim-ep-quote-action-secondary:hover,
.kim-ep-quote-action-secondary:focus {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #0f172a;
}

.kim-ep-quote-action-whatsapp {
    border-color: #16a34a;
    background: #16a34a;
}

.kim-ep-quote-action-whatsapp:hover,
.kim-ep-quote-action-whatsapp:focus {
    background: #15803d;
}

.kim-ep-quote-action svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.kim-ep-quote-items-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.kim-ep-quote-items-table th,
.kim-ep-quote-items-table td {
    border-bottom: 1px solid #eef2f7;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.kim-ep-quote-items-table th {
    color: #667085;
    font-size: 12px;
    text-transform: uppercase;
}

.kim-ep-quote-items-table td span {
    display: block;
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
}

.kim-ep-quote-totals {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.kim-ep-quote-totals span,
.kim-ep-quote-totals strong {
    border: 1px solid #e4e7ec;
    border-radius: 999px;
    background: #fff;
    padding: 7px 11px;
    font-size: 13px;
}

@media (max-width: 1700px) {

    .kim-ep-quote-line {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kim-ep-quote-line label:nth-child(1),
    .kim-ep-quote-line label:nth-child(2) {
        grid-column: span 3;
    }

    .kim-ep-quote-line-total-label {
        grid-column: span 2;
    }
}

.kim-ep-update label {
    display: block;
    color: #344054;
    font-weight: 800;
    margin: 12px 0 6px;
    font-size: 13px;
}

.kim-ep-update label:first-of-type {
    margin-top: 0;
}

.kim-ep-update select,
.kim-ep-update input[type="text"],
.kim-ep-update input[type="file"],
.kim-ep-update input[type="datetime-local"],
.kim-ep-update textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #101828;
    padding: 10px 12px;
    font: inherit;
}

.kim-ep-update textarea {
    resize: vertical;
}

.kim-ep-update button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    float: none;
    clear: both;
    width: auto;
    min-width: 0;
    max-width: 100%;
    margin-top: 14px;
    margin-left: 0;
    margin-right: 0;
    border: 0;
    background: var(--kim-ep-accent);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
}

.kim-ep-success {
    padding: 12px 16px;
    background: #e8f6ec;
    border: 1px solid #b8dfc2;
    border-radius: 5px;
    margin-bottom: 20px;
}

.kim-ep-login {
    max-width: 420px;
    margin: 80px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.kim-ep-login h2 {
    margin-top: 0;
    color: var(--kim-ep-accent);
}

.kim-ep-login input[type="text"],
.kim-ep-login input[type="password"] {
    width: 100%;
    box-sizing: border-box;
}

.kim-ep-login input[type="submit"] {
    background: var(--kim-ep-accent);
    color: #fff;
    border: 0;
    padding: 10px 20px;
    cursor: pointer;
}

.kim-ep-calendar-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.kim-ep-calendar-controls select {
    min-height: 42px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px 12px;
}

.kim-ep-calendar-controls button {
    min-height: 42px;
    border: 0;
    border-radius: 5px;
    background: var(--kim-ep-accent);
    color: #fff !important;
    cursor: pointer;
    padding: 0 20px;
}

.kim-ep-calendar-summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.kim-ep-calendar-summary strong {
    color: var(--kim-ep-accent);
    font-size: 34px;
    line-height: 1;
}

.kim-ep-calendar-summary span {
    color: #666;
}

.kim-ep-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
}

.kim-ep-calendar-weekday,
.kim-ep-calendar-day {
    min-width: 0;
    border-right: 1px solid #ededed;
    border-bottom: 1px solid #ededed;
}

.kim-ep-calendar-weekday:nth-child(7n),
.kim-ep-calendar-day:nth-child(7n) {
    border-right: 0;
}

.kim-ep-calendar-weekday {
    background: #f7f7f7;
    color: #555;
    font-size: 13px;
    font-weight: 700;
    padding: 12px;
    text-align: center;
}

.kim-ep-calendar-day {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 120px;
    padding: 12px;
}

.kim-ep-calendar-empty {
    background: #fafafa;
}

.kim-ep-calendar-date {
    color: #555;
    font-size: 13px;
    font-weight: 700;
}

.kim-ep-calendar-day strong {
    color: #777;
    font-size: 28px;
    line-height: 1;
}

.kim-ep-calendar-day span:last-child {
    color: #777;
    font-size: 13px;
}

.kim-ep-calendar-day.has-leads {
    background: color-mix(in srgb, var(--kim-ep-accent) 8%, #fff);
}

.kim-ep-calendar-day.has-leads strong {
    color: var(--kim-ep-accent);
}

.kim-ep-report-section {
    margin-top: 26px;
}

.kim-ep-report-section h2 {
    font-size: 20px;
    margin: 0 0 12px;
}

.kim-ep-report-table {
    min-width: 620px;
}

.kim-ep-report-table th:nth-child(1),
.kim-ep-report-table td:nth-child(1) {
    width: auto;
}

.kim-ep-report-table th,
.kim-ep-report-table td {
    width: auto;
}

@media (max-width: 900px) {

    .kim-ep-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .kim-ep-quote-line-header {
        display: none;
    }

    .kim-ep-mobile-lbl {
        display: block;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        color: #64748b;
        margin-bottom: 3px;
    }

    .kim-ep-quote-line {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .kim-ep-cell-item,
    .kim-ep-cell-desc {
        grid-column: span 2;
    }

    .kim-ep-cell-total {
        grid-column: span 1;
    }

    .kim-ep-cell-action {
        grid-column: span 1;
        justify-self: end;
    }
}

@media (max-width: 600px) {

    .kim-ep {
        padding: 12px;
        margin-top: 20px;
    }

    .kim-ep-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .kim-ep-header-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .kim-ep-filters {
        flex-direction: column;
    }

    .kim-ep-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .kim-ep-modal {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 12px;
    }

    .kim-ep-modal .kim-ep-update,
    .kim-ep-modal-inner {
        padding: 0 14px 16px;
    }

    .kim-ep-modal-header {
        margin: 0 -14px 16px;
        padding: 14px;
    }

    .kim-ep-modal-header strong {
        font-size: 18px;
    }

    .kim-ep-info-grid,
    .kim-ep-manual-grid,
    .kim-ep-ai-details-grid,
    .kim-ep-quote-client-grid,
    .kim-ep-quote-edit-grid {
        grid-template-columns: 1fr;
    }

    .kim-ep-chat-message {
        max-width: 92%;
    }

    .kim-ep-quote-line {
        grid-template-columns: 1fr;
    }

    .kim-ep-cell-item,
    .kim-ep-cell-desc,
    .kim-ep-cell-total,
    .kim-ep-cell-action {
        grid-column: auto;
    }

    .kim-ep-quote-remove-line {
        justify-self: start;
    }

    .kim-ep-quote-live-totals {
        justify-content: flex-start;
    }

    .kim-ep-quote-actions-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .kim-ep-calendar {
        overflow-x: auto;
        grid-template-columns: repeat(7, minmax(92px, 1fr));
    }

    .kim-ep-calendar-day {
        min-height: 96px;
    }
}


/* Sticky Actions Column for Enquiries Table */
.kim-ep-enquiries-table th:last-child,
.kim-ep-enquiries-table td:last-child {
    position: sticky !important;
    right: 0;
    z-index: 2;
    background-color: #fff !important;
    border-left: 1px solid #ededed !important;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.03) !important;
}

.kim-ep-enquiries-table th:last-child {
    background-color: #f8fafc !important;
    z-index: 3;
}
