:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --header-height: 65px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    overflow-x: hidden;
    padding-top: var(--header-height);
}

/* Sticky Header */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, #0070a7 0%, #2e8aac 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1050;
    display: flex;
    align-items: center;
    padding: 0 20px;
    transition: all 0.3s ease;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.header-logo i {
    font-size: 28px;
}

.header-title {
    display: flex;
    flex-direction: column;
}

.header-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.header-title p {
    margin: 0;
    font-size: 11px;
    opacity: 0.9;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-search {
    position: relative;
}

.header-search input {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 15px 8px 40px;
    border-radius: 8px;
    width: 280px;
    transition: all 0.3s ease;
}

.header-search input::placeholder {
    color: rgba(255,255,255,0.7);
}

.header-search input:focus {
    background: rgba(255,255,255,0.25);
    outline: none;
    border-color: rgba(255,255,255,0.4);
}

.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.7);
}

.header-notification {
    position: relative;
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-notification:hover {
    color: var(--warning-color);
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.header-user:hover {
    background: rgba(255,255,255,0.1);
}

.header-user img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details .name {
    font-size: 14px;
    font-weight: 600;
}

.user-details .role {
    font-size: 11px;
    opacity: 0.8;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
   margin-left: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.25);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    width: var(--sidebar-width);
    background: white;
    padding: 15px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1040;
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .nav-menu a span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-menu a {
    justify-content: center;
    padding: 14px 10px;
}

.sidebar.collapsed .nav-menu i {
    margin-right: 0;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin-bottom: 2px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #475569;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.nav-menu a:hover {
    background: #f8fafc;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-menu a.active {
    background: #eff6ff;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-menu i {
    margin-right: 12px;
    font-size: 18px;
    width: 22px;
    text-align: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-menu a span {
    transition: all 0.3s ease;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    min-height: calc(100vh - var(--header-height));
    transition: all 0.3s ease;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid;
    height: 100%;
    margin-bottom: 15px;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.stats-card.primary {
    border-color: var(--primary-color);
}

.stats-card.success {
    border-color: var(--secondary-color);
}

.stats-card.warning {
    border-color: var(--warning-color);
}

.stats-card.danger {
    border-color: var(--danger-color);
}

.stats-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 12px;
}

.stats-card.primary .stats-icon {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.stats-card.success .stats-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stats-card.warning .stats-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stats-card.danger .stats-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stats-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 6px;
    line-height: 1.2;
}

.stats-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.stats-change {
    font-size: 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stats-change.positive {
    color: var(--secondary-color);
}

.stats-change.negative {
    color: var(--danger-color);
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header-custom h5 {
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.custom-table {
    width: 100%;
    margin: 0;
    min-width: 800px;
}

.custom-table thead {
    background: #f8fafc;
}

.custom-table thead th {
    padding: 12px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    border: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.custom-table tbody td {
    padding: 14px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.custom-table tbody tr:hover {
    background: #fafbfc;
}

.custom-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge-custom {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
    white-space: nowrap;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-disbursed {
    background: #dbeafe;
    color: #1e40af;
}

/* Buttons */
.btn-custom {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-primary-custom {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-success-custom {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success-custom:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

/* Summary Boxes */
.summary-box {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.summary-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.summary-box h3 {
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 22px;
}

.summary-box p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* Mobile Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(0, 0, 0, 0.5);
    z-index: 1030;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .header-search input {
        width: 220px;
    }
}

@media (max-width: 992px) {
    :root {
        --sidebar-width: 260px;
    }
    
    .sidebar {
        left: calc(-1 * var(--sidebar-width));
        width: var(--sidebar-width) !important;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar.collapsed {
        left: calc(-1 * var(--sidebar-width));
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .header-logo .header-title {
        display: none;
    }
    
    .header-search {
        display: none;
    }
    
    .user-details {
        display: none;
    }
    
    .top-header {
        padding: 0 12px;
    }
    
    .header-right {
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .stats-value {
        font-size: 22px;
    }
    
    .stats-label {
        font-size: 12px;
    }
    
    .stats-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .content-card {
        padding: 15px;
    }
    
    .card-header-custom h5 {
        font-size: 14px;
    }
    
    .btn-custom {
        padding: 9px 16px;
        font-size: 13px;
    }
    
    .summary-box h3 {
        font-size: 20px;
    }
    
    .summary-box p {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    :root {
        --header-height: 56px;
    }
    
    body {
        padding-top: 56px;
    }
    
    .top-header {
        height: 56px;
        padding: 0 10px;
    }
    
    .sidebar {
        top: 56px;
        height: calc(100vh - 56px);
    }
    
    .sidebar-overlay {
        top: 56px;
        height: calc(100vh - 56px);
    }
    
    .main-content {
        padding: 12px;
    }
    
    .header-logo i {
        font-size: 24px;
    }
    
    .sidebar-toggle {
        padding: 6px 10px;
        font-size: 18px;
        margin-right: 8px;
    }
    
    .header-notification {
        font-size: 20px;
    }
    
    .header-user img {
        width: 34px;
        height: 34px;
    }
    
    .stats-card {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .stats-value {
        font-size: 20px;
    }
    
    .stats-label {
        font-size: 11px;
    }
    
    .stats-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .stats-change {
        font-size: 11px;
    }
    
    .content-card {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .card-header-custom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-header-custom h5 {
        font-size: 13px;
    }
    
    .btn-custom {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
    }
    
    .summary-box {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .summary-box h3 {
        font-size: 18px;
    }
    
    .summary-box p {
        font-size: 11px;
    }
    
    .custom-table thead th {
        font-size: 10px;
        padding: 10px 8px;
    }
    
    .custom-table tbody td {
        font-size: 11px;
        padding: 12px 8px;
    }
    
    .badge-custom {
        font-size: 9px;
        padding: 4px 10px;
    }
    
    .btn-sm {
        padding: 5px 8px;
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .main-content {
        padding: 10px 8px;
    }
    
    .stats-value {
        font-size: 18px;
    }
    
    .summary-box h3 {
        font-size: 16px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .sidebar-toggle {
        padding: 5px 8px;
        font-size: 16px;
    }
}
/* ===================== GLOBAL ===================== */
body {
    background: #f4f6f9;
}

label {
    font-weight: 600;
    font-size: 13px;
}

/* ===================== IBOX ===================== */
.ibox {
    margin-bottom: 25px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* ===================== HEADER ===================== */
.custom-header-color {
    background: linear-gradient(90deg, #e3f2fd, #f8f9fa);
    border-bottom: 1px solid #d6e4f0;
    padding: 12px 15px;
    border-radius: 6px 6px 0 0;
}

.custom-header-color h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0d6efd;
}

.custom-header-color h5 i {
    margin-right: 6px;
}

.ibox-tools .btn {
    font-size: 13px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* ===================== CONTENT ===================== */
.ibox-content {
    padding: 15px;
}

/* ===================== SEARCH ===================== */
.search-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.form-control {
    height: 36px;
    font-size: 13px;
}

/* ===================== DATATABLE ===================== */
#order-table thead th {
    background: #e9eff5;
    font-size: 13px;
    text-align: center;
}

#order-table tbody td {
    font-size: 13px;
    vertical-align: middle;
}

#order-table tbody tr:hover {
    background: #f5faff;
}

/* ===================== BADGES ===================== */
.badge {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 12px;
}

/*============View css ===================*/

.table-scrollable {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    position: relative;
}
    
    .table-bordered-custom td {
        background: white;
        color: #212529;
    }
    
    .table-bordered-custom tbody tr:hover {
        background: #f1f3f5;
    }
    
    /* Data Table Styling */
    .data-table {
        width: 100%;
        border: 2px solid #dee2e6;
        border-collapse: collapse;
        margin-top: 15px;
    }
    
    .data-table thead {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .data-table thead th {
        border: 1px solid rgba(255,255,255,0.2);
        padding: 12px 10px;
        font-weight: 600;
        text-align: center;
        font-size: 0.9rem;
    }
    
    .data-table tbody tr {
        transition: background 0.2s ease;
    }
    
    .data-table tbody tr:hover {
        background: #f8f9fa;
    }
    
    .data-table tbody td {
        padding: 10px;
        border: 1px solid #dee2e6;
        vertical-align: middle;
        font-size: 0.9rem;
    }
    
    /* Compact Action Buttons */
    .action-buttons {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 15px;
        padding: 10px;
        background: white;
        border-radius: 6px;
        border: 1px solid #dee2e6;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.875rem;
        border-radius: 5px;
        font-weight: 500;
        transition: all 0.2s ease;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
    
    .btn-sm:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    
    .btn-sm i {
        font-size: 0.875rem;
    }
    
    .file-link {
        color: #667eea;
        text-decoration: none;
        font-weight: 500;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
    
    .file-link:hover {
        color: #764ba2;
        text-decoration: underline;
    }
    
    .no-file-badge {
        background: #dc3545;
        color: white;
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 0.8rem;
        display: inline-block;
    }
    
    @media (max-width: 768px) {
        .action-buttons {
            flex-direction: column;
        }
        
        .btn-sm {
            width: 100%;
            justify-content: center;
        }
        
        .table-bordered-custom th {
            width: 40%;
        }
    }

