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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--sl-color-neutral-50);
    padding: 1rem;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

.header {
    margin-bottom: 1rem;
}

.calendar-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-right: 10%;
    margin-left: 1%;
}

.tabs-container {
    margin-bottom: 1rem;
}

.tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
}

.tab {
    padding: 0.75rem 1rem;
    background: var(--sl-color-neutral-100);
    border: 1px solid var(--sl-color-neutral-300);
    border-radius: var(--sl-border-radius-medium);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-size: 0.875rem;
    width: 100%;
    text-align: center;
}

.tab:hover {
    background: var(--sl-color-neutral-200);
}

.tab.active {
    background: var(--sl-color-primary-500);
    color: white;
    border-color: var(--sl-color-primary-600);
}

.calendar-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2px;
    width: 100%;
}


.grid-header {
    background: var(--sl-color-neutral-100);
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    position: sticky;
    left: 0;
    z-index: 2;
}

.date-header {
    background: var(--sl-color-primary-50);
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

.hour-row-wrapper {
    display: contents;
}

.hour-label {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hour-label.green {
    background: var(--sl-color-success-500);
}

.hour-label.yellow {
    background: #fbbf24;
}

.hour-label.red {
    background: var(--sl-color-danger-500);
}

.status-buttons {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--sl-color-neutral-100);
    border-radius: 4px;
    align-items: center;
    min-height: 48px;
}

.status-button {
    flex: 1;
    min-width: 40px;
    min-height: 40px;
    height: 40px;
    border: 1px solid var(--sl-color-neutral-300);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
    margin-left: 1rem;
    margin-right: 1rem;
    -webkit-tap-highlight-color: transparent;
}

.status-button:hover {
    transform: scale(1.1);
    z-index: 10;
}

.status-button.green {
    background: var(--sl-color-success-500);
}

.status-button.yellow {
    background: #fbbf24;
}

.status-button.red {
    background: var(--sl-color-danger-500);
}

.status-button.active {
    border-width: 2px;
    border-color: var(--sl-color-neutral-900);
    box-shadow: 0 0 0 2px var(--sl-color-primary-200);
}


.loading {
    text-align: center;
    padding: 2rem;
}

.error {
    color: var(--sl-color-danger-600);
    padding: 1rem;
    background: var(--sl-color-danger-50);
    border-radius: var(--sl-border-radius-medium);
    margin-bottom: 1rem;
}

.user-list {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--sl-border-radius-medium);
}

.user-item {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.color-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid var(--sl-color-neutral-300);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.view-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--sl-color-neutral-100);
    border: 1px solid var(--sl-color-neutral-300);
    border-radius: var(--sl-border-radius-medium);
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s;
}

.view-tab:hover {
    background: var(--sl-color-neutral-200);
}

.view-tab.active {
    background: var(--sl-color-primary-500);
    color: white;
    border-color: var(--sl-color-primary-600);
}

.overview-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.overview-table {
    display: grid;
    grid-template-columns: 120px repeat(24, 1fr);
    gap: 2px;
    min-width: max-content;
    position: relative;
}

.overview-header-row {
    display: contents;
}

.overview-user-header,
.overview-hour-header {
    background: var(--sl-color-primary-50);
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    position: sticky;
    top: 0;
    z-index: 2;
}

.overview-user-header {
    left: 0;
    z-index: 3;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    width: 120px;
    border-right: 2px solid var(--sl-color-neutral-300);
    margin-left: 0;
    transform: translateZ(0);
    will-change: transform;
}

.overview-user-row {
    display: contents;
}

.overview-user-name {
    background: var(--sl-color-neutral-100);
    padding: 0.75rem 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    position: sticky;
    left: 0;
    z-index: 2;
    border-right: 2px solid var(--sl-color-neutral-300);
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    width: 120px;
    margin-left: 0;
    transform: translateZ(0);
    will-change: transform;
}

.overview-cell {
    min-height: 40px;
    border: 1px solid var(--sl-color-neutral-200);
    transition: all 0.2s;
}

.overview-cell.green {
    background: var(--sl-color-success-500);
}

.overview-cell.yellow {
    background: #fbbf24;
}

.overview-cell.red {
    background: var(--sl-color-danger-500);
}

.next-day-button-container {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.next-day-button {
    padding: 0.875rem 1.5rem;
    background: var(--sl-color-primary-500);
    color: white;
    border: none;
    border-radius: var(--sl-border-radius-medium);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 150px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.next-day-button:hover:not(:disabled) {
    background: var(--sl-color-primary-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.next-day-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.next-day-button:disabled {
    background: var(--sl-color-neutral-300);
    color: var(--sl-color-neutral-500);
    cursor: not-allowed;
    box-shadow: none;
}

.copy-yesterday-button-container {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    padding: 0.5rem;
}

.copy-yesterday-button {
    padding: 0.875rem 1.5rem;
    background: var(--sl-color-success-500);
    color: white;
    border: none;
    border-radius: var(--sl-border-radius-medium);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 150px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-yesterday-button:hover:not(:disabled) {
    background: var(--sl-color-success-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.copy-yesterday-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-yesterday-button:disabled {
    background: var(--sl-color-neutral-300);
    color: var(--sl-color-neutral-500);
    cursor: not-allowed;
    box-shadow: none;
}
