:root {
    --primary: #005792;
    --secondary: #00bbf0;
    --accent: #7dcfb6;
    --light: #f0f9ff;
    --dark: #192841;
    --danger: #e63946;
    --success: #2a9d8f;
    --warning: #e9c46a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin-bottom: 0.5rem;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Main navigation */
.main-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.main-btn {
    background-color: white;
    border: none;
    border-radius: 8px;
    padding: 2rem 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--dark);
}

.main-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.main-btn i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.experiment-btn {
    border-top: 5px solid var(--primary);
}

.protocol-btn {
    border-top: 5px solid var(--secondary);
}

.reagent-btn {
    border-top: 5px solid var(--accent);
}

.equipment-btn {
    border-top: 5px solid var(--warning);
}

.past-experiments-btn {
    border-top: 5px solid #9c6644;
}

.experiment-detail-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.pdf-btn {
    background-color: #d62828;
    color: white;
}

.pdf-btn:hover {
    background-color: #9d0208;
}

.view-btn {
    background-color: var(--primary);
}

/* Section styles */
.section {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}

.section-active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.section-header h2 {
    color: var(--primary);
}

.section-header .back-btn {
    background-color: var(--light);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header .back-btn:hover {
    background-color: #e1e8ed;
}

/* Forms */
form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--dark);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

input, textarea, select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn {
    background-color: var(--primary);
    color: white;
}

.primary-btn:hover {
    background-color: #004a7c;
}

.secondary-btn {
    background-color: var(--light);
    color: var(--dark);
}

.secondary-btn:hover {
    background-color: #e1e8ed;
}

.danger-btn {
    background-color: var(--danger);
    color: white;
}

.danger-btn:hover {
    background-color: #c1121f;
}

.success-btn {
    background-color: var(--success);
    color: white;
}

.success-btn:hover {
    background-color: #1e8074;
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: var(--light);
    font-weight: 600;
}

tr:hover {
    background-color: #f8f9fa;
}

.action-cell {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.card-subtitle {
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Protocol Steps */
.step-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #fafafa;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.step-title {
    font-weight: 600;
    color: var(--primary);
}

.step-actions {
    display: flex;
    gap: 0.5rem;
}

/* Widgets */
.widget-selector {
    background-color: white;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.widget-selector p {
    margin-bottom: 1rem;
    color: #6c757d;
}

.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.widget-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget-btn:hover {
    background-color: var(--light);
    border-color: var(--secondary);
}

.widget-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.widget-container {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.widget-title {
    font-weight: 600;
    color: var(--dark);
}

/* 96-Well Plate Widget */
.well-plate {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.well {
    aspect-ratio: 1;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
}

.well:hover {
    background-color: var(--light);
    border-color: var(--secondary);
}

/* Checklist Widget */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffecb5;
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    border: 1px solid #b6effb;
    color: #055160;
}

/* Experiment page specific */
.protocol-info {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.protocol-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.step-complete {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.modal-header h3 {
    color: var(--primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

/* Utilities */
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Responsive */
@media (max-width: 768px) {
    .main-buttons {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group button {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        padding: 1rem;
    }
    
    .widget-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Widget-specific styles */
.calculation-result {
    background-color: var(--light);
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.table-controls {
    display: flex;
    gap: 0.5rem;
}

.experiment-timer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.timer-display {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.timer-controls {
    display: flex;
    gap: 0.5rem;
}

.slide-sections {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.experiment-checklist-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.experiment-table-cell-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #eee;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.bg-danger {
    background-color: var(--danger);
    color: white;
}

.bg-warning {
    background-color: var(--warning);
    color: var(--dark);
}

/* Data management buttons */
#data-management {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Input groups */
.input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
}