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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f7fb;
    color: #333333;
    font-size: 12px;
    font-weight: 300;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed; /* Fixed positioning instead of sticky */
    top: 0;
    left: 0;
    overflow-y: auto; /* Allow scrolling within the sidebar if content is too tall */
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3186ad 0%, #26639d 100%);
    border-radius: 6px;
    margin-right: 0.75rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333333;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    color: #718096;
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.nav-item:hover {
    background-color: #f7fafc;
    color: #333333;
}

.nav-item.active {
    background-color: #e6f1f8;
    color: #3186ad;
    border-right: 3px solid #3186ad;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header Styles */
.header {
    height: 64px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

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

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #333333;
    font-family: 'Lato', Arial, sans-serif;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e53e3e;
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
}

.create-po-btn {
    background: #3186ad;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 1px;
    font-weight: 500;
    font-family: 'Lato', Arial, sans-serif;
    text-transform: uppercase;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.create-po-btn:hover {
    background: #474e53;
}

/* Adjust the main content to accommodate the fixed sidebar */
.main-wrapper {
    margin-left: 240px; /* Same as sidebar width */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: 1px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f2f2f2;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    margin-left: 1rem;
    margin-top: 1rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333333;
    font-family: 'Lato', Arial, sans-serif;
}

.stat-card {
    background: white;
    border-radius: 1px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f2f2f2;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333333;
}

.stat-label {
    color: #718096;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: #38a169;
}

.stat-change.negative {
    color: #e53e3e;
}

/* Alert Card */
.alert-card {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 1px;
    padding: 1.5rem;
}

.alert-card .card-title {
    color: #c53030;
}

.alert-list {
    list-style: none;
    margin-top: 1rem;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #fed7d7;
}

.alert-item:last-child {
    border-bottom: none;
}

.reorder-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 1px;
    font-size: 0.875rem;
    text-transform: uppercase;
    font-family: 'Lato', Arial, sans-serif;
    cursor: pointer;
}

.reorder-btn:hover {
    background: #474e53;
}

/* Inventory Snapshot */
.inventory-card {
    background: white;
    border-radius: 1px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f2f2f2;
}

.location-inventory {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.location-inventory:last-child {
    border-bottom: none;
}

.location-name {
    font-weight: 500;
}

.location-qty {
    font-weight: 600;
    color: #3186ad;
}

/* Full-width sections */
.full-width-section {
    grid-column: 1 / -1;
    background: white;
    border-radius: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f2f2f2;
    margin-top: 1.5rem;
}

.datapage-container {
    min-height: 200px;
    display: flex;
    color: #718096;
    font-style: italic;
    border: 2px dashed #e2e8f0;
    border-radius: 1px;
    margin: 1rem;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 1.5rem;
}

.tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    color: #718096;
    font-family: Arial, sans-serif;
}

.tab.active {
    color: #3186ad;
    border-bottom-color: #3186ad;
}

.tab-content {
    display: none;
    padding: 1.5rem;
}

.tab-content.active {
    display: block;
}

/* User Profile */
.user-profile {
    margin-top: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-weight: 600;
    color: #4a5568;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: #718096;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 1px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #f2f2f2;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f2f2f2;
}

.modal-body {
    padding: 1.5rem;
}

.close-modal {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #718096;
    transition: color 0.15s ease;
}

.close-modal:hover {
    color: #333333;
}