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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding-bottom: 50px;
}

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-links a:hover,
.nav-links a.active {
    color: #667eea;
    background: #f0f4ff;
}

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

.page-header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #666;
    font-weight: 500;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid white;
    background: transparent;
    color: white;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: white;
    color: #667eea;
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.task-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    position: relative;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.task-card h3 {
    color: #333;
    margin-bottom: 0.75rem;
}

.task-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.available {
    background: #10b981;
    color: white;
}

.status-badge.assigned {
    background: #f59e0b;
    color: white;
}

.status-badge.completed {
    background: #6366f1;
    color: white;
}

.assigned-to {
    margin-top: 0.75rem;
    font-weight: 600;
    color: #667eea;
}

.no-tasks {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    padding: 2rem;
}

.pdf-download-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: white;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pdf-download-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.pdf-view-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.pdf-view-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.pdf-indicator {
    color: #667eea;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 5px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.no-safety-info {
    color: #999;
    font-style: italic;
    padding: 15px;
    text-align: center;
}

/* Manager Portal Styles */
.manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.panel {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.panel h3 {
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #667eea;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 5px;
    margin-bottom: 0.75rem;
}

.list-item:hover {
    background: #f3f4f6;
}

.list-item span {
    color: #333;
    font-weight: 500;
}

.list-item button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.panel.full-width {
    grid-column: 1 / -1;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #667eea;
    border: 2px solid white;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f0f4ff;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
}

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

/* Safety Dashboard Section */
.safety-dashboard-section {
    margin-bottom: 2rem;
}

.safety-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.safety-dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.safety-dashboard-card h3 {
    color: #28a745;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.dashboard-safety-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.dashboard-safety-item.is-today {
    background: #d4edda;
    border-left-color: #28a745;
}

.dashboard-safety-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.dashboard-safety-item p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.safety-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.safety-date {
    display: inline-block;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.today-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.info-badge {
    display: inline-block;
    background: #6c757d;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Worker Page Styles */
.worker-signin {
    max-width: 500px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.worker-signin h2 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.worker-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.worker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #667eea;
}

.worker-info h3 {
    color: #333;
    font-size: 1.5rem;
}

.worker-info p {
    color: #666;
    margin-top: 0.25rem;
}

/* Safety Items for Workers */
.worker-safety-section {
    margin-bottom: 2rem;
}

.worker-safety-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #28a745;
}

.worker-safety-item h4 {
    color: #333;
    margin-bottom: 0.75rem;
}

.worker-safety-item p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.safety-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.acknowledged-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Acknowledgements Tracking */
.acknowledgements-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.acknowledgements-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-badge {
    padding: 0.5rem 1rem;
    background: #f0f4ff;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-badge:hover,
.filter-badge.active {
    background: #667eea;
    color: white;
}

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

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

.acknowledgements-table th,
.acknowledgements-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.acknowledgements-table th {
    background: #f9fafb;
    color: #333;
    font-weight: 600;
}

.acknowledgements-table tr:hover {
    background: #f9fafb;
}

.progress-container {
    margin-top: 1rem;
}

.progress-bar {
    background: #e5e7eb;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

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

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }

    .page-header h2 {
        font-size: 2rem;
    }
}

/* Safety History Buttons */
.safety-history-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.safety-history-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: #f0f4ff;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.safety-history-btn:hover,
.safety-history-btn.active {
    background: #667eea;
    color: white;
}

.safety-history-list {
    max-height: 400px;
    overflow-y: auto;
}

.safety-history-item {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #28a745;
}

.safety-history-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.safety-history-item p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.safety-history-item .date-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.recurring-options {
    margin-top: 1rem;
    padding: 1rem;
    background: #f0f4ff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.recurring-options label {
    display: block;
    margin-bottom: 0.75rem;
}

.file-hint {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.pdf-name {
    display: inline-block;
    background: #f0f4ff;
    color: #667eea;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Popup Control Settings Styles */
.settings-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.settings-info {
    border-top: 2px solid var(--border-color);
    padding-top: 1.5rem;
}

.settings-info h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.settings-display {
    background: var(--background);
    border-radius: 8px;
    padding: 1rem;
}

.settings-display p {
    margin: 0.5rem 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.settings-display strong {
    color: var(--primary);
    min-width: 150px;
    display: inline-block;
}

.form-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #28a745, #20c997);
    border-radius: 3px;
    outline: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid #28a745;
    border-radius: 50%;
    cursor: pointer;
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid #28a745;
    border-radius: 50%;
    cursor: pointer;
}

/* Jobsites Styles */
.jobsites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.jobsite-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.jobsite-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.jobsite-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.jobsite-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.jobsite-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.jobsite-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.jobsite-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    margin-left: 0.5rem;
}

/* Employees Grid */
.employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.employee-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.employee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.employee-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.employee-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}
