:root {
    --primary: #2ecc71;
    --secondary: #6c757d;
    --accent: #27ae60;
    --bg-light: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-glass: rgba(0, 0, 0, 0.1);
    --text-main: #3e4a52;
    --text-dim: #6c757d;
    --glass-blur: blur(10px);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(46, 204, 113, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(39, 174, 96, 0.05) 0%, transparent 40%);
    min-height: 100vh;
}

/* Glassmorphism Classes (Light Theme) */
.glass {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header & Typography */
h1 {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2rem;
}

h2,
h3,
h4 {
    color: var(--text-main);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    transition: var(--transition);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.15);
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-glass {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

.btn-glass:hover {
    background: rgba(0, 0, 0, 0.08);
}

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

.stat-card {
    padding: 1.5rem;
    text-align: center;
    background: #ffffff;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    color: var(--primary);
}

.stat-label {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 700;
}

.data-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid #e9ecef;
    color: var(--text-dim);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.95rem;
}

tr:hover {
    background: #f8f9fa;
}

/* Lab Parameter Builder */
.parameter-entry {
    background: #f8f9fa;
    padding: 1.2rem;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    margin-bottom: 1rem;
    position: relative;
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #dc3545;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

/* Modals */
.modal-overlay {
    background: rgba(255, 255, 255, 0.8) !important;
}

.report-modal {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
}

.param-box {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
}

/* Pagination Styling */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid #e9ecef;
}

.pagination-info {
    color: var(--text-dim);
    font-size: 0.9rem;
}


.pagination-controls {
    display: flex;
    gap: 0.8rem;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    input,
    select,
    textarea {
        padding: 10px 14px;
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0.75rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }
}