.crm-table {
    min-width: 860px;
    border-spacing: 0 8px;
    background: transparent;
}

.crm-table.crm-table-business {
    width: 100%;
    table-layout: fixed;
}

@media (min-width: 901px) {
    .crm-table.crm-table-business {
        border-spacing: 0 12px;
        background: transparent;
    }

    .crm-table.crm-table-business thead th {
        position: static;
        padding: 11px 14px;
        border-top: 1px solid var(--color-divider);
        border-bottom: 1px solid var(--color-divider);
        background: var(--color-panel-raised);
        color: var(--color-text-subtle);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.01em;
    }

    .crm-table.crm-table-business thead th:first-child {
        border-left: 1px solid var(--color-divider);
        border-radius: 14px 0 0 14px;
        text-align: left;
    }

    .crm-table.crm-table-business thead th:last-child {
        border-right: 1px solid var(--color-divider);
        border-radius: 0 14px 14px 0;
    }

    .crm-table.crm-table-business thead .sales-sort-btn {
        justify-content: center;
        width: 100%;
    }

    .crm-table.crm-table-business thead th:first-child .sales-sort-btn {
        justify-content: flex-start;
    }

    .crm-table.crm-table-business tbody td {
        padding: 17px 14px;
        border-top: 1px solid var(--color-divider);
        border-bottom: 1px solid var(--color-divider);
        background: var(--color-card-bg);
        transition: background-color 0.16s ease, border-color 0.16s ease;
    }

    .crm-table.crm-table-business tbody td:first-child {
        border-left: 1px solid var(--color-divider);
        border-radius: 16px 0 0 16px;
    }

    .crm-table.crm-table-business tbody td:last-child {
        border-right: 1px solid var(--color-divider);
        border-radius: 0 16px 16px 0;
    }

    .crm-table.crm-table-business tbody tr:hover td {
        border-color: var(--color-divider-strong);
        background: var(--color-panel-hover);
    }

    .crm-table.crm-table-business .crm-name-cell {
        position: relative;
        padding-left: 46px;
    }

    .crm-table.crm-table-business .crm-name-cell::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 22px;
        width: 10px;
        height: 10px;
        border-radius: 4px;
        background: var(--color-accent);
        box-shadow: 0 0 0 5px var(--color-accent-muted);
        transform: translateY(-50%);
    }

    .crm-table.crm-table-business .crm-name-link {
        font-size: 15px;
        letter-spacing: -0.015em;
    }

    .crm-table.crm-table-business tbody td:nth-child(4),
    .crm-table.crm-table-business tbody td:nth-child(7),
    .crm-table.crm-table-business tbody td:nth-child(8),
    .crm-table.crm-table-business tbody td:nth-child(9) {
        color: var(--color-text-subtle);
        font-size: 13px;
        font-weight: 600;
    }
}

.crm-list-title-row {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 46px;
    overflow: visible;
}

.crm-section-header {
    align-items: center;
    z-index: 12;
}

.crm-business-filter-group {
    display: inline-flex;
    align-items: center;
    position: relative;
    z-index: 24;
}

.crm-status-toggle-group {
    gap: 8px;
}

.crm-status-toggle-btn {
    min-width: 84px;
}

.crm-status-toggle-btn.active {
    border-color: rgba(37, 99, 235, 0.22);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.08));
    color: #1d4ed8;
}

.crm-status-toggle-sales.active {
    border-color: rgba(37, 99, 235, 0.26);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(125, 211, 252, 0.12));
    color: #1d4ed8;
}

.crm-status-toggle-progress.active {
    border-color: rgba(124, 58, 237, 0.28);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(124, 58, 237, 0.1));
    color: #7c3aed;
}

.crm-status-toggle-done.active {
    border-color: rgba(5, 150, 105, 0.28);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.1));
    color: #047857;
}

.crm-status-toggle-hold.active {
    border-color: rgba(100, 116, 139, 0.28);
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.2), rgba(100, 116, 139, 0.1));
    color: #475569;
}

.crm-work-filter-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 0 14px;
    border-top: 1px solid var(--color-divider);
}

.crm-work-filter-group {
    display: inline-grid;
    gap: 7px;
    min-width: 0;
}

.crm-work-filter-group > span {
    color: var(--color-text-subtle);
    font-size: 11px;
    font-weight: 900;
}

.crm-work-filter-group > div {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.crm-work-filter-chip,
.crm-work-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--color-divider);
    border-radius: 8px;
    background: var(--color-card-bg);
    color: var(--color-text-subtle);
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.crm-work-filter-chip span {
    min-width: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.crm-work-filter-chip.active {
    border-color: #6366f1;
    background: #6366f1;
    color: #fff;
}

.crm-work-option-chip.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.crm-work-filter-chip:not(.active):hover,
.crm-work-filter-reset:not(:disabled):hover {
    border-color: var(--color-divider-strong);
    color: var(--color-body-text);
    transform: translateY(-1px);
}

.crm-work-filter-reset {
    align-self: flex-end;
    color: var(--color-body-text);
}

.crm-work-filter-reset:disabled {
    cursor: default;
    opacity: 0.45;
}

.crm-filter-search-field {
    gap: 8px;
}

.crm-filter-select {
    width: 78px;
    min-width: 78px;
    height: 100%;
    border: 0;
    border-right: 1px solid var(--color-divider);
    background: transparent;
    color: var(--color-control-text);
    font-size: 13px;
    font-weight: 800;
    outline: none;
}

.crm-table thead th {
    font-size: 14px;
    padding: 16px 14px;
}

.crm-table tbody td {
    font-size: 14px;
    line-height: 1.55;
    background: var(--color-panel-raised);
    color: var(--color-body-text);
}

.crm-table tbody tr:hover td {
    background: var(--color-panel-hover);
}

.crm-view-toolbar {
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    min-height: 46px;
}

.crm-business-create-btn {
    min-height: 46px;
    white-space: nowrap;
}

.crm-journal-action-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.crm-name-cell {
    font-weight: 800;
    text-align: left;
    width: 238px;
    max-width: 238px;
    padding-left: 72px;
    padding-right: 12px;
    color: var(--color-body-text);
}

.crm-name-link {
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    box-shadow: none;
    outline: none;
    transform: none !important;
    transition: color 0.15s ease;
    color: var(--color-body-text);
    font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
    text-decoration: none;
    text-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-name-link:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.crm-table.crm-table-business .crm-col-name {
    width: 238px;
}

.crm-table.crm-table-work {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 13px;
}

.crm-table.crm-table-work th,
.crm-table.crm-table-work td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--color-divider, #eef2f7);
    background: transparent;
    vertical-align: middle;
}

.crm-table.crm-table-work th {
    background: var(--color-panel-raised, #f8fafc);
    color: var(--color-text-subtle, #4b5563);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.crm-table.crm-table-work tr:hover td {
    background: var(--color-panel-hover, #f9fafb);
}

.crm-table.crm-table-work .crm-work-col-name { width: 320px; }
.crm-table.crm-table-work .crm-work-col-dealStage { width: 160px; }
.crm-table.crm-table-work .crm-work-col-contact { width: 112px; }
.crm-table.crm-table-work .crm-work-col-contactInfo { width: 180px; }
.crm-table.crm-table-work .crm-work-col-latestContactDate { width: 142px; }
.crm-table.crm-table-work .crm-work-col-actions { width: 180px; }

.crm-work-business-cell {
    text-align: left;
}

.crm-work-business-identity {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-width: 0;
}

.crm-work-business-copy {
    min-width: 0;
}

.crm-work-avatar-stack {
    position: relative;
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
}

.crm-work-avatar,
.crm-work-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex: 0 0 auto;
}

.crm-work-avatar-stack .crm-work-avatar,
.crm-work-avatar-stack .crm-work-avatar-fallback {
    grid-area: 1 / 1;
}

.crm-work-avatar.is-default-company {
    background: var(--color-panel-raised);
}

.crm-work-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-divider);
    background: var(--color-panel-raised);
    color: var(--color-heading);
    font-size: 12px;
    font-weight: 900;
}

.crm-work-contact-avatar {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid var(--color-panel, #ffffff);
    background: var(--color-panel-raised);
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.crm-work-signal-cell,
.crm-work-activity-cell {
    text-align: center;
}

.crm-work-signal-cell strong {
    display: block;
    color: var(--color-heading);
    font-size: 16px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.crm-work-signal-cell span,
.crm-work-activity-cell span,
.crm-work-business-meta {
    display: block;
    margin-top: 3px;
    color: var(--color-text-subtle);
    font-size: 11px;
    font-weight: 800;
}

.crm-work-name-link {
    display: block;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-body-text);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.crm-work-name-link:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.crm-work-track-cell,
.crm-work-reason-cell,
.crm-work-next-cell,
.crm-work-action-cell {
    text-align: center;
}

.crm-work-track-badge,
.crm-work-signal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    margin: 2px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.crm-work-track-badge.is-strategy,
.crm-work-signal-badge.is-strategy {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.crm-work-track-badge.is-hubspot,
.crm-work-signal-badge.is-hubspot {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
}

.crm-work-track-badge.is-operation,
.crm-work-signal-badge.is-operation {
    background: rgba(5, 150, 105, 0.1);
    color: #047857;
}

.crm-work-track-badge.is-basic,
.crm-work-signal-badge.is-neutral {
    background: rgba(148, 163, 184, 0.14);
    color: #64748b;
}

.crm-work-signal-badge.is-warning {
    background: rgba(217, 119, 6, 0.11);
    color: #92400e;
}

.crm-work-signal-badge.is-focus {
    background: rgba(14, 116, 144, 0.1);
    color: #0e7490;
}

.crm-work-signal-badge.is-contract {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.crm-work-signal-badge.is-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.crm-work-signal-badge.is-muted {
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
}

.crm-work-signal-list {
    display: flex;
    justify-content: flex-start;
    gap: 2px;
    flex-wrap: wrap;
}

.crm-work-deal-cell,
.crm-work-contact-cell,
.crm-work-contact-info-cell,
.crm-work-activity-cell,
.crm-work-action-cell {
    text-align: center;
}

.crm-work-deal-stage,
.crm-work-deal-empty {
    display: grid;
    gap: 3px;
    justify-items: center;
    min-width: 0;
}

.crm-work-deal-stage strong,
.crm-work-deal-empty strong,
.crm-work-contact-cell strong,
.crm-work-activity-cell strong {
    max-width: 100%;
    color: var(--color-heading);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-work-deal-stage span,
.crm-work-deal-empty span,
.crm-work-contact-cell span,
.crm-work-contact-info-cell span,
.crm-work-contact-info-cell a,
.crm-work-activity-cell span,
.crm-work-activity-cell small {
    max-width: 100%;
    color: var(--color-text-subtle);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.crm-work-contact-info-cell a {
    color: var(--color-link);
    text-decoration: none;
}

.crm-work-contact-info-cell a:hover {
    text-decoration: underline;
}

.crm-work-contact-cell strong,
.crm-work-contact-cell span,
.crm-work-contact-info-cell a,
.crm-work-contact-info-cell span,
.crm-work-activity-cell strong,
.crm-work-activity-cell span,
.crm-work-activity-cell small {
    display: block;
}

.crm-work-contact-cell strong,
.crm-work-activity-cell strong {
    margin-bottom: 3px;
}

.crm-work-contact-info-cell a + span,
.crm-work-activity-cell span,
.crm-work-activity-cell small {
    margin-top: 3px;
}

.crm-work-reason-cell p {
    max-width: 270px;
    margin: 6px auto 0;
    color: var(--color-text-subtle);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.crm-work-next-cell {
    color: var(--color-body-text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.crm-work-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.crm-work-actions button,
.crm-work-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 5px;
    border: 1px solid var(--color-divider);
    border-radius: 7px;
    background: var(--color-card-bg);
    color: var(--color-body-text);
    cursor: pointer;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.crm-work-actions button:hover,
.crm-work-actions a:hover {
    border-color: var(--color-divider-strong);
    background: var(--color-panel-raised);
}

.crm-work-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.38);
}

.crm-work-modal-box {
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    border: 1px solid var(--color-divider);
    border-radius: 8px;
    background: var(--color-card-bg);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.crm-work-activity-box {
    width: min(860px, 100%);
}

.crm-work-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--color-divider);
}

.crm-work-modal-head h3 {
    margin: 0;
    color: var(--color-heading);
    font-size: 18px;
    font-weight: 900;
}

.crm-work-modal-head p {
    margin: 5px 0 0;
    color: var(--color-text-subtle);
    font-size: 13px;
    font-weight: 700;
}

.crm-work-modal-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-divider);
    border-radius: 8px;
    background: var(--color-card-bg);
    color: var(--color-heading);
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.crm-work-link-list,
.crm-work-activity-list,
.crm-work-stage-form {
    display: grid;
    gap: 10px;
    padding: 18px 20px 20px;
}

.crm-work-link-list button {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--color-divider);
    border-radius: 8px;
    background: var(--color-panel-raised);
    color: var(--color-body-text);
    cursor: pointer;
    text-align: left;
}

.crm-work-link-list button:hover {
    border-color: var(--color-divider-strong);
    background: var(--color-panel-hover);
}

.crm-work-link-list strong {
    color: var(--color-heading);
    font-size: 14px;
    font-weight: 900;
}

.crm-work-link-list span {
    color: var(--color-text-subtle);
    font-size: 12px;
    font-weight: 700;
}

.crm-work-activity-item {
    display: grid;
    gap: 8px;
    padding: 13px 14px;
    border: 1px solid var(--color-divider);
    border-radius: 8px;
    background: var(--color-panel-raised);
}

.crm-work-activity-item div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.crm-work-activity-item strong {
    color: var(--color-heading);
    font-size: 13px;
    font-weight: 900;
}

.crm-work-activity-item span {
    color: var(--color-text-subtle);
    font-size: 12px;
    font-weight: 800;
}

.crm-work-activity-item p {
    margin: 0;
    color: var(--color-body-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.crm-work-activity-drawer .crm-work-activity-item {
    padding: 13px 0;
    border: 0;
    border-bottom: 1px solid var(--color-divider, #eef2f7);
    border-radius: 0;
    background: transparent;
}

.crm-work-activity-drawer .crm-work-activity-item div {
    justify-content: initial;
}

.crm-work-activity-drawer .ib-activity-item-head {
    justify-content: space-between;
}

.crm-work-activity-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.crm-work-activity-number {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border: 1px solid var(--color-divider, #e5e7eb);
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.crm-work-modal-empty,
.crm-work-modal-error {
    padding: 16px;
    border: 1px solid var(--color-divider);
    border-radius: 8px;
    background: var(--color-panel-raised);
    color: var(--color-text-subtle);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.crm-work-modal-error {
    margin: 14px 20px 0;
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(254, 242, 242, 0.88);
    color: #b91c1c;
}

.crm-work-stage-form label {
    display: grid;
    gap: 6px;
}

.crm-work-stage-form label span {
    color: var(--color-text-subtle);
    font-size: 12px;
    font-weight: 900;
}

.crm-work-stage-form select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--color-divider);
    border-radius: 8px;
    background: var(--color-card-bg);
    color: var(--color-body-text);
    font-size: 13px;
    font-weight: 800;
}

.crm-work-stage-route {
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--color-panel-raised);
    color: var(--color-heading);
    font-size: 13px;
    font-weight: 900;
}

.crm-work-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.crm-memo-cell {
    max-width: 520px;
    white-space: normal;
    text-align: left;
    line-height: 1.45;
}

.crm-memo-cell.center-cell {
    text-align: center;
}

.crm-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.crm-progress-cell {
    min-width: 148px;
}

.crm-progress-meter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.crm-progress-bar-track {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 84px;
    height: 14px;
    padding: 3px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(226, 232, 240, 0.72) 0%, rgba(241, 245, 249, 0.92) 100%);
    border: 1px solid rgba(191, 219, 254, 0.85);
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.95),
        0 8px 16px rgba(148, 163, 184, 0.08);
    overflow: hidden;
}

.crm-progress-bar-fill {
    display: block;
    width: 0;
    height: 100%;
    min-width: 8px;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            hsl(calc(210 - (var(--progress-rate) * 0.35)) 92% 76%) 0%,
            hsl(calc(224 - (var(--progress-rate) * 0.6)) 82% 56%) 48%,
            hsl(calc(197 - (var(--progress-rate) * 0.42)) 76% 46%) 100%
        );
    box-shadow:
        0 0 16px hsla(calc(214 - (var(--progress-rate) * 0.38)) 88% 58% / 0.28),
        inset 0 1px 0 rgba(255,255,255,0.42);
    transition: width 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.crm-progress-value {
    min-width: 42px;
    text-align: left;
    font-size: 13px;
    font-weight: 800;
    color: #2563eb;
    letter-spacing: -0.01em;
}

.crm-priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.crm-priority-badge-high {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.92), rgba(51, 65, 85, 0.86));
    color: #f8fafc;
}

.crm-priority-badge-medium {
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.96), rgba(203, 213, 225, 0.94));
    color: #334155;
}

.crm-priority-badge-low {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.96));
    color: #64748b;
    border: 1px solid rgba(226, 232, 240, 0.96);
}

.crm-status-sales {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(37, 99, 235, 0.1));
    color: #1d4ed8;
}

.crm-status-hold {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.24), rgba(100, 116, 139, 0.12));
    color: #475569;
}

.crm-status-progress {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(124, 58, 237, 0.1));
    color: #7c3aed;
}

.crm-status-done {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.1));
    color: #047857;
}

.crm-journal-row td {
    vertical-align: top;
    padding: 16px;
    background: rgba(255, 255, 255, 0.78);
    border-top: 1px solid rgba(226, 232, 240, 0.82);
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.crm-journal-row td:first-child {
    border-left: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 18px 0 0 18px;
}

.crm-journal-row td:last-child {
    border-right: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 0 18px 18px 0;
}

.crm-journal-row:hover td {
    background: rgba(248, 250, 252, 0.96);
}

.crm-journal-business-cell {
    text-align: center;
    width: 240px;
    min-width: 210px;
    border-right: 1px solid rgba(226, 232, 240, 0.9);
    vertical-align: middle !important;
}

.crm-journal-business-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    white-space: normal;
    text-align: center;
    line-height: 1.5;
    color: var(--color-text-primary);
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.crm-journal-business-link:hover {
    color: #7c3aed;
    text-decoration: underline;
}

.crm-journal-memo-cell {
    min-width: 420px;
    text-align: left;
    white-space: normal;
}

.crm-journal-memo-block {
    display: block;
    width: 100%;
    min-height: 28px;
    color: var(--color-text-primary);
    font-size: 14px;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.crm-journal-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.crm-journal-title-row .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    min-width: 44px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.crm-journal-title-row .crm-type-call {
    border-color: rgba(20, 184, 166, 0.38);
    background: #ccfbf1;
    color: #0f766e;
}

.crm-journal-title-row .crm-type-meeting {
    border-color: rgba(99, 102, 241, 0.36);
    background: #e0e7ff;
    color: #4338ca;
}

.crm-journal-title-row .crm-type-note {
    border-color: rgba(71, 85, 105, 0.26);
    background: #e2e8f0;
    color: #1e293b;
}

.crm-journal-title-row .crm-type-email {
    border-color: rgba(14, 165, 233, 0.32);
    background: #e0f2fe;
    color: #0369a1;
}

.crm-journal-title-row .crm-type-visit {
    border-color: rgba(245, 158, 11, 0.38);
    background: #fef3c7;
    color: #92400e;
}

.crm-journal-title-row .crm-type-task {
    border-color: rgba(168, 85, 247, 0.34);
    background: #f3e8ff;
    color: #7e22ce;
}

.crm-search-highlight {
    display: inline;
    padding: 0 3px;
    border-radius: 4px;
    background: #fef08a;
    color: #713f12;
    font-weight: 900;
}

.crm-journal-pagination {
    justify-content: flex-end;
    margin-top: 14px;
}

.crm-journal-pagination:empty {
    display: none;
}

.crm-journal-date-cell {
    width: 132px;
    min-width: 120px;
    text-align: center;
    vertical-align: middle !important;
}

.crm-journal-edit-cell {
    width: 96px;
    min-width: 96px;
    text-align: center;
    vertical-align: middle !important;
}

.crm-journal-action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.crm-journal-action-buttons .crm-journal-action-btn {
    width: 64px;
    min-height: 30px;
    padding: 0 8px;
}

.crm-journal-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--color-info-bg);
    color: var(--color-info-text);
    font-size: 13px;
    font-weight: 800;
}

.crm-journal-action-btn {
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 10px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    box-shadow: none;
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.crm-journal-edit-link,
.crm-history-edit {
    color: var(--color-text-secondary);
}

.crm-journal-edit-link:hover,
.crm-history-edit:hover {
    color: var(--color-info-text);
    border-color: var(--color-info-bg);
    background: var(--color-info-bg);
}

.crm-journal-delete-link,
.crm-history-delete {
    color: var(--color-danger-text);
}

.crm-journal-delete-link:hover,
.crm-history-delete:hover {
    color: var(--color-danger-text);
    border-color: var(--color-danger-border);
    background: var(--color-danger-bg);
}

/* 다크 모드: 상담유형 뱃지 오버라이드 */
:root:not([data-theme="light"]) .crm-journal-title-row .status-badge {
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    border-color: var(--color-border-strong);
}
:root:not([data-theme="light"]) .crm-journal-title-row .crm-type-call {
    background: rgba(20, 184, 166, 0.15);
    color: #5eead4;
    border-color: rgba(20, 184, 166, 0.3);
}
:root:not([data-theme="light"]) .crm-journal-title-row .crm-type-meeting {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}
:root:not([data-theme="light"]) .crm-journal-title-row .crm-type-note {
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    border-color: var(--color-border-strong);
}
:root:not([data-theme="light"]) .crm-journal-title-row .crm-type-email {
    background: rgba(14, 165, 233, 0.15);
    color: #7dd3fc;
    border-color: rgba(14, 165, 233, 0.3);
}
:root:not([data-theme="light"]) .crm-journal-title-row .crm-type-visit {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}
:root:not([data-theme="light"]) .crm-journal-title-row .crm-type-task {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    border-color: rgba(168, 85, 247, 0.3);
}
:root:not([data-theme="light"]) .crm-auto-badge {
    background: rgba(22, 163, 74, 0.15);
    color: var(--color-success-text);
    border-color: rgba(22, 163, 74, 0.3);
}

.crm-modal-content {
    width: min(1380px, 96vw);
    max-height: 94vh;
    overflow-y: auto;
    background: var(--color-panel);
    border-color: var(--color-divider);
    color: var(--color-body-text);
    border-radius: 28px;
    padding: 30px;
    box-shadow: var(--shadow-panel);
}

.integrated-business-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: -4px 0 16px;
    padding: 14px 16px;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.82);
}

.integrated-business-summary strong,
.subscription-linked-business-panel strong {
    display: block;
    color: var(--color-heading);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
}

.integrated-business-summary small,
.integrated-business-kicker,
.subscription-linked-business-panel span {
    display: block;
    color: var(--color-text-subtle);
    font-size: 12px;
    font-weight: 800;
}

.integrated-business-picker {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 16px;
    background: rgba(239, 246, 255, 0.78);
}

.integrated-business-picker.hidden {
    display: none;
}

.integrated-business-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-divider);
}

.integrated-business-tab {
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid var(--color-divider);
    border-radius: 999px;
    background: var(--color-panel-raised);
    color: var(--color-text-subtle);
    font-size: 13px;
    font-weight: 900;
    box-shadow: none;
}

.integrated-business-tab.active {
    border-color: rgba(37, 99, 235, 0.28);
    background: rgba(219, 234, 254, 0.78);
    color: #1d4ed8;
}

.integrated-business-tab.hidden {
    display: none;
}

.integrated-business-tab-panel {
    display: none;
}

.integrated-business-tab-panel.active {
    display: block;
}

.subscription-linked-business-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 18px;
    background: var(--color-panel-raised);
}

.subscription-linked-business-panel p {
    margin-top: 4px;
}

.subscription-memo-panel {
    margin-bottom: 16px;
}

#integratedSubscriptionPanel .allocation-section {
    margin-top: 0;
}

#integratedSubscriptionPanel .modal-actions {
    position: sticky;
    bottom: -30px;
    z-index: 2;
    padding-top: 14px;
}

.crm-modal-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
    gap: 18px;
    align-items: stretch;
}

.crm-modal-left-stack {
    display: grid;
    grid-template-rows: auto auto;
    gap: 18px;
    align-content: start;
    margin-top: 4px;
}

.crm-info-panel {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 20px 22px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.96), rgba(248, 250, 252, 0.9) 48%, rgba(241, 245, 249, 0.88) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.88),
        0 16px 28px rgba(15, 23, 42, 0.06);
}

.crm-info-panel h4 {
    margin-bottom: 14px;
}

.crm-info-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    align-content: start;
}

.crm-info-field {
    display: grid;
    gap: 8px;
}

.crm-info-field label {
    font-size: 13px;
    font-weight: 800;
    color: #475569;
}

.crm-info-field input,
.crm-info-field select {
    min-height: 52px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        0 10px 20px rgba(148, 163, 184, 0.08);
    padding: 0 16px;
}

.crm-info-subsection {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(226, 232, 240, 0.92);
}

.crm-info-subsection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.crm-info-subsection-header h5 {
    margin: 0;
    font-size: 15px;
    color: #1e293b;
}

.crm-info-subsection-header span {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
}

.crm-status-section {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(226, 232, 240, 0.92);
}

.crm-status-label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.crm-status-button-group {
    display: contents;
}

.crm-status-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.crm-status-btn {
    min-width: 0;
    width: 100%;
    border-radius: 999px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: none;
    font-size: 14px;
    font-weight: 700;
}

.crm-status-btn.active {
    border-color: rgba(124, 58, 237, 0.18);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(59, 130, 246, 0.1));
    color: #6d28d9;
}

.crm-subscription-open-btn {
    min-width: 0;
    width: 100%;
    min-height: 0;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    align-self: auto;
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: none;
}

.crm-priority-section {
    margin-top: 14px;
}

.crm-priority-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.crm-priority-btn {
    min-width: 0;
    width: 100%;
    border-radius: 999px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: none;
    font-size: 14px;
    font-weight: 700;
}

.crm-priority-high.active {
    border-color: rgba(71, 85, 105, 0.34);
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.96), rgba(51, 65, 85, 0.9));
    color: #f8fafc;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.16),
        0 10px 18px rgba(51, 65, 85, 0.14);
}

.crm-priority-medium.active {
    border-color: rgba(148, 163, 184, 0.32);
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.98), rgba(203, 213, 225, 0.94));
    color: #334155;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.62),
        0 10px 18px rgba(148, 163, 184, 0.12);
}

.crm-priority-low.active {
    border-color: rgba(203, 213, 225, 0.3);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.96));
    color: #64748b;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.8),
        0 10px 18px rgba(226, 232, 240, 0.12);
}

.crm-sales-status-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(203, 213, 225, 0.82);
    background:
        radial-gradient(circle at top left, rgba(219, 234, 254, 0.42), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.92) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        0 12px 24px rgba(148, 163, 184, 0.08);
}

.crm-sales-status-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.crm-sales-status-card-header h5 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
}

.crm-sales-status-card-header span {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
}

.crm-sales-status-card .crm-status-section {
    margin-top: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(226, 232, 240, 0.88);
}

.crm-sales-status-card-header + .crm-status-section {
    padding-top: 0;
    border-top: 0;
}

.crm-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.crm-history-header h4 {
    flex: 0 0 auto;
    margin: 0;
}

.crm-history-toolbar {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1 1 420px;
    min-width: 0;
    max-width: 100%;
}

.crm-contract-panel {
    height: 100%;
    margin-top: 4px;
    padding: 18px 22px;
    border: 1px solid rgba(191, 219, 254, 0.88);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(239, 246, 255, 0.92) 0%, rgba(248, 250, 252, 0.92) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.9),
        0 12px 30px rgba(37, 99, 235, 0.08);
}

.crm-contract-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.crm-contract-header h4 {
    font-size: 17px;
    line-height: 1.2;
    white-space: nowrap;
}

.crm-contract-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
}

.crm-contract-bulk-btn {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(147, 197, 253, 0.88);
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(239, 246, 255, 0.96) 100%);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        0 8px 14px rgba(59, 130, 246, 0.08);
}

.crm-contract-bulk-btn:hover {
    border-color: rgba(96, 165, 250, 0.96);
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(219, 234, 254, 0.92) 100%);
    color: #1e40af;
}

.crm-contract-progress-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.crm-contract-progress-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(147, 197, 253, 0.92);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.crm-contract-progress-rate {
    min-width: 64px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(59, 130, 246, 0.84));
    border-color: rgba(37, 99, 235, 0.82);
    color: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.22),
        0 10px 18px rgba(37, 99, 235, 0.2);
}

.crm-contract-process-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.crm-contract-memo-section {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(191, 219, 254, 0.72);
}

.crm-contract-memo-label {
    font-size: 13px;
    font-weight: 800;
    color: #475569;
}

.crm-contract-memo-section textarea {
    width: 100%;
    min-height: 148px;
    resize: vertical;
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.92);
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.94),
        0 12px 20px rgba(148, 163, 184, 0.08);
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #1e293b;
}

.crm-modal-middle-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
}

.crm-business-todo-panel,
.crm-recent-mail-panel {
    padding: 20px 22px;
    border: 1px solid rgba(191, 219, 254, 0.82);
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(125, 211, 252, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        0 14px 28px rgba(148, 163, 184, 0.08);
}

.crm-business-todo-panel {
    border-color: rgba(186, 230, 253, 0.9);
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(240, 249, 255, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.crm-business-todo-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.crm-business-todo-header h4 {
    margin-bottom: 6px;
}

.crm-business-todo-pagination {
    gap: 6px;
    flex-shrink: 0;
}

.crm-business-todo-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.crm-business-todo-pagination:empty {
    display: none;
}

.crm-business-todo-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.crm-business-todo-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 62px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(186, 230, 253, 0.94);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.96),
        0 10px 20px rgba(14, 165, 233, 0.07);
    cursor: pointer;
    transition: box-shadow 0.15s ease, background 0.15s ease;
}

.crm-business-todo-item:hover {
    background: rgba(240, 249, 255, 0.98);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.96),
        0 12px 24px rgba(14, 165, 233, 0.13);
}

.crm-business-todo-item.is-done {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(226, 232, 240, 0.94);
}

.crm-business-todo-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
}

.crm-business-todo-checkbox {
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    place-content: center;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border: 2px solid #7dd3fc;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.crm-business-todo-checkbox::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    background: #ffffff;
    clip-path: polygon(14% 44%, 0 62%, 38% 100%, 100% 16%, 82% 0, 35% 66%);
    transition: transform 0.12s ease;
}

.crm-business-todo-checkbox:checked {
    border-color: #0ea5e9;
    background: #0ea5e9;
}

.crm-business-todo-checkbox:checked::before {
    transform: scale(1);
}

.crm-business-todo-checkbox:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.5);
}

.crm-business-todo-status-dot {
    width: 10px;
    height: 10px;
    margin-top: 7px;
    border-radius: 999px;
    background: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.crm-business-todo-item.is-done .crm-business-todo-status-dot {
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

.crm-business-todo-title {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.45;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.crm-business-todo-item.is-done .crm-business-todo-title {
    color: #64748b;
    text-decoration: line-through;
}

.crm-business-todo-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.crm-business-todo-badges {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.crm-business-todo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: rgba(248, 250, 252, 0.96);
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.crm-business-todo-badge.is-high {
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(255, 251, 235, 0.96);
    color: #b45309;
}

.crm-business-todo-badge.is-medium {
    border-color: rgba(147, 197, 253, 0.75);
    background: rgba(239, 246, 255, 0.96);
    color: #1d4ed8;
}

.crm-business-todo-badge.is-low {
    border-color: rgba(203, 213, 225, 0.9);
    background: rgba(248, 250, 252, 0.96);
    color: #64748b;
}

.crm-business-todo-badge.is-status {
    border-color: rgba(186, 230, 253, 0.9);
    background: rgba(240, 249, 255, 0.96);
    color: #0369a1;
}

.crm-business-todo-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(100, 116, 139, 0.42);
    font-size: 21px;
    font-weight: 900;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.crm-business-todo-delete-btn:hover {
    background: rgba(254, 242, 242, 0.94);
    color: #dc2626;
    transform: scale(1.04);
}

.crm-business-todo-empty {
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px dashed rgba(125, 211, 252, 0.95);
    background: rgba(255, 255, 255, 0.88);
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

.crm-business-todo-empty strong {
    color: #0369a1;
}

.crm-recent-mail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.crm-recent-mail-header h4 {
    margin-bottom: 6px;
}

.crm-recent-mail-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.crm-recent-mail-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.crm-recent-mail-empty {
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px dashed rgba(191, 219, 254, 0.9);
    background: rgba(255, 255, 255, 0.88);
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

.crm-recent-mail-item {
    display: grid;
    gap: 8px;
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.96),
        0 10px 20px rgba(148, 163, 184, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    overflow: hidden;
}

.crm-recent-mail-item:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.96);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.96),
        0 14px 24px rgba(59, 130, 246, 0.12);
}

.crm-recent-mail-item.is-expanded {
    border-color: rgba(96, 165, 250, 0.96);
}

.crm-recent-mail-trigger {
    display: grid;
    gap: 8px;
    width: 100%;
    padding: 16px 18px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    box-shadow: none;
}

.crm-recent-mail-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.crm-recent-mail-direction-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: -0.01em;
    white-space: nowrap;
    border: 1px solid rgba(191, 219, 254, 0.96);
}

.crm-recent-mail-direction-badge.is-received {
    background: rgba(239, 246, 255, 0.98);
    color: #1d4ed8;
}

.crm-recent-mail-direction-badge.is-sent {
    background: rgba(237, 233, 254, 0.96);
    color: #7c3aed;
    border-color: rgba(196, 181, 253, 0.9);
}

.crm-recent-mail-subject {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.5;
    color: #0f172a;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.crm-recent-mail-meta {
    font-size: 13px;
    color: #64748b;
}

.crm-recent-mail-meta-label {
    font-weight: 800;
    color: #475569;
}

.crm-recent-mail-detail {
    display: grid;
    gap: 12px;
    padding: 0 18px 18px;
    border-top: 1px solid rgba(219, 234, 254, 0.92);
}

.crm-recent-mail-detail-meta {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

.crm-recent-mail-detail-meta strong {
    color: #0f172a;
    margin-right: 6px;
}

.crm-recent-mail-detail-body,
.crm-recent-mail-detail-empty {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.92);
    color: #1e293b;
    font-size: 14px;
    line-height: 1.75;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.crm-recent-mail-detail-empty {
    color: #64748b;
}

.crm-recent-mail-detail-actions {
    display: flex;
    justify-content: flex-end;
}

.crm-outlook-auth-box {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.92);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.82) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.crm-outlook-auth-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.crm-outlook-auth-code-label {
    font-size: 12px;
    font-weight: 800;
    color: #475569;
}

.crm-recent-mail-actions #crmOutlookAuthBtn {
    min-width: 96px;
}

.crm-recent-mail-pagination {
    gap: 6px;
}

.crm-recent-mail-pagination:empty {
    display: none;
}

.crm-outlook-auth-code-row strong {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(147, 197, 253, 0.96);
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.crm-outlook-auth-copy-btn,
.crm-outlook-auth-code-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.92);
    background: rgba(255, 255, 255, 0.96);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.crm-outlook-auth-copy-btn:hover,
.crm-outlook-auth-code-row a:hover {
    border-color: rgba(96, 165, 250, 0.96);
    background: rgba(239, 246, 255, 0.96);
}

.crm-outlook-auth-message {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

.crm-contract-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    padding: 7px 10px;
    border-radius: 14px;
    border: 1px solid rgba(191, 219, 254, 0.98);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247, 250, 255, 0.94) 100%);
    color: #334155;
    text-align: left;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.96),
        0 8px 18px rgba(148, 163, 184, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.crm-contract-step:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.96);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.95),
        0 12px 22px rgba(59, 130, 246, 0.12);
}

.crm-contract-step.active {
    border-color: rgba(37, 99, 235, 0.92);
    background:
        linear-gradient(145deg, rgba(37, 99, 235, 0.96), rgba(56, 189, 248, 0.88));
    color: #eff6ff;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.24),
        0 18px 30px rgba(37, 99, 235, 0.24);
}

.crm-contract-step-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 30px;
    padding: 0 7px;
    border-radius: 11px;
    background: rgba(219, 234, 254, 0.96);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.crm-contract-step.active .crm-contract-step-order {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.crm-contract-step-label {
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.28;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.crm-history-panel {
    margin-top: 20px;
    padding: 20px 22px;
    border: 1px solid rgba(203, 213, 225, 0.7);
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.78);
    min-height: 320px;
}

.crm-history-list {
    display: grid;
    gap: 14px;
    margin-top: 12px;
    color: #64748b;
    font-size: 15px;
    align-content: start;
}

.crm-history-item {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 18px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(219, 234, 254, 0.96);
    color: #0f172a;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        0 12px 24px rgba(148, 163, 184, 0.08);
}

.crm-history-item strong {
    color: #2563eb;
    font-size: 15px;
    line-height: 1.7;
}

.crm-history-meta-column {
    display: grid;
    gap: 8px;
    align-content: start;
    min-width: 0;
}

.crm-history-main {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.crm-history-subject {
    color: var(--color-heading);
    font-size: 15px;
}

.crm-history-item-memo {
    white-space: pre-wrap;
    word-break: keep-all;
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.8;
}

.crm-history-call-auto {
    border-color: rgba(20, 184, 166, 0.28);
    background: #f8fffd;
}

.crm-history-item-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.crm-auto-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid rgba(16, 185, 129, 0.32);
    color: #047857;
    font-size: 12px;
    font-weight: 800;
}

.crm-history-date,
.crm-history-duration {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.crm-call-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.crm-call-toggle-btn,
.crm-rawtext-toggle {
    justify-self: start;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.crm-call-summary-body {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(153, 246, 228, 0.7);
    background: rgba(240, 253, 250, 0.72);
}

.crm-rawtext-body {
    max-height: 280px;
    overflow: auto;
    white-space: pre-wrap;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    line-height: 1.7;
}

.crm-history-action-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.crm-history-add-btn {
    min-height: 42px;
    padding-inline: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #8fa1bb 0%, #6e7f98 100%);
    color: #ffffff;
    border-color: rgba(125, 143, 170, 0.9);
    box-shadow: 0 14px 24px rgba(100, 116, 139, 0.22);
}

.crm-history-add-btn:hover {
    background: linear-gradient(180deg, #7f92af 0%, #64748b 100%);
    color: #ffffff;
}

.crm-rawtext-modal-content {
    width: min(860px, 94vw);
    max-height: 86vh;
    overflow-y: auto;
}

.crm-rawtext-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.crm-rawtext-modal-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.crm-rawtext-modal-body {
    max-height: 62vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: keep-all;
    overflow-wrap: anywhere;
    padding: 14px;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    line-height: 1.75;
}

.crm-unmatched-empty {
    padding: 18px;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-weight: 700;
}

.crm-child-modal {
    z-index: 10050;
}

.crm-contact-modal-content {
    width: min(1120px, 96vw);
    background: var(--color-panel);
    border-color: var(--color-divider);
    color: var(--color-body-text);
    box-shadow: var(--shadow-panel);
}

.crm-contact-modal-content textarea,
.crm-contact-modal-content input,
#crmJournalCreateMemo,
#crmJournalCreateDate {
    font-family: "Malgun Gothic", "맑은 고딕", "Segoe UI", sans-serif;
}

.crm-contact-modal-content textarea,
#crmJournalCreateMemo {
    font-size: 16px;
    line-height: 1.8;
    min-height: 320px;
}

.crm-modal-actions {
    justify-content: space-between;
    align-items: center;
}

.crm-modal-action-group {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.crm-hubspot-link-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.crm-hubspot-deal-select {
    font-size: 12px;
    max-width: 220px;
}

.crm-hubspot-deal-id-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    margin-top: 4px;
}

.crm-hubspot-deal-id-row label {
    font-size: 12px;
    color: var(--text-muted, #6b7280);
    white-space: nowrap;
    min-width: 90px;
}

.crm-hubspot-deal-id-input-group {
    display: flex;
    gap: 4px;
    flex: 1;
}

.crm-hubspot-deal-id-input-group input {
    flex: 1;
    font-size: 12px;
    min-width: 0;
}

.crm-hubspot-deal-id-clear-btn {
    padding: 2px 8px;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.crm-hubspot-link-btn {
    text-decoration: none;
}

.crm-hubspot-link-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.crm-hubspot-link-btn:not(.is-disabled) {
    background: #ff7a59;
    border-color: #ff7a59;
    color: #ffffff;
}

.crm-hubspot-link-btn:not(.is-disabled):hover {
    background: #f25f3a;
    border-color: #f25f3a;
    color: #ffffff;
}

.crm-hubspot-sync-box {
    margin-top: 10px;
    min-height: 0;
    padding: 12px;
    font-size: 13px;
}

.crm-hubspot-sync-box select {
    width: 100%;
    margin-top: 8px;
}

.crm-hubspot-sync-preview {
    display: grid;
    gap: 6px;
}
