/* ======================
   General Styles
======================= */
:root {
    --primary-color: #0077B6;
    --primary-dark: #005f92;
    --primary-light: #90e0ef;
    --secondary-color: #00B4D8;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --danger-color: #F44336;
    --info-color: #2196F3;
    --light-gray: #f5f5f5;
    --mid-gray: #e0e0e0;
    --dark-gray: #757575;
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: #f9fafb;
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.5;
}

.container {
    display: flex;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style-type: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.2;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    font-size: 14px;
}

/* ======================
   Sidebar
======================= */
.sidebar {
    width: 250px;
    background-color: white;
    height: 100vh;
    position: fixed;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.logo {
    padding: 20px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--mid-gray);
}

.logo-icon {
    margin-right: 8px;
    font-size: 24px;
}

.menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.menu li {
    margin: 5px 0;
}

.menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-dark);
    transition: var(--transition);
}

.menu a:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.menu li.active a {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-left: 4px solid var(--primary-color);
}

.menu-icon {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.user-profile {
    padding: 16px 20px;
    border-top: 1px solid var(--mid-gray);
    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: 500;
    margin-right: 12px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 500;
}

.user-role {
    font-size: 12px;
    color: var(--dark-gray);
}

/* ======================
   Main Content
======================= */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 24px;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
}

.search-container {
    position: relative;
    margin-right: 16px;
}

.search-container input {
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--mid-gray);
    border-radius: var(--border-radius);
    width: 240px;
    transition: var(--transition);
}

.search-container input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.1);
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-gray);
}

.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ======================
   Dashboard Cards
======================= */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.card {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-title {
    font-weight: 500;
    color: var(--dark-gray);
}

.card-icon {
    font-size: 18px;
}

.card-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-trend {
    font-size: 12px;
    color: var(--dark-gray);
}

.trend-up {
    color: var(--success-color);
}

.trend-down {
    color: var(--danger-color);
}

/* ======================
   Sections
======================= */
.section {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 500;
}

.section-controls {
    display: flex;
    align-items: center;
}

.view-all {
    font-size: 13px;
    color: var(--primary-color);
    transition: var(--transition);
}

.view-all:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* ======================
   Test Categories
======================= */
.test-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.test-category {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 120px;
}

.test-category:hover {
    background-color: var(--mid-gray);
}

.test-category.active {
    background-color: var(--primary-color);
    color: white;
}

.category-name {
    font-weight: 500;
}

.category-count {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
}

.test-category.active .category-count {
    background-color: rgba(255, 255, 255, 0.3);
}

/* ======================
   Tables
======================= */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    background-color: var(--light-gray);
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    color: var(--dark-gray);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 12px 16px;
    border-top: 1px solid var(--mid-gray);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background-color: var(--light-gray);
}

.priority-badge, .status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    display: inline-block;
    white-space: nowrap;
}

.priority-badge.high {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
}

.priority-badge.medium {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.priority-badge.low {
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--info-color);
}

.status-badge.pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.status-badge.in-progress {
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--info-color);
}

.status-badge.completed {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.status-badge.failed {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
}

.actions {
    white-space: nowrap;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-right: 4px;
}

.icon-btn:hover {
    background-color: var(--light-gray);
}

.view-btn:hover {
    color: var(--info-color);
}

.edit-btn:hover {
    color: var(--warning-color);
}

.complete-btn:hover, .start-btn:hover {
    color: var(--success-color);
}

/* ======================
   Test Results
======================= */
.test-results {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.test-result-chart {
    background-color: white;
    padding: 16px;
    border-radius: var(--border-radius);
    height: 300px;
}

.test-result-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.stat-item {
    background-color: var(--light-gray);
    padding: 16px;
    border-radius: var(--border-radius);
}

.stat-label {
    font-size: 13px;
    color: var(--dark-gray);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-trend {
    font-size: 12px;
    color: var(--success-color);
}

/* ======================
   Test Schedule
======================= */
.test-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.schedule-day {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.day-header {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-header h3 {
    font-size: 16px;
    font-weight: 500;
}

.test-count {
    font-size: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
}

.schedule-items {
    padding: 12px;
}

.schedule-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.schedule-item:last-child {
    margin-bottom: 0;
}

.schedule-time {
    font-weight: 500;
    min-width: 80px;
}

.schedule-content {
    flex: 1;
    padding: 0 12px;
}

.schedule-title {
    font-weight: 500;
}

.schedule-details {
    font-size: 12px;
    color: var(--dark-gray);
}

.schedule-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.schedule-status.pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.schedule-status.in-progress {
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--info-color);
}

.schedule-status.completed {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.schedule-status.scheduled {
    background-color: rgba(158, 158, 158, 0.1);
    color: var(--dark-gray);
}

/* ======================
   Buttons
======================= */
.primary-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
    margin-right: 8px;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
}

.primary-btn i {
    margin-right: 6px;
}

.secondary-btn {
    background-color: var(--light-gray);
    color: var(--text-dark);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.secondary-btn:hover {
    background-color: var(--mid-gray);
}

.secondary-btn i {
    margin-right: 6px;
}

/* ======================
   Modals
======================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    width: 500px;
    max-width: 90%;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--mid-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 500;
}

.close-modal {
    font-size: 24px;
    font-weight: 500;
    cursor: pointer;
    color: var(--dark-gray);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 20px;
}

/* ======================
   Forms
======================= */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--mid-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.1);
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ======================
   Responsive Design
======================= */
@media (max-width: 1024px) {
    .test-results {
        grid-template-columns: 1fr;
    }
    
    .test-result-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        overflow: hidden;
    }
    
    .sidebar .logo-icon {
        margin-right: 0;
    }
    
    .sidebar .logo span:not(.logo-icon) {
        display: none;
    }
    
    .sidebar .menu a span:not(.menu-icon) {
        display: none;
    }
    
    .sidebar .user-info {
        display: none;
    }
    
    .sidebar .menu-icon {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .test-result-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        margin-top: 12px;
        width: 100%;
    }
    
    .search-container {
        width: 100%;
        margin-right: 8px;
    }
    
    .search-container input {
        width: 100%;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .test-schedule {
        grid-template-columns: 1fr;
    }
}