﻿* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #eee;
    height: 100vh;
    overflow: hidden;
}

/* ===== LOGIN ===== */
.login-container {
    max-width: 380px;
    margin: 15vh auto;
    padding: 40px;
    background: #16213e;
    border-radius: 12px;
    border: 1px solid #0f3460;
    text-align: center;
}

.login-container h1 {
    color: #e94560;
    font-size: 28px;
    margin-bottom: 4px;
}

.login-container .subtitle {
    color: #888;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    background: #0f3460;
    border: 1px solid #1a4a8a;
    border-radius: 6px;
    color: #eee;
    font-size: 15px;
    outline: none;
    transition: border 0.2s;
}

.form-group input:focus {
    border-color: #e94560;
}

.mfa-message {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 20px;
}

.message {
    margin-top: 16px;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
}

.message.error { background: #5c1a1a; color: #ff8a8a; }
.message.success { background: #1a4a2a; color: #8aff8a; }
.message.info { background: #1a3a5c; color: #8ac8ff; }

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: #e94560; color: white; }
.btn-success { background: #2ecc71; color: white; }
.btn-danger { background: #c0392b; color: white; }
.btn-query { background: #3498db; color: white; }

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* ===== ADMIN LAYOUT ===== */
.admin-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left h1 {
    color: #e94560;
    font-size: 20px;
}

.header-right {
    display: flex;
    gap: 8px;
}

/* Kebab (⋮) button — hidden on desktop, shown on narrow screens */
.kebab-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: #0f3460;
    color: #eee;
    border: 1px solid #1a4a8a;
    border-radius: 6px;
    font-size: 22px;
    line-height: 1;
    padding: 2px 12px;
    cursor: pointer;
}
.kebab-btn:hover { opacity: 0.85; }

/* ===== MOBILE HEADER: collapse actions into the ⋮ menu ===== */
@media (max-width: 768px) {
    .admin-header {
        position: relative;
        gap: 8px;
    }
    .header-left {
        flex: 1;
        min-width: 0;
        gap: 8px;
    }
    /* Give the tables dropdown room; hide the app title on phones */
    .header-left h1 { display: none; }
    #tableSelect {
        flex: 1;
        min-width: 0;
    }
    .kebab-btn { display: inline-flex; }

    /* The action cluster becomes a vertical dropdown under the ⋮ */
    .header-right {
        display: none;
        position: absolute;
        top: 100%;
        right: 8px;
        margin-top: 6px;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        background: #16213e;
        border: 1px solid #0f3460;
        border-radius: 8px;
        padding: 8px;
        min-width: 190px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
        z-index: 1000;
    }
    .admin-header.menu-open .header-right { display: flex; }
    .header-right .btn {
        width: 100%;
        text-align: left;
    }
}

#tableSelect {
    padding: 6px 12px;
    background: #0f3460;
    border: 1px solid #1a4a8a;
    border-radius: 6px;
    color: #eee;
    font-size: 13px;
    min-width: 200px;
    outline: none;
}

#tableSelect:focus { border-color: #e94560; }

.row-count {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
}

/* ===== CONTEXT BAR (breadcrumb + related dropdown) ===== */
.context-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    background: #12192e;
    border-bottom: 1px solid #0f3460;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    flex-wrap: wrap;
}

.crumb {
    color: #3498db;
    cursor: pointer;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s;
}

.crumb:hover {
    background: rgba(52, 152, 219, 0.15);
}

.crumb.current {
    color: #eee;
    cursor: default;
}

.crumb.current:hover {
    background: none;
}

.crumb-separator {
    color: #555;
    font-size: 12px;
    margin: 0 2px;
}

.crumb-detail {
    color: #888;
    font-size: 12px;
    margin-left: 4px;
}

.context-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.related-select {
    padding: 5px 10px;
    background: #0f3460;
    border: 1px solid #1a4a8a;
    border-radius: 6px;
    color: #eee;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.related-select:focus { border-color: #e94560; }

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: #12192e;
    border-bottom: 1px solid #0f3460;
    flex-wrap: wrap;
}

.filter-bar select {
    padding: 5px 10px;
    background: #0f3460;
    border: 1px solid #1a4a8a;
    border-radius: 6px;
    color: #eee;
    font-size: 12px;
    outline: none;
    width: 100px;
}

.filter-bar select:focus {
    border-color: #e94560;
}

.filter-bar select.filter-active {
    border-color: #e94560;
    background: #1a2a4e;
}

.filter-count {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
}

/* ===== SEARCH BAR ===== */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: #12192e;
    border-bottom: 1px solid #0f3460;
}

.search-bar input {
    flex: 1;
    max-width: 400px;
    padding: 7px 12px;
    background: #0f3460;
    border: 1px solid #1a4a8a;
    border-radius: 6px;
    color: #eee;
    font-size: 13px;
    outline: none;
}

.search-bar input:focus {
    border-color: #e94560;
}

.search-count {
    color: #888;
    font-size: 12px;
}

/* ===== QUERY PANEL ===== */
.query-panel {
    padding: 12px 20px;
    background: #12192e;
    border-bottom: 1px solid #0f3460;
}

#queryInput {
    width: 100%;
    padding: 10px;
    background: #0a0f1e;
    border: 1px solid #1a4a8a;
    border-radius: 6px;
    color: #8aff8a;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
    outline: none;
}

#queryInput:focus { border-color: #e94560; }

.query-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 20px;
    background: #12192e;
    border-bottom: 1px solid #0f3460;
    font-size: 12px;
    color: #888;
}

/* ===== DATA GRID ===== */
.grid-container {
    flex: 1;
    overflow: auto;
    min-height: 0;
}

#dataGrid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#dataGrid thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #0f3460;
    color: #ddd;
    padding: 8px 12px;
    text-align: left;
    border: 1px solid #1a4a8a;
    white-space: nowrap;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

#dataGrid thead th:hover {
    background: #1a4a8a;
}

#dataGrid thead th.pk { color: #e94560; }
#dataGrid thead th.identity { color: #f39c12; }

#dataGrid tbody tr {
    cursor: pointer;
    transition: background 0.1s;
}

#dataGrid tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

#dataGrid tbody tr:hover {
    background: rgba(233, 69, 96, 0.15);
}

#dataGrid tbody tr.selected {
    background: rgba(233, 69, 96, 0.25);
}

#dataGrid tbody td {
    padding: 6px 12px;
    border: 1px solid #1e2a45;
    white-space: nowrap;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ccc;
}

#dataGrid tbody td.null-value { color: #555; font-style: italic; }
#dataGrid tbody td.pk-cell { color: #e94560; font-weight: 600; }
#dataGrid tbody td.number-cell { text-align: right; color: #8aff8a; }
#dataGrid tbody td.bool-cell { text-align: center; }

/* ===== STATUS BAR ===== */
.status-bar {
    padding: 6px 20px;
    background: #16213e;
    border-top: 1px solid #0f3460;
    font-size: 12px;
    color: #888;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show { display: flex; }

.modal-content {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    width: 550px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #0f3460;
}

.modal-header h3 { color: #e94560; font-size: 16px; }

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
}

.modal-close:hover { color: #e94560; }

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-body .field-group { margin-bottom: 14px; }

.modal-body .field-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.modal-body .field-label .field-type { color: #555; font-size: 10px; }

.modal-body .field-label .pk-badge {
    background: #e94560; color: white;
    padding: 1px 6px; border-radius: 3px;
    font-size: 9px; font-weight: 700;
}

.modal-body .field-label .identity-badge {
    background: #f39c12; color: white;
    padding: 1px 6px; border-radius: 3px;
    font-size: 9px; font-weight: 700;
}

.modal-body input,
.modal-body textarea,
.modal-body select {
    width: 100%;
    padding: 8px 10px;
    background: #0f3460;
    border: 1px solid #1a4a8a;
    border-radius: 4px;
    color: #eee;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.modal-body input:focus,
.modal-body textarea:focus { border-color: #e94560; }

.modal-body input:disabled,
.modal-body textarea:disabled { opacity: 0.5; cursor: not-allowed; }

.modal-footer {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #0f3460;
}

.modal-footer .btn-danger { margin-left: auto; }

/* ── Update Note Editor ── */
.note-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.note-editor-header-left,
.note-editor-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-editor-layout {
    display: flex;
    height: calc(100vh - 140px);
    overflow: hidden;
}

.note-editor-form {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    max-width: 580px;
    border-right: 1px solid #ddd;
    background: #fff;
}

.note-editor-preview {
    flex: 1.2;
    padding: 16px;
    overflow-y: auto;
    background: #f4f6f8;
}

.note-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
    margin-bottom: 8px;
}

.note-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.note-form-group {
    flex: 1;
    margin-bottom: 12px;
}

    .note-form-group label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 4px;
        color: #333;
    }

    .note-form-group input,
    .note-form-group select {
        width: 100%;
        padding: 7px 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 13px;
    }

        .note-form-group input:focus {
            outline: none;
            border-color: #23456a;
            box-shadow: 0 0 0 2px rgba(35, 69, 106, 0.1);
        }

.note-target-chips {
    display: flex;
    gap: 8px;
    color: #999;
}


.note-chip {
    padding: 5px 14px;
    border: 1.5px solid #999;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    color: #333;
    background: #fff;
}

    .note-chip:hover {
        border-color: #23456a;
    }

    .note-chip.selected {
        background: #23456a;
        color: white;
        border-color: #23456a;
    }

.note-add-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* Content Blocks */
.note-block {
    background: #f8f9fa;
    border: 1.5px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.15s;
}

    .note-block:hover {
        border-color: #23456a;
    }

.note-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.note-block-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.note-block-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 3px;
    color: white;
}

.note-badge-heading {
    background: #23456a;
}

.note-badge-paragraph {
    background: #6b7c8d;
}

.note-badge-bullets {
    background: #17a2b8;
}

.note-badge-numbered {
    background: #e8913a;
}

.note-badge-note {
    background: #f0ad4e;
    color: #333;
}

.note-badge-divider {
    background: #ccc;
    color: #333;
}

.note-block-header-right {
    display: flex;
    align-items: center;
    gap: 2px;
}

.note-block-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 5px;
    font-size: 13px;
    color: #888;
    border-radius: 3px;
}

    .note-block-btn:hover {
        background: #eee;
        color: #333;
    }

    .note-block-btn.delete:hover {
        background: #fde8e8;
        color: #dc3545;
    }

.note-block-body {
    padding: 8px 10px;
}

    .note-block-body textarea {
        width: 100%;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        padding: 6px 8px;
        font-family: inherit;
        font-size: 13px;
        resize: vertical;
        min-height: 50px;
        line-height: 1.5;
    }

        .note-block-body textarea:focus {
            outline: none;
            border-color: #23456a;
        }

    .note-block-body .hint {
        font-size: 11px;
        color: #aaa;
        margin-top: 3px;
    }

/* Bullet/Numbered items */
.note-bullet-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.note-bullet-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .note-bullet-item .marker {
        flex-shrink: 0;
        width: 20px;
        text-align: center;
        font-size: 13px;
        font-weight: 700;
        color: #888;
    }

    .note-bullet-item input {
        flex: 1;
        padding: 4px 8px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        font-size: 13px;
    }

        .note-bullet-item input:focus {
            outline: none;
            border-color: #23456a;
        }

    .note-bullet-item .note-remove-item {
        background: none;
        border: none;
        cursor: pointer;
        color: #ccc;
        font-size: 14px;
        padding: 2px;
    }

        .note-bullet-item .note-remove-item:hover {
            color: #dc3545;
        }

.note-add-item-btn {
    background: none;
    border: 1px dashed #ccc;
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
    color: #999;
    font-size: 12px;
    margin-top: 4px;
    width: 100%;
    text-align: center;
}

    .note-add-item-btn:hover {
        border-color: #23456a;
        color: #23456a;
        background: #f0f4f8;
    }

/* Preview */
.note-preview-frame {
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    max-width: 650px;
    margin: 0 auto;
    overflow: hidden;
}

.note-preview-banner {
    background: linear-gradient(135deg, #23456a 0%, #2d5a8a 100%);
    color: white;
    padding: 24px 28px;
}

    .note-preview-banner h2 {
        font-size: 22px;
        font-weight: 600;
        margin: 0 0 4px 0;
    }

.note-preview-meta {
    font-size: 13px;
    opacity: 0.8;
}

.note-preview-content {
    padding: 24px 28px;
    font-size: 14px;
    line-height: 1.7;
    color: #2c3e50;
}

    .note-preview-content h3 {
        font-size: 16px;
        font-weight: 700;
        color: #23456a;
        margin: 18px 0 6px 0;
        padding-bottom: 3px;
        border-bottom: 2px solid #eee;
    }

        .note-preview-content h3:first-child {
            margin-top: 0;
        }

    .note-preview-content p {
        margin: 8px 0;
    }

    .note-preview-content ul, .note-preview-content ol {
        margin: 8px 0;
        padding-left: 22px;
    }

    .note-preview-content li {
        margin: 5px 0;
        color: #2c3e50;
    }

    .note-preview-content .note-box {
        background: #fff8e1;
        border-left: 4px solid #e8913a;
        padding: 10px 14px;
        border-radius: 0 4px 4px 0;
        margin: 12px 0;
        font-size: 13px;
    }

        .note-preview-content .note-box strong {
            color: #e8913a;
        }

    .note-preview-content hr {
        border: none;
        border-top: 1px solid #eee;
        margin: 16px 0;
    }

/* ===== NOTES MANAGER ===== */
/* Grid cell: notes stack one per line, so the row grows to fit them. The nowrap and
   ellipsis on the generic td rule are both undone here on purpose. */
#dataGrid tbody td.notes-cell {
    cursor: pointer;
    white-space: normal;
    text-overflow: clip;
    overflow: visible;
    /* min-width is what actually holds the column open -- with the cell wrapping,
       auto-layout will otherwise squeeze this column to feed the rest of the row. */
    min-width: 360px;
    width: 360px;
    max-width: 360px;
    line-height: 1.6;
    vertical-align: top;
}

    #dataGrid tbody td.notes-cell:hover {
        background: rgba(233, 69, 96, 0.3);
    }

    #dataGrid tbody td.notes-cell .note-add {
        color: #555;
        font-style: italic;
    }

/* The editor itself is deliberately light -- it's the same form as Crab's, so it
   should look and behave the same rather than match the dark admin chrome. */
#notesModal .notes-modal {
    background: white;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 20px;
    width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

    .notes-header strong {
        font-size: 16px;
        color: #222;
    }

.notes-clear-btn {
    padding: 5px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

    .notes-clear-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.notes-sub {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

#notesInputLabel {
    margin-top: 12px;
}

.notes-list {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    min-height: 100px;
    max-height: 40vh;
    overflow-y: auto;
    font-size: 13px;
}

    .notes-list .notes-empty {
        color: #999;
        font-style: italic;
    }

.note-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

    .note-item:last-child {
        margin-bottom: 0;
    }

    .note-item.editing {
        border-color: #28a745;
    }

    .note-item .note-text {
        flex: 1;
        white-space: pre-wrap;
        word-break: break-word;
        cursor: pointer;
        color: #333;
    }

    .note-item .note-del {
        flex-shrink: 0;
        margin-left: 10px;
        padding: 2px 8px;
        background: #dc3545;
        color: white;
        border: none;
        border-radius: 3px;
        cursor: pointer;
        font-size: 11px;
    }

#notesInput {
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 80px;
    resize: vertical;
    font-size: 13px;
    font-family: inherit;
}

.notes-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.notes-btn {
    padding: 10px 30px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.notes-btn-close {
    background: #6c757d;
}

.notes-btn-cancel {
    background: white;
    color: #6c757d;
    border: 1px solid #ced4da;
    display: none;
}

.notes-btn-save {
    background: #28a745;
    display: none;
}

@media (max-width: 768px) {
    .note-item .note-del {
        padding: 8px 12px;
        font-size: 14px;
    }
    /* 16px stops iOS Safari zooming the page when the textarea takes focus. */
    #notesInput {
        font-size: 16px;
    }
    /* ===== COLUMN WIDTHS ===== */
    /* Same pattern as .notes-cell above. These three keep nowrap and ellipsis from the
   generic td rule, so max-width truncates with "..." instead of growing the row. */
    #dataGrid tbody td[data-column="CompanyID"] {
        min-width: 20px;
        width: 20px;
        max-width: 20px;
    }

    #dataGrid tbody td[data-column="ShopName"] {
        min-width: 160px;
        width: 160px;
        max-width: 160px;
    }

    #dataGrid tbody td[data-column="Contact"] {
        min-width: 120px;
        width: 140px;
        max-width: 160px;
    }
}

/* ===== PROCESSES MENU ===== */
#processSelect { cursor: pointer; }
#processSelect option { background: #16213e; color: #eee; }

/* ===== COPY REPORTS MODAL ===== */
.cr-modal { width: min(480px, calc(100vw - 32px)); }

.cr-endpoints {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.cr-endpoint {
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 10px 12px 12px;
    min-width: 0;
}

.cr-endpoint legend {
    color: #e94560;
    font-size: 12px;
    font-weight: 700;
    padding: 0 6px;
}

.cr-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 8px;
    font-size: 13px;
    color: #ccc;
}

.cr-radios label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }

/* .modal-body input is width:100% -- undo that for the radios and checkboxes here */
#copyModal input[type="radio"],
#copyModal input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0;
    accent-color: #e94560;
}

.cr-section-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.cr-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    font-size: 14px;
    color: #eee;
    cursor: pointer;
}

.cr-check-all {
    font-weight: 700;
    border-bottom: 1px solid #0f3460;
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.cr-column-list {
    display: flex;
    flex-direction: column;
}

.cr-push-right { margin-left: auto; }

/* Confirm step */
.cr-sum-intro { margin: 0 0 12px; color: #ccc; font-size: 14px; }

.cr-sum-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #0f3460;
    font-size: 14px;
    color: #eee;
}

.cr-sum-label { color: #888; font-size: 12px; text-transform: uppercase; padding-top: 2px; }
.cr-sum-detail { color: #999; font-size: 12px; margin-top: 2px; }

.cr-sum-cols { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.cr-sum-chip {
    background: #0f3460;
    border: 1px solid #1a4a8a;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12px;
}

.cr-sum-warn { margin: 14px 0 0; color: #f39c12; font-size: 13px; }

@media (max-width: 768px) {
    .cr-endpoints { grid-template-columns: 1fr; }
    /* 16px stops iOS Safari zooming when the ID box takes focus */
    #crFromId, #crToId { font-size: 16px; }
    .header-right #processSelect { width: 100%; text-align: left; }
}

/* Copy Reports: the 5 "Columns to update" boxes sit on one wrapping line */
.cr-field-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #0f3460;
}

/* Copy ShopPrefCrab: where the letter titles came from */
.cr-note {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin: -2px 0 6px;
}
