/* WideCRM Modern Enterprise Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --brand: #4F46E5;
    --brand-hover: #4338CA;
    --sidebar-width: 260px;
}

body {
    background-color: #F8FAFC;
    color: #0F172A;
    font-family: 'Cairo', 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar Navigation Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: #0F172A; /* Deep slate luxury dark */
    color: #F8FAFC;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 50;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 1.25rem 1.25rem 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-menu {
    padding: 1rem 0.75rem;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-heading {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748B;
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.65rem;
    font-size: 0.825rem;
    font-weight: 700;
    color: #94A3B8;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    margin-bottom: 0.25rem;
    text-decoration: none;
    border: 1px solid transparent;
}

.sidebar-nav-link:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-nav-link.active {
    color: #FFFFFF;
    background: #4F46E5;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.sidebar-nav-link .icon-box {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
}

/* Kanban Board Layout */
.kanban-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(290px, 1fr));
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
}

.kanban-column {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 210px);
}

.kanban-column-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #E2E8F0;
    background: #FFFFFF;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-column-body {
    padding: 0.75rem;
    overflow-y: auto;
    flex-grow: 1;
    min-height: 250px;
    transition: background-color 0.2s;
}

.kanban-column-body.drag-over {
    background-color: #EEF2FF;
    border: 2px dashed #6366F1;
    border-radius: 10px;
}

/* Kanban Cards */
.kanban-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.95rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    cursor: grab;
    transition: all 0.15s ease-in-out;
}

.kanban-card:hover {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    border-color: #CBD5E1;
}

.kanban-card.dragging {
    opacity: 0.4;
    cursor: grabbing;
}

.empty-state-card {
    padding: 2.5rem 1rem;
    text-align: center;
    border: 1px dashed #CBD5E1;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
}

/* Badges & Action Buttons */
.badge-price {
    background: #EEF2FF;
    color: #4338CA;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #E0E7FF;
}

.btn-whatsapp-sm {
    background: #10B981;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-whatsapp-sm:hover {
    background: #059669;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #CBD5E1;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #10B981;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Modals */
.modal-backdrop {
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

/* Tabs */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

@media (max-width: 1024px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }
    [dir="rtl"] .app-sidebar {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }
    .app-sidebar.open {
        transform: translateX(0) !important;
    }
}
