/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Professional Color Palette - Scientific/Laboratory Theme */
:root {
    --primary-color: #2c5282;
    --primary-light: #4a7ba7;
    --primary-dark: #1a365d;
    --secondary-color: #2f855a;
    --accent-color: #d69e2e;
    --danger-color: #c53030;
    --success-color: #276749;
    --warning-color: #b7791f;
    --background-main: #f7fafc;
    --background-app: #f5f7fb;
    --background-card: #ffffff;
    --background-section: #edf2f7;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #cbd5e0;
    --border-light: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Body and Container */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--background-main);
    padding: 15px;
    min-height: 100vh;
    overflow: auto;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1900px;
    margin: 0 auto;
    background: var(--background-card);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 12px;
    min-height: calc(100vh - 30px);
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: visible;
    border: 1px solid var(--border-light);
}

/* Header */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.header-container::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 150px;
    height: 2px;
    background: var(--accent-color);
}

.header-container h1 {
    margin: 0;
    font-size: 22px;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1;
}

.brand-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    height: 38px;
    width: auto;
    display: block;
}

.brand-mark.small {
    height: 30px;
}

.brand-mark.tiny {
    height: 24px;
}

.app-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

/* Project Controls */
.project-controls-compact {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
}

.project-info-compact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-info-compact input {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    width: 160px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-info-compact input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

.project-status {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--background-section);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.project-buttons-compact {
    display: flex;
    gap: 3px;
}

.project-buttons-compact button {
    padding: 4px 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--background-card);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.project-buttons-compact button:hover {
    background: var(--background-section);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Tab Navigation */
.tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 8px;
    padding: 0;
    flex-shrink: 0;
}

.tab-button {
    background: var(--background-section);
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    position: relative;
    margin: 0;
}

.tab-button:hover {
    background: var(--border-light);
    color: var(--primary-color);
}

.tab-button.active {
    background: var(--background-card);
    color: var(--primary-color);
    box-shadow: 0 -2px 0 var(--primary-color) inset;
}

.tab-content {
    display: none;
    flex: 1;
    min-height: 0;
    overflow: visible;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Main Layout Grid */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 10px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.left-panel,
.middle-panel,
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 3px;
}

/* Custom Scrollbar */
.left-panel::-webkit-scrollbar,
.middle-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar,
.conditions-section::-webkit-scrollbar,
.datapoints-list::-webkit-scrollbar,
.peak-data-section::-webkit-scrollbar {
    width: 8px;
}

.left-panel::-webkit-scrollbar-track,
.middle-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track,
.conditions-section::-webkit-scrollbar-track,
.datapoints-list::-webkit-scrollbar-track,
.peak-data-section::-webkit-scrollbar-track {
    background: var(--background-section);
    border-radius: 4px;
}

.left-panel::-webkit-scrollbar-thumb,
.middle-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb,
.conditions-section::-webkit-scrollbar-thumb,
.datapoints-list::-webkit-scrollbar-thumb,
.peak-data-section::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    border: 2px solid var(--background-section);
}

.left-panel::-webkit-scrollbar-thumb:hover,
.middle-panel::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover,
.conditions-section::-webkit-scrollbar-thumb:hover,
.datapoints-list::-webkit-scrollbar-thumb:hover,
.peak-data-section::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Section Cards */
.section {
    background: var(--background-section);
    border-radius: 6px;
    padding: 10px;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.section.scrollable {
    overflow-y: auto;
    overflow-x: auto;
    flex: 1;
    min-height: 150px;
    max-height: 500px;
}

.section.compact {
    padding: 8px;
}

.section h2 {
    font-size: 0.95em;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.section h2::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 1px;
}

.section h3 {
    font-size: 0.9em;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
}

/* Chromatogram Container */
.chromatogram-container {
    background: linear-gradient(135deg, var(--background-card) 0%, var(--background-section) 100%);
    border-radius: 8px;
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 480px;
    max-height: 100%;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.chromatogram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-shrink: 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
}

.chromatogram-title {
    color: var(--primary-color);
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chromatogram-title::before {
    content: '📈';
    font-size: 1.1em;
}

/* Chromatogram Controls */
.chromatogram-controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 4px;
    align-items: center;
    background: var(--background-card);
    padding: 4px 8px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    justify-content: space-between;
}

.chromatogram-controls-left {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 1;
}

.chromatogram-controls-right {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}

.control-group {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    min-width: auto;
}

.control-group label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
    margin: 0;
}

.chromatogram-controls select {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 11px;
    min-width: 120px;
    background: white;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.chromatogram-controls input[type="number"] {
    width: 55px;
    padding: 4px 6px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.chromatogram-controls select:focus,
.chromatogram-controls input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

/* Custom Range Controls */
.custom-range-controls {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin: 0;
    flex-shrink: 0;
    border: none;
}

.custom-range-controls input {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 11px;
    transition: all 0.3s ease;
}

.custom-range-controls input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

.custom-range-controls span {
    font-size: 10px;
    color: var(--text-muted);
}

/* Toggle Controls */
.toggle-controls {
    display: flex;
    gap: 3px;
    flex-wrap: nowrap;
    align-items: center;
}

.toggle-controls button {
    background: var(--background-card);
    color: var(--text-secondary);
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 0;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.toggle-controls button:hover {
    background: var(--background-section);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.toggle-controls button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.checkbox-control {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

/* Canvas */
.chromatogram-canvas {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    width: 100% !important;
    height: 460px !important;
    max-height: 460px !important;
    display: block;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

/* Legend */
.legend {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    font-size: 10px;
    flex-wrap: wrap;
    background: var(--background-card);
    padding: 5px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    min-height: 28px;
    border: 1px solid var(--border-light);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    color: var(--text-secondary);
}

.legend-color {
    width: 20px;
    height: 10px;
    border-radius: 2px;
    border: 1px solid var(--border-light);
}

/* Form Elements */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: 13px;
}

textarea {
    width: 100%;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    font-size: 11px;
    background: white;
    color: var(--text-primary);
    transition: all 0.3s ease;
    min-height: 70px;
}

#methodDescription,
#additionalComments,
#defaultMethodNotes {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif !important;
    font-size: 13px;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

button {
    background: var(--primary-color);
    color: white;
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

button:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button:disabled:hover {
    background: inherit;
}

button.danger {
    background: var(--danger-color);
}

button.danger:hover {
    background: #9b2c2c;
}

button.secondary, a.secondary {
    background: var(--text-muted);
    color: white;
}

button.secondary:hover, a.secondary:hover {
    background: var(--text-secondary);
}

button.small, a.small {
    padding: 4px 8px;
    font-size: 10px;
    margin: 0;
    letter-spacing: 0.2px;
    text-decoration: none;
}

/* Status Messages */
.status-message {
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-message::before {
    font-size: 16px;
}

.error {
    background: #fed7d7;
    color: var(--danger-color);
    border-left: 3px solid var(--danger-color);
}

.error::before {
    content: '⚠️';
}

.success {
    background: #c6f6d5;
    color: var(--success-color);
    border-left: 3px solid var(--success-color);
}

.success::before {
    content: '✓';
}

.warning {
    background: #fef3c7;
    color: var(--warning-color);
    border-left: 3px solid var(--warning-color);
}

.warning::before {
    content: '⚠️';
}

/* Condition Inputs */
.initial-condition-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 8px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.initial-condition-row label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.initial-condition-row select {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 12px;
    background: white;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.initial-condition-row select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

.target-conditions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.target-condition-group {
    flex: 1;
    min-width: 100px;
}

.target-condition-group label {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.target-condition-group input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.target-condition-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-top: 6px;
    background: white;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

table tbody, table thead {
    display: table;
    width: 100%;
    table-layout: auto;
}

th {
    background: var(--primary-color);
    color: white;
    padding: 8px 6px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

th small {
    display: block;
    font-weight: normal;
    opacity: 0.9;
    margin-top: 2px;
    text-transform: none;
}

td {
    padding: 4px;
    border-bottom: 1px solid var(--border-light);
    font-size: 11px;
    white-space: nowrap;
    min-width: 60px;
}

tr:hover {
    background: var(--background-section);
}

tr:last-child td {
    border-bottom: none;
}

#resultsTable {
    display: table;
    width: 100%;
    max-width: none;
}

#resultsTable th,
#resultsTable td {
    min-width: 70px;
}

.peak-row {
    font-weight: 500;
}

/* Resolution Info */
.resolution-info {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    padding: 6px;
    margin-top: 6px;
    font-size: 10px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.resolution-info h4 {
    color: var(--primary-color);
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.resolution-pairs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 3px;
    min-width: max-content;
}

.resolution-pair {
    background: var(--background-section);
    padding: 5px 8px;
    border-radius: 3px;
    border: 1px solid var(--border-light);
    font-weight: 500;
    font-size: 10px;
}

.resolution-good { border-left: 3px solid var(--success-color); }
.resolution-poor { border-left: 3px solid var(--warning-color); }
.resolution-bad { border-left: 3px solid var(--danger-color); }

/* Peaks Tab */
.peaks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(600px, 1fr));
    gap: 12px;
    margin-top: 10px;
    padding-right: 5px;
    overflow-x: auto;
    overflow-y: visible;
}

.peak-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 10px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow-x: auto;
}

.peak-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.peak-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 14px;
}

.peak-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.peak-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.peak-color-indicator.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.peak-color-indicator.clickable:hover {
    border-color: var(--primary-color);
    transform: scale(1.15);
    box-shadow: var(--shadow-md);
}

.peak-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.detail-group {
    background: var(--background-section);
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.detail-group h5 {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.detail-value {
    display: flex;
    gap: 8px;
    align-items: center;
}

.detail-value input {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.detail-value input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

.detail-value span {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Regression Stats */
.regression-stats {
    background: #ebf8ff;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    border: 1px solid #bee3f8;
}

.regression-stats h5 {
    font-size: 11px;
    color: var(--primary-color);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 6px;
}

.stat-item {
    font-size: 11px;
    color: var(--text-secondary);
    background: white;
    padding: 5px 8px;
    border-radius: 3px;
    font-weight: 500;
}

.stat-item strong {
    color: var(--text-primary);
}

.quality-indicator {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.quality-good {
    background: #c6f6d5;
    color: var(--success-color);
}

.quality-moderate {
    background: #feebc8;
    color: var(--warning-color);
}

.quality-poor {
    background: #fed7d7;
    color: var(--danger-color);
}

/* Peak Data Tables */
.peak-data-section {
    margin-top: 10px;
    overflow-x: auto;
}

.peak-data-section h5 {
    font-size: 12px;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.peak-data-table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    font-size: 11px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.peak-data-table thead {
    background: var(--primary-color);
    color: white;
}

.peak-data-table th {
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.peak-data-table td {
    padding: 5px 6px;
    border-bottom: 1px solid var(--border-light);
}

.peak-data-table input {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    font-size: 11px;
    font-weight: 500;
}

.peak-data-table .editable-cell input {
    background: #fffbeb;
    border-color: var(--warning-color);
}

.add-row-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 6px;
    margin-top: 8px;
    padding: 8px;
    background: var(--background-section);
    border-radius: 4px;
}

.add-row-form input,
.add-row-form select {
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 11px;
}

.add-row-form button {
    padding: 5px 10px;
    font-size: 11px;
    margin: 0;
}

/* Conditions Tab */
.conditions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
}

.conditions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.conditions-header h2 {
    margin: 0;
}

.condition-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
}

.condition-card h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
}

/* Nested Tabs */
.nested-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
}

.nested-tab-button {
    background: var(--background-section);
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nested-tab-button:hover {
    background: var(--border-light);
    color: var(--primary-color);
}

.nested-tab-button.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 -2px 0 var(--primary-color) inset;
}

.nested-tab-content {
    display: none;
    padding: 15px;
    background: var(--background-section);
    border-radius: 0 0 6px 6px;
}

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

/* Multi-condition Entry */
.multi-condition-entry {
    background: white;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
}

.multi-condition-entry h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1em;
    font-weight: 600;
}

.multi-entry-controls {
    background: var(--background-section);
    border-radius: 4px;
    padding: 10px;
    color: var(--text-primary);
}

.multi-entry-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.multi-entry-conditions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.multi-entry-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.multi-entry-input label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.multi-entry-input input {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.multi-entry-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

.multi-entry-peak-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    min-width: 200px;
    background: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.multi-entry-peak-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

/* Condition Graphs */
.condition-graph-container {
    background: white;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.condition-graph-canvas {
    width: 100%;
    height: 300px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.graph-legend {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    padding: 8px;
    background: var(--background-section);
    border-radius: 4px;
}

.graph-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.condition-data-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

/* Datapoints List */
.datapoints-list {
    background: var(--background-section);
    border-radius: 6px;
    padding: 10px;
    margin: 12px 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
}

.datapoint-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.datapoint-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(2px);
}

.datapoint-info {
    flex: 1;
}

.datapoint-info strong {
    color: var(--primary-color);
}

.add-datapoint-form {
    background: #ebf8ff;
    border-radius: 6px;
    padding: 15px;
    margin-top: 12px;
    border: 1px solid #bee3f8;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

/* Utility Classes */
.value-display {
    min-width: 40px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
}

.input-group {
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.input-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

.button-group {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.button-group button {
    flex: 1;
    margin-top: 0;
    font-size: 12px;
    padding: 6px 12px;
}

.info-text {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding: 8px 10px;
    background: #ebf8ff;
    border-radius: 4px;
    border-left: 2px solid var(--primary-light);
    line-height: 1.4;
}

.hidden {
    display: none !important;
}

/* Results Controls */
.results-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: nowrap;
}

.results-controls h2 {
    flex: 1;
    margin-bottom: 0;
}

.results-checkbox-control {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.peaks-tab-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: var(--background-section);
    border-radius: 6px;
}

.peaks-control-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.peaks-view-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.peaks-view-control input[type="checkbox"] {
    margin: 0;
}

.peaks-view-control label {
    margin: 0;
    cursor: pointer;
}

/* Report Generation Styles */
.report-section {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.report-actions {
    display: flex;
    gap: 10px;
}

.report-setup {
    background: var(--background-section);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.report-form h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1em;
}

.report-field {
    margin-bottom: 15px;
}

.report-field label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.report-field input,
.report-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.report-field input:focus,
.report-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

.field-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.report-options {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.report-options h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 13px;
}

.report-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.report-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.report-checkbox-group label:hover {
    background: var(--background-card);
}

.report-checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Report Preview Styles */
.report-preview {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-top: 20px;
    overflow: visible;
}

.report-document {
    max-width: 900px;
    margin: 0 auto;
    overflow: visible;
}

.report-page {
    background: white;
    padding: 20px;
    overflow: visible;
}

.report-header-section {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.report-header-section h1 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 20px;
}

.report-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.meta-row {
    display: flex;
    gap: 15px;
    padding: 5px 0;
}

.meta-label {
    font-weight: 600;
    min-width: 180px;
    color: var(--text-secondary);
}

.meta-value {
    color: var(--text-primary);
}

.report-body {
    margin-bottom: 40px;
}

.report-section-content {
    margin-bottom: 35px;
    page-break-inside: avoid;
}

.report-section-content h2 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-light);
}

.report-section-content h3 {
    color: var(--primary-dark);
    font-size: 14px;
    margin: 15px 0 10px 0;
}

.report-section-content h4 {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 10px 0 5px 0;
}

.report-section-content p {
    line-height: 1.6;
    color: var(--text-primary);
}

/* Report Tables */
.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
}

.report-table th {
    background: var(--primary-color);
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 11px;
}

.report-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light);
}

.report-table tr:nth-child(even) {
    background: var(--background-section);
}

.report-table tr:hover {
    background: #ebf8ff;
}

.report-table.compact {
    font-size: 11px;
}

.report-table.compact td {
    padding: 5px 8px;
}

.report-table.compact-conditions {
    margin: 8px 0;
    font-size: 11px;
}

.report-table.compact-conditions th {
    padding: 6px 8px;
    font-size: 10px;
    background: var(--primary-color);
    color: white;
}

.report-table.compact-conditions td {
    padding: 6px 8px;
    font-weight: 600;
    text-align: center;
    background: var(--background-section);
}

.report-table.compact-conditions-left {
    width: auto;
    max-width: 400px;
    margin: 8px 0;
    border-collapse: collapse;
    font-size: 11px;
}

.report-table.compact-conditions-left th {
    background: var(--primary-color);
    color: white;
    padding: 6px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
}

.report-table.compact-conditions-left td {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    text-align: left;
    font-weight: 500;
}

.report-table.compact-conditions-left td:first-child {
    font-weight: 600;
    color: var(--text-secondary);
}

.report-table.compact-conditions-left tr:nth-child(even) {
    background: var(--background-section);
}

.report-table.compact-conditions-fullwidth,
.report-table.compact-conditions-horizontal {
    width: 100%;
    margin: 8px 0;
    border-collapse: collapse;
    font-size: 11px;
}

.report-table.compact-conditions-fullwidth th,
.report-table.compact-conditions-horizontal th {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.report-table.compact-conditions-fullwidth td,
.report-table.compact-conditions-horizontal td {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    font-weight: 600;
    background: var(--background-section);
}

.peak-indicator {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid var(--border-color);
}

.peak-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    border: 1px solid var(--border-color);
}

.status-good {
    color: var(--success-color);
    font-weight: 600;
}

.status-moderate {
    color: var(--warning-color);
    font-weight: 600;
}

.status-poor {
    color: var(--danger-color);
    font-weight: 600;
}

.res-good { 
    color: var(--success-color); 
    font-weight: bold; 
}

.res-moderate { 
    color: var(--warning-color); 
    font-weight: bold; 
}

.res-poor { 
    color: var(--danger-color); 
    font-weight: bold; 
}

/* Report Chromatogram */
.report-chromatogram {
    margin: 20px 0;
    text-align: center;
    padding: 20px;
    background: var(--background-section);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.report-chromatogram.compact {
    margin: 10px 0;
    padding: 10px;
    background: var(--background-section);
    border-radius: 4px;
}

.report-chromatogram canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
}

.report-chromatogram.compact canvas {
    border: 1px solid var(--border-color);
    background: white;
}

/* Report Footer */
.report-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.signature-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 30px;
}

.signature-block {
    text-align: center;
}

.signature-line {
    border-bottom: 1px solid #333;
    height: 50px;
    margin-bottom: 8px;
}

.signature-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.signature-date {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.page-footer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    padding: 20px 0;
}

.page-footer p {
    margin: 3px 0;
}

/* Compact Report Elements */
.compact-report .report-header-section.compact {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.compact-report h1 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.compact-report .report-meta-compact {
    margin-bottom: 0;
}

.compact-report .meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    font-size: 11px;
}

.compact-report .meta-item {
    display: flex;
    gap: 5px;
}

.compact-report .meta-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.compact-report .meta-value {
    color: var(--text-primary);
}

.compact-report .report-body.compact {
    margin-bottom: 15px;
}

.compact-report .report-section-content.compact {
    margin-bottom: 12px;
    page-break-inside: avoid;
}

.compact-report .report-section-content.compact h2 {
    font-size: 14px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
}

.compact-report .report-section-content.compact h3 {
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--primary-dark);
}

.compact-text {
    font-size: 11px;
    line-height: 1.4;
    margin: 5px 0;
}

.compact-signature-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    page-break-inside: avoid;
    clear: both;
    display: block;
    min-height: 50px;
}

.compact-signature-wrapper {
    margin-top: 25px;
    padding-top: 15px;
    clear: both;
    display: block;
}

.signature-line-box,
.inline-signature {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    font-size: 11px;
    padding: 10px 0;
    margin-top: 10px;
}

.signature-line-box span,
.inline-signature span {
    color: var(--text-secondary);
    flex: 1;
}

.page-break,
.page-break-section {
    page-break-before: always;
    margin-top: 0;
    padding: 0;
    height: 0;
    clear: both;
}

.core-section {
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.extended-section {
    margin-top: 20px;
    clear: both;
}

.extended-section .section-header {
    font-size: 16px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.extended-section h3 {
    font-size: 14px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.extended-section h4 {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 12px 0 8px 0;
}

.extended-section p {
    font-size: 10px !important;
    line-height: 1.4 !important;
    margin: 5px 0;
}

.model-graph-container {
    margin: 10px 0;
    padding: 10px;
    background: var(--background-section);
    border-radius: 4px;
    text-align: center;
}

.model-graph-container canvas {
    border: 1px solid var(--border-color);
    background: white;
}

.resolution-note {
    font-size: 9px !important;
    color: var(--text-secondary);
    margin-top: 8px;
    padding: 6px;
    background: #ebf8ff;
    border-left: 3px solid var(--primary-color);
    border-radius: 3px;
    line-height: 1.2;
}

.report-table.raw-data {
    font-size: 10px;
}

.report-table.raw-data td {
    padding: 4px 6px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 9px;
}

.report-footer.compact {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
}

/* Report Title Area */
.report-title-area {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
}

.company-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.company-logo img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.title-content {
    flex: 1;
}

.title-content h1 {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 4px;
    line-height: 1.2;
}

.company-name {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    margin-top: 4px;
}

.conditions-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px;
    background: var(--background-section);
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.condition-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: white;
    border-radius: 3px;
    border: 1px solid var(--border-light);
}

.condition-name {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
}

.condition-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 12px;
    background: var(--background-section);
    padding: 2px 6px;
    border-radius: 2px;
}

.method-notes-section {
    margin-bottom: 25px !important;
    padding-bottom: 15px;
    position: relative;
}

.method-notes-section::after {
    content: '';
    display: block;
    clear: both;
    margin-bottom: 10px;
}

.method-notes-section .compact-text {
    margin-bottom: 25px !important;
    line-height: 1.6 !important;
    display: block !important;
    clear: both !important;
    overflow: visible !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    max-height: none !important;
    height: auto !important;
}

.print-ready {
    display: block;
}

.print-ready + img {
    display: none;
}

/* Settings Tab Styles */
.settings-section {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.settings-actions {
    display: flex;
    gap: 10px;
}

.settings-content {
    display: grid;
    gap: 25px;
}

.settings-category {
    background: var(--background-section);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-light);
}

.settings-category h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.settings-field {
    margin-bottom: 20px;
}

.settings-field label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-size: 13px;
}

.settings-field input,
.settings-field select,
.settings-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.settings-field input:focus,
.settings-field select:focus,
.settings-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

.logo-upload-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo-filename {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

.logo-preview {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-preview img {
    max-width: 200px;
    max-height: 80px;
    object-fit: contain;
}

.settings-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.settings-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.settings-checkbox-group label:hover {
    background: var(--background-card);
}

.settings-checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.settings-status {
    margin-top: 20px;
}

.settings-info-box {
    background: #e7f3ff;
    border-left: 3px solid var(--primary-color);
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.settings-info-box h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 14px;
}

.settings-info-box p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.settings-info-box ul {
    color: var(--text-secondary);
}

.settings-info-box li {
    margin-bottom: 5px;
}

/* Print Media Queries */
@media print {
    .print-ready {
        display: none !important;
    }
    
    .print-ready + img {
        display: block !important;
    }
    
    .company-logo img {
        max-height: 50px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .report-table.compact-conditions-fullwidth th,
    .report-table.compact-conditions-horizontal th {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .report-table.compact-conditions-fullwidth td,
    .report-table.compact-conditions-horizontal td {
        background: #f9f9f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .conditions-horizontal {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding: 8px;
        background: #f9f9f9;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .condition-item {
        display: inline-flex;
        padding: 3px 8px;
        background: white;
        border: 1px solid #ccc;
    }
    
    .condition-name {
        font-weight: 600;
        color: #333;
        font-size: 11px;
    }
    
    .condition-value {
        font-weight: 700;
        color: #000;
        font-size: 11px;
        background: #f0f0f0;
        padding: 1px 5px;
        margin-left: 3px;
    }
    
    .status-good,
    .res-good {
        color: #276749 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .status-moderate,
    .res-moderate {
        color: #b7791f !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .status-poor,
    .res-poor,
    .status-acceptable {
        color: #c53030 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .peak-dot {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .page-break-section {
        page-break-before: always;
    }
    
    .compact-signature-section,
    .model-graph-container,
    .report-chromatogram {
        page-break-inside: avoid;
    }
}

/* Responsive Design */
@media (max-width: 1600px) {
    .chromatogram-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 1400px) {
    .main-layout {
        grid-template-columns: 260px 1fr;
        grid-template-rows: 1fr auto;
    }
    
    .middle-panel {
        grid-column: 2;
        grid-row: 1 / -1;
    }
    
    .right-panel {
        grid-column: 1;
        grid-row: 2;
        max-height: 250px;
    }
    
    .chromatogram-canvas {
        height: 400px !important;
        max-height: 400px !important;
    }
}

@media (max-width: 1200px) {
    .condition-data-section {
        grid-template-columns: 1fr;
    }
    
    .settings-checkbox-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1000px) {
    .main-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .left-panel {
        grid-row: 1;
        max-height: 200px;
    }
    
    .middle-panel {
        grid-column: 1;
        grid-row: 2;
    }
    
    .right-panel {
        grid-column: 1;
        grid-row: 3;
        max-height: 180px;
    }
    
    .chromatogram-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .brand-identity {
        width: 100%;
    }
    
    .project-controls-compact {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
    }
    
    .project-info-compact {
        width: 100%;
    }
    
    .project-info-compact input {
        flex: 1;
        width: auto;
    }
    
    .peaks-grid {
        grid-template-columns: 1fr;
    }
    
    .signature-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .meta-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .meta-label {
        min-width: auto;
    }
    
    .settings-category {
        padding: 15px;
    }
    
    .logo-upload-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Login Modal Styles */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 18% 20%, rgba(44, 82, 130, 0.14), transparent 34%),
        radial-gradient(circle at 82% 18%, rgba(47, 133, 90, 0.12), transparent 30%),
        radial-gradient(circle at 22% 78%, rgba(214, 158, 46, 0.12), transparent 26%),
        linear-gradient(135deg, rgba(44, 82, 130, 0.12), rgba(47, 133, 90, 0.08)),
        var(--background-main);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 24px;
    backdrop-filter: blur(4px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-modal {
    background: linear-gradient(180deg, var(--background-card) 0%, #f7fafc 100%);
    border-radius: 12px;
    padding: 32px 32px 28px;
    width: min(460px, 96vw);
    box-shadow: 0 16px 45px rgba(26, 38, 93, 0.15);
    animation: slideUp 0.4s ease;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.login-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: left;
    margin-bottom: 24px;
}

.login-header .brand-identity {
    justify-content: center;
}

.login-header .brand-mark {
    height: 34px;
}

.login-header h2 {
    color: var(--primary-dark);
    font-size: 22px;
    margin-bottom: 6px;
    font-weight: 700;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 13px;
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
}

.login-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--background-card);
    box-shadow: var(--shadow-sm);
}

.login-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.login-checkbox {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    flex-wrap: nowrap;
}

.login-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.login-checkbox input {
    width: auto;
    height: auto;
    padding: 0;
    margin: 0 6px 0 0;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.login-checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.checkbox-inline input {
    margin: 0;
}

.login-error {
    display: none;
    background: #fff5f5;
    color: var(--danger-color);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
    border: 1px solid #fed7d7;
    box-shadow: var(--shadow-sm);
}

.login-error.info {
    background: #ebf8ff;
    color: var(--primary-color);
    border-color: #bee3f8;
}

.login-error.success {
    background: #f0fff4;
    color: var(--success-color);
    border-color: #c6f6d5;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    background: var(--background-section);
    padding: 6px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.auth-tab {
    flex: 1;
    background: var(--background-card);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab:hover {
    background: #fff;
    border-color: var(--border-light);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 10px 20px rgba(44, 82, 130, 0.2);
}

.auth-view.hidden {
    display: none;
}

.auth-view button[type="submit"],
#loginForm button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: 1px solid var(--primary-dark);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
}

.auth-view button[type="submit"]:hover,
#loginForm button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(44, 82, 130, 0.2);
}

.login-hint {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.login-demo-info {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--background-section);
    padding: 15px;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
    box-shadow: var(--shadow-sm);
}

.login-demo-info p {
    margin: 3px 0;
}

.login-demo-info strong {
    color: var(--primary-dark);
}

/* User Info Styles in Settings */
.user-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.user-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 120px;
    font-size: 13px;
}

.info-value {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.info-value.demo-mode {
    color: var(--warning-color);
    font-weight: 600;
}

.info-value.license-full {
    color: var(--danger-color);
    font-weight: 600;
}

.user-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.footer-legal {
    text-align: right;
    margin: 20px 12px 6px;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.8;
}

.user-info-item button.small {
    margin-left: auto;
    padding: 4px 12px;
}

.user-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: var(--background-section);
    border-radius: 4px;
    border: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.user-indicator span {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Demo Prompt Modal Styles */
.demo-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

.demo-prompt-modal {
    background: white;
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.demo-prompt-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 16px 16px 0 0;
    text-align: center;
    position: relative;
}

.demo-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.demo-prompt-header h2 {
    font-size: 28px;
    margin: 10px 0;
    font-weight: 700;
}

.demo-prompt-header p {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
}

.demo-prompt-content {
    padding: 30px;
}

.feature-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.feature-column {
    background: var(--background-section);
    border-radius: 8px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.feature-column h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
}

.demo-features {
    border-color: var(--warning-color);
    opacity: 0.8;
}

.pro-features {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
}

.feature-column ul {
    list-style: none;
    padding: 0;
}

.feature-column li {
    padding: 8px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-column li.available {
    color: var(--success-color);
    font-weight: 500;
}

.feature-column li.limited {
    color: var(--warning-color);
}

.feature-column li.unavailable {
    color: var(--text-muted);
    text-decoration: line-through;
}

.pricing-info {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 25px;
}

.price-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.price {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1;
}

.period {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.discount-note {
    font-size: 15px;
    font-weight: 600;
    color: var(--danger-color);
    margin: 0;
}

.demo-prompt-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.upgrade-btn {
    flex: 1;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-icon {
    font-size: 20px;
}

.continue-demo-btn {
    flex: 1;
    padding: 15px 20px;
    background: var(--background-card);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.continue-demo-btn:hover {
    background: var(--background-section);
    border-color: var(--primary-color);
}

.demo-reminder {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.demo-reminder input {
    margin-right: 5px;
}

/* License Warning/Actions in Settings */
.license-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid var(--warning-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.warning-icon {
    font-size: 28px;
}

.warning-content strong {
    display: block;
    color: var(--warning-color);
    font-size: 16px;
    margin-bottom: 4px;
}

.warning-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.license-actions {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.license-actions button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
}

.license-reminder {
    flex-basis: 100%;
    font-size: 12px;
    color: var(--warning-color);
    margin-top: 8px;
}

.license-alert {
    flex: 1 100%;
    background: #fed7d7;
    color: var(--danger-color);
    padding: 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--danger-color);
}

.alert-icon {
    font-size: 20px;
}

/* Upgrade Modal Styles */
.upgrade-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.3s ease;
}

.upgrade-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 30px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--background-section);
    color: var(--text-primary);
}

.pricing-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.pricing-card {
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.recommended {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.pricing-card h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.pricing-card .price {
    margin: 20px 0;
}

.pricing-card .amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-card .period {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 5px;
}

.pricing-card .features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.pricing-card .features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.select-plan {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
}

.guarantee {
    text-align: center;
    padding: 20px;
    background: var(--background-section);
    border-radius: 8px;
    margin-top: 20px;
}

.guarantee p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* License Calculator */
.license-calculator {
    background: var(--background-section);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.quantity-selector {
    margin: 20px 0;
}

.quantity-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-controls button {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 20px;
    font-weight: bold;
}

.quantity-controls input {
    width: 100px;
    height: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 4px;
}

.pricing-summary {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 6px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.price-row.discount {
    color: var(--success-color);
    font-weight: 500;
}

.price-row.total {
    border-top: 2px solid var(--border-color);
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.bulk-discount-info {
    margin-top: 20px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 6px;
}

.bulk-discount-info h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 14px;
}

.bulk-discount-info ul {
    list-style: none;
    padding: 0;
}

.bulk-discount-info li {
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.full-width {
    width: 100%;
}

/* Demo Prompt Modal Styles - UPDATED FOR LARGER SIZE */
.demo-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
    padding: 20px; /* Add padding to ensure modal doesn't touch edges */
}

.demo-prompt-modal {
    background: white;
    border-radius: 16px;
    padding: 0;
    width: 95%; /* Increased from 90% */
    max-width: 1000px; /* Increased from 800px */
    max-height: 95vh; /* Increased from 90vh */
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    display: flex;
    flex-direction: column;
}

.demo-prompt-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px; /* Reduced padding slightly */
    border-radius: 16px 16px 0 0;
    text-align: center;
    position: relative;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.demo-badge {
    position: absolute;
    top: 12px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.demo-prompt-header h2 {
    font-size: 26px; /* Slightly smaller */
    margin: 8px 0;
    font-weight: 700;
}

.demo-prompt-header p {
    font-size: 15px; /* Slightly smaller */
    opacity: 0.95;
    margin: 0;
}

.demo-prompt-content {
    padding: 25px 30px; /* Reduced padding slightly */
    flex: 1;
    overflow-y: auto; /* Allow scrolling only if needed */
    display: flex;
    flex-direction: column;
}

.feature-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px; /* Reduced from 30px */
    flex-shrink: 0;
}

.feature-column {
    background: var(--background-section);
    border-radius: 8px;
    padding: 18px; /* Reduced from 20px */
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.feature-column h3 {
    color: var(--primary-color);
    margin-bottom: 12px; /* Reduced from 15px */
    font-size: 17px; /* Slightly smaller */
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-light);
}

.demo-features {
    border-color: var(--warning-color);
    opacity: 0.8;
}

.pro-features {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
}

.feature-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-column li {
    padding: 6px 0; /* Reduced from 8px */
    font-size: 13px; /* Reduced from 14px */
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-column li.available {
    color: var(--success-color);
    font-weight: 500;
}

.feature-column li.limited {
    color: var(--warning-color);
}

.feature-column li.unavailable {
    color: var(--text-muted);
    text-decoration: line-through;
}

.pricing-info {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    padding: 18px; /* Reduced from 20px */
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px; /* Reduced from 25px */
    flex-shrink: 0;
}

.price-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px; /* Reduced from 10px */
}

.price {
    font-size: 38px; /* Reduced from 42px */
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1;
}

.period {
    font-size: 13px; /* Reduced from 14px */
    color: var(--text-secondary);
    font-weight: 500;
}

.discount-note {
    font-size: 14px; /* Reduced from 15px */
    font-weight: 600;
    color: var(--danger-color);
    margin: 0;
}

.demo-prompt-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 18px; /* Reduced from 20px */
    flex-shrink: 0;
}

.upgrade-btn {
    flex: 1;
    padding: 14px 20px; /* Reduced from 15px */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px; /* Reduced from 16px */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-icon {
    font-size: 18px; /* Reduced from 20px */
}

.continue-demo-btn {
    flex: 1;
    padding: 14px 20px; /* Reduced from 15px */
    background: var(--background-card);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px; /* Reduced from 16px */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.continue-demo-btn:hover {
    background: var(--background-section);
    border-color: var(--primary-color);
}

.demo-reminder {
    text-align: center;
    font-size: 12px; /* Reduced from 13px */
    color: var(--text-secondary);
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.demo-reminder input {
    margin-right: 5px;
}

/* Responsive adjustments for smaller screens */
@media (max-height: 800px) {
    .demo-prompt-modal {
        max-height: 98vh;
    }
    
    .demo-prompt-header {
        padding: 20px 25px;
    }
    
    .demo-prompt-header h2 {
        font-size: 24px;
    }
    
    .demo-prompt-content {
        padding: 20px 25px;
    }
    
    .feature-column {
        padding: 15px;
    }
    
    .feature-column li {
        padding: 5px 0;
        font-size: 12px;
    }
    
    .price {
        font-size: 34px;
    }
}

@media (max-width: 768px) {
    .demo-prompt-modal {
        width: 98%;
        max-width: none;
    }
    
    .feature-comparison {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .demo-prompt-actions {
        flex-direction: column;
    }
    
    .demo-prompt-content {
        padding: 20px;
    }
}

/* For very large screens, maintain readability */
@media (min-height: 1200px) {
    .demo-prompt-modal {
        max-width: 1100px;
        max-height: 900px; /* Cap the height on very tall screens */
    }
}

.simple-modal {
    max-width: 700px;
}

.license-info-content {
    margin: 20px 0;
}

.current-license-info {
    background: var(--background-section);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    border-left: 3px solid var(--primary-color);
}

.current-license-info p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.current-license-info strong {
    color: var(--text-primary);
    display: inline-block;
    min-width: 120px;
}

.additional-pricing {
    margin-bottom: 25px;
}

.additional-pricing h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
}

.pricing-tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.pricing-tier {
    background: var(--background-section);
    border: 2px solid var(--border-light);
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-tier:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pricing-tier.popular {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
}

.pricing-tier.best-value {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
}

.tier-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.pricing-tier.best-value .tier-badge {
    background: var(--success-color);
}

.tier-quantity {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.tier-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.tier-price span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.tier-note {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 500;
}

.volume-discount-table {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.volume-discount-table h4 {
    color: var(--primary-color);
    font-size: 14px;
    margin-bottom: 10px;
}

.volume-discount-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.volume-discount-table th {
    background: var(--background-section);
    color: var(--text-primary);
    padding: 8px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
}

.volume-discount-table td {
    padding: 8px;
    border-top: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.purchase-instructions {
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.instruction-text {
    text-align: center;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-buttons button {
    padding: 12px 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.additional-notes {
    background: var(--background-section);
    border-radius: 6px;
    padding: 15px;
}

.additional-notes h4 {
    color: var(--primary-color);
    font-size: 13px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.additional-notes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.additional-notes li {
    padding: 5px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pricing-tiers {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
    }
}

/* Make pricing cards clickable */
.pricing-card.clickable,
.pricing-tier.clickable {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card.clickable:hover,
.pricing-tier.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Add visual feedback for clickable pricing cards */
.pricing-card.clickable::after,
.pricing-tier.clickable::after {
    content: '→';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--primary-color);
    opacity: 0;
    transition: all 0.3s ease;
}

.pricing-card.clickable:hover::after,
.pricing-tier.clickable:hover::after {
    opacity: 1;
    right: 15px;
}

/* Special styling for the recommended card */
.pricing-card.recommended.clickable:hover {
    border-color: var(--primary-light);
    box-shadow: 0 10px 30px rgba(44, 82, 130, 0.3);
}

/* Special styling for popular and best value tiers */
.pricing-tier.popular.clickable:hover {
    border-color: var(--primary-light);
    box-shadow: 0 8px 25px rgba(44, 82, 130, 0.25);
}

.pricing-tier.best-value.clickable:hover {
    border-color: var(--success-color);
    box-shadow: 0 8px 25px rgba(39, 103, 73, 0.25);
}

/* Ensure buttons inside clickable cards still work */
.pricing-card.clickable button,
.pricing-tier.clickable button {
    position: relative;
    z-index: 2;
}

/* Add hover effect for select plan buttons */
.pricing-card button.select-plan:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Add a subtle "click me" hint on first hover */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(44, 82, 130, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(44, 82, 130, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(44, 82, 130, 0);
    }
}

.pricing-card.clickable:hover,
.pricing-tier.clickable:hover {
    animation: pulse 2s infinite;
}

/* Ensure the entire card area is clickable */
.pricing-card.clickable *,
.pricing-tier.clickable * {
    pointer-events: none;
}

.pricing-card.clickable button,
.pricing-tier.clickable button {
    pointer-events: auto;
}

/* Add tooltip on hover */
.pricing-card.clickable::before,
.pricing-tier.clickable::before {
    content: 'Click to learn more';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.pricing-card.clickable:hover::before,
.pricing-tier.clickable:hover::before {
    opacity: 0.9;
}

/* Method Development Conditions Styles */
.method-dev-note {
    background: #e7f3ff;
    border-left: 3px solid var(--primary-color);
    padding: 10px 15px;
    margin: 15px 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    border-radius: 4px;
}

.method-dev-table {
    margin: 20px 0;
}

.method-dev-table th {
    background: var(--primary-dark);
    color: white;
    font-size: 11px;
}

.method-dev-table td {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
}

.method-dev-table td.target-value {
    background: #e7f3ff;
    color: var(--primary-color);
    font-weight: 700;
}

.method-dev-table td.varied-value {
    background: #fff3cd;
    color: var(--warning-color);
    font-weight: 700;
}

.method-dev-instructions {
    background: var(--background-section);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.method-dev-instructions h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 14px;
}

.method-dev-instructions ol {
    margin: 15px 0 15px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
}

.method-dev-instructions li {
    margin-bottom: 8px;
}

.method-dev-legend {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-secondary);
}

.method-dev-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.target-indicator,
.varied-indicator {
    display: inline-block;
    width: 20px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid var(--border-color);
}

.target-indicator {
    background: #e7f3ff;
}

.varied-indicator {
    background: #fff3cd;
}

/* Print styles for method development section */
@media print {
    .method-dev-table td.target-value {
        background: #e7f3ff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .method-dev-table td.varied-value {
        background: #fff3cd !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .method-dev-note {
        background: #f0f8ff !important;
        border-left: 2px solid #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .method-dev-instructions {
        page-break-inside: avoid;
    }
}

/* Method Development Options Styles */
.method-dev-options {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.method-dev-options .variation-selection,
.method-dev-options .runs-selection {
    margin-bottom: 15px;
}

.method-dev-options .section-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 13px;
}

.method-dev-options label {
    display: block;
    margin: 5px 0;
    padding-left: 20px;
    font-size: 13px;
}

.method-dev-options input[type="checkbox"],
.method-dev-options input[type="radio"] {
    margin-right: 8px;
    margin-left: -20px;
}

.design-summary {
    background: #e7f3ff;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.design-summary h4 {
    margin-top: 0;
    color: #2c5282;
    font-size: 14px;
}

.summary-details p {
    margin: 8px 0;
    font-size: 12px;
    line-height: 1.5;
}

.design-note {
    font-style: italic;
    color: #6c757d;
    margin-top: 10px !important;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

/* Highlight reduced experiments in the table */
.method-dev-table tr.reduced-experiment {
    background-color: #fff3cd;
}

.method-dev-table tr.reduced-experiment td {
    font-style: italic;
}

.screening-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px;
    margin: 10px 0;
    font-style: italic;
    border-radius: 4px;
}

.method-dev-table tr.screening-experiment {
    background-color: #fff8e1;
    font-weight: bold;
}

.method-dev-table tr.baseline-experiment {
    background-color: #e8f5e8;
    font-weight: bold;
}

.screening-indicator {
    background: #ffc107 !important;
    width: 12px;
    height: 12px;
    display: inline-block;
    margin-right: 5px;
    border-radius: 2px;
}

/* 50% Variation Warning Styles */
.variation-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px;
    margin: 10px 0;
    font-size: 12px;
    color: #856404;
}

.method-dev-options label[for="include50Percent"] {
    color: #856404;
    font-weight: 500;
}

.method-dev-options #include50Percent:checked + label {
    background-color: #fff3cd;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Highlight extreme variations in table */
.method-dev-table td.varied-value.extreme-variation {
    background-color: #fff3cd !important;
    font-weight: bold;
}


/* Method Development Options Enhanced Styling */
.method-dev-options {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.method-dev-options .variation-selection,
.method-dev-options .runs-selection {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.method-dev-options .runs-selection {
    border-bottom: none;
    margin-bottom: 15px;
}

.method-dev-options .section-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #495057;
    font-size: 14px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 4px;
}

/* Checkbox Grid Layout */
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-left: 0;
}

.checkbox-item {
    display: flex !important;
    align-items: flex-start;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 !important;
}

.checkbox-item:hover {
    background: #e7f3ff;
    border-color: #3498db;
}

.checkbox-item input[type="checkbox"] {
    margin: 0 12px 0 0 !important;
    transform: scale(1.1);
}

.checkbox-text {
    font-size: 13px;
    line-height: 1.4;
    color: #495057;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.checkbox-text small {
    color: #6c757d;
    font-style: italic;
    margin-top: 2px;
}

/* Radio Group Layout */
.radio-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-left: 0;
}

.radio-item {
    display: flex !important;
    align-items: flex-start;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 !important;
}

.radio-item:hover {
    background: #e7f3ff;
    border-color: #3498db;
}

.radio-item input[type="radio"] {
    margin: 0 12px 0 0 !important;
    transform: scale(1.1);
}

.radio-text {
    font-size: 13px;
    line-height: 1.4;
    color: #495057;
    flex: 1;
}

/* Method Dev Preview */
.method-dev-preview {
    margin-top: 15px;
    padding: 15px;
    background: #e8f4f8;
    border-left: 4px solid #17a2b8;
    border-radius: 0 6px 6px 0;
}

.preview-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-text {
    font-size: 12px;
    color: #495057;
    font-style: italic;
}

/* Enhanced Report Options */
.report-options {
    margin-top: 20px;
}

.report-options h4 {
    margin: 20px 0 15px 0;
    color: #495057;
    font-size: 16px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.report-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.report-checkbox-group label {
    display: flex !important;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 !important;
}

.report-checkbox-group label:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.report-checkbox-group input[type="checkbox"] {
    margin: 0 10px 0 0 !important;
    transform: scale(1.1);
}

/* Additional styles for method development elements */
.screening-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin: 15px 0;
    font-style: italic;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    line-height: 1.4;
}

.design-summary {
    background: #e7f3ff;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

.design-summary h4 {
    margin-top: 0;
    color: #2c5282;
    font-size: 14px;
}

.summary-details p {
    margin: 8px 0;
    font-size: 12px;
    line-height: 1.5;
}

.design-note {
    font-style: italic;
    color: #6c757d;
    margin-top: 10px !important;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

/* Print-specific method development styles */
.method-dev-table tr.reduced-experiment {
    background-color: #fff3cd !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.method-dev-table tr.screening-experiment {
    background-color: #fff8e1 !important;
    font-weight: bold;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.method-dev-table tr.baseline-experiment {
    background-color: #e8f5e8 !important;
    font-weight: bold;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.target-indicator,
.varied-indicator,
.screening-indicator {
    width: 12px;
    height: 12px;
    display: inline-block;
    margin-right: 5px;
    border-radius: 2px;
    vertical-align: middle;
}

.target-indicator {
    background: #28a745 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.varied-indicator {
    background: #ffc107 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.screening-indicator {
    background: #fd7e14 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* Data collection table styles */
.data-collection-table {
    font-size: 10px !important;
    margin: 15px 0;
    page-break-inside: avoid;
}

.data-collection-table th {
    background: #f0f0f0 !important;
    color: #000 !important;
    padding: 8px 6px;
    text-align: center;
    border: 1px solid #ccc;
    font-weight: 600;
    font-size: 9px !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.data-collection-table td {
    padding: 10px 8px;
    border: 1px solid #ccc;
    text-align: center;
    font-size: 10px !important;
}

.data-collection-table .data-entry-cell {
    background: #f9f9f9 !important;
    min-height: 25px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.data-collection-notes {
    margin-top: 20px;
    page-break-inside: avoid;
}

.data-collection-notes h4 {
    color: #2c5282;
    margin-bottom: 10px;
    font-size: 12px !important;
}

.data-collection-notes ol {
    margin: 10px 0 10px 20px;
    font-size: 11px !important;
    line-height: 1.6;
    color: #495057;
}

.data-collection-notes li {
    margin-bottom: 6px;
    font-size: 11px !important;
}

.notes-section {
    margin-top: 20px;
    page-break-inside: avoid;
}

.notes-lines {
    margin-top: 10px;
}

.note-line {
    margin: 15px 0;
    font-size: 11px;
    color: #999;
    border-bottom: 1px solid #ccc;
    padding-bottom: 2px;
}

.analyst-verification {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #333;
    page-break-inside: avoid;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .checkbox-grid,
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    .method-dev-options {
        padding: 15px;
        margin-top: 15px;
    }
    
    .report-checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* Admin Dashboard */
.admin-body {
    background: var(--background-app);
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--text-primary);
}

.admin-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px 40px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-title h1 {
    margin: 0;
    font-size: 28px;
    color: var(--primary-color);
}

.admin-subtitle {
    margin: 6px 0 0;
    color: var(--text-secondary);
}

.admin-actions button {
    margin-left: 10px;
}

.admin-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.summary-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

.summary-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-panel {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: 30px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0;
}

.panel-actions {
    display: flex;
    gap: 10px;
}

.panel-actions input[type="search"] {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    min-width: 220px;
}

.table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.admin-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
    background: var(--background-section);
}

.table-placeholder {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
}

.table-placeholder.error {
    color: var(--danger-color);
}

.user-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-cell strong {
    font-weight: 600;
}

.user-cell span {
    font-size: 13px;
    color: var(--text-secondary);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    margin-right: 6px;
    text-transform: uppercase;
}

.badge.admin-badge {
    background: rgba(44, 82, 130, 0.15);
    color: var(--primary-color);
}

.badge.warning {
    background: rgba(245, 158, 11, 0.18);
    color: #b7791f;
}

.license-type {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.license-max {
    width: 80px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.usage-indicator {
    font-weight: 600;
}

.action-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.inline-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.inline-form select,
.inline-form button {
    height: 38px;
}

.reset-output {
    margin-top: 15px;
}

.token-card {
    background: var(--background-section);
    border-radius: 8px;
    padding: 14px;
    border: 1px dashed var(--border-color);
}

.token-card code {
    background: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.token-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .panel-actions {
        width: 100%;
        flex-direction: column;
    }

    .panel-actions input[type="search"] {
        width: 100%;
    }

    .admin-table th,
    .admin-table td {
        font-size: 12px;
        padding: 10px;
    }
}
