* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    color: #333;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 200, 255, 0.2) 0%, transparent 50%);
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.header h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.header h2 {
    color: #34495e;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.header p {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.file-loader {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.file-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.file-input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.main-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #f093fb, #667eea);
    background-size: 300% 100%;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.tab-navigation {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    position: relative;
    justify-content: space-between;
}

.tab-btn {
    flex: 1 1 auto !important;
    display: inline-block !important;
    padding: 12px 6px;
    background: #f8f9fa;
    border: none;
    border-right: 1px solid #dee2e6;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
    position: relative;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-btn.active {
    background: #ffffff;
    color: #495057;
    border-bottom: 3px solid #007bff;
    margin-bottom: -1px;
}

.tab-btn.active::before,
.tab-btn::before,
.tab-navigation::before {
    display: none;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

#records.tab-content {
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* File Upload Styles */
.file-upload-section {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.file-upload-section:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.file-upload-section.dragover {
    border-color: #3498db;
    background: #e6f3ff;
    transform: scale(1.02);
}

.file-input {
    margin: 10px 0;
}

.file-input input[type="file"] {
    padding: 8px;
    background: white;
    border: 1px solid #dee2e6;
}

.file-list {
    margin-top: 15px;
    text-align: left;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-item-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    background: #3498db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.file-icon.pdf {
    background: #e74c3c;
}

.file-icon.doc {
    background: #2e86ab;
}

.file-icon.jpg {
    background: #f39c12;
}

.file-icon.png {
    background: #9b59b6;
}

.file-name {
    font-weight: 500;
    color: #495057;
}

.file-size {
    font-size: 0.85rem;
    color: #6c757d;
    margin-left: 10px;
}

.file-actions {
    display: flex;
    gap: 5px;
}

.attached-files {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.attached-files h5 {
    margin-bottom: 10px;
    color: #495057;
}

.kpi-dashboard {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(2, 1fr) !important;
    gap: 20px;
    margin-bottom: 30px;
    min-height: 300px;
    width: 100%;
}

.kpi-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.1),
        0 3px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: left 0.6s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.1);
}

.kpi-card:hover::before {
    left: 100%;
}

.kpi-card:nth-child(1) {
    border-left: 4px solid #e74c3c;
}

.kpi-card:nth-child(2) {
    border-left: 4px solid #f39c12;
}

.kpi-card:nth-child(3) {
    border-left: 4px solid #f1c40f;
}

.kpi-card:nth-child(4) {
    border-left: 4px solid #27ae60;
}

.kpi-card:nth-child(5) {
    border-left: 4px solid #3498db;
}

.kpi-card:nth-child(6) {
    border-left: 4px solid #e74c3c;
}

.kpi-card:nth-child(7) {
    border-left: 4px solid #9b59b6;
}

.kpi-card:nth-child(8) {
    border-left: 4px solid #2ecc71;
}

.kpi-card h3 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.kpi-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    user-select: none;
}

.data-table th:hover {
    background: #e9ecef;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-open {
    background: #fff3cd;
    color: #856404;
}

.status-closed {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #cce7ff;
    color: #004085;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.priority-high {
    background: #f8d7da;
    color: #721c24;
}

.priority-medium {
    background: #fff3cd;
    color: #856404;
}

.priority-low {
    background: #d1ecf1;
    color: #0c5460;
}

.priority-near-miss {
    background: #e2e3e5;
    color: #41464b;
}

.priority-incident {
    background: #f8d7da;
    color: #721c24;
}

.priority-audit {
    background: #d1ecf1;
    color: #0c5460;
}

.status-current {
    background: #d4edda;
    color: #155724;
}

.status-overdue {
    background: #f8d7da;
    color: #721c24;
}

.status-expiring {
    background: #fff3cd;
    color: #856404;
}

.status-logged {
    background: #d1ecf1;
    color: #0c5460;
}

.status-reported {
    background: #e2e3e5;
    color: #41464b;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.priority-osha-300 {
    background: #e2e3e5;
    color: #41464b;
}

.priority-osha-301 {
    background: #cce7ff;
    color: #004085;
}

.compliance-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.1),
        0 3px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.compliance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: left 0.6s ease;
}

.compliance-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.1);
}

.compliance-card:hover::before {
    left: 100%;
}

.compliance-card:nth-child(1) {
    border-left: 4px solid #e74c3c;
}

.compliance-card:nth-child(2) {
    border-left: 4px solid #f39c12;
}

.compliance-card:nth-child(3) {
    border-left: 4px solid #27ae60;
}

.compliance-card:nth-child(4) {
    border-left: 4px solid #e74c3c;
}

.compliance-card:nth-child(5) {
    border-left: 4px solid #e74c3c;
}

.compliance-card:nth-child(6) {
    border-left: 4px solid #f39c12;
}

.compliance-card:nth-child(7) {
    border-left: 4px solid #3498db;
}

.compliance-card:nth-child(8) {
    border-left: 4px solid #e74c3c;
}

.compliance-card:nth-child(9) {
    border-left: 4px solid #9b59b6;
}

.compliance-card:nth-child(10) {
    border-left: 4px solid #2ecc71;
}

.compliance-card:nth-child(11) {
    border-left: 4px solid #3498db;
}

.compliance-card:nth-child(12) {
    border-left: 4px solid #f39c12;
}

.compliance-card:nth-child(13) {
    border-left: 4px solid #27ae60;
}

.compliance-card:nth-child(14) {
    border-left: 4px solid #9b59b6;
}

.compliance-card:nth-child(15) {
    border-left: 4px solid #f1c40f;
}

.compliance-card:nth-child(16) {
    border-left: 4px solid #2ecc71;
}

.compliance-card h4 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1rem;
}

.compliance-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.compliance-label {
    color: #6c757d;
    font-size: 0.85rem;
}

#complianceSummary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    display: grid;

}

#ghsComplianceSummary {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(4, 1fr) !important;
    gap: 15px;
    margin-bottom: 20px;
    min-height: 400px;
    width: 100%;
}

.training-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 0;
}

.training-tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: #f8f9fa;
    border: none;
    border-right: 1px solid #dee2e6;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
}

.training-tab-btn:last-child {
    border-right: none;
}

.training-tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.training-tab-btn.active {
    background: #ffffff;
    color: #495057;
    border-bottom: 3px solid #007bff;
    margin-bottom: -1px;
}

.training-section {
    display: none;
}

.training-section.active {
    display: block;
}

.training-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.training-filter {
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.training-filter select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    min-width: 200px;
}

.employee-inactive {
    opacity: 0.6;
    background-color: #f8f9fa !important;
}

.records-filter-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.records-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.records-filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#recordCount {
    margin-left: auto;
    font-weight: 600;
    color: #6c757d;
}

.location-selector {
    margin-bottom: 20px;
}

.man-hours-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.man-hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.follow-up-section {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.follow-up-entry {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.follow-up-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #6c757d;
}

.five-why-analysis {
    background: linear-gradient(135deg, #e8f4fd, #f0f8ff);
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.five-why-question {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.five-why-question label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.five-why-question textarea {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.root-cause-conclusion {
    background: #f8f9fa;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.analysis-summary {
    background: #f1f8e9;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
}

.detail-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-section h4 {
    margin-bottom: 15px;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    margin-bottom: 10px;
    align-items: start;
}

.detail-label {
    font-weight: 600;
    color: #6c757d;
}

.detail-value {
    color: #495057;
}

.status-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
}

.highlight {
    background-color: #fff3cd !important;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    padding: 40px;
    border-radius: 20px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 450px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #f093fb, #667eea);
    background-size: 300% 100%;
    animation: gradientShift 6s ease infinite;
}

.login-logo {
    margin-bottom: 30px;
}

.login-logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.login-logo h2 {
    color: #34495e;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-logo p {
    color: #7f8c8d;
    font-size: 1rem;
}

.login-form {
    margin-top: 30px;
}

.login-form-group {
    margin-bottom: 25px;
    text-align: left;
    position: relative;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    font-size: 18px;
    padding: 5px;
    transition: color 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #495057;
}

.password-toggle:focus {
    outline: none;
    color: #667eea;
}

.login-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.login-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.password-input-wrapper .login-input {
    padding-right: 50px;
}

.login-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.95);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #764ba2, #667eea);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.login-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.login-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
}

.login-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
}

.app-container {
    display: none;
}

.app-container.logged-in {
    display: block;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 999;
}

.logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* GHS/SDS Specific Styles */
.hazard-symbol {
    width: 24px;
    height: 24px;
    border: 2px solid #e74c3c;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #e74c3c;
    margin: 2px;
}

.hazard-symbol.flammable {
    border-color: #f39c12;
    color: #f39c12;
}

.hazard-symbol.toxic {
    border-color: #e74c3c;
    color: #e74c3c;
}

.hazard-symbol.corrosive {
    border-color: #9b59b6;
    color: #9b59b6;
}

.hazard-symbol.irritant {
    border-color: #f1c40f;
    color: #f1c40f;
}

.hazard-symbol.environmental {
    border-color: #27ae60;
    color: #27ae60;
}

.chemical-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-bottom: 15px;
}

.ghs-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 0;
}

.ghs-tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: #f8f9fa;
    border: none;
    border-right: 1px solid #dee2e6;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
}

.ghs-tab-btn:last-child {
    border-right: none;
}

.ghs-tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.ghs-tab-btn.active {
    background: #ffffff;
    color: #495057;
    border-bottom: 3px solid #007bff;
    margin-bottom: -1px;
}

.ghs-section {
    display: none;
}

.ghs-section.active {
    display: block;
}

.chemical-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sds-status-expired {
    background: #f8d7da;
    color: #721c24;
}

.sds-status-current {
    background: #d4edda;
    color: #155724;
}

.sds-status-expiring {
    background: #fff3cd;
    color: #856404;
}

.hazard-classification {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

@media (max-width: 1024px) and (min-width: 769px) {
    #ghsComplianceSummary {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: repeat(8, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .kpi-dashboard {
        grid-template-columns: 1fr;
    }

    #ghsComplianceSummary {
        grid-template-columns: 1fr !important;
        grid-template-rows: none !important;
        min-height: auto;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

@media print {
    @page {
        size: landscape;
        margin: 0.5in;
    }

    body>* {
        display: none !important;
        /* Hide everything on the page by default */
    }

    #oshaLogPrintView {
        display: block !important;
        /* Show only our print container */
    }

    .print-header {
        text-align: center;
        margin-bottom: 20px;
    }

    .print-header h1 {
        font-size: 18pt;
        font-weight: bold;
        margin: 0;
    }

    .print-header h2 {
        font-size: 16pt;
        margin: 5px 0;
    }

    .print-header h3 {
        font-size: 14pt;
        font-weight: normal;
        margin: 5px 0;
    }

    .print-info {
        text-align: right;
        margin-bottom: 10px;
        font-size: 12pt;
    }

    #oshaLogPrintTable {
        width: 100%;
        border-collapse: collapse;
        font-size: 9pt;
    }

    #oshaLogPrintTable th,
    #oshaLogPrintTable td {
        border: 2px solid black;
        padding: 4px;
        text-align: center;
        vertical-align: top;
    }

    #oshaLogPrintTable th {
        font-weight: bold;
        background-color: #f2f2f2;
    }

    /* Column-specific widths to match the OSHA form */
    #oshaLogPrintTable .col-case {
        width: 4%;
    }

    #oshaLogPrintTable .col-name {
        width: 10%;
    }

    #oshaLogPrintTable .col-title {
        width: 10%;
    }

    #oshaLogPrintTable .col-date {
        width: 7%;
    }

    #oshaLogPrintTable .col-desc {
        width: 23%;
    }

    #oshaLogPrintTable .col-death {
        width: 4%;
    }

    #oshaLogPrintTable .col-days-away {
        width: 7%;
    }

    #oshaLogPrintTable .col-restricted {
        width: 7%;
    }

    #oshaLogPrintTable .col-transfer {
        width: 7%;
    }

    #oshaLogPrintTable .col-other {
        width: 7%;
    }

    #oshaLogPrintTable td:nth-child(2),
    #oshaLogPrintTable td:nth-child(3),
    #oshaLogPrintTable td:nth-child(5) {
        text-align: left;
    }

    .print-summary {
        margin-top: 20px;
        display: flex;
        justify-content: space-between;
        font-size: 12pt;
    }

    .print-summary-table {
        width: 40%;
        border-collapse: collapse;
    }

    .print-summary-table td {
        border: 2px solid black;
        padding: 5px;
    }

    .print-summary-table td:first-child {
        font-weight: bold;
    }
}