/*
 * Tabler polish for 24 Operations System
 * ضع هذا الملف في: public/assets/css/app-tabler.css
 */
:root {
    --layout-sidebar-width: 280px;
    --layout-bg: #f6f8fb;
    --layout-sidebar-bg: #0f172a;
    --layout-sidebar-bg-2: #111827;
    --layout-primary: #206bc4;
    --layout-radius: 14px;
}

html, body {
    min-height: 100%;
    background: var(--layout-bg);
}

body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: #1f2937;
}

.page-rtl-layout {
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(32,107,196,.08), transparent 30%), var(--layout-bg);
}

.sidebar-tabler {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--layout-sidebar-width);
    z-index: 1040;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--layout-sidebar-bg), var(--layout-sidebar-bg-2));
    box-shadow: -8px 0 24px rgba(15, 23, 42, .18);
    border-left: 1px solid rgba(255,255,255,.08);
}

.sidebar-tabler .navbar-brand {
    height: 72px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #206bc4, #4299e1);
    color: #fff;
    box-shadow: 0 10px 24px rgba(32,107,196,.35);
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: .2px;
}

.sidebar-tabler .navbar-nav {
    padding: 14px 12px 24px;
}

.sidebar-tabler .nav-section {
    list-style: none;
    color: rgba(255,255,255,.46);
    font-size: .72rem;
    font-weight: 800;
    margin: 18px 10px 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.sidebar-tabler .nav-link {
    border-radius: 12px;
    margin-bottom: 5px;
    padding: 11px 14px;
    color: rgba(255,255,255,.76);
    transition: all .18s ease;
}

.sidebar-tabler .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
    transform: translateX(-2px);
}

.sidebar-tabler .nav-item.active > .nav-link,
.sidebar-tabler .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(32,107,196,.95), rgba(66,153,225,.85));
    box-shadow: 0 10px 24px rgba(32,107,196,.22);
}

.sidebar-tabler .nav-link-icon {
    width: 26px;
    margin-left: 10px;
    opacity: .95;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 1035;
}

.topbar-tabler {
    position: sticky;
    top: 0;
    z-index: 1020;
    margin: 0 0 22px 0;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226,232,240,.9);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 12px 30px rgba(15,23,42,.06);
}

.topbar-tabler .container-xl {
    max-width: 100%;
}

.page-title-block .page-pretitle {
    color: #64748b;
    font-size: .78rem;
    margin-bottom: 2px;
}

.page-title-block .page-title {
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 800;
}

.user-avatar-tabler {
    background: linear-gradient(135deg, #206bc4, #4299e1);
    color: #fff;
    font-weight: 800;
}

.badge-notification {
    position: absolute;
    top: -8px;
    left: -8px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notif-menu {
    width: min(420px, 92vw);
}

.main-content {
    margin-right: var(--layout-sidebar-width);
    padding: 0 22px 28px;
    min-height: 100vh;
}

.card {
    border-radius: var(--layout-radius);
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 22px rgba(15,23,42,.04);
}

.card-header {
    border-radius: var(--layout-radius) var(--layout-radius) 0 0 !important;
}

.page-header-modern,
.operations-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(15,23,42,.045);
}

.page-header-modern h2,
.operations-header h2 {
    color: #0f172a;
    font-weight: 850;
}

.kpi-card {
    border-radius: 18px;
    padding: 18px;
    min-height: 126px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.3);
    box-shadow: 0 14px 30px rgba(15,23,42,.08);
    transition: transform .18s ease, box-shadow .18s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 38px rgba(15,23,42,.12);
}

.kpi-card .kpi-label,
.kpi-card small {
    opacity: .85;
    font-weight: 700;
}

.kpi-card .kpi-value,
.kpi-card h3 {
    font-weight: 900;
    font-size: 2rem;
    margin: 6px 0;
}

.kpi-card .kpi-icon,
.kpi-card > i {
    position: absolute;
    left: 16px;
    bottom: 10px;
    font-size: 3.2rem;
    opacity: .18;
}

.kpi-card.primary { background: linear-gradient(135deg, #206bc4, #4299e1); color: #fff; }
.kpi-card.info { background: linear-gradient(135deg, #0891b2, #22d3ee); color: #fff; }
.kpi-card.warning { background: linear-gradient(135deg, #f59f00, #fbbf24); color: #111827; }
.kpi-card.success { background: linear-gradient(135deg, #2fb344, #22c55e); color: #fff; }
.kpi-card.danger { background: linear-gradient(135deg, #d63939, #ef4444); color: #fff; }
.kpi-card.dark { background: linear-gradient(135deg, #1f2937, #111827); color: #fff; }
.kpi-card.secondary { background: linear-gradient(135deg, #64748b, #94a3b8); color: #fff; }

.workflow-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(15,23,42,.045);
}

.workflow-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 13px;
    color: #334155;
    text-decoration: none;
    font-weight: 750;
    transition: all .15s ease;
}

.workflow-tabs a:hover {
    background: #eff6ff;
    color: #206bc4;
}

.workflow-tabs a.active {
    background: #206bc4;
    color: #fff;
    box-shadow: 0 10px 24px rgba(32,107,196,.22);
}

.workflow-tabs .tab-count {
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,.08);
    font-size: .75rem;
}

.workflow-tabs a.active .tab-count {
    background: rgba(255,255,255,.22);
}

.table {
    --tblr-table-bg: #fff;
}

.table thead th,
.orders-table thead th {
    background: #f8fafc !important;
    color: #475569;
    font-size: .78rem;
    font-weight: 850;
    border-bottom: 1px solid #e5e7eb;
}

.table tbody tr,
.modern-row {
    transition: background .15s ease, transform .15s ease;
}

.table tbody tr:hover,
.modern-row:hover {
    background: #f8fbff !important;
}

.btn {
    border-radius: 10px;
    font-weight: 700;
}

.form-control,
.form-select,
.input-group-text {
    border-radius: 10px;
}

.badge {
    border-radius: 999px;
    font-weight: 750;
}

.service-tag {
    background: #eff6ff;
    color: #206bc4;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
}

.team-user,
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #206bc4;
    color: #fff;
    font-weight: 800;
    border: 2px solid #fff;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex: 0 0 40px;
}

@media (max-width: 991.98px) {
    .sidebar-tabler {
        transform: translateX(100%);
        transition: transform .22s ease;
    }

    .sidebar-tabler.is-open {
        transform: translateX(0);
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .main-content {
        margin-right: 0;
        padding: 0 12px 22px;
    }

    .topbar-tabler {
        border-radius: 0 0 14px 14px;
        margin-bottom: 16px;
    }

    .page-header-modern,
    .operations-header {
        padding: 16px;
    }

    .workflow-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    .workflow-tabs a {
        white-space: nowrap;
    }
}
