/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --danger-color: #e63946;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-color: #dee2e6;
    --sidebar-width: 240px;
    --positive-trend: #4cc9f0;
    --negative-trend: #e63946;
    --neutral-trend: #6c757d;
}

body {
    background-color: #f5f7fa;
    color: var(--dark-color);
}

/* Container Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 20px 20px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.logo-icon {
    margin-right: 10px;
    font-size: 1.8rem;
}

.menu {
    list-style: none;
}

.menu li {
    margin-bottom: 5px;
}

.menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.menu li a:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

.menu li.active a {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.menu-icon {
    margin-right: 10px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.user-profile {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: white;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
}

.user-name {
    font-weight: 600;
}

.user-role {
    font-size: 0.8rem;
    color: var(--gray-color);
}

/* Main Content Styles */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
}

.search-container {
    position: relative;
    margin-right: 20px;
}

.search-container input {
    padding: 8px 15px 8px 35px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 200px;
}

.search-container i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dashboard Card Styles */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    font-weight: 600;
    color: var(--gray-color);
}

.card-icon {
    font-size: 1.5rem;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.card-trend {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.card-trend.positive {
    color: var(--positive-trend);
}

.card-trend.negative {
    color: var(--negative-trend);
}

.card-trend.neutral {
    color: var(--neutral-trend);
}

.card-trend span {
    margin-right: 5px;
}

/* Section Styles */
.section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.section-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Batch Status Styles */
.batch-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.batch-card {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
}

.batch-name {
    font-weight: 600;
    margin-bottom: 10px;
}

.batch-progress {
    margin-top: 10px;
}

.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    border-radius: 4px;
}

.progress.pending {
    background-color: #adb5bd;
}

.progress.in-progress {
    background-color: var(--primary-color);
}

.progress.review {
    background-color: #fb8500;
}

.progress.complete {
    background-color: #52b788;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-color);
}

/* Alerts Table Styles */
.alerts-table-container {
    overflow-x: auto;
}

.alerts-table {
    width: 100%;
    border-collapse: collapse;
}

.alerts-table th,
.alerts-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.alerts-table th {
    font-weight: 600;
    color: var(--gray-color);
    border-bottom: 2px solid var(--border-color);
}

.alerts-table tr:last-child td {
    border-bottom: none;
}

.priority {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.priority.high {
    background-color: rgba(230, 57, 70, 0.1);
    color: var(--danger-color);
}

.priority.medium {
    background-color: rgba(251, 133, 0, 0.1);
    color: #fb8500;
}

.priority.low {
    background-color: rgba(29, 144, 167, 0.1);
    color: #1d90a7;
}

.actions {
    display: flex;
    gap: 10px;
}

.actions a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.actions a:hover {
    text-decoration: underline;
}

.actions a.resolve-alert {
    color: #52b788;
}

.empty-alerts {
    text-align: center;
    color: var(--gray-color);
    padding: 20px 0;
    font-style: italic;
}

/* Recent Activities Styles */
.activities {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity {
    display: flex;
    gap: 15px;
    padding: 10px;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.green {
    background-color: rgba(82, 183, 136, 0.2);
    color: #52b788;
}

.activity-icon.yellow {
    background-color: rgba(251, 133, 0, 0.2);
    color: #fb8500;
}

.activity-icon.blue {
    background-color: rgba(29, 144, 167, 0.2);
    color: #1d90a7;
}

.activity-icon.red {
    background-color: rgba(230, 57, 70, 0.2);
    color: var(--danger-color);
}

.activity-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.activity-description {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--gray-color);
    font-style: italic;
}

/* Button Styles */
.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
}

.secondary-btn {
    background-color: transparent;
    color: var(--gray-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background-color: #f8f9fa;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

/* Content Views */
.content-view {
    display: none;
}

.content-view.active-view {
    display: block;
}

/* Loading States */
.loading-placeholder {
    padding: 20px;
    text-align: center;
    color: var(--gray-color);
    font-style: italic;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .container.show-sidebar .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .batch-status {
        grid-template-columns: 1fr;
    }
    
    .search-container input {
        width: 150px;
    }
    
    .header h1 {
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    .header h1::after {
        content: "☰";
        margin-left: 10px;
        color: var(--gray-color);
    }
}