/*======================================================
    GridLabs CRM Pro
    Common Table
======================================================*/

/*==========================
  Table Wrapper
==========================*/

.table-wrapper{
    background:var(--card-bg);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-sm);
    overflow:hidden;
}

/*==========================
  Responsive
==========================*/

.table-responsive-custom{
    width:100%;
    max-height:650px;
    overflow:auto;
    position:relative;
}

/* Scrollbar */

.table-responsive-custom::-webkit-scrollbar{
    width:8px;
    height:8px;
}

.table-responsive-custom::-webkit-scrollbar-track{
    background:#f3f4f6;
}

.table-responsive-custom::-webkit-scrollbar-thumb{
    background:#cbd5e1;
    border-radius:20px;
}

.table-responsive-custom::-webkit-scrollbar-thumb:hover{
    background:var(--primary);
}

/* Firefox */

.table-responsive-custom{
    scrollbar-width:thin;
    scrollbar-color:#cbd5e1 #f3f4f6;
}

/*==========================
  Table
==========================*/

.crm-table{
    width:100%;
    min-width:1400px;
    border-collapse:collapse;
    background:#fff;
}

/*==========================
  Header
==========================*/

.crm-table thead th{

    position:sticky;
    top:0;

    background:#373434;

    color:#fff;

    padding:16px 18px;

    font-size:13px;

    font-weight:600;

    text-transform:uppercase;

    white-space:nowrap;

    z-index:20;

    border-bottom:1px solid rgba(255,255,255,.08);

}

/*==========================
  Body
==========================*/

.crm-table tbody td{

    padding:16px 18px;

    font-size:14px;

    color:var(--text);

    border-bottom:1px solid #edf2f7;

    white-space:nowrap;

    vertical-align:middle;

}

.crm-table tbody tr{

    transition:var(--transition);

}

.crm-table tbody tr:hover{

    background:#fafafa;

}

.crm-table tbody tr:nth-child(even){

    background:#fcfcfc;

}

/*==========================
  Empty Row
==========================*/

.table-empty{

    text-align:center;

    padding:60px 20px;

    color:#94a3b8;

}

/*==========================
  Loader
==========================*/

.table-loader{

    display:flex;

    justify-content:center;

    align-items:center;

    flex-direction:column;

    gap:12px;

    padding:30px;

}

.loader-circle{

    width:42px;

    height:42px;

    border:4px solid #ececec;

    border-top:4px solid var(--primary);

    border-radius:50%;

    animation:tableLoader .8s linear infinite;

}

@keyframes tableLoader{

    100%{

        transform:rotate(360deg);

    }

}

/*==========================
  Status Badge
==========================*/

.status{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:6px 14px;

    border-radius:50px;

    font-size:12px;

    font-weight:600;

}

.status.today{

    background:#fff7db;

    color:#b7791f;

}

.status.upcoming{

    background:#dbeafe;

    color:#1d4ed8;

}

.status.closed{

    background:#dcfce7;

    color:#15803d;

}

/*==========================
  Action Buttons
==========================*/

.action-group{

    display:flex;

    align-items:center;

    justify-content:center;

    gap:8px;

}

.action-btn{

    width:36px;

    height:36px;

    border:none;

    border-radius:10px;

    cursor:pointer;

    transition:.3s;

}

.action-btn i{

    font-size:14px;

}

.action-btn.edit{

    background:#dbeafe;

    color:#2563eb;

}

.action-btn.delete{

    background:#fee2e2;

    color:#dc2626;

}

.action-btn.view{

    background:#dcfce7;

    color:#15803d;

}

.action-btn:hover{

    transform:translateY(-2px);

}

/*==========================
  Copy Button
==========================*/

.copy-box{

    display:flex;

    align-items:center;

    gap:10px;

}

.copy-btn{

    width:34px;

    height:34px;

    border:1px solid var(--border);

    border-radius:8px;

    background:#fff;

    cursor:pointer;

    transition:.3s;

}

.copy-btn:hover{

    background:var(--primary);

    color:#fff;

}

/*==========================
  Responsive
==========================*/

@media(max-width:991px){

    .crm-table{

        min-width:1200px;

    }

}