        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Roboto, Arial, sans-serif;
        }

        body {
            background: #f5f6f8;
            display: flex;
            justify-content: center;
            min-height: 100vh;
            width: 100%;
            padding: 0;
            overflow-x: hidden;
        }

        .main-window {
            width: 100%;
            max-width: 100%;
            background: #f5f6f8;
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
        }

        .branding-row {
            background: #1F4E79;
            height: 45px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 15px;
        }

        .company-title {
            font-family: 'Segoe UI', Arial, sans-serif;
            font-size: 22px;
            font-weight: 600;
        }

        .company-title .softifyx {
            color: #FFFFFF;
        }

        .company-title .company-name {
            color: #F5A623;
            margin-left: 5px;
        }

        .toolbar-row {
            background: #214F77;
            height: 42px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 15px;
            position: relative;
        }

        .nav-menu {
            display: flex;
            gap: 20px;
        }

        .menu-item {
            position: relative;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            padding: 5px 0;
            display: flex;
            align-items: center;
            gap: 5px;
            color: #FFFFFF;
            transition: color 0.2s;
        }

        .menu-item:hover {
            color: #F5A623;
        }

        .menu-item i {
            font-size: 12px;
            margin-left: 3px;
        }

        .mobile-menu-toggle {
            display: none;
            color: white;
            font-size: 20px;
            cursor: pointer;
            padding: 5px;
        }

        .welcome-user {
            color: white;
            font-size: 14px;
            background: rgba(255,255,255,0.15);
            padding: 5px 15px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            gap: 8px;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .welcome-user i {
            color: #F5A623;
            font-size: 16px;
        }

        .divider {
            height: 2px;
            background: #F5A623;
            width: 100%;
        }

        /* DROPDOWN MENU STYLES */
        .dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            background: white;
            border-radius: 6px;
            box-shadow: 0px 8px 20px rgba(0,0,0,0.15);
            min-width: 200px;
            padding: 0;
            display: none;
            z-index: 10000;
            animation: slideDown 0.2s ease;
            margin-top: 5px;
            border: 1px solid #eaeaea;
        }

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

        .dropdown-item {
            padding: 4px 12px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
            position: relative;
            line-height: 1.2;
        }

        .dropdown-item:hover {
            background: #eef3fc;
            color: #1F4E79;
        }

        .dropdown-item.has-nested {
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
        }

        .dropdown-item.has-nested:after {
            content: "►";
            font-size: 10px;
            color: #999;
            margin-left: 10px;
        }

        .nested-dropdown {
            display: none;
            position: absolute;
            top: 0;
            left: 100% !important;
            right: auto !important;
            background: white;
            border-radius: 6px;
            box-shadow: 0px 8px 20px rgba(0,0,0,0.15);
            min-width: 180px;
            padding: 0;
            z-index: 10001;
            border: 1px solid #eaeaea;
            margin-left: 2px;
        }

        .dropdown-item.has-nested:hover > .nested-dropdown,
        .nested-dropdown.show-nested {
            display: block !important;
        }

        .nested-dropdown:hover {
            display: block !important;
        }

        .nested-item {
            padding: 4px 12px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
            line-height: 1.2;
        }

        .nested-item:hover {
            background: #eef3fc;
            color: #1F4E79;
        }

        .dropdown.wide {
            min-width: 240px;
        }

        /* Main Dashboard Layout */
        .dashboard-layout {
            display: flex;
            flex: 1;
            overflow: hidden;
            padding: 10px;
            gap: 10px;
            background: #f0f2f5;
        }

        .left-sidebar {
            width: 250px;
            background: #FFFFFF;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            padding: 8px 0;
            display: flex;
            flex-direction: column;
            height: fit-content;
            max-height: calc(100vh - 110px);
            overflow-y: auto;
        }

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

        .section-header {
            background: #1f4668;
            color: white;
            padding: 6px 10px;
            margin: 0 8px 4px 8px;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .section-header i {
            color: #F5A623;
            font-size: 14px;
        }

        .sidebar-items {
            padding: 0 6px;
        }

        .sidebar-item {
            padding: 4px 6px 4px 12px;
            font-size: 13px;
            color: #444;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            border-radius: 5px;
            margin: 1px 0;
            transition: all 0.2s;
            line-height: 1.2;
        }

        .sidebar-item:hover {
            background: #e9ecef;
            color: #1f4668;
        }

        .sidebar-item i {
            width: 16px;
            color: #F5A623;
            font-size: 12px;
            text-align: center;
        }

        .center-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 12px;
            overflow-y: auto;
            padding-right: 5px;
            max-height: calc(100vh - 110px);
        }

        .welcome-card {
            background: #204b73;
            border-radius: 10px;
            padding: 20px 15px;
            color: white;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative; /* Added for absolute logo placement */
        }

        .welcome-header {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 5px;
        }

        .dashboard-logo {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            width: auto;
            height: 80px; /* Increased from 60px to fill the bar better */
            object-fit: contain;
            /* background, padding, and box-shadow removed as requested */
            border-radius: 8px;
        }

        .softifyx-title {
            font-size: 32px;
            font-weight: 700;
            color: #F5A623;
            letter-spacing: 2.5px;
            margin: 0;
            line-height: 1;
        }

        .licensed-text {
            font-size: 13px;
            color: rgba(255,255,255,0.8);
            margin-bottom: 8px;
            text-transform: uppercase;
        }

        .company-badge {
            display: inline-block;
            border: 2px solid #F5A623;
            border-radius: 25px;
            padding: 5px 20px;
            color: white;
            font-size: 15px;
            font-weight: 500;
            background: rgba(255,255,255,0.1);
        }

        .search-date-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
        }

        .search-wrapper {
            flex: 1;
            position: relative;
            display: flex;
            align-items: center;
        }

        .search-wrapper i {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: #999;
            font-size: 14px;
        }

        .search-input {
            width: 100%;
            height: 38px;
            border: 1px solid #e0e4e8;
            border-radius: 6px 0 0 6px;
            padding: 0 10px 0 35px;
            font-size: 13px;
            background: white;
            transition: all 0.2s;
        }

        .search-input:focus {
            outline: none;
            border-color: #1f4668;
            box-shadow: 0 0 0 2px rgba(31,70,104,0.1);
        }

        .search-btn {
            height: 38px;
            padding: 0 15px;
            background: #1f4668;
            color: white;
            border: none;
            border-radius: 0 6px 6px 0;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
        }

        .search-btn:hover {
            background: #153550;
        }

        .date-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
            background: white;
            padding: 0 12px;
            height: 38px;
            border-radius: 6px;
            border: 1px solid #e0e4e8;
        }

        .date-wrapper i {
            color: #F5A623;
            font-size: 14px;
        }

        .date-wrapper span {
            font-size: 13px;
            color: #555;
            font-weight: 500;
        }

        .date-wrapper input {
            border: none;
            padding: 3px;
            font-size: 13px;
            color: #333;
            width: 100px;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }

        .stat-card {
            background: white;
            border-radius: 8px;
            padding: 8px 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .stat-header {
            display: flex;
            align-items: center;
            gap: 4px;
            color: #666;
            font-size: 12px;
            font-weight: 500;
            margin-bottom: 3px;
        }

        .stat-header i {
            color: #F5A623;
            font-size: 13px;
        }

        .stat-value {
            font-size: 18px;
            font-weight: 700;
            color: #1f4668;
            margin-bottom: 2px;
        }

        .stat-badge {
            background: #ffe5e5;
            color: #d63031;
            padding: 2px 6px;
            border-radius: 20px;
            font-size: 10px;
            display: inline-block;
            font-weight: 500;
        }

        .financial-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
        }

        .financial-card {
            background: white;
            border-radius: 8px;
            padding: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .financial-card h3 {
            color: #1f4668;
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 8px;
            padding-bottom: 5px;
            border-bottom: 2px solid #F5A623;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .financial-card h3 i {
            color: #F5A623;
            font-size: 15px;
        }

        .financial-row {
            display: flex;
            justify-content: space-between;
            padding: 4px 0;
            font-size: 13px;
            color: #555;
            border-bottom: 1px dashed #e0e4e8;
        }

        .financial-row:last-child {
            border-bottom: none;
        }

        .financial-row .label {
            color: #777;
        }

        .financial-row .value {
            font-weight: 600;
            color: #1f4668;
        }

        .highlight-row {
            background: #f4f6f8;
            margin: 3px -5px;
            padding: 4px 5px;
            border-radius: 4px;
            font-weight: 600;
        }

        .widgets-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 5px;
        }

        .widget-card {
            background: white;
            border-radius: 8px;
            padding: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .widget-title {
            color: #1f4668;
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .widget-title i {
            color: #F5A623;
            font-size: 15px;
        }

        .graph-bars {
            display: flex;
            align-items: flex-end;
            gap: 10px;
            height: 90px;
            margin-top: 10px;
        }

        .bar-container {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .bar {
            width: 30px;
            background: #1f4668;
            border-radius: 4px 4px 0 0;
            transition: height 0.3s;
        }

        .bar-label {
            font-size: 11px;
            color: #777;
            font-weight: 500;
        }

        .notes-textarea {
            width: 100%;
            min-height: 70px;
            padding: 8px;
            border: 1px solid #e0e4e8;
            border-radius: 6px;
            font-size: 13px;
            resize: vertical;
            margin-bottom: 10px;
        }

        .notes-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
        }

        .right-sidebar {
            width: 260px;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            padding: 15px;
            height: fit-content;
            max-height: calc(100vh - 110px);
            overflow-y: auto;
        }

        .summary-section {
            margin-bottom: 15px;
        }

        .summary-title {
            color: #1f4668;
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 6px;
            padding-bottom: 5px;
            border-bottom: 2px solid #F5A623;
        }

        .summary-title i {
            color: #F5A623;
            font-size: 16px;
        }

        .summary-card {
            background: #FFFFFF;
            border-radius: 8px;
            padding: 10px;
            margin-bottom: 12px;
            border: 1px solid #f0f2f5;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
            cursor: pointer;
            transition: all 0.2s;
        }

        .summary-card:hover {
            box-shadow: 0 4px 8px rgba(31,70,104,0.15);
            transform: translateY(-1px);
        }

        .summary-card h4 {
            color: #1f4668;
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .summary-card h4 i {
            color: #F5A623;
            font-size: 14px;
        }

        .summary-row {
            display: flex;
            justify-content: space-between;
            padding: 3px 0;
            font-size: 12px;
            color: #555;
        }

        .summary-row .value {
            font-weight: 600;
            color: #1f4668;
        }

        .highlight-value {
            color: #F5A623 !important;
            font-weight: 700;
        }

        .alert-badge {
            background: #ffd700;
            color: #1f4668;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
        }

        .alert-badge.danger {
            background: #ffe5e5;
            color: #d63031;
        }

        .btn {
            padding: 8px 20px;
            border: none;
            border-radius: 5px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid transparent;
        }

        .btn-primary, 
        .btn-save,
        button[onclick*="save"]:not(.btn-secondary):not(.btn-danger),
        .modal-actions .btn-success {
            background: #1f4668 !important;
            color: white !important;
        }
        
        .btn-primary:hover,
        .btn-save:hover,
        button[onclick*="save"]:not(.btn-secondary):not(.btn-danger):hover,
        .modal-actions .btn-success:hover {
            background: #153550 !important;
        }

        .btn-success {
            background: #28a745;
            color: white;
        }
        .btn-success:hover {
            background: #218838;
        }

        .btn-danger {
            background: #dc3545;
            color: white;
        }
        .btn-danger:hover {
            background: #c82333;
        }

        .btn-warning {
            background: #ffc107;
            color: #212529;
        }
        .btn-warning:hover {
            background: #e0a800;
        }

        .btn-secondary {
            background: #6c757d;
            color: white;
        }
        .btn-secondary:hover {
            background: #5a6268;
        }

        .btn-sm {
            padding: 4px 12px;
            font-size: 11px;
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.4);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 50000;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal-container {
            background: #FFFFFF;
            border-radius: 10px;
            padding: 20px;
            max-width: 600px;
            width: 90%;
            max-height: 85vh;
            box-shadow: 0 20px 40px rgba(0,0,0,0.2);
            position: relative;
            animation: modalFadeIn 0.2s ease;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            border: 2px solid #1f4668;
            transition: max-width 0.3s ease;
        }

        .modal-container.modal-wide {
            max-width: 1400px !important;
            width: 95% !important;
        }

        .modal-container.modal-medium {
            max-width: 1000px !important;
            width: 92% !important;
        }

        .employees-sidebar {
            min-width: 250px !important;
            max-width: 350px !important;
        }

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

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 12px;
            margin-bottom: 12px;
            border-bottom: 2px solid #F5A623;
        }

        .modal-header h2 {
            font-size: 20px;
            font-weight: 600;
            color: #1f4668;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .modal-header h2 i {
            color: #F5A623;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 28px;
            cursor: pointer;
            color: #dc3545; /* Red as requested */
            font-weight: 700;
            line-height: 1;
            transition: all 0.2s;
            padding: 0 5px;
            margin-right: -5px; /* Pull it slightly into the corner */
        }

        .modal-close:hover {
            color: #a71d2a;
            transform: scale(1.1);
        }

        .modal-body {
            overflow-y: auto;
            flex: 1;
            padding-right: 5px;
        }

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

        .form-group label {
            display: block;
            font-size: 13px;
            font-weight: 500;
            color: #333;
            margin-bottom: 4px;
        }

        .form-control {
            width: 100%;
            height: 36px;
            border: 1px solid #D1D5DB;
            border-radius: 6px;
            padding: 0 12px;
            font-size: 13px;
            transition: all 0.2s;
        }

        .form-control:focus {
            outline: none;
            border-color: #1f4668;
            box-shadow: 0 0 0 2px rgba(31,70,104,0.1);
        }

        .form-row {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 12px;
        }

        .form-row > * {
            flex: 1 1 calc(50% - 6px);
            min-width: 250px;
        }

        .modal-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 15px;
            padding-top: 12px;
            border-top: 1px solid #e0e4e8;
        }

        .user-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 15px;
            font-size: 13px;
        }

        .user-table th {
            text-align: left;
            padding: 8px 5px;
            color: #1f4668;
            font-weight: 600;
            border-bottom: 2px solid #F5A623;
        }

        .user-table td {
            padding: 8px 5px;
            border-bottom: 1px solid #eee;
        }

        .user-actions {
            display: flex;
            gap: 5px;
        }

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

        .inventory-table th {
            text-align: left;
            padding: 8px 5px;
            color: #1f4668;
            font-weight: 600;
            border-bottom: 2px solid #F5A623;
        }

        .inventory-table td {
            padding: 8px 5px;
            border-bottom: 1px solid #eee;
        }

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

        .low-stock {
            color: #d63031;
            font-weight: 600;
        }

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

        .ur-table th {
            text-align: left;
            padding: 8px 5px;
            color: #1f4668;
            font-weight: 600;
            border-bottom: 2px solid #F5A623;
            position: sticky;
            top: 0;
            background: white;
            z-index: 10;
        }

        .ur-table td {
            padding: 8px 5px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            user-select: none;
        }

        .ur-table tr:hover td {
            background: #f1f8ff;
        }
        
        .ur-table td.indent-level-1 {
            padding-left: 25px;
            color: #555;
        }

        .footer {
            background: white;
            padding: 8px 15px;
            border-top: 1px solid #e0e4e8;
            font-size: 12px;
            color: #777;
            text-align: center;
        }

        ::-webkit-scrollbar {
            width: 4px;
            height: 4px;
        }

        ::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb {
            background: #1f4668;
            border-radius: 10px;
        }

        @media (max-width: 1200px) {
            .dashboard-layout {
                flex-direction: column;
                overflow-y: auto;
            }
            .center-content {
                max-height: none;
                overflow-y: visible;
            }
            .left-sidebar, .right-sidebar {
                width: 100%;
                max-height: none;
            }
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            .financial-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            .widgets-grid {
                grid-template-columns: repeat(1, 1fr);
            }
        }

        @media (max-width: 768px) {
            .left-sidebar, .right-sidebar {
                display: none !important;
            }
            .mobile-menu-toggle {
                display: block;
            }
            .nav-menu {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                width: 100%;
                background: #1F4E79;
                flex-direction: column;
                gap: 0;
                padding: 0;
                box-shadow: 0 5px 15px rgba(0,0,0,0.2);
                z-index: 50000;
                max-height: 80vh;
                overflow-y: auto;
            }
            .nav-menu.active {
                display: flex;
            }
            .menu-item {
                padding: 12px 20px;
                border-bottom: 1px solid rgba(255,255,255,0.05);
                width: 100%;
                text-align: left;
                position: relative;
            }
            .dropdown {
                position: static; /* Mobile: Push other items down instead of overlaying */
                width: 100%;
                box-shadow: none;
                background: rgba(0,0,0,0.1); /* Slightly darker to distinguish from main nav */
                border: none;
                border-radius: 0;
                padding: 0;
                margin-top: 8px;
            }
            .dropdown-item {
                padding: 10px 35px; /* More indent for sub-items */
                color: rgba(255,255,255,0.85);
                border-bottom: 1px solid rgba(255,255,255,0.03);
            }
            .dropdown-item:hover {
                background: rgba(255,255,255,0.1);
                color: white;
            }
            .welcome-user {
                display: none; /* Hide on very small screens to save space */
            }
            .branding-row {
                padding: 0 10px;
            }
            .search-date-bar {
                flex-direction: column;
                align-items: stretch;
            }
            .stats-grid {
                grid-template-columns: 1fr;
            }
            .financial-grid {
                grid-template-columns: 1fr;
            }
            .modal-container {
                width: 95%;
                padding: 15px;
            }
        }

        .logo-preview {
            max-width: 150px;
            max-height: 100px;
            margin: 10px auto;
            display: block;
            border: 2px solid #1f4668;
            border-radius: 6px;
            padding: 5px;
        }

        .logo-preview-container {
            text-align: center;
            margin-bottom: 15px;
            display: none;
        }

        .logo-preview-container.show {
            display: block;
        }
