:root {
    --primary-color: #0D2F63; /* Dark Navy Blue from brand */
    --secondary-color: #2DB85C; /* Bright Green from brand */
    --success-color: #2DB85C; /* Bright Green from brand */
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #0D2F63;
    --sage-color: #9BB896; /* Sage Green from brand */
    --gray-color: #A6A8A8; /* Brand Gray */
}
.header-insights {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-inline: auto 30px;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(92,45,213,0.06);
    border-radius: 14px;
    padding: 10px 16px;
    min-width: 150px;
    border: 1px solid rgba(92,45,213,0.08);
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.insight-label {
    display: block;
    font-size: 0.8rem;
    color: #6b5b8a;
}

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;700&display=swap');

/* Brand Fonts */
@font-face {
    font-family: 'Century Gothic';
    src: local('Century Gothic'), local('Century Gothic Bold');
    font-weight: bold;
}

/* Note: GESS Two Medium font needs to be added to your project fonts folder */
@font-face {
    font-family: 'GESS Two';
    font-weight: 500;
    /* Add the font file path when you have the GESS Two font file */
    /* src: url('../fonts/GESSTwo-Medium.ttf') format('truetype'); */
}

/* Reset & base */
* { box-sizing: border-box; }
html,body { height:100%; }
body {
    font-family: 'GESS Two', 'Century Gothic', 'Cairo', sans-serif;
    background: #0b2856;
    color: #888;
    min-height: 100vh;
    margin:0;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('../images/tatweer1_logo.png');
    background-repeat: repeat;
    background-size: 320px auto;
    background-position: center;
    opacity: 0.08;
    pointer-events: none;
    z-index: -2;
    filter: saturate(0.4);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(2, 12, 32, 0.78);
    pointer-events: none;
    z-index: -1;
}

/* Container main layout */
.container-main {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding-right: 324px; /* 300px sidebar width + 24px gap */
}

/* ===== SIDEBAR (shared) ===== */
.sidebar {
    width: 300px;
    background: linear-gradient(180deg, rgba(32,13,82,0.92), rgba(22,8,54,0.9));
    color: #f7f4ff;
    height: 100vh;
    padding: 22px;
    border-radius: 12px;
    position: fixed;
    top: 0;
    right: 0;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(15,23,36,0.08);
    flex-shrink: 0;
    z-index: 1000;
}

/* sidebar header */
.sidebar-header h4 { margin:0; color:#f7f4ff; font-size:1.15rem; }
.sidebar-header p { margin:4px 0 12px; color: rgba(255,255,255,0.75); font-size:0.9rem; }

/* profile */
.user-profile { text-align:center; margin-bottom:14px; }
.user-avatar {
    width:68px; height:68px; border-radius:50%;
    background: linear-gradient(135deg,#f6c85f,#f08d19);
    display:inline-flex; align-items:center; justify-content:center;
    font-size:28px; box-shadow:0 6px 18px rgba(43,108,176,0.18);
}
.user-name { margin-top:10px; font-weight:700; }
.user-role { color: rgba(255,255,255,0.7); font-size:0.9rem; margin-bottom:10px; }
.user-stats { display:flex; justify-content:space-around; gap:10px; margin-top:10px; }
.user-stats .stat-item { text-align:center; }
.user-stats .stat-value { font-weight:700; font-size:1.05rem; }
.user-stats .stat-label { font-size:0.8rem; color:rgba(255,255,255,0.7); }

/* nav */
.sidebar .nav { margin-top: 10px; padding-left:0; }
.sidebar .nav .nav-item { margin-bottom:6px; }
.sidebar .nav .nav-link {
    color: rgba(255,255,255,0.9);
    background: transparent;
    border-radius:8px;
    padding:10px 12px;
    display:flex; align-items:center; gap:10px;
    transition: all .18s ease;
}
.sidebar .nav .nav-link i { width:22px; text-align:center; font-size:16px; color: rgba(255,255,255,0.9); }
.sidebar .nav .nav-link:hover {
    transform: translateX(-6px);
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.sidebar .nav .nav-link.active {
    background: linear-gradient(90deg,var(--secondary-color), var(--primary-color));
    color:#fff;
    box-shadow: 0 8px 18px rgba(88,43,199,0.35);
}

/* sidebar footer */
.sidebar-footer { margin-top:18px; color: rgba(255,255,255,0.65); font-size:0.85rem; text-align:center; }

/* ===== MAIN CONTENT (shared styles from order.html) ===== */
.main-content, .container {
    flex:1;
    padding: 20px;
}

/* header card */
.header {
    background: white;
    padding: 20px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(84,63,154,0.12);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: visible;
}
.header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}
.page-title h1 { font-weight:700; color:var(--primary-color); margin-bottom:5px; }
.page-title p { color:#5e4b7c; margin-bottom:0; }

/* stats cards */
.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card {
    background: white; border-radius: 15px; padding: 20px;
    box-shadow: 0 5px 18px rgba(84,63,154,0.12); text-align:center; transition: transform .25s;
    color: #2d1b4f;
}
.stat-card:hover { transform: translateY(-5px); }
.stat-icon { font-size:2.2rem; margin-bottom:12px; }
.stat-value { font-size:1.6rem; font-weight:700; margin:8px 0; }

/* filters card */
.filters-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 18px rgba(84,63,154,0.12);
    margin-bottom: 25px;
    color: #2d1b4f;
}
.section-title { font-weight:700; color:var(--primary-color); margin-bottom:20px; padding-bottom:10px; border-bottom:2px solid rgba(0,0,0,0.05); }
.filter-row { display:flex; gap:15px; flex-wrap:wrap; }
.filter-group { flex:1; min-width:200px; }
.filters-card .form-label { color:#5e4b7c; }
.filters-card .form-select,
.filters-card .form-control {
    background-color: #fff;
    border:1px solid rgba(93,67,146,0.25);
    color:#2d1b4f;
}
.filters-card .form-select:focus,
.filters-card .form-control:focus {
    border-color: rgba(92,45,213,0.6);
    box-shadow: 0 0 0 0.2rem rgba(92,45,213,0.1);
}

/* requests table card */
.requests-table { background-color:white; border-radius:15px; overflow:hidden; box-shadow:0 5px 18px rgba(84,63,154,0.12); margin-bottom:20px; color:#2d1b4f; }
.table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    padding: 15px;
    text-align: center;
}
.table td { padding: 15px; vertical-align: middle; text-align: center; color:#2d1b4f; }

/* status badges */
.status-badge { padding:7px 12px; border-radius:20px; font-size:.85rem; font-weight:700; display:inline-flex; gap:8px; align-items:center; }
.status-approved { background-color: rgba(46,204,113,0.12); color: var(--success-color); }
.status-pending  { background-color: rgba(243,156,18,0.12); color: var(--warning-color); }
.status-rejected { background-color: rgba(231,76,60,0.12); color: var(--danger-color); }
.status-completed{ background-color: rgba(52,152,219,0.12); color: var(--secondary-color); }

/* actions */
.btn-action { border-radius: 20px; padding:5px 15px; font-size:0.85rem; font-weight:600; }

/* loader */
.loader {
    position: fixed; top:0; right:0; width:100%; height:100%;
    background: rgba(255,255,255,0.9); display:flex; justify-content:center; align-items:center; z-index:9999; flex-direction:column;
}
.spinner {
    width:60px; height:60px; border:5px solid #f3f3f3; border-top:5px solid var(--secondary-color); border-radius:50%; animation:spin 1s linear infinite; margin-bottom:20px;
}
.loader-text { font-size:1.1rem; color:var(--primary-color); font-weight:600; }
@keyframes spin { 0%{transform:rotate(0)}100%{transform:rotate(360deg)} }

/* no requests */
.no-requests { text-align:center; padding:40px; color:#6c757d; }
.no-requests i { font-size:4rem; margin-bottom:20px; color:#dee2e6; }

/* back button */
.back-button { display:inline-flex; align-items:center; gap:8px; margin-bottom:20px; color:var(--primary-color); text-decoration:none; font-weight:600; transition:all .25s; }
.back-button:hover { color:var(--secondary-color); transform:translateX(-5px); }

.request-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.request-actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.request-actions .btn {
    border-radius: 999px;
    font-weight: 600;
}

.request-actions .btn-outline-primary {
    border-color: rgba(122,102,31,0.4);
    color: #7a661f;
}

/* Enhanced Pagination Styles */
.pagination-wrapper {
    background: white;
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 0 5px 18px rgba(84,63,154,0.12);
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.pagination-info {
    width: 100%;
    text-align: center;
}

.pagination-text {
    color: #5e4b7c;
    font-size: 0.95rem;
}

.pagination-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

.pagination-custom {
    margin: 0;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination-custom .page-item {
    margin: 0;
}

.pagination-custom .page-link {
    min-width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 2px solid rgba(93,67,146,0.15);
    border-radius: 12px;
    color: #5e4b7c;
    font-weight: 600;
    font-size: 0.95rem;
    background: white;
    transition: all 0.25s ease;
    text-decoration: none;
    gap: 6px;
}

.pagination-custom .page-link:hover:not(.disabled):not(.active) {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92,45,213,0.3);
}

.pagination-custom .page-item.active .page-link {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(92,45,213,0.35);
    font-weight: 700;
}

.pagination-custom .page-item.disabled .page-link {
    background: #f8f9fa;
    color: #adb5bd;
    border-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-custom .page-link-prev,
.pagination-custom .page-link-next {
    font-weight: 700;
    padding: 0 16px;
    min-width: auto;
}

.pagination-custom .page-link-prev i,
.pagination-custom .page-link-next i {
    font-size: 0.85rem;
}

.pagination-custom .page-link-prev:hover:not(.disabled),
.pagination-custom .page-link-next:hover:not(.disabled) {
    transform: translateX(-3px);
}

.pagination-custom .page-link-next:hover:not(.disabled) {
    transform: translateX(3px);
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination-wrapper {
        padding: 15px;
    }

    .pagination-custom .page-link {
        min-width: 38px;
        height: 38px;
        font-size: 0.9rem;
        padding: 0 10px;
    }

    .pagination-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .pagination-custom {
        gap: 4px;
    }

    .pagination-custom .page-link {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
        padding: 0 8px;
    }

    .pagination-custom .page-link-prev,
    .pagination-custom .page-link-next {
        padding: 0 12px;
    }
}

.request-actions .btn-outline-primary:hover,
.request-actions .btn-outline-primary:focus {
    background: #ffd861;
    color: #3d2a00;
}

.tabbed-orders .nav-link {
    border-radius: 999px;
    color: #7a661f;
    font-weight: 600;
    background: rgba(255, 224, 140, 0.35);
    border: 1px solid transparent;
    margin-bottom: 10px;
}

.tabbed-orders .nav-link.active {
    color: #3d2a00;
    background: #ffd861;
    border-color: #f7c640;
    box-shadow: 0 6px 18px rgba(247,198,64,0.35);
}

.dept-pane {
    background: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 25px rgba(110,85,0,0.08);
    margin-top: 16px;
}

.employee-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.employee-summary .info-chip {
    background: rgba(255,232,162,0.6);
    border: 1px dashed rgba(122,102,31,0.4);
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 0.95rem;
}

.header-logo-pill {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.04);
}

.header-logo-pill img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.client-mail-card {
    background: rgba(255,255,255,0.85);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    margin-bottom: 18px;
    border: 1px solid rgba(0,0,0,0.02);
}

.client-mail-card figure {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.client-mail-card img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
    filter: saturate(0.85);
}

.service-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.service-option {
    position: relative;
}

.service-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.service-option-body {
    background: rgba(255,255,255,0.9);
    border: 2px solid rgba(122,102,31,0.15);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: center;
    min-height: 120px;
    transition: all .25s ease;
}

.service-option input:checked + .service-option-body {
    border-color: #f7c640;
    box-shadow: 0 10px 25px rgba(247,198,64,0.25);
    background: #fff4c0;
}

.service-icon-badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.service-option-body h5 {
    margin-bottom: 6px;
    font-weight: 700;
    color: #4f3d00;
}

.service-option-body p {
    margin: 0;
    color: #7a661f;
    font-size: 0.9rem;
}

.service-block {
    border: 1px solid rgba(122,102,31,0.15);
    border-radius: 18px;
    background: rgba(255,255,255,0.9);
    margin-bottom: 24px;
    box-shadow: 0 12px 25px rgba(0,0,0,0.06);
    overflow: hidden;
}

.service-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
}

.service-block-header i {
    font-size: 1.5rem;
}

.service-block-body {
    padding: 22px 24px;
}

.service-empty-state {
    padding: 40px;
    border: 2px dashed rgba(122,102,31,0.35);
    border-radius: 18px;
    background: rgba(255,255,255,0.6);
    margin-bottom: 24px;
    color: #7a661f;
}

.summary-card {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;
    background: rgba(255,255,255,0.92);
    padding: 20px 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
    gap: 12px;
}

.summary-label {
    font-size: 0.8rem;
    color: #7a661f;
    display: block;
}

.summary-notes p {
    color: #4f3d00;
}

.summary-services .badge {
    border-radius: 999px;
}

.attachments-section {
    border: 1px dashed rgba(0,0,0,0.12);
    border-radius: 16px;
    padding: 24px;
    background: rgba(255,255,255,0.8);
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attachment-item {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px,1fr)) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: rgba(0,0,0,0.02);
    border-radius: 14px;
}

.attachment-item button {
    border-radius: 10px;
}

/* responsive */
@media (max-width: 992px) {
    .sidebar { position: relative; width:100%; height:auto; min-height:auto; border-radius:12px; }
    .container-main { flex-direction: column; padding: 12px; padding-right: 12px; }
    .main-content, .container { padding:12px; }
    .header { flex-direction:column; gap:12px; align-items:flex-start; }
}

@media (max-width: 768px) {
    .request-actions-inline {
        flex-direction: column;
    }

    .service-options-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}
