/*==================================================
    Skills CRM
    Version : 1.0
    Author  : Skills Advanced
==================================================*/


/*==================================================
    GENERAL
==================================================*/

.crm-wrapper{
    width:100%;
}


/*==================================================
    HEADER
==================================================*/

.crm-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    margin-bottom:25px;
}


/*==================================================
    BUTTONS
==================================================*/

.crm-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:12px 20px;
    border-radius:10px;
    text-decoration:none;
    font-weight:600;
    transition:.3s;
}

.crm-btn-primary{
    background:#5B21B6;
    color:#fff;
}

.crm-btn-primary:hover{
    background:#6D28D9;
}


/*==================================================
    SEARCH
==================================================*/

.crm-search{
    width:100%;
    padding:14px 18px;
    border-radius:10px;
    border:none;
    background:#22112f;
    color:#fff;
}


/*==================================================
    TABLE
==================================================*/

.crm-table{
    width:100%;
    border-collapse:collapse;
    background:#1F1F1F;
    color:#fff;
    border-radius:12px;
    overflow:hidden;
}

.crm-table th{

    background:#3B0764;
    color:#fff;
    padding:15px;

}

.crm-table td{

    padding:14px;
    border-bottom:1px solid #333;

}

.crm-table tr:hover{

    background:#2C2C2C;

}


/*==================================================
    ACTIONS
==================================================*/

.crm-actions{

    display:flex;
    gap:8px;

}

.crm-actions a{

    padding:7px 10px;
    border-radius:7px;
    text-decoration:none;

}

.crm-edit{

    background:#2563EB;
    color:#fff;

}

.crm-view{

    background:#059669;
    color:#fff;

}

.crm-delete{

    background:#DC2626;
    color:#fff;

}


/*==================================================
    RESPONSIVE
==================================================*/

@media(max-width:768px){

.crm-header{

flex-direction:column;

}

.crm-table{

display:block;
overflow-x:auto;

}

}

/* ==================================================
   CRM SERVICES BADGES
================================================== */

.crm-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.crm-service-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 10px;

    background: #24212A;
    border: 1px solid #3A3445;

    color: #C4B5FD;

    border-radius: 6px;

    font-size: 12px;
    font-weight: 500;

    line-height: 1.4;
    white-space: nowrap;

    transition: all 0.2s ease;
}


/* Hover */

.crm-service-badge:hover {
    background: #2D2935;
    border-color: #514866;
    color: #DDD6FE;
}

/* ==================================================
   CRM ACTION BUTTONS
================================================== */

.crm-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}


/* زر التعديل */

.crm-actions .crm-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 34px;
    height: 32px;

    padding: 0 9px;

    background: #2563EB;
    color: #ffffff;

    border: 0;
    border-radius: 7px;

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    transition: all 0.2s ease;
}


/* أيقونة التعديل */

.crm-actions .crm-edit::before {
    content: "✎";
    margin-left: 5px;
    font-size: 14px;
}


/* Hover التعديل */

.crm-actions .crm-edit:hover {
    background: #1D4ED8;
    color: #ffffff;
    transform: translateY(-1px);
}


/* زر العرض */

.crm-actions .crm-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 34px;
    height: 32px;

    padding: 0 9px;

    background: #059669;
    color: #ffffff;

    border: 0;
    border-radius: 7px;

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    transition: all 0.2s ease;
}


/* أيقونة العرض */

.crm-actions .crm-view::before {
    content: "◉";
    margin-left: 5px;
    font-size: 12px;
}


/* Hover العرض */

.crm-actions .crm-view:hover {
    background: #047857;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ==================================================
   CRM GLOBAL THEME TOGGLE
   Floating top-right button
   ================================================== */

.crm-theme-toggle {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    bottom: auto !important;
    left: auto !important;

    z-index: 999999 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    min-height: 42px !important;
    padding: 9px 15px !important;

    border: 1px solid var(--crm-border) !important;
    border-radius: 10px !important;

    background: var(--crm-surface) !important;
    color: var(--crm-text) !important;

    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;

    cursor: pointer !important;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease !important;
}

.crm-theme-toggle:hover {
    transform: translateY(-2px) !important;
    background: var(--crm-surface-hover) !important;
}

.crm-theme-toggle:active {
    transform: translateY(0) !important;
}

.crm-theme-toggle-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    font-size: 16px !important;
    line-height: 1 !important;
}

.crm-theme-toggle-label {
    white-space: nowrap !important;
}


/* Light Mode */

html.crm-theme-light .crm-theme-toggle {
    background: #ffffff !important;
    color: #1f2937 !important;
    border-color: #d1d5db !important;

    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.12) !important;
}


/* Dark Mode */

html.crm-theme-dark .crm-theme-toggle {
    background: #16001f !important;
    color: #ffffff !important;
    border-color: #4b1768 !important;
}


/* Mobile */

@media (max-width: 768px) {

    .crm-theme-toggle {
        top: 12px !important;
        right: 12px !important;

        min-height: 38px !important;

        padding: 8px 11px !important;

        border-radius: 9px !important;

        font-size: 12px !important;
    }

    .crm-theme-toggle-icon {
        font-size: 15px !important;
    }

}