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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background-color: #2c3e50;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-links a:hover {
    background-color: #34495e;
}

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

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Headings */
h1 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

h2 {
    margin-bottom: 1rem;
    color: #34495e;
    font-size: 1.25rem;
}

h3 {
    margin: 1rem 0;
    color: #34495e;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Auth forms */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
}

.auth-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-warning {
    background-color: #e74c3c;
    color: white;
}

.btn-warning:hover {
    background-color: #c0392b;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

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

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.data-table tbody tr:hover {
    background-color: #f5f5f5;
}

.data-table tfoot td {
    background-color: #f8f9fa;
    font-weight: 600;
}

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin {
    background-color: #9b59b6;
    color: white;
}

.badge-user {
    background-color: #3498db;
    color: white;
}

/* Filter form */
.filter-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-form select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

/* Inline form */
.inline-form {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.inline-form input {
    width: 100px;
    padding: 0.5rem;
}

/* CSV format */
.csv-format {
    display: block;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.875rem;
}

.csv-example {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.875rem;
    white-space: pre-wrap;
}

/* Period info */
.period-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.period-dates {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

/* Info text */
.info-text {
    color: #7f8c8d;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.submitted-info {
    color: #27ae60;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Missing list */
.missing-list {
    list-style: none;
    padding: 0;
}

.missing-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: #e74c3c;
}

/* Actions column */
.actions {
    white-space: nowrap;
}

.actions form {
    margin-right: 0.5rem;
}

/* Daily Hours Grid */
.daily-hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.day-entry {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.day-entry label {
    display: block;
    margin-bottom: 0.5rem;
}

.day-entry .day-name {
    display: block;
    font-weight: 600;
    color: #2c3e50;
}

.day-entry .day-date {
    display: block;
    font-size: 0.875rem;
    color: #7f8c8d;
}

.day-entry input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
}

.day-entry input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.hours-summary {
    background: #e8f4fd;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.25rem;
}

.hours-summary #total-hours {
    color: #3498db;
}

/* Admin Daily Hours Table */
.daily-hours-table th.date-col {
    text-align: center;
    font-size: 0.75rem;
    padding: 0.5rem 0.25rem;
    white-space: nowrap;
}

.daily-hours-table th.date-col small {
    color: #7f8c8d;
}

.daily-hours-table .hours-cell {
    text-align: center;
    padding: 0.5rem 0.25rem;
    font-size: 0.875rem;
}

.daily-hours-table .total-cell {
    text-align: center;
    background: #e8f4fd;
}

/* Hub Cards */
.hub-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 0;
}

.hub-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-decoration: none;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.hub-card-icon {
    font-size: 2.25rem;
    flex-shrink: 0;
}

.hub-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.hub-card-desc {
    font-size: 0.8rem;
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 768px) {
    .hub-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .nav-links {
        justify-content: center;
    }

    .container {
        padding: 1rem;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .inline-form input {
        width: 100%;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}
