    /**
    * All Windoors ERP - Main Stylesheet
    * Professional Corporate Design
    * All Windoors Manufacturing Pvt. Ltd.
    */

    /* ============================================================
    ROOT VARIABLES & RESET
    ============================================================ */
    :root {
        --primary: #1e40af;
        --primary-light: #3b82f6;
        --primary-dark: #1e3a8a;
        --secondary: #0f766e;
        --secondary-light: #14b8a6;
        --success: #059669;
        --success-light: #34d399;
        --danger: #dc2626;
        --danger-light: #f87171;
        --warning: #d97706;
        --warning-light: #fbbf24;
        --info: #0284c7;
        --info-light: #38bdf8;
        --purple: #7c3aed;
        --dark: #1e293b;
        --gray: #64748b;
        --gray-light: #94a3b8;
        --gray-lighter: #e2e8f0;
        --light: #f1f5f9;
        --lighter: #f8fafc;
        --white: #ffffff;
        --sidebar-bg: #1e293b;
        --sidebar-width: 260px;
        --header-height: 65px;
        --border-radius: 10px;
        --card-radius: 12px;
        --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
        --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
        --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -2px rgba(0,0,0,0.03);
        --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.02);
        --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html {
        font-size: 14px;
        scroll-behavior: smooth;
    }

    body {
        font-family: var(--font-family);
        background-color: var(--light);
        color: var(--dark);
        line-height: 1.6;
        overflow-x: hidden;
    }

    a {
        text-decoration: none;
        color: inherit;
        transition: var(--transition);
    }

    button {
        cursor: pointer;
        border: none;
        outline: none;
        font-family: inherit;
        transition: var(--transition);
    }

    /* ============================================================
    LAYOUT - SIDEBAR
    ============================================================ */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: var(--sidebar-width);
        height: 100vh;
        background: var(--sidebar-bg);
        z-index: 1000;
        transition: var(--transition);
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--gray) var(--sidebar-bg);
    }

    .sidebar::-webkit-scrollbar {
        width: 5px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: var(--gray);
        border-radius: 10px;
    }

    .sidebar-brand {
        padding: 18px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: var(--header-height);
    }

    .sidebar-brand-logo {
        width: 40px;
        height: 40px;
        background: #0d6efd;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        font-size: 18px;
        font-weight: 700;
        flex-shrink: 0;
    }

    .sidebar-brand-text {
        color: var(--white);
        font-size: 15px;
        font-weight: 600;
        line-height: 1.3;
    }

    .sidebar-brand-text small {
        display: block;
        font-size: 11px;
        font-weight: 400;
        color: var(--gray-light);
        margin-top: 2px;
    }

    .sidebar-nav {
        flex: 1;
        padding: 12px 10px;
    }

    .nav-section {
        margin-bottom: 8px;
    }

    .nav-section-title {
        padding: 10px 14px 6px;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--gray-light);
    }

    .nav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 11px 14px;
        color: rgba(188, 16, 16, 0.7);
        border-radius: 8px;
        margin-bottom: 3px;
        font-size: 13.5px;
        font-weight: 500;
        position: relative;
        transition: var(--transition);
    }

    .nav-link i {
        width: 22px;
        text-align: center;
        font-size: 14px;
    }

    .nav-link:hover {
        color: var(--white);
        background: rgba(255,255,255,0.06);
    }

    .nav-link.active {
        color: var(--white);
        background: var(--primary);
        box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    }

    .nav-link.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 20px;
        background: var(--white);
        border-radius: 0 3px 3px 0;
    }

    .sidebar-footer {
        padding: 14px;
        border-top: 1px solid rgba(255,255,255,0.06);
    }

    .user-info {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        background: var(--primary-light);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        font-size: 14px;
        font-weight: 600;
        flex-shrink: 0;
    }

    .user-details {
        flex: 1;
        min-width: 0;
    }

    .user-name {
        color: var(--white);
        font-size: 12.5px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .user-role {
        color: var(--gray-light);
        font-size: 11px;
    }

    /* ============================================================
    LAYOUT - MAIN CONTENT
    ============================================================ */
    .main-content {
        margin-left: var(--sidebar-width);
        min-height: 100vh;
        transition: var(--transition);
    }

    /* ============================================================
    HEADER - FIXED DROPDOWN
    ============================================================ */
    .top-header {
        position: sticky;
        top: 0;
        z-index: 1020;
        background: var(--white);
        height: var(--header-height);
        border-bottom: 1px solid var(--gray-lighter);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 24px;
        box-shadow: var(--shadow-sm);
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .sidebar-toggle {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: var(--light);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--dark);
        font-size: 16px;
        cursor: pointer;
        border: none;
        transition: var(--transition);
    }

    .sidebar-toggle:hover {
        background: var(--gray-lighter);
    }

    .page-title {
        font-size: 18px;
        font-weight: 700;
        color: var(--dark);
    }

    .header-right {
        display: flex;
        align-items: center;
        gap: 8px;
        position: relative;
    }

    /* ============================================================
    DROPDOWN - COMPLETE FIX
    ============================================================ */
    .header-dropdown {
        position: relative;
    }

    /* Button style */
    .header-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: #871980;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--gray);
        font-size: 16px;
        cursor: pointer;
        border: none;
        position: relative;
        transition: var(--transition);
    }

    .header-btn:hover {
        background: var(--light);
        color: var(--dark);
    }

    .header-btn .badge-count {
        position: absolute;
        top: 4px;
        right: 4px;
        width: 16px;
        height: 16px;
        background: var(--danger);
        color: var(--white);
        font-size: 9px;
        font-weight: 700;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ===== DROPDOWN MENU - YEH SABSE IMPORTANT HAI ===== */
    .header-dropdown-menu {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        background: var(--white);
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15);
        min-width: 230px;
        padding: 8px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: all 0.2s ease;
        z-index: 9999 !important;
        border: 1px solid var(--gray-lighter);
    }

    /* Show on hover */
    .header-dropdown:hover .header-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Show on active class (JS se toggle hoga) */
    .header-dropdown.active .header-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Dropdown items */
    .dropdown-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        border-radius: 8px;
        color: var(--dark);
        font-size: 13px;
        font-weight: 500;
        transition: var(--transition);
        text-decoration: none;
        white-space: nowrap;
    }

    .dropdown-item:hover {
        background: var(--light);
        color: var(--primary);
    }

    .dropdown-item i {
        width: 18px;
        text-align: center;
        font-size: 14px;
        color: var(--gray);
        transition: var(--transition);
    }

    .dropdown-item:hover i {
        color: var(--primary);
    }

    /* User info in dropdown */
    .dropdown-user-info {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        margin-bottom: 4px;
    }

    .dropdown-user-info .avatar {
        width: 40px;
        height: 40px;
        background: var(--primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        font-weight: 700;
        font-size: 16px;
        flex-shrink: 0;
    }

    .dropdown-user-info .info {
        flex: 1;
        min-width: 0;
    }

    .dropdown-user-info .info strong {
        display: block;
        font-size: 14px;
        font-weight: 700;
        color: var(--dark);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dropdown-user-info .info span {
        font-size: 12px;
        color: var(--gray-light);
    }

    .dropdown-divider {
        height: 1px;
        background: var(--gray-lighter);
        margin: 6px 8px;
    }

    /* Logout item */
    .dropdown-item.logout {
        color: var(--danger);
    }

    .dropdown-item.logout:hover {
        background: #fef2f2;
        color: var(--danger);
    }

    .dropdown-item.logout i {
        color: var(--danger);
    }

    /* ============================================================
    CONTENT AREA
    ============================================================ */
    .content-area {
        padding: 24px;
    }

    .content-wrapper {
        max-width: 1600px;
        margin: 0 auto;
    }

    /* ============================================================
    CARDS
    ============================================================ */
    .card {
        background: var(--white);
        border-radius: var(--card-radius);
        box-shadow: var(--shadow);
        border: none;
        margin-bottom: 20px;
        transition: var(--transition);
    }

    .card:hover {
        box-shadow: var(--shadow-lg);
    }

    .card-header {
        padding: 18px 22px;
        border-bottom: 1px solid var(--gray-lighter);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .card-title {
        font-size: 15px;
        font-weight: 700;
        color: var(--dark);
        margin: 0;
    }

    .card-body {
        padding: 22px;
    }

    .card-footer {
        padding: 14px 22px;
        border-top: 1px solid var(--gray-lighter);
        background: var(--lighter);
        border-radius: 0 0 var(--card-radius) var(--card-radius);
    }

    /* ============================================================
    STAT CARDS (Dashboard KPI)
    ============================================================ */
    .stat-card {
        background: var(--white);
        border-radius: var(--card-radius);
        padding: 22px;
        box-shadow: var(--shadow);
        transition: var(--transition);
        position: relative;
        overflow: hidden;
        border-left: 4px solid var(--primary);
    }

    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }

    .stat-card.primary { border-left-color: var(--primary); }
    .stat-card.success { border-left-color: var(--success); }
    .stat-card.warning { border-left-color: var(--warning); }
    .stat-card.danger { border-left-color: var(--danger); }
    .stat-card.info { border-left-color: var(--info); }
    .stat-card.purple { border-left-color: var(--purple); }
    .stat-card.secondary { border-left-color: var(--secondary); }

    .stat-card-bg {
        position: absolute;
        top: -20px;
        right: -20px;
        width: 100px;
        height: 100px;
        border-radius: 50%;
        opacity: 0.06;
    }

    .stat-card.primary .stat-card-bg { background: var(--primary); }
    .stat-card.success .stat-card-bg { background: var(--success); }
    .stat-card.warning .stat-card-bg { background: var(--warning); }
    .stat-card.danger .stat-card-bg { background: var(--danger); }
    .stat-card.info .stat-card-bg { background: var(--info); }
    .stat-card.purple .stat-card-bg { background: var(--purple); }
    .stat-card.secondary .stat-card-bg { background: var(--secondary); }

    .stat-label {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--gray);
        margin-bottom: 8px;
    }

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

    .stat-icon {
        position: absolute;
        top: 22px;
        right: 22px;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }

    .stat-card.primary .stat-icon { background: rgba(30, 64, 175, 0.1); color: var(--primary); }
    .stat-card.success .stat-icon { background: rgba(5, 150, 105, 0.1); color: var(--success); }
    .stat-card.warning .stat-icon { background: rgba(217, 119, 6, 0.1); color: var(--warning); }
    .stat-card.danger .stat-icon { background: rgba(220, 38, 38, 0.1); color: var(--danger); }
    .stat-card.info .stat-icon { background: rgba(2, 132, 199, 0.1); color: var(--info); }
    .stat-card.purple .stat-icon { background: rgba(124, 58, 237, 0.1); color: var(--purple); }
    .stat-card.secondary .stat-icon { background: rgba(15, 118, 110, 0.1); color: var(--secondary); }

    .stat-footer {
        font-size: 12px;
        color: var(--gray);
        margin-top: 4px;
    }

    /* ============================================================
    BUTTONS
    ============================================================ */
    .aw-btn, .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 9px 18px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        transition: var(--transition);
        white-space: nowrap;
    }

    .aw-btn:hover, .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

    .aw-btn:active, .btn:active {
        transform: translateY(0);
    }

    .aw-btn-primary, .btn-primary {
        background: var(--primary) !important;
        color: var(--white) !important;
        border-color: var(--primary) !important;
    }

    .aw-btn-primary:hover, .btn-primary:hover {
        background: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
    }

    .aw-btn-success, .btn-success {
        background: var(--success) !important;
        color: var(--white) !important;
        border-color: var(--success) !important;
    }

    .aw-btn-success:hover, .btn-success:hover {
        background: #047857 !important;
        border-color: #047857 !important;
    }

    .aw-btn-danger, .btn-danger {
        background: var(--danger) !important;
        color: var(--white) !important;
        border-color: var(--danger) !important;
    }

    .aw-btn-danger:hover, .btn-danger:hover {
        background: #b91c1c !important;
        border-color: #b91c1c !important;
    }

    .aw-btn-warning, .btn-warning {
        background: var(--warning) !important;
        color: var(--white) !important;
        border-color: var(--warning) !important;
    }

    .aw-btn-warning:hover, .btn-warning:hover {
        background: #b45309 !important;
        border-color: #b45309 !important;
    }

    .aw-btn-info, .btn-info {
        background: var(--info) !important;
        color: var(--white) !important;
        border-color: var(--info) !important;
    }

    .aw-btn-secondary, .btn-secondary {
        background: var(--gray) !important;
        color: var(--white) !important;
        border-color: var(--gray) !important;
    }

    .aw-btn-outline-primary, .btn-outline-primary {
        background: transparent !important;
        color: var(--primary) !important;
        border: 1.5px solid var(--primary) !important;
    }

    .aw-btn-outline-primary:hover, .btn-outline-primary:hover {
        background: var(--primary) !important;
        color: var(--white) !important;
    }

    .aw-btn-outline-danger, .btn-outline-danger {
        background: transparent !important;
        color: var(--danger) !important;
        border: 1.5px solid var(--danger) !important;
    }

    .aw-btn-outline-danger:hover, .btn-outline-danger:hover {
        background: var(--danger) !important;
        color: var(--white) !important;
    }

    .aw-btn-sm, .btn-sm {
        padding: 6px 12px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
    }

    .aw-btn-lg, .btn-lg {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    .aw-btn-icon, .btn-icon {
        width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 8px;
    }

    /* ============================================================
    FORMS
    ============================================================ */
    .form-label {
        display: block;
        font-size: 12.5px;
        font-weight: 600;
        color: var(--dark);
        margin-bottom: 6px;
    }

    .form-label .required::after {
        content: ' *';
        color: var(--danger);
    }

    .form-control, .form-select {
        width: 100%;
        padding: 10px 14px;
        font-size: 13.5px;
        font-family: inherit;
        color: var(--dark);
        background: var(--white);
        border: 1.5px solid var(--gray-lighter);
        border-radius: 8px;
        transition: var(--transition);
    }

    .form-control:focus, .form-select:focus {
        outline: none;
        border-color: var(--primary-light);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    }

    .form-control::placeholder {
        color: var(--gray-light);
    }

    .form-select {
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 34px;
    }

    textarea.form-control {
        resize: vertical;
        min-height: 80px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0 16px;
    }

    .input-group {
        display: flex;
        align-items: stretch;
    }

    .input-group-text {
        display: flex;
        align-items: center;
        padding: 10px 14px;
        font-size: 13.5px;
        font-weight: 500;
        color: var(--gray);
        background: var(--light);
        border: 1.5px solid var(--gray-lighter);
        border-radius: 8px 0 0 8px;
        border-right: none;
        white-space: nowrap;
    }

    .input-group .form-control {
        border-radius: 0 8px 8px 0;
        flex: 1;
    }

    /* ============================================================
    TABLES
    ============================================================ */
    .table-container {
        overflow-x: auto;
        border-radius: var(--card-radius);
    }

    .data-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
    }

    .data-table thead th {
        background: var(--lighter);
        color: var(--gray);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 12px 16px;
        text-align: left;
        border-bottom: 1.5px solid var(--gray-lighter);
        white-space: nowrap;
    }

    .data-table tbody td {
        padding: 14px 16px;
        border-bottom: 1px solid var(--gray-lighter);
        color: var(--dark);
        vertical-align: middle;
    }

    .data-table tbody tr {
        transition: var(--transition);
    }

    .data-table tbody tr:hover {
        background: rgba(59, 130, 246, 0.03);
    }

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

    /* ============================================================
    BADGES
    ============================================================ */
    .badge {
        display: inline-flex;
        align-items: center;
        padding: 4px 10px;
        font-size: 11px;
        font-weight: 600;
        border-radius: 20px;
        white-space: nowrap;
    }

    .badge-success {
        background: rgba(5, 150, 105, 0.1);
        color: var(--success);
    }

    .badge-danger {
        background: rgba(220, 38, 38, 0.1);
        color: var(--danger);
    }

    .badge-warning {
        background: rgba(217, 119, 6, 0.1);
        color: var(--warning);
    }

    .badge-info {
        background: rgba(2, 132, 199, 0.1);
        color: var(--info);
    }

    .badge-primary {
        background: rgba(30, 64, 175, 0.1);
        color: var(--primary);
    }

    .badge-purple {
        background: rgba(124, 58, 237, 0.1);
        color: var(--purple);
    }

    .badge-secondary {
        background: var(--gray-lighter);
        color: var(--gray);
    }

    .badge-dark {
        background: var(--dark);
        color: var(--white);
    }

    /* ============================================================
    ALERTS
    ============================================================ */
    .alert {
        padding: 14px 18px;
        border-radius: 10px;
        margin-bottom: 20px;
        font-size: 13.5px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .alert-success {
        background: rgba(5, 150, 105, 0.08);
        color: var(--success);
        border: 1px solid rgba(5, 150, 105, 0.2);
    }

    .alert-danger {
        background: rgba(220, 38, 38, 0.08);
        color: var(--danger);
        border: 1px solid rgba(220, 38, 38, 0.2);
    }

    .alert-warning {
        background: rgba(217, 119, 6, 0.08);
        color: var(--warning);
        border: 1px solid rgba(217, 119, 6, 0.2);
    }

    .alert-info {
        background: rgba(2, 132, 199, 0.08);
        color: var(--info);
        border: 1px solid rgba(2, 132, 199, 0.2);
    }

    .btn-close {
        margin-left: auto;
        background: none;
        border: none;
        font-size: 16px;
        cursor: pointer;
        color: inherit;
        opacity: 0.6;
    }

    .btn-close:hover {
        opacity: 1;
    }

    /* ============================================================
    PAGINATION
    ============================================================ */
    .pagination {
        display: flex;
        align-items: center;
        gap: 4px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .page-link {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        font-size: 13px;
        font-weight: 600;
        color: var(--gray);
        background: var(--white);
        border: 1.5px solid var(--gray-lighter);
        border-radius: 8px;
        cursor: pointer;
        transition: var(--transition);
    }

    .page-link:hover {
        background: var(--light);
        color: var(--primary);
        border-color: var(--primary-light);
    }

    .page-link.active {
        background: var(--primary);
        color: var(--white);
        border-color: var(--primary);
    }

    .page-link.disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    /* ============================================================
    MODAL
    ============================================================ */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 2000;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        backdrop-filter: blur(4px);
    }

    .modal-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .modal {
        background: var(--white);
        border-radius: 16px;
        box-shadow: var(--shadow-xl);
        max-width: 600px;
        width: 90%;
        max-height: 90vh;
        overflow: hidden;
        transform: scale(0.9) translateY(20px);
        transition: var(--transition);
    }

    .modal-overlay.show .modal {
        transform: scale(1) translateY(0);
    }

    .modal-lg {
        max-width: 900px;
    }

    .modal-header {
        padding: 20px 24px;
        border-bottom: 1px solid var(--gray-lighter);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .modal-title {
        font-size: 16px;
        font-weight: 700;
        color: var(--dark);
    }

    .modal-close {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: var(--light);
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 14px;
        color: var(--gray);
        transition: var(--transition);
    }

    .modal-close:hover {
        background: var(--danger);
        color: var(--white);
    }

    .modal-body {
        padding: 24px;
        overflow-y: auto;
        max-height: calc(90vh - 140px);
    }

    .modal-footer {
        padding: 16px 24px;
        border-top: 1px solid var(--gray-lighter);
        display: flex;
        justify-content: flex-end;
        gap: 10px;
    }

    /* ============================================================
    LOGIN PAGE
    ============================================================ */
    .login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: var(--sidebar-bg);
    position: relative;
    overflow: hidden;
    padding-right: 5%;
}

    .login-bg-pattern {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        opacity: 0.04;
        background-image: 
            radial-gradient(circle at 25% 25%, white 2px, transparent 2px),
            radial-gradient(circle at 75% 75%, white 2px, transparent 2px);
        background-size: 60px 60px;
    }

    .login-card {
        background: var(--white);
        border-radius: 20px;
        box-shadow: var(--shadow-xl);
        width: 100%;
        max-width: 420px;
        padding: 40px;
        position: relative;
        z-index: 1;
    }

    .login-logo {
        text-align: center;
        margin-bottom: 30px;
    }

    .login-logo-icon {
        width: 60px;
        height: 60px;
        background: var(--primary);
        border-radius: 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        font-size: 24px;
        font-weight: 700;
        margin-bottom: 16px;
    }

    .login-logo h1 {
        font-size: 22px;
        font-weight: 800;
        color: var(--dark);
        margin-bottom: 4px;
    }

    .login-logo p {
        font-size: 13px;
        color: var(--gray);
    }

    .login-form .form-group {
        margin-bottom: 18px;
    }

    .login-form .form-control {
        padding: 12px 16px;
        font-size: 14px;
    }

    .login-btn {
        width: 100%;
        padding: 13px;
        font-size: 14px;
        font-weight: 700;
        margin-top: 8px;
    }

    .login-footer {
        text-align: center;
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid var(--gray-lighter);
        font-size: 12px;
        color: var(--gray);
    }

    .login-footer strong {
        color: var(--dark);
    }

    /* ============================================================
    TABS
    ============================================================ */
    .tabs {
        display: flex;
        gap: 4px;
        border-bottom: 2px solid var(--gray-lighter);
        margin-bottom: 20px;
    }

    .tab-btn {
        padding: 12px 20px;
        font-size: 13.5px;
        font-weight: 600;
        color: var(--gray);
        background: none;
        border: none;
        border-bottom: 2px solid transparent;
        margin-bottom: -2px;
        cursor: pointer;
        transition: var(--transition);
    }

    .tab-btn:hover {
        color: var(--primary);
    }

    .tab-btn.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
    }

    .tab-content {
        display: none;
    }

    .tab-content.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* ============================================================
    SEARCH & FILTER BAR
    ============================================================ */
    .filter-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        align-items: center;
        margin-bottom: 20px;
        padding: 14px 18px;
        background: var(--white);
        border-radius: var(--card-radius);
        box-shadow: var(--shadow);
    }

    .filter-bar .form-control,
    .filter-bar .form-select {
        width: auto;
        min-width: 160px;
    }

    .search-box {
        position: relative;
        flex: 1;
        min-width: 240px;
    }

    .search-box i {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gray-light);
        font-size: 13px;
    }

    .search-box .form-control {
        padding-left: 38px;
    }

    /* ============================================================
    TIMELINE / ACTIVITY FEED
    ============================================================ */
    .timeline {
        position: relative;
        padding-left: 28px;
    }

    .timeline::before {
        content: '';
        position: absolute;
        left: 8px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: var(--gray-lighter);
    }

    .timeline-item {
        position: relative;
        padding-bottom: 18px;
    }

    .timeline-dot {
        position: absolute;
        left: -28px;
        top: 2px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: var(--primary-light);
        border: 3px solid var(--white);
        box-shadow: 0 0 0 2px var(--gray-lighter);
    }

    .timeline-dot.success { background: var(--success); }
    .timeline-dot.danger { background: var(--danger); }
    .timeline-dot.warning { background: var(--warning); }
    .timeline-dot.info { background: var(--info); }

    .timeline-content {
        background: var(--lighter);
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 13px;
    }

    .timeline-title {
        font-weight: 600;
        color: var(--dark);
        margin-bottom: 4px;
    }

    .timeline-desc {
        color: var(--gray);
        font-size: 12.5px;
    }

    .timeline-time {
        font-size: 11px;
        color: var(--gray-light);
        margin-top: 4px;
    }

    /* ============================================================
    PRINT STYLES
    ============================================================ */
    @media print {
        .sidebar,
        .top-header,
        .no-print,
        .btn {
            display: none !important;
        }
        .main-content {
            margin-left: 0 !important;
        }
        .card {
            box-shadow: none !important;
            border: 1px solid #ddd !important;
        }
    }

    /* ============================================================
    RESPONSIVE
    ============================================================ */
    @media (max-width: 1024px) {
        .sidebar {
            transform: translateX(-100%);
        }
        
        .sidebar.show {
            transform: translateX(0);
        }
        
        .main-content {
            margin-left: 0;
        }
        
        .sidebar-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 999;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition);
        }
        
        .sidebar-overlay.active {
            opacity: 1;
            visibility: visible;
        }
    }

    @media (max-width: 768px) {
        .content-area {
            padding: 16px;
        }
        
        .stat-value {
            font-size: 22px;
        }
        
        .filter-bar {
            flex-direction: column;
            align-items: stretch;
        }
        
        .filter-bar .form-control,
        .filter-bar .form-select {
            width: 100%;
        }
        
        .search-box {
            min-width: 100%;
        }
        
        .form-row {
            grid-template-columns: 1fr;
        }
        
        .card-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }
        
        .login-card {
            margin: 16px;
            padding: 30px 24px;
        }
        
        /* Mobile dropdown fix */
        .header-dropdown-menu {
            right: -20px;
            min-width: 200px;
        }
    }

    /* ============================================================
    ANIMATIONS
    ============================================================ */
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes pulse {
        0%, 100% {
            opacity: 1;
        }
        50% {
            opacity: 0.5;
        }
    }

    .animate-slide-up {
        animation: slideUp 0.4s ease forwards;
    }

    .animate-slide-down {
        animation: slideDown 0.3s ease forwards;
    }

    /* ============================================================
    LOADING SPINNER
    ============================================================ */
    .spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        border-top-color: var(--white);
        animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }

    /* ============================================================
    QUOTATION PDF PREVIEW
    ============================================================ */
    .quotation-preview {
        background: var(--white);
        border: 1px solid var(--gray-lighter);
        border-radius: var(--card-radius);
        padding: 30px;
        max-width: 800px;
        margin: 0 auto;
    }

    .quotation-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 2px solid var(--primary);
    }

    .quotation-company h2 {
        font-size: 22px;
        font-weight: 800;
        color: var(--primary);
        margin-bottom: 6px;
    }

    .quotation-company p {
        font-size: 12px;
        color: var(--gray);
        line-height: 1.6;
    }

    .quotation-meta {
        text-align: right;
    }

    .quotation-meta .qtn-number {
        font-size: 16px;
        font-weight: 700;
        color: var(--dark);
    }

    .quotation-meta .qtn-date {
        font-size: 12px;
        color: var(--gray);
        margin-top: 4px;
    }

    .quotation-details {
        margin-bottom: 24px;
    }

    .quotation-details h4 {
        font-size: 13px;
        font-weight: 700;
        color: var(--dark);
        margin-bottom: 8px;
        text-transform: uppercase;
    }

    .quotation-details p {
        font-size: 13px;
        color: var(--gray);
        line-height: 1.6;
    }

    .quotation-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 24px;
    }

    .quotation-table th {
        background: var(--lighter);
        padding: 12px;
        text-align: left;
        font-size: 12px;
        font-weight: 700;
        color: var(--dark);
        border-bottom: 2px solid var(--gray-lighter);
    }

    .quotation-table td {
        padding: 12px;
        font-size: 13px;
        border-bottom: 1px solid var(--gray-lighter);
    }

    .quotation-total {
        margin-left: auto;
        width: 300px;
    }

    .quotation-total-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        font-size: 13px;
        border-bottom: 1px solid var(--gray-lighter);
    }

    .quotation-total-row.grand-total {
        font-size: 16px;
        font-weight: 800;
        color: var(--primary);
        border-bottom: 2px solid var(--primary);
        border-top: 2px solid var(--primary);
        margin-top: 4px;
    }

    /* ============================================================
    QUOTATION CALCULATOR
    ============================================================ */
    .calc-row {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
        gap: 10px;
        align-items: end;
        margin-bottom: 10px;
        padding: 14px;
        background: var(--lighter);
        border-radius: 10px;
    }

    .calc-summary {
        background: var(--lighter);
        border-radius: 12px;
        padding: 20px;
        margin-top: 16px;
    }

    .calc-summary-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        font-size: 14px;
        border-bottom: 1px dashed var(--gray-lighter);
    }

    .calc-summary-row.total {
        font-size: 18px;
        font-weight: 800;
        color: var(--primary);
        border-bottom: none;
        border-top: 2px solid var(--primary);
        margin-top: 8px;
        padding-top: 12px;
    }

    /* ============================================================
    CHART CONTAINER
    ============================================================ */
    .chart-container {
        position: relative;
        height: 300px;
        width: 100%;
    }

    .chart-container-sm {
        height: 220px;
    }

    /* ============================================================
    EMPTY STATE
    ============================================================ */
    .empty-state {
        text-align: center;
        padding: 50px 20px;
    }

    .empty-state-icon {
        width: 80px;
        height: 80px;
        background: var(--lighter);
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        color: var(--gray-light);
        margin-bottom: 16px;
    }

    .empty-state h4 {
        font-size: 16px;
        font-weight: 700;
        color: var(--dark);
        margin-bottom: 8px;
    }

    .empty-state p {
        font-size: 13px;
        color: var(--gray);
    }

    /* ============================================================
    TOOLTIP
    ============================================================ */
    .tooltip {
        position: relative;
    }

    .tooltip::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(-6px);
        background: var(--dark);
        color: var(--white);
        font-size: 11px;
        padding: 5px 10px;
        border-radius: 6px;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 100;
    }

    .tooltip:hover::after {
        opacity: 1;
        visibility: visible;
    }

    /* ============================================================
    CUSTOM SCROLLBAR
    ============================================================ */
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    ::-webkit-scrollbar-track {
        background: var(--light);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--gray-light);
        border-radius: 3px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--gray);
    }

    /* ============================================================
    Z-INDEX HIERARCHY FIX
    ============================================================ */
    .sidebar-overlay { z-index: 999 !important; }
    .sidebar { z-index: 1000 !important; }
    .top-header { z-index: 1020 !important; }
    .header-dropdown { z-index: 1030 !important; }
    .header-dropdown-menu { z-index: 9999 !important; }
    .modal-overlay { z-index: 2000 !important; }
/* ============================================
           🔥 SIDEBAR COLLAPSE/EXPAND STYLES
           ============================================ */
        .sidebar {
            transition: width 0.3s ease;
        }

        .sidebar.collapsed {
            width: 70px;
        }

        .sidebar.collapsed .sidebar-brand {
            justify-content: center;
            padding: 20px 10px;
        }

        .sidebar.collapsed .sidebar-brand-logo {
            margin-right: 0;
        }

        .sidebar.collapsed .sidebar-brand-text,
        .sidebar.collapsed .nav-section-title,
        .sidebar.collapsed .user-details {
            opacity: 0;
            visibility: hidden;
            width: 0;
            overflow: hidden;
            transition: all 0.2s ease;
        }

        .sidebar.collapsed .nav-link {
            justify-content: center;
            padding: 10px;
        }

        .sidebar.collapsed .nav-link i {
            margin-right: 0;
            font-size: 16px;
        }

        .sidebar.collapsed .nav-link .arrow {
            display: none;
        }

        .sidebar.collapsed .submenu {
            display: none !important;
        }

        .sidebar.collapsed .user-info {
            justify-content: center;
        }

        .sidebar.collapsed .user-avatar {
            margin-right: 0;
        }

        /* Tooltip on collapsed hover */
        .sidebar.collapsed .nav-link:hover::after {
            content: attr(data-title);
            position: absolute;
            left: 75px;
            top: 50%;
            transform: translateY(-50%);
            background: #1e293b;
            color: #ffffff;
            padding: 8px 14px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            white-space: nowrap;
            z-index: 1001;
            box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
            opacity: 0;
            animation: tooltipFade 0.2s ease forwards;
            pointer-events: none;
        }

        @keyframes tooltipFade {
            from { opacity: 0; transform: translateY(-50%) translateX(-5px); }
            to { opacity: 1; transform: translateY(-50%) translateX(0); }
        }

        /* 🔥 SIDEBAR TOGGLE BUTTON */
        .sidebar-toggle-btn {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: rgba(255,255,255,0.08);
            border: none;
            color: rgba(255,255,255,0.6);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 14px;
            z-index: 2;
        }

        .sidebar-toggle-btn:hover {
            background: rgba(255,255,255,0.15);
            color: #ffffff;
        }

        .sidebar.collapsed .sidebar-toggle-btn {
            right: 50%;
            transform: translate(50%, -50%);
        }

        .sidebar.collapsed .sidebar-toggle-btn i {
            transform: rotate(180deg);
            transition: transform 0.3s ease;
        }

        /* Main content expanded */
        .main-content {
            transition: margin-left 0.3s ease;
        }

        .main-content.expanded {
            margin-left: 70px;
        }

        /* Mobile: disable collapsed state */
        @media (max-width: 768px) {
            .sidebar.collapsed {
                width: 260px !important;
            }
            .sidebar.collapsed .sidebar-brand-text,
            .sidebar.collapsed .nav-section-title,
            .sidebar.collapsed .user-details,
            .sidebar.collapsed .nav-link span,
            .sidebar.collapsed .submenu {
                opacity: 1 !important;
                visibility: visible !important;
                width: auto !important;
                display: block !important;
            }
            .sidebar.collapsed .nav-link {
                justify-content: flex-start !important;
                padding: 10px 15px !important;
            }
            .sidebar.collapsed .nav-link i {
                margin-right: 10px !important;
            }
            .main-content.expanded {
                margin-left: 0 !important;
            }
        }
        .login-page {
    background: url("../img/llogin-bg.jpg.png") no-repeat center center !important;
    background-size: cover !important;
}

/* ============================================================
   🔒 CAPTCHA STYLES
   ============================================================ */
.captcha-box {
    margin: 20px 0;
    padding: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px dashed #7dd3fc;
    border-radius: 14px;
}

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

.captcha-header label {
    font-size: 13px;
    font-weight: 700;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-btn {
    background: #0ea5e9;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

#captchaCanvas {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #fff;
    display: block;
    margin-bottom: 12px;
    width: 100%;
    max-width: 180px;
}

.captcha-box .input-group {
    margin-top: 0;
}

.captcha-box .input-group .form-control {
    border-radius: 0 8px 8px 0;
}