/* =========================================
   Control Panel & Modern Settings Redesign
   ========================================= */

/* Root & Variables */
:root {
    --cp-bg: #ffffff;
    --cp-sidebar-bg: #f8f9fa;
    --cp-text: #333333;
    --cp-text-muted: #6c757d;
    --cp-border: #e9ecef;
    --cp-primary: #0d6efd;
    --cp-primary-hover: #0b5ed7;
    --cp-radius: 12px;
    --cp-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
}

body.dark-mode {
    --cp-bg: #1e293b;
    --cp-sidebar-bg: #111827;
    --cp-text: #f8f9fa;
    --cp-text-muted: #94a3b8;
    --cp-border: #374151;
    --cp-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* Modal Overlay Override */
#settings-modal.modal-overlay {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

/* Control Panel Container */
.control-panel-container {
    display: flex;
    width: 90vw;
    max-width: 1000px;
    height: 80vh;
    background: var(--cp-bg);
    border-radius: 20px;
    box-shadow: var(--cp-shadow);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpFade {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Sidebar */
.cp-sidebar {
    width: 260px;
    background: var(--cp-sidebar-bg);
    border-left: 1px solid var(--cp-border);
    /* RTL */
    display: flex;
    flex-direction: column;
    padding: 30px 25px;
}

.cp-header {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cp-primary);
}

.cp-header i {
    font-size: 24px;
}

.cp-header h2 {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 800;
}

.cp-nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    margin-bottom: 12px;
    border-radius: 10px;
    color: var(--cp-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.cp-nav-item i {
    font-size: 1.5rem;
    width: 28px;
    text-align: center;
    background: linear-gradient(135deg, #000000 0%, #2a5697 70%, #00adff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.2s ease;
}

body.dark-mode .cp-nav-item i {
    background: linear-gradient(135deg, #e2e8f0 0%, #60a5fa 70%, #38bdf8 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cp-nav-item:hover {
    background: rgba(13, 110, 253, 0.05);
    color: var(--cp-primary);
}

.cp-nav-item.active {
    background: var(--cp-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.cp-nav-item.active i {
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: #ffffff;
}

/* Content Area */
.cp-content {
    flex: 1;
    padding: 45px;
    padding-bottom: 60px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--cp-bg);
    position: relative;
    min-height: 0;
}

/* Tablet: keep scrolling inside control panel content only */
body.is-apk-tablet.cp-modal-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}
body.is-apk-tablet #control-panel-modal {
    overscroll-behavior: contain;
}
body.is-apk-tablet #control-panel-modal .cp-content {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
body.is-apk-tablet #control-panel-modal .control-panel-container {
    overflow: hidden;
}
body.is-apk-tablet #control-panel-modal .cp-sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}
body.dark-mode .cp-close-btn {
    color: #ffffff !important;
}
body.dark-mode .cp-close-btn:hover {
    color: #e2e8f0 !important;
}

.cp-section {
    display: none;
    animation: fadeIn 0.3s ease;
    padding-bottom: 20px;
}

.cp-section.active {
    display: block !important;
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cp-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 35px;
    color: var(--cp-text);
    text-align: center;
    padding-bottom: 15px;
    position: relative;
}

.cp-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--cp-primary);
    border-radius: 2px;
}

/* Cards & Widgets */
.cp-card {
    background: var(--cp-bg);
    border: 1px solid var(--cp-border);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cp-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.cp-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--cp-text);
    font-size: 0.95rem;
}

.cp-desc {
    font-size: 0.85rem;
    color: var(--cp-text-muted);
    margin-bottom: 15px;
}

/* WhatsApp save button in Control Panel > General */
#cp-general .cp-whatsapp-save-btn {
    margin-top: 10px;
    width: auto;
    min-height: 40px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 800;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    color: #334155;
    background: linear-gradient(145deg, #f1f5f9 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
    transition: all 0.2s ease;
}
#cp-general .cp-whatsapp-save-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(145deg, #e2e8f0 0%, #f8fafc 100%);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}
body.dark-mode #cp-general .cp-whatsapp-save-btn {
    border-color: #475569;
    color: #e2e8f0;
    background: linear-gradient(145deg, #1f2937 0%, #0f172a 100%);
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.45);
}

/* Custom Inputs */
.cp-input,
.cp-select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--cp-border);
    background: var(--cp-bg);
    color: var(--cp-text);
    margin-bottom: 10px;
    transition: 0.2s;
}

.cp-input:focus,
.cp-select:focus {
    border-color: var(--cp-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

/* Live Preview Box */
.live-preview-box {
    border: 2px dashed var(--cp-border);
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.02);
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.live-preview-box img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

/* Table Themes Grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.theme-preview-card {
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.theme-preview-card.active {
    border-color: var(--cp-primary);
    transform: scale(1.05);
}

.theme-preview-img {
    height: 80px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #888;
}

.theme-name {
    padding: 8px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

/* File Upload Fancy */
.cp-file-upload {
    position: relative;
    border: 2px dashed var(--cp-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.cp-file-upload:hover {
    border-color: var(--cp-primary);
    background: rgba(13, 110, 253, 0.02);
}

.cp-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.cp-actions {
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid var(--cp-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.btn-cp-save {
    background: var(--cp-primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-cp-save:hover {
    background: var(--cp-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-cp-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: all 0.2s;
}

.btn-cp-cancel:hover {
    background: #e2e8f0;
}

body.dark-mode .btn-cp-cancel {
    background: #334155;
    color: #f8fafc;
    border-color: #475569;
}

/* Scrollbar */
.cp-content::-webkit-scrollbar {
    width: 6px;
}

.cp-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* ================= TABLE THEMES ================= */
/* Default / Standard */
.table-theme-standard thead tr {
    background: #f8f9fa;
    color: #333;
}

.table-theme-standard tbody tr:hover {
    background: #f1f1f1;
}

/* Modern Blue */
.table-theme-blue {
    border-collapse: separate;
    border-spacing: 0 5px;
}

.table-theme-blue thead tr {
    background: linear-gradient(45deg, #0d6efd, #0a58ca);
    color: white;
    border-radius: 8px;
}

.table-theme-blue th:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.table-theme-blue th:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.table-theme-blue tbody tr {
    background: #eef2ff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.table-theme-blue tbody tr:hover {
    transform: scale(1.01);
    background: #dfe7ff;
}

/* Dark Elegant */
.table-theme-dark thead tr {
    background: #1f2937;
    color: #f9fafb;
}

.table-theme-dark tbody tr:nth-child(even) {
    background: #f3f4f6;
}

.table-theme-dark tbody tr:hover {
    background: #e5e7eb;
    border-left: 4px solid #1f2937;
}

/* Minimalist */
.table-theme-minimal thead tr {
    border-bottom: 2px solid #333;
    background: transparent;
}

.table-theme-minimal th {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-theme-minimal tbody tr {
    border-bottom: 1px solid #eee;
}

.table-theme-minimal tbody tr:hover {
    background: #fafafa;
}


/* ================= PRINT ASSET CARD ================= */
.print-asset-card {
    border: 1px solid var(--cp-border);
    border-radius: 12px;
    padding: 15px;
    background: #fff;
    margin-bottom: 15px;
    transition: 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.print-asset-card:hover {
    border-color: var(--cp-primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.print-asset-label {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--cp-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.print-asset-preview {
    flex: 1;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    overflow: hidden;
    position: relative;
    border: 1px solid #eee;
}

.print-asset-preview img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.print-asset-preview .placeholder-text {
    font-size: 12px;
    color: #999;
    text-align: center;
}

.print-asset-controls {
    display: flex;
    gap: 10px;
}

.btn-upload-asset {
    flex: 1;
    background: var(--cp-primary);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-upload-asset input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.btn-reset-asset {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

body.dark-mode .print-asset-card {
    background: var(--cp-sidebar-bg);
}

/* ================= DARK MODE TABLE OVERRIDES ================= */
body.dark-mode .table-theme-standard thead tr {
    background: #374151;
    color: #f8f9fa;
}

body.dark-mode .table-theme-standard tbody tr {
    background: var(--cp-bg);
    color: #e5e7eb;
}

body.dark-mode .table-theme-standard tbody tr:hover {
    background: #374151;
}

body.dark-mode .table-theme-blue tbody tr {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-mode .table-theme-blue tbody tr:hover {
    background: #1e1b4b;
    /* Darker blue */
}

body.dark-mode .table-theme-dark tbody tr:nth-child(even) {
    background: #374151;
    color: #f3f4f6;
}

body.dark-mode .table-theme-dark tbody tr:nth-child(odd) {
    background: #1f2937;
    color: #f3f4f6;
}

body.dark-mode .table-theme-minimal thead tr {
    border-bottom: 2px solid #555;
    color: #f8f9fa;
}

body.dark-mode .table-theme-minimal tbody tr {
    border-bottom: 1px solid #444;
    color: #e5e7eb;
}

body.dark-mode .table-theme-minimal tbody tr:hover {
    background: #374151;
}

/* Fix Preview Container in Dark Mode */
body.dark-mode #table-preview-container {
    background: #1e293b;
    border-color: #4b5563 !important;
}


/* ================= TABLE HEADER CUSTOM STYLES ================= */
/* Navy Blue */
.th-navy thead tr,
.th-navy thead th {
    background-color: #000080 !important;
    background: #000080 !important;
    color: white !important;
}

/* Black */
.th-black thead tr,
.th-black thead th {
    background-color: #000000 !important;
    background: #000000 !important;
    color: white !important;
}

/* Light Cyan (User requested #add8ff) */
.th-cyan thead tr,
.th-cyan thead th {
    background-color: #add8ff !important;
    background: #add8ff !important;
    color: #000000 !important;
}

/* Grey */
.th-grey thead tr,
.th-grey thead th {
    background-color: #e9ecef !important;
    background: #e9ecef !important;
    color: #000000 !important;
}

/* White */
.th-white thead tr,
.th-white thead th {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #000000 !important;
    border-bottom: 2px solid #dee2e6 !important;
}

/* Purple Dark */
.th-purple-deep thead tr,
.th-purple-deep thead th {
    background-color: #3f0c59 !important;
    background: #3f0c59 !important;
    color: white !important;
}

/* Burgundy */
.th-burgundy thead tr,
.th-burgundy thead th {
    background-color: #63074f !important;
    background: #63074f !important;
    color: white !important;
}

/* Pink Light */
.th-pink-bright thead tr,
.th-pink-bright thead th {
    background-color: #db7fc8 !important;
    background: #db7fc8 !important;
    color: #000 !important;
}

/* Green Dark */
.th-green-forest thead tr,
.th-green-forest thead th {
    background-color: #0d4726 !important;
    background: #0d4726 !important;
    color: white !important;
}

/* Tan/Nude */
.th-tan-nude thead tr,
.th-tan-nude thead th {
    background-color: #e0b590 !important;
    background: #e0b590 !important;
    color: #000 !important;
}


/* Color Swatches for Selection */
.header-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ddd;
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    vertical-align: middle;
}

.header-color-swatch:hover {
    transform: scale(1.1);
}

.header-color-swatch.active {
    border-color: var(--cp-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.3);
}

.header-color-swatch.active::after {
    content: '';
    /* Simple dot or check */
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Dark Mode Overrides for Header Colors */
body.dark-mode .th-navy thead tr {
    background: #000050 !important;
}

body.dark-mode .th-black thead tr {
    background: #000000 !important;
    border-bottom: 1px solid #333;
}

body.dark-mode .th-cyan thead tr {
    background: #1e3a8a !important;
    /* Dark Blue for contrast with light blue intent */
    color: #fff !important;
}

body.dark-mode .th-grey thead tr {
    background: #495057 !important;
    color: #fff !important;
}

body.dark-mode .th-purple-deep thead tr {
    background: #2a083d !important;
}

body.dark-mode .th-burgundy thead tr {
    background: #4a053b !important;
}

body.dark-mode .th-pink-bright thead tr {
    background: #a55a96 !important;
    color: #fff !important;
}

body.dark-mode .th-green-forest thead tr {
    background: #08311a !important;
}

body.dark-mode .th-tan-nude thead tr {
    background: #8e735b !important;
    color: #fff !important;
}

/* Small reset button for icon BG */
.btn-small-reset {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    padding: 0;
    border-radius: 4px;
}


/* ================= ICON MANAGEMENT CARDS ================= */
.icon-mgmt-card {
    background: var(--cp-bg);
    border: 1px solid var(--cp-border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.2s;
}

.icon-mgmt-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--cp-primary);
}

.icon-preview-box {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--cp-primary);
    border: 1px solid #eee;
    overflow: hidden;
    position: relative;
}

.icon-preview-box img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.icon-info {
    flex: 1;
}

.icon-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--cp-text);
    margin-bottom: 2px;
}

.icon-slug {
    font-size: 11px;
    color: var(--cp-text-muted);
}

.icon-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-upload {
    background: #eef2ff;
    color: #4f46e5;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-icon-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.btn-icon-reset {
    background: #fff;
    color: #dc3545;
    border: 1px solid #fee2e2;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

body.dark-mode .icon-mgmt-card {
    background: var(--cp-sidebar-bg);
}

body.dark-mode .icon-preview-box {
    background: #1e293b;
    border-color: #374151;
}

@media (max-width: 768px) {
    .control-panel-container {
        flex-direction: column !important;
        height: 90vh !important;
        width: 95vw !important;
    }

    .cp-sidebar {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding: 10px !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: 1px solid var(--cp-border) !important;
        gap: 10px !important;
    }

    .cp-header {
        display: none !important;
    }

    .cp-nav-item {
        margin-bottom: 0 !important;
        padding: 10px 15px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .cp-actions {
        flex-direction: row !important;
        padding-top: 0 !important;
        border-top: none !important;
        gap: 10px !important;
        flex-shrink: 0 !important;
    }

    .btn-cp-save,
    .btn-cp-cancel {
        width: auto !important;
        white-space: nowrap !important;
        padding: 10px 15px !important;
    }

    .cp-content {
        padding: 15px !important;
        padding-bottom: 80px !important;
    }
}

@media (max-width: 768px) {
    #cp-database .cp-card>div[style*="display:flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
    }

    #cp-database .cp-card>div[style*="display:grid"]:not(.cp-db-groups):not(.cp-db-group-btns) {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ========== قاعدة البيانات الطبية — تصميم مضغوط وواضح لجميع الأجهزة ========== */
#cp-database .cp-card.cp-database-card {
    min-width: 0;
    overflow: hidden;
}

/* الهيدر: عنوان ووصف وأزرار تصدير/استيراد */
#cp-database .cp-database-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
#cp-database .cp-database-header-text {
    flex: 1;
    min-width: 0;
}
#cp-database .cp-database-title {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}
#cp-database .cp-database-desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
    max-width: 56ch;
}
#cp-database .cp-db-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
#cp-database .cp-db-actions .btn-db {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

/* مجموعات القوائم: عناوين وأزرار بحجم مناسب */
#cp-database .cp-db-groups {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#cp-database .cp-db-group {
    width: 100%;
    box-sizing: border-box;
}
#cp-database .cp-db-group-title {
    margin: 0 0 6px 0;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--cp-primary, #1e3aa8);
    display: flex;
    align-items: center;
    gap: 5px;
}
#cp-database .cp-db-group-title i {
    font-size: 12px;
    opacity: 0.9;
}
#cp-database .cp-db-group-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}
#cp-database .cp-db-group-btns .p-tab-btn {
    flex: 0 1 auto;
    min-width: 0;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
#cp-database .cp-db-group-btns .p-tab-btn i {
    font-size: 13px;
    flex-shrink: 0;
}
#cp-database .cp-db-group-btns .p-tab-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e40af;
}
#cp-database .cp-db-group-btns .p-tab-btn.active {
    background: var(--cp-primary, #2563eb);
    border-color: var(--cp-primary, #2563eb);
    color: #fff;
}

/* صندوق المحتوى: نموذج إضافة/تعديل + بحث + قائمة */
#cp-database .db-content-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    min-height: 320px;
    box-sizing: border-box;
}
/* صف الاسم فقط في سطر، ثم صف السعر والأزرار في سطر آخر */
#cp-database .db-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 0;
}
#cp-database .db-form-row-name {
    margin-bottom: 10px;
}
#cp-database .db-form-row-name .db-field-wrap-name {
    flex: 1 1 100%;
    max-width: 100%;
}
#cp-database .db-form-row-name .db-input {
    max-width: 100%;
}
#cp-database .db-form-row-actions {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}
#cp-database .db-search-wrap {
    flex: 1;
    min-width: 140px;
}
#cp-database .db-search-wrap .db-search {
    margin-bottom: 0;
}
#cp-database .db-field-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
#cp-database .db-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    margin: 0;
}
#cp-database .db-input {
    width: 100%;
    min-width: 140px;
    max-width: 200px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
}
#cp-database .db-price-wrap {
    display: none;
}
#cp-database .db-input-price {
    max-width: 100px;
}
#cp-database .db-form-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
#cp-database .db-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    min-width: 70px;
}
#cp-database .db-search {
    margin-bottom: 10px;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    max-width: 100%;
}

/* شريط الحذف الجماعي */
#cp-database .db-bulk-toolbar {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
#cp-database .db-bulk-toolbar[style*="flex"] {
    display: flex !important;
}
#cp-database .db-bulk-label {
    font-size: 12px;
    margin: 0;
}

/* قائمة العناصر: صفوف مضغوطة */
#cp-database .db-list-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 2px 2px 0;
    width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}
#cp-database .db-empty-msg {
    text-align: center;
    padding: 24px 16px;
    font-size: 13px;
    color: #64748b;
}
#cp-database .db-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    min-width: 0;
    transition: border-color 0.15s, background 0.15s;
}
#cp-database .db-item-row:hover {
    border-color: #cbd5e1;
    background: #fafafa;
}
#cp-database .db-item-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
#cp-database .db-row-cb {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}
#cp-database .db-item-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    border-radius: 5px;
    flex-shrink: 0;
}
#cp-database .db-item-info {
    flex: 1;
    min-width: 0;
}
#cp-database .db-item-val {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    word-break: break-word;
    display: block;
}
#cp-database .db-item-price {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}
#cp-database .db-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
#cp-database .db-row-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
#cp-database .db-row-btn i {
    font-size: 14px;
}
#cp-database .db-row-btn-edit:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #2563eb;
}
#cp-database .db-row-btn-delete:hover {
    border-color: #fecaca;
    background: #fef2f2;
    color: #dc2626;
}

/* دارك مود */
body.dark-mode #cp-database .cp-database-title {
    color: #f1f5f9;
}
body.dark-mode #cp-database .cp-database-desc {
    color: #94a3b8;
}
body.dark-mode #cp-database .cp-db-group-title {
    color: #93c5fd;
}
body.dark-mode #cp-database .cp-db-group-btns .p-tab-btn {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
body.dark-mode #cp-database .cp-db-group-btns .p-tab-btn:hover {
    background: #334155;
    color: #e2e8f0;
}
body.dark-mode #cp-database .cp-db-group-btns .p-tab-btn.active {
    background: #2563eb;
    color: #fff;
}
body.dark-mode #cp-database .db-content-box {
    background: #0f172a;
    border-color: #334155;
}
body.dark-mode #cp-database .db-field-label {
    color: #94a3b8;
}
body.dark-mode #cp-database .db-input,
body.dark-mode #cp-database .db-search {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}
body.dark-mode #cp-database .db-item-row {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode #cp-database .db-item-row:hover {
    background: #334155;
    border-color: #475569;
}
body.dark-mode #cp-database .db-item-index {
    background: #0f172a;
    color: #94a3b8;
}
body.dark-mode #cp-database .db-item-val {
    color: #f1f5f9;
}
body.dark-mode #cp-database .db-item-price {
    color: #94a3b8;
}
body.dark-mode #cp-database .db-row-btn {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
body.dark-mode #cp-database .db-empty-msg {
    color: #94a3b8;
}

/* ========== استجابة: تابلت ومحمول (عرض حتى 1400) ========== */
@media (max-width: 1400px) {
    #cp-database .cp-database-header {
        margin-bottom: 14px;
    }
    #cp-database .cp-database-desc {
        max-width: 100%;
    }
    #cp-database .db-content-box {
        padding: 12px;
        min-height: 280px;
    }
    #cp-database .db-list-container {
        max-height: 320px;
    }
}

@media (max-width: 768px) {
    #cp-database .cp-database-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    #cp-database .cp-db-actions {
        justify-content: flex-end;
    }
    #cp-database .db-form-row-actions {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    #cp-database .db-field-wrap {
        flex-wrap: wrap;
    }
    #cp-database .db-input {
        max-width: 100%;
    }
    #cp-database .db-input-price {
        max-width: 120px;
    }
    #cp-database .db-form-actions {
        flex: 1;
        flex-wrap: wrap;
    }
    #cp-database .db-btn {
        flex: 1;
        min-width: 0;
    }
    #cp-database .db-item-row {
        padding: 8px;
    }
    #cp-database .db-item-val {
        font-size: 12px;
    }
    #cp-database .db-row-btn {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    #cp-database .cp-database-title {
        font-size: 1rem;
    }
    #cp-database .cp-db-group-btns .p-tab-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    #cp-database .cp-db-group-btns .p-tab-btn i {
        font-size: 12px;
    }
    #cp-database .db-content-box {
        padding: 10px;
        min-height: 260px;
    }
    #cp-database .db-list-container {
        max-height: 280px;
        gap: 5px;
    }
    #cp-database .db-item-index {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }
}

/* ========== قاعدة البيانات: بطاقات الإحصائيات + أزرار متدرجة ========== */
.db-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.db-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    border-radius: 14px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.db-stat-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.db-stat-card:has(.db-stat-cb:checked) {
    background: linear-gradient(145deg, #e0f2fe 0%, #bae6fd 100%);
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
}

.db-stat-cb {
    margin-bottom: 4px;
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #0ea5e9;
}

.db-stat-num {
    font-weight: 800;
    font-size: 1.15rem;
    display: block;
}

.db-stat-card[data-category="patients"] .db-stat-num { color: #0d9488; }
.db-stat-card[data-category="records"] .db-stat-num { color: #0369a1; }
.db-stat-card[data-category="bookings"] .db-stat-num { color: #7c3aed; }
.db-stat-card[data-category="employees"] .db-stat-num { color: #b45309; }
.db-stat-card[data-category="revenues"] .db-stat-num { color: #15803d; }
.db-stat-card[data-category="expenses"] .db-stat-num { color: #b91c1c; }
.db-stat-card[data-category="lab"] .db-stat-num,
.db-stat-card[data-category="nursing"] .db-stat-num { color: #0e7490; }
.db-stat-card[data-category="logs"] .db-stat-num { color: #475569; }

.db-stat-label {
    font-size: 10px;
    color: #64748b;
    margin-top: 1px;
}

/* دارك مود: بطاقات الإحصائيات */
body.dark-mode .db-stat-card {
    background: linear-gradient(145deg, #334155 0%, #1e293b 100%);
    border-color: #475569;
}

body.dark-mode .db-stat-card:hover {
    border-color: #64748b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .db-stat-card:has(.db-stat-cb:checked) {
    background: linear-gradient(145deg, #1e3a5f 0%, #1e293b 100%);
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

body.dark-mode .db-stat-label {
    color: #94a3b8;
}

body.dark-mode .db-stats-select-all,
body.dark-mode .db-bulk-label {
    color: #cbd5e1;
}

body.dark-mode .db-stats-hint {
    color: #64748b;
}

.db-stats-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.db-stats-clear-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

body.dark-mode .db-stats-clear-row {
    border-top-color: #475569;
}

.db-stats-select-all,
.db-bulk-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin: 0;
    font-size: 12px;
    color: #475569;
}

.db-stats-hint {
    font-size: 11px;
    color: #94a3b8;
    margin: 10px 0 0;
}

/* أزرار قاعدة البيانات — أصغر حجماً، متدرجة */
.btn-db {
    padding: 5px 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.btn-db:hover:not(:disabled) {
    transform: translateY(-0.5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-db:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-db-primary {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
}

.btn-db-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-db-danger {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: #fff;
}

.btn-db-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.btn-db-refresh {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: #fff;
}

.btn-db-refresh:hover:not(:disabled) {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.btn-db-ghost {
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
}

.btn-db-ghost:hover:not(:disabled) {
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
}

.btn-db-export {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.btn-db-export:hover:not(:disabled) {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.btn-db-import {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
}

.btn-db-import:hover:not(:disabled) {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
}

.btn-db-local {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #fff;
}

.btn-db-local:hover:not(:disabled) {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.btn-db-idb {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #fff;
}

.btn-db-idb:hover:not(:disabled) {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.btn-db-cloud-clear {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
}

.btn-db-cloud-clear:hover:not(:disabled) {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

.btn-db-danger-sm,
.btn-db-ghost-sm {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 6px;
}

.btn-db-danger-sm {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: #fff;
}

.btn-db-ghost-sm {
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
}

.btn-db-merge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.btn-db-merge:hover:not(:disabled) {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.btn-db-cloud-down {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.btn-db-cloud-down:hover:not(:disabled) {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.btn-db-cloud-up {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: #fff;
}

.btn-db-cloud-up:hover:not(:disabled) {
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
}

.btn-db-seed {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #fff;
}

.btn-db-seed:hover:not(:disabled) {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

/* Supabase > Database status card buttons follow old "save number" gradient style */
#cp-supabase .db-stats-toolbar .btn-db,
#cp-supabase .db-stats-clear-row .btn-db {
    border: 1px solid #cbd5e1;
}
#cp-supabase .db-stats-toolbar .btn-db:not(.btn-db-danger):not(.btn-db-primary),
#cp-supabase .db-stats-clear-row .btn-db:not(.btn-db-primary):not(.btn-db-local):not(.btn-db-idb):not(.btn-db-cloud-clear) {
    color: #334155;
    background: linear-gradient(145deg, #f1f5f9 0%, #ffffff 100%);
}
#cp-supabase .db-stats-toolbar .btn-db:not(.btn-db-danger):not(.btn-db-primary):hover,
#cp-supabase .db-stats-clear-row .btn-db:not(.btn-db-primary):not(.btn-db-local):not(.btn-db-idb):not(.btn-db-cloud-clear):hover {
    background: linear-gradient(145deg, #e2e8f0 0%, #f8fafc 100%);
}
#cp-supabase .db-stats-toolbar .btn-db-danger,
#cp-supabase .db-stats-toolbar .btn-db-primary,
#cp-supabase .db-stats-clear-row .btn-db-primary,
#cp-supabase .db-stats-clear-row .btn-db-local,
#cp-supabase .db-stats-clear-row .btn-db-idb,
#cp-supabase .db-stats-clear-row .btn-db-cloud-clear {
    color: #ffffff;
    border-color: #b91c1c;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 55%, #b91c1c 100%) !important;
}
body.dark-mode #cp-supabase .db-stats-toolbar .btn-db:not(.btn-db-danger):not(.btn-db-primary),
body.dark-mode #cp-supabase .db-stats-clear-row .btn-db:not(.btn-db-primary):not(.btn-db-local):not(.btn-db-idb):not(.btn-db-cloud-clear) {
    color: #e2e8f0;
    border-color: #475569;
    background: linear-gradient(145deg, #1f2937 0%, #0f172a 100%);
}
body.dark-mode #cp-supabase .db-stats-toolbar .btn-db-danger,
body.dark-mode #cp-supabase .db-stats-toolbar .btn-db-primary,
body.dark-mode #cp-supabase .db-stats-clear-row .btn-db-primary,
body.dark-mode #cp-supabase .db-stats-clear-row .btn-db-local,
body.dark-mode #cp-supabase .db-stats-clear-row .btn-db-idb,
body.dark-mode #cp-supabase .db-stats-clear-row .btn-db-cloud-clear {
    border-color: #ef4444;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 55%, #7f1d1d 100%) !important;
}

.cp-database-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.cp-db-actions {
    display: flex;
    gap: 10px;
}

.db-bulk-toolbar {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.db-bulk-toolbar[style*="flex"] {
    display: flex !important;
}

.cp-db-source-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* طريقة الإعداد في قاعدة سحابية — دارك مود: نص أبيض */
body.dark-mode .cp-supabase-setup-card {
    background: #422006 !important;
    border-color: #b45309 !important;
}
body.dark-mode .cp-supabase-setup-title,
body.dark-mode .cp-supabase-setup-list {
    color: #ffffff !important;
}
body.dark-mode .cp-supabase-setup-list a {
    color: #93c5fd !important;
}

/* شبكة خيارات المظهر — 10 ثيمات: فاتح، داكن، أزرق، أخضر، نعناع، ياقوت، بنفسج، أحمر، وردي، شفق */
.theme-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.theme-options-grid.theme-options-grid-10 {
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.theme-options-grid.theme-options-grid-10 .theme-option {
    min-height: 72px;
    padding: 10px 6px;
}
.theme-options-grid.theme-options-grid-10 .theme-opt-label { font-size: 12px; }
.theme-options-grid .theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    min-height: 88px;
    border: 2px solid var(--cp-border, #e9ecef);
    border-radius: 12px;
    background: var(--cp-bg, #fff);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.theme-options-grid .theme-option:hover {
    border-color: var(--cp-primary, #0d6efd);
    background: rgba(13, 110, 253, 0.06);
}
.theme-opt-icon {
    display: block;
}
.theme-opt-label {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b !important;
}
.theme-options-grid .theme-option .theme-opt-icon {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
}
.theme-options-grid.theme-options-grid-10 .theme-opt-label {
    color: #1e293b !important;
}

/* مظاهر: أزرق، أخضر، نعناع، ياقوت، بنفسج، أحمر، وردي، شفق (لون أساسي) */
body.theme-blue { --cp-primary: #0ea5e9; --primary: #0ea5e9; }
body.theme-green { --cp-primary: #10b981; --primary: #10b981; }
body.theme-mint { --cp-primary: #50C878; --primary: #50C878; }
body.theme-sapphire { --cp-primary: #0F52BA; --primary: #0F52BA; }
body.theme-purple { --cp-primary: #7c3aed; --primary: #7c3aed; }
body.theme-crimson { --cp-primary: #D72638; --primary: #D72638; }
body.theme-rose { --cp-primary: #B66E79; --primary: #B66E79; }
body.theme-aurora { --cp-primary: #E07C24; --primary: #E07C24; }
