/* Uniform drag-and-drop file upload (CSV bulk + document files). */

.crm-upload-page {
    min-height: calc(100dvh - 23rem);
}

.crm-upload-panel .um-editor-panel__body {
    padding-top: 0.95rem;
}

.crm-upload-columns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--admin-accent, #003399) 14%, #dbe4f0);
    background: color-mix(in srgb, var(--admin-accent, #003399) 4%, #fff);
}

.crm-upload-columns__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--admin-text-muted, #5f6f85);
}

.crm-upload-columns__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.crm-upload-columns__chip {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.62rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--admin-accent, #003399) 22%, #dbe4f0);
    background: #fff;
    color: var(--admin-text, #163056);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
}

.crm-upload-panel .crm-upload-help {
    margin: 0 0 1rem;
}

.crm-upload-panel .crm-upload-columns + .crm-upload-help {
    margin-top: -0.35rem;
}

.um-editor-panel.crm-upload-panel .crm-upload-columns {
    margin-bottom: 1rem;
}

.crm-upload-panel .crm-dropzone {
    margin-top: 0;
}

.doc-upload-page .crm-upload-panel {
    margin-bottom: 1rem;
}

.crm-upload-card {
    border: 1px solid var(--admin-border, #dbe4f0);
    border-radius: 14px;
    background: var(--admin-bg-card, #fff);
}

.crm-upload-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 0.6rem;
}

.crm-upload-card__title {
    font-weight: 700;
    letter-spacing: 0.01em;
    margin: 0;
    color: var(--admin-text, #163056);
}

.crm-upload-card__note {
    margin: 0;
    font-size: 0.8rem;
    color: var(--admin-text-muted, #5f6f85);
}

.crm-upload-card__body {
    padding: 0.6rem 1.1rem 1.15rem;
}

.crm-upload-format {
    padding: 0.8rem 0.9rem;
    border-radius: 10px;
    border: 1px dashed #9ab9ef;
    background: #f7fbff;
    color: #1e3a68;
    font-size: 0.88rem;
    line-height: 1.4;
}

.crm-upload-help {
    margin-top: 0.8rem;
    color: #c32638;
    font-weight: 600;
    font-size: 0.89rem;
}

.crm-dropzone-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.crm-dropzone {
    display: block;
    margin-top: 0.9rem;
    border: 2px dashed #b8c8df;
    background: #fbfdff;
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.crm-dropzone:hover,
.crm-dropzone:focus,
.crm-dropzone:focus-visible,
.crm-dropzone.is-active {
    border-color: #2d6cdf;
    background: #f2f7ff;
    outline: none;
}

.crm-dropzone__icon {
    font-size: 1.25rem;
    color: #2d6cdf;
    margin-bottom: 0.35rem;
}

.crm-dropzone__title {
    font-weight: 600;
    color: var(--admin-text, #163056);
    margin-bottom: 0.25rem;
}

.crm-dropzone__hint {
    font-size: 0.84rem;
    color: var(--admin-text-muted, #5f6f85);
    margin: 0;
}

.crm-dropzone-filename {
    margin-top: 0.7rem;
    font-size: 0.84rem;
    color: var(--admin-text-muted, #5f6f85);
    min-height: 1.1rem;
}

.crm-btn-cancel {
    border-radius: 999px;
    border: 1px solid #f1b6bf;
    background: #fff4f6;
    color: #b4233f;
    font-weight: 600;
    padding-inline: 1rem;
}

.crm-btn-cancel:hover {
    background: #ffe9ee;
    color: #961f35;
    border-color: #e69aa8;
}

.crm-csv-preview {
    margin-top: 1rem;
    border: 1px solid var(--admin-border, #dbe4f0);
    border-radius: 10px;
    background: #fff;
    display: none;
}

.crm-csv-preview.is-visible {
    display: block;
}

.crm-csv-preview__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--admin-border, #dbe4f0);
    background: #f8fbff;
    font-size: 0.86rem;
    font-weight: 600;
}

.crm-csv-preview__status {
    font-weight: 600;
    color: #4b5f7f;
}

.crm-csv-preview__status.is-ok { color: #0f7a43; }
.crm-csv-preview__status.is-warn { color: #bf3c2f; }

.crm-csv-preview__body {
    max-height: 320px;
    overflow: auto;
}

.crm-csv-preview__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.crm-csv-preview__table th,
.crm-csv-preview__table td {
    border-bottom: 1px solid #edf2fb;
    border-right: 1px solid #edf2fb;
    padding: 0.45rem 0.55rem;
    white-space: nowrap;
}

.crm-csv-preview__table th:last-child,
.crm-csv-preview__table td:last-child { border-right: 0; }

.crm-csv-preview__table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f7ff;
    font-weight: 700;
}

.um-editor-panel .crm-dropzone {
    margin-top: 0.35rem;
}

.um-editor-panel .crm-upload-format {
    margin-top: 1rem;
}
