* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    background: #fff;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.tab.active {
    background: #007bff;
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.timesheet-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-row {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.info-item {
    display: flex;
    gap: 10px;
}

.info-label {
    font-weight: bold;
}

.status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.status.draft {
    background: #e7e7e7;
    color: #495057;
}

.status.pending {
    background: #fff3cd;
    color: #856404;
}

.status.approved {
    background: #d4edda;
    color: #155724;
}

.status.rejected {
    background: #f8d7da;
    color: #721c24;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    overflow-x: auto;
    display: block;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 15px;
    }

    .tabs {
        flex-wrap: wrap;
        gap: 5px;
    }

    .tab {
        padding: 8px 12px;
        font-size: 13px;
        flex: 1;
        min-width: 80px;
        text-align: center;
    }

    .timesheet-card {
        padding: 15px;
    }

    .info-row {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    table {
        font-size: 11px;
    }

    th,
    td {
        padding: 4px;
        font-size: 11px;
    }

    input[type="number"] {
        width: 45px;
        padding: 3px;
        font-size: 12px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .actions {
        flex-direction: column;
    }

    .timesheet-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .login-form {
        margin: 50px 10px;
        padding: 20px;
    }

    #statsCards {
        flex-direction: column;
    }
}

th,
td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

th {
    background: #f8f9fa;
    font-weight: 600;
}

input[type="number"] {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn:hover {
    opacity: 0.9;
}

.actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.login-form {
    max-width: 400px;
    margin: 100px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.total-row {
    font-weight: bold;
    background: #e9ecef;
}

.admin-list {
    margin-top: 20px;
}

.timesheet-item {
    background: #fff;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#reportsList,
#eventReportsList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

#reportsList .timesheet-item,
#eventReportsList .timesheet-item {
    margin-bottom: 0;
    /* Reset margin since grid handles gap */
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#reportsList .timesheet-item .status,
#eventReportsList .timesheet-item .status {
    align-self: flex-start;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    padding: 12px 20px;
    border-radius: 6px;
    color: #fff;
    margin-bottom: 8px;
    animation: slideIn 0.3s ease;
    max-width: 350px;
    word-wrap: break-word;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #333;
}

.toast.info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Offline banner */
.offline-banner {
    display: none;
    background: #dc3545;
    color: #fff;
    text-align: center;
    padding: 8px;
    font-weight: 600;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
}

.offline-banner.active {
    display: block;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.logo {
    height: 60px;
    display: block;
    margin: 0 auto 15px;
}

.header-logo {
    height: 45px;
    vertical-align: middle;
    margin-right: 12px;
}