:root {
    --primary: #003366;
    --secondary: #FF8C00;
    --light: #f4f7f6;
    --border: #ddd;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: var(--light);
}

.navbar {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
}

.logo span {
    color: var(--secondary);
}

.btn {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.planning-container {
    padding: 20px;
    overflow-x: auto;
}

.planning-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.planning-table th,
.planning-table td {
    border: 1px solid var(--border);
    padding: 10px;
    text-align: center;
}

.planning-table th {
    background-color: #eee;
    font-weight: 600;
}

.site-name {
    font-weight: bold;
    text-align: left;
    background-color: #f9f9f9;
    min-width: 150px;
}

.day-cell {
    min-width: 100px;
    height: 80px;
    vertical-align: top;
    position: relative;
}

.badge {
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 4px;
    cursor: pointer;
    display: inline-block;
}

.add-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
}

background: #f5f5f5;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
}

.admin-container {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.admin-section {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.add-form input {
    flex: 1;
    padding: 8px;
}

.btn-primary {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
}

.list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* --- NEW STYLES --- */

/* View Switcher */
.view-switcher {
    display: flex;
    gap: 10px;
}

.view-switcher .btn.active {
    background-color: #34495e;
    border-bottom: 2px solid #3498db;
}

/* Site Management */
.delete-site-btn {
    color: #e74c3c;
    cursor: pointer;
    margin-left: 10px;
    font-size: 0.8em;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.delete-site-btn:hover {
    opacity: 1;
}

/* Assignments & Badges */
.assignments {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 0.85em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
    /* Fill space */
    text-align: center;
}

.badge.am,
.badge.pm {
    flex-basis: 45%;
    /* Approx half width */
    font-size: 0.75em;
}

.badge.full {
    flex-basis: 100%;
}

.period-indicator {
    font-size: 0.7em;
    opacity: 0.8;
    margin-left: 3px;
    font-weight: bold;
}

/* Month View Adjustments */
.planning-container.month .day-cell {
    min-width: 40px;
    /* Make cells narrower in month view */
}

.planning-container.month .day-name {
    font-size: 0.8em;
}

.planning-container.month .badge {
    padding: 2px 4px;
    font-size: 0.7em;
}

/* Stats Table */
.stats-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.stats-table th,
.stats-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.stats-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Modal Form */
.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.period-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.period-selector label {
    cursor: pointer;
    border-radius: 8px;
}

.employee-option {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.employee-option:hover {
    background: #f5f5f5;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
}

.admin-container {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.admin-section {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.add-form input {
    flex: 1;
    padding: 8px;
}

.btn-primary {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
}

.list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* --- NEW STYLES --- */

/* View Switcher */
.view-switcher {
    display: flex;
    gap: 10px;
}

.view-switcher .btn.active {
    background-color: #34495e;
    border-bottom: 2px solid #3498db;
}

/* Site Management */
.delete-site-btn {
    color: #e74c3c;
    cursor: pointer;
    margin-left: 10px;
    font-size: 0.8em;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.delete-site-btn:hover {
    opacity: 1;
}

/* Assignments & Badges */
.assignments {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 0.85em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
    /* Fill space */
    text-align: center;
}

.badge.am,
.badge.pm {
    flex-basis: 45%;
    /* Approx half width */
    font-size: 0.75em;
}

.badge.full {
    flex-basis: 100%;
}

.period-indicator {
    font-size: 0.7em;
    opacity: 0.8;
    margin-left: 3px;
    font-weight: bold;
}

/* Month View Adjustments */
.planning-container.month .day-cell {
    min-width: 40px;
    /* Make cells narrower in month view */
}

.planning-container.month .day-name {
    font-size: 0.8em;
}

.planning-container.month .badge {
    padding: 2px 4px;
    font-size: 0.7em;
}

/* Stats Table */
.stats-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.stats-table th,
.stats-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.stats-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Modal Form */
.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.period-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.period-selector label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

border-bottom: 1px solid #eee;
cursor: pointer;
display: flex;
align-items: center;
}

.employee-option:hover {
    background: #f5f5f5;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
}

.admin-container {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.admin-section {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.add-form input {
    flex: 1;
    padding: 8px;
}

.btn-primary {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
}

.list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* --- NEW STYLES --- */

/* View Switcher */
.view-switcher {
    display: flex;
    gap: 10px;
}

.view-switcher .btn.active {
    background-color: #34495e;
    border-bottom: 2px solid #3498db;
}

/* Site Management */
.delete-site-btn {
    color: #e74c3c;
    cursor: pointer;
    margin-left: 10px;
    font-size: 0.8em;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.delete-site-btn:hover {
    opacity: 1;
}

/* Assignments & Badges */
.assignments {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 0.85em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
    /* Fill space */
    text-align: center;
}

.badge.am,
.badge.pm {
    flex-basis: 45%;
    /* Approx half width */
    font-size: 0.75em;
}

.badge.full {
    flex-basis: 100%;
}

.period-indicator {
    font-size: 0.7em;
    opacity: 0.8;
    margin-left: 3px;
    font-weight: bold;
}

/* Month View Adjustments */
.planning-container.month .day-cell {
    min-width: 40px;
    /* Make cells narrower in month view */
}

.planning-container.month .day-name {
    font-size: 0.8em;
}

.planning-container.month .badge {
    padding: 2px 4px;
    font-size: 0.7em;
}

/* Stats Table */
.stats-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.stats-table th,
.stats-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.stats-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Modal Form */
.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.period-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.period-selector label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.weekend {
    background-color: #f0f0f0;
    /* Light gray for weekends */
}

.holiday {
    background-color: #ffe6e6;
    /* Light red for holidays */
    font-weight: bold;
}

/* Stats Links */
.stats-links {
    display: flex;
    gap: 10px;
}

/* Floating Add Site Button */
.floating-add-site {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.floating-add-site .btn {
    padding: 15px 25px;
    font-size: 1em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-add-site .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Year View Calendar Grid */
.year-view-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.year-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mini-calendar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.mini-calendar-header {
    font-weight: 600;
    font-size: 1.1em;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

.mini-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.mini-day-label {
    text-align: center;
    font-weight: 600;
    font-size: 0.8em;
    color: #7f8c8d;
    padding: 4px 0;
}

.mini-day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.mini-day-cell:not(.empty) {
    background: #ecf0f1;
}

.mini-day-cell:hover:not(.empty) {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mini-day-cell.weekend {
    background: #d5dbdb !important;
    color: #7f8c8d;
}

.mini-day-cell.holiday {
    background: #fadbd8 !important;
    color: #c0392b;
    font-weight: 600;
}

.mini-day-cell.has-work {
    background: #d5f4e6 !important;
    color: #27ae60;
    font-weight: 600;
}

.mini-day-cell.empty {
    background: transparent;
}

.year-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
}

.legend-color.has-work {
    background: #d5f4e6;
    border: 1px solid #27ae60;
}

.legend-color.holiday {
    background: #fadbd8;
    border: 1px solid #c0392b;
}

.legend-color.weekend {
    background: #d5dbdb;
    border: 1px solid #7f8c8d;
}

/* Admin User Management */
.user-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.user-form .form-control {
    flex: 1;
    min-width: 150px;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.users-table thead {
    background: #34495e;
    color: white;
}

.users-table th,
.users-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.users-table tr:hover {
    background: #f8f9fa;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-admin {
    background: #e74c3c;
    color: white;
}

.badge-user {
    background: #95a5a6;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85em;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.help-text {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Color Picker Buttons */
.color-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.color-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.color-btn.active {
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #2c3e50;
    transform: scale(1.1);
}

/* Enhanced Period Indicators */
.badge.am {
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 3px,
            rgba(255, 255, 255, 0.3) 3px,
            rgba(255, 255, 255, 0.3) 6px) !important;
    border: 2px solid rgba(0, 0, 0, 0.2);
    position: relative;
}

.badge.pm {
    background: repeating-linear-gradient(-45deg,
            transparent,
            transparent 3px,
            rgba(255, 255, 255, 0.3) 3px,
            rgba(255, 255, 255, 0.3) 6px) !important;
    border: 2px solid rgba(0, 0, 0, 0.2);
    position: relative;
}

.badge.full {
    border: 2px solid rgba(0, 0, 0, 0.1);
}

/* Period indicator badges */
.period-indicator {
    display: inline-block;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: bold;
    margin-left: 4px;
}