/* CSS Variables for theming */
:root {
    /* Light theme colors */
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #333;
    --text-secondary: #666;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-overlay: rgba(255, 255, 255, 0.9);
    --border-color: #eee;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

/* Dark theme colors */
body.dark-mode {
    --primary-color: #8b9cfe;
    --primary-gradient: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-overlay: rgba(26, 32, 44, 0.9);
    --border-color: #4a5568;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --success-color: #38a169;
    --danger-color: #e53e3e;
    --warning-color: #d69e2e;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-gradient);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Authentication */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: var(--bg-primary);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 2em;
}

#auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form input {
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-form button {
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-form button:hover {
    filter: brightness(0.9);
}

/* Main App */
.main-app {
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* Header */
.header {
    background: var(--bg-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.header h1 {
    color: var(--primary-color);
    font-size: 1.8em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    padding: 8px 16px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover {
    filter: brightness(0.9);
}

.nav-tabs {
    display: flex;
    background: var(--bg-secondary);
    border-top: 1px solid #dee2e6;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-tab {
    padding: 15px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-tab:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    border-bottom-color: #667eea;
}

/* Tab Content */
.tab-content {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Time Tracker */
.tracker-container {
    max-width: 600px;
    margin: 0 auto;
}

.session-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 3px solid #28a745;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.session-header h3 {
    color: var(--success-color);
    font-size: 1.3em;
}

.session-time {
    font-size: 2em;
    font-weight: bold;
    color: var(--success-color);
    font-family: 'Courier New', monospace;
}

.session-details {
    margin-bottom: 20px;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 20px;
    margin-bottom: 10px;
}

.category-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
}

.category-name {
    font-weight: 500;
    color: var(--text-primary);
}

.session-notes textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.clock-form {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.clock-form h3 {
    margin-bottom: 25px;
    color: var(--text-primary);
    font-size: 1.3em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.clock-btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.clock-in {
    background: var(--success-color);
    color: white;
}

.clock-in:hover {
    background: #218838;
    transform: translateY(-2px);
}

.clock-out {
    background: var(--danger-color);
    color: white;
}

.clock-out:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
}

/* History */
.history-container {
    max-width: 900px;
    margin: 0 auto;
}

.history-controls {
    background: var(--bg-primary);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.date-range label {
    font-weight: 500;
    color: #555;
}

.date-range input {
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.date-range button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.date-range button:hover {
    filter: brightness(0.9);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--bg-primary);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.summary-card h4 {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
}

.history-list {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.history-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item-info {
    flex-grow: 1;
}

.history-date {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.history-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.history-duration {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
}

/* Team Dashboard */
.team-container {
    max-width: 1000px;
    margin: 0 auto;
}

.team-section {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.team-section h3 {
    margin-bottom: 25px;
    color: var(--text-primary);
    font-size: 1.3em;
}

.team-controls {
    margin-bottom: 25px;
}

.active-sessions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.active-session-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #28a745;
}

.active-session-user {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.active-session-duration {
    font-size: 1.1em;
    color: var(--success-color);
    font-weight: bold;
    margin-bottom: 5px;
}

.active-session-category {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.team-summary {
    overflow-x: auto;
}

.team-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.team-table th,
.team-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.team-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.team-table tr:hover {
    background: var(--bg-secondary);
}

/* Messages */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    max-width: 400px;
}

.message {
    background: var(--bg-primary);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    animation: slideIn 0.3s ease-out;
}

.message.success {
    border-left-color: #28a745;
}

.message.error {
    border-left-color: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .nav-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }

    .nav-tab {
        min-width: 120px;
    }

    .date-range {
        flex-direction: column;
        align-items: stretch;
    }

    .date-range input,
    .date-range button {
        width: 100%;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .active-sessions {
        grid-template-columns: 1fr;
    }

    .team-table {
        font-size: 0.9em;
    }

    .message-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .tab-content {
        padding: 20px 15px;
    }

    .auth-card {
        padding: 25px;
    }

    .session-card,
    .clock-form,
    .team-section {
        padding: 20px;
    }

    .session-time {
        font-size: 1.5em;
    }
}

/* Charts */
.charts-container {
    background: var(--bg-primary);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.charts-header {
    background: var(--bg-secondary);
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.charts-header h3 {
    margin: 0;
    color: #495057;
}

.chart-container {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-primary);
}

#hours-chart {
    border: 1px solid #e9ecef;
    border-radius: 5px;
    background: var(--bg-primary);
}

.chart-legend {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background: var(--bg-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-label {
    font-size: 0.9em;
    color: #495057;
}

/* Pie Chart Styles */
.pie-chart-container {
    margin-top: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.pie-chart {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: var(--bg-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pie-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 180px;
}

.pie-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
}

.pie-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pie-legend-text {
    color: #495057;
    line-height: 1.2;
}

/* PTO Calendar Features */
.clickable-day {
    cursor: pointer;
    position: relative;
}

.clickable-day:hover {
    background-color: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.day-actions {
    position: absolute;
    bottom: 2px;
    right: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    pointer-events: none;
    width: 16px;
    height: 14px;
}

.clickable-day:hover .day-actions {
    opacity: 1;
    pointer-events: auto;
}

.pto-button {
    font-size: 10px;
    cursor: pointer;
    padding: 2px 3px;
    border-radius: 3px;
    background: rgba(34, 197, 94, 0.9);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
    color: white;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: block;
    width: 14px;
    height: 12px;
    text-align: center;
    line-height: 8px;
}

.pto-button:hover {
    background: #22C55E;
    transform: scale(1.15);
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

/* PTO Modal */
.pto-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.pto-modal-content {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pto-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.pto-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.pto-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    padding: 5px;
}

.pto-modal-close:hover {
    color: var(--text-primary);
    background: #f0f0f0;
    border-radius: 50%;
}

.pto-modal-body {
    padding: 0 20px 20px 20px;
}

.pto-modal-body p {
    margin: 0 0 15px 0;
    color: #555;
}

.pto-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.pto-allocate-btn, .pto-remove-btn, .pto-cancel-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pto-allocate-btn {
    background: #22C55E;
    color: white;
}

.pto-allocate-btn:hover {
    background: #16A34A;
}

.pto-remove-btn {
    background: #EF4444;
    color: white;
}

.pto-remove-btn:hover {
    background: #DC2626;
}

.pto-cancel-btn {
    background: #6B7280;
    color: white;
}

.pto-cancel-btn:hover {
    background: #4B5563;
}

.pto-allocate-btn:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
}

.pto-existing-info {
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    border-radius: 5px;
    padding: 10px;
    margin: 15px 0;
}

.pto-existing-info h4 {
    margin: 0 0 8px 0;
    color: #374151;
    font-size: 14px;
}

.pto-existing-info ul {
    margin: 0;
    padding-left: 20px;
    color: #6B7280;
}

.pto-existing-info li {
    margin-bottom: 2px;
}

.pto-view-note {
    color: #6B7280;
    font-style: italic;
    margin-top: 10px;
}

.pto-retrospective-note {
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    border-radius: 5px;
    padding: 8px 10px;
    color: #92400E;
    margin: 10px 0;
}

/* Calendar day with PTO indicator */
.calendar-day.has-pto {
    background: linear-gradient(45deg, #22C55E 50%, transparent 50%);
}

.calendar-day.has-pto .day-number {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px;
}

.pto-indicator {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 12px;
    line-height: 1;
}

.pto-users {
    position: absolute;
    bottom: 1px;
    left: 1px;
    right: 1px;
    font-size: 8px;
    background: rgba(34, 197, 94, 0.9);
    color: white;
    padding: 1px 2px;
    border-radius: 2px;
    text-align: center;
    line-height: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#load-charts-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

#load-charts-btn:hover {
    filter: brightness(0.9);
}

@media (max-width: 768px) {
    .charts-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    #hours-chart {
        width: 100%;
        height: 300px;
    }

    .chart-legend {
        justify-content: center;
    }
}

/* Edit Entries */
.edit-container {
    background: var(--bg-primary);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.edit-controls {
    background: var(--bg-secondary);
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.edit-entries-list {
    padding: 20px;
    overflow-y: auto;
}

.no-entries {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px;
}

.edit-entry {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.edit-entry:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.entry-header {
    background: var(--bg-secondary);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.entry-date {
    font-weight: 600;
    color: #495057;
}

.entry-actions {
    display: flex;
    gap: 10px;
}

.edit-btn, .delete-btn, .save-btn, .cancel-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.3s;
}

.edit-btn {
    background: var(--primary-color);
    color: white;
}

.edit-btn:hover:not(:disabled) {
    filter: brightness(0.9);
}

.edit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.delete-btn {
    background: var(--danger-color);
    color: white;
}

.delete-btn:hover {
    filter: brightness(0.9);
}

.save-btn {
    background: var(--success-color);
    color: white;
}

.save-btn:hover {
    background: #218838;
}

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

.cancel-btn:hover {
    background: #5a6268;
}

.entry-details {
    padding: 20px;
}

.entry-times {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.entry-category, .entry-notes {
    margin-bottom: 10px;
}

.entry-notes {
    margin-bottom: 0;
}

.edit-form {
    padding: 20px;
    background: var(--bg-secondary);
    border-top: 1px solid #e9ecef;
}

.edit-form .form-group {
    margin-bottom: 15px;
}

.edit-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.edit-form input, .edit-form select, .edit-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9em;
}

.edit-form textarea {
    resize: vertical;
    min-height: 60px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .entry-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .entry-times {
        flex-direction: column;
        gap: 5px;
    }

    .entry-actions, .form-actions {
        width: 100%;
    }

    .entry-actions button, .form-actions button {
        flex: 1;
    }
}

/* Calendar Summary Styles */
.calendar-container {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.view-toggle-btn {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: var(--bg-primary);
    color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-toggle-btn:hover {
    background: #f0f0f0;
}

.view-toggle-btn.active {
    background: var(--primary-color);
    color: white;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.month-navigation button {
    padding: 8px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.month-navigation button:hover {
    filter: brightness(0.9);
}

#current-month-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 150px;
    text-align: center;
}

.calendar-grid {
    margin-bottom: 20px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 1px;
}

.day-header {
    background: var(--bg-secondary);
    padding: 10px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid #e9ecef;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    border: 1px solid #e9ecef;
}

.calendar-day {
    min-height: 80px;
    background: var(--bg-primary);
    border: 1px solid #e9ecef;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
}

.calendar-day:hover {
    background: var(--bg-secondary);
}

.calendar-day.other-month {
    background: var(--bg-secondary);
    color: #999;
}

.calendar-day.today {
    border: 2px solid #667eea;
    background: #f0f4ff;
}

.calendar-day.has-hours {
    background: #e6fffa;
}

.calendar-day.intensity-low {
    background: #c6f6d5;
}

.calendar-day.intensity-medium {
    background: #9ae6b4;
}

.calendar-day.intensity-high {
    background: #68d391;
}

.day-number {
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-day.other-month .day-number {
    color: #999;
}

.day-hours {
    font-size: 11px;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    margin-top: 5px;
}

.calendar-summary {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.calendar-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.summary-stat {
    text-align: center;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.summary-stat h4 {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Calendar responsive design */
@media (max-width: 768px) {
    .calendar-controls {
        flex-direction: column;
        align-items: center;
    }

    .calendar-day {
        min-height: 60px;
        padding: 5px;
    }

    .day-hours {
        font-size: 10px;
    }

    .calendar-summary-stats {
        grid-template-columns: 1fr;
    }
}

/* Edit Page Enhancements */
.create-entry-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.create-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.create-btn:hover {
    background: #218838;
}

.create-form {
    margin-top: 20px;
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.create-form h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.active-entry {
    border-left: 4px solid #28a745;
}

.active-badge {
    background: var(--success-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
}

.clock-out-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 8px;
    transition: background 0.3s ease;
}

.clock-out-btn:hover {
    filter: brightness(0.9);
}

.entry-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .create-entry-section {
        padding: 15px;
    }

    .entry-actions {
        flex-direction: column;
        gap: 5px;
    }

    .entry-actions button {
        width: 100%;
    }
}

/* CSV Import Styles */
.import-controls {
    margin-left: 15px;
}

.import-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.import-btn:hover {
    background: #218838;
}

.edit-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

@media (max-width: 768px) {
    .edit-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .import-controls {
        margin-left: 0;
        margin-top: 10px;
    }

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

/* Calendar Summary List View */
.calendar-notice {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin: 20px 0;
}

.calendar-notice h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 24px;
}

.calendar-notice p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.month-summary {
    max-width: 400px;
    margin: 0 auto 20px;
}

.user-summary {
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-primary);
    margin-bottom: 8px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-email {
    font-weight: 500;
    color: var(--text-primary);
}

.user-hours {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
}

.calendar-note {
    font-size: 12px;
    color: #888;
    font-style: italic;
    margin-top: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Settings Page Styles */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.settings-container h2 {
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
    font-size: 28px;
}

.settings-section {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.settings-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

/* Account Information */
.account-info {
    display: grid;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    font-weight: 600;
    color: #555;
    min-width: 150px;
}

.info-item span {
    color: var(--text-primary);
    font-weight: 500;
}

/* Password Form */
.password-form {
    max-width: 500px;
}

.password-form .form-group {
    margin-bottom: 20px;
}

.password-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-primary);
}

.password-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.password-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.save-password-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.save-password-btn:hover {
    filter: brightness(0.9);
}

.cancel-password-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 2px solid #ddd;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cancel-password-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

/* Preferences */
.preferences {
    display: grid;
    gap: 15px;
}

.preference-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.preference-item label {
    display: flex;
    align-items: center;
    color: #999;
    font-size: 14px;
}

.preference-item input[type="checkbox"] {
    margin-right: 10px;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-container {
        padding: 15px;
    }

    .settings-section {
        padding: 20px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .info-item label {
        min-width: auto;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}

/* Weekly Summary Enhancements */
.week-summary {
    margin: 0 auto 20px;
}

.user-summary {
    background: var(--bg-primary);
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 16px;
}

/* Add responsive layout for pie charts */
@media (min-width: 768px) {
    .user-summary .pie-chart-container {
        flex-direction: row;
    }
}

@media (max-width: 767px) {
    .user-summary .pie-chart-container {
        flex-direction: column;
        align-items: center;
    }
    .user-summary .pie-chart {
        width: 150px;
        height: 150px;
    }
}

/* Yearly Summary Styles */
.yearly-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.yearly-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.year-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.year-navigation button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.year-navigation button:hover {
    background: #5a6fd8;
}

.yearly-grid {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.yearly-notice h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.yearly-notice p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.year-summary {
    max-width: 800px;
    margin: 0 auto 20px;
}

.user-yearly-summary {
    background: var(--bg-primary);
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.pto-summary {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    border: 1px solid #e9ecef;
}

.pto-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.pto-used {
    color: #6B7280;
    font-size: 14px;
}

.pto-remaining {
    font-size: 14px;
    font-weight: 500;
}

.pto-available {
    color: #22C55E;
}

.pto-over {
    color: #EF4444;
}

.pto-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.pto-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22C55E 0%, #FCD34D 70%, #EF4444 90%);
    transition: width 0.3s ease;
}

.yearly-summary {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.yearly-note {
    color: #6B7280;
    font-style: italic;
    text-align: center;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .yearly-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .year-navigation {
        justify-content: center;
    }

    .user-yearly-summary .pie-chart-container {
        flex-direction: column;
        align-items: center;
    }

    .pto-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.user-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.user-hours {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 18px;
}

.user-deficit {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.deficit-negative {
    background: #fee2e2;
    color: #dc2626;
}

.deficit-positive {
    background: #dcfce7;
    color: #16a34a;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 25%, #eab308 50%, #22c55e 75%, #16a34a 100%);
    transition: width 0.3s ease;
}

.summary-stat.deficit-negative .stat-value {
    color: #dc2626;
}

.summary-stat.deficit-positive .stat-value {
    color: #16a34a;
}

/* Week navigation specific styles */
.week-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.week-navigation button {
    padding: 8px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.week-navigation button:hover {
    filter: brightness(0.9);
}

#weekly-current-week-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 200px;
    text-align: center;
}

/* Responsive design for weekly summary */
/* Categories Management Styles */
.categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.categories-header h2 {
    color: #2d3748;
    font-size: 24px;
}

.create-btn, .save-btn, .edit-btn, .cancel-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.create-btn, .save-btn {
    background: #48bb78;
    color: white;
}

.create-btn:hover, .save-btn:hover {
    background: #38a169;
}

.edit-btn {
    background: #4299e1;
    color: white;
}

.edit-btn:hover {
    background: #3182ce;
}

.cancel-btn {
    background: #e53e3e;
    color: white;
}

.cancel-btn:hover {
    background: #c53030;
}

.create-form, .edit-form {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.create-form h3, .edit-form h3 {
    margin-bottom: 20px;
    color: #2d3748;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #4a5568;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="color"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4299e1;
}

.form-group input[type="color"] {
    width: 60px;
    height: 40px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.categories-list {
    display: grid;
    gap: 16px;
}

.category-item {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: box-shadow 0.2s;
}

.category-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.category-info {
    flex: 1;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.category-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-name {
    color: #2d3748;
    font-size: 18px;
    margin: 0;
}

.category-description {
    color: #718096;
    margin-bottom: 8px;
    line-height: 1.5;
}

.category-meta {
    font-size: 12px;
    color: #a0aec0;
}

.category-actions {
    display: flex;
    gap: 8px;
}

.no-categories {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-style: italic;
    background: var(--bg-primary);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Dark mode additional styling for form elements */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: var(--primary-color);
    outline: none;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: var(--text-secondary);
}

body.dark-mode .message.success {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

body.dark-mode .message.error {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

/* Dark mode checkbox cursor */
#dark-mode {
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .categories-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .category-item {
        flex-direction: column;
        gap: 15px;
    }

    .category-actions {
        align-self: flex-start;
    }

    .form-actions {
        flex-direction: column;
    }

    .user-info {
        flex-direction: column;
        gap: 8px;
    }

    .user-metrics {
        align-items: flex-start;
    }

    .week-navigation {
        flex-direction: column;
        gap: 10px;
    }

    #weekly-current-week-label {
        min-width: auto;
        font-size: 14px;
    }
}

/* Calendar Detail Styles */
.calendar-detail-container {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calendar-detail-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.calendar-detail-grid {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow-x: auto;
    position: relative;
    min-height: 600px;
}

.week-calendar {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    grid-template-rows: 50px repeat(24, 60px);
    min-width: 900px;
    position: relative;
}

.time-column-header {
    grid-column: 1;
    grid-row: 1;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.day-column-header {
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    font-weight: 600;
}

.day-column-header.today {
    background: #e6f3ff;
    color: var(--primary-color);
}

.day-name {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.day-date {
    font-size: 18px;
    color: var(--text-primary);
    margin-top: 2px;
}

.time-label {
    grid-column: 1;
    padding: 8px;
    text-align: right;
    font-size: 11px;
    color: var(--text-secondary);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.time-slot {
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    transition: background 0.2s ease;
}

.time-slot:hover {
    background: var(--bg-secondary);
}

.time-slot.today-slot {
    background: #f8fbff;
}

.calendar-entry {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calendar-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    z-index: 20 !important;
}

.entry-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.entry-detail-content {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.entry-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.entry-detail-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.entry-detail-close {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    padding: 5px;
}

.entry-detail-close:hover {
    color: var(--text-primary);
    background: #f0f0f0;
    border-radius: 50%;
}

.entry-detail-body {
    padding: 0 20px 20px 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    color: var(--text-secondary);
    min-width: 100px;
}

.detail-row span {
    color: var(--text-primary);
    text-align: right;
    flex: 1;
}

.entry-detail-actions {
    padding: 0 20px 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Edit Active Session Styles */
.session-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.edit-session-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.edit-session-btn:hover {
    filter: brightness(0.9);
}

.edit-active-form {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.edit-active-form h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.edit-active-form .form-group {
    margin-bottom: 15px;
}

.edit-active-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.edit-active-form input,
.edit-active-form select,
.edit-active-form textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.edit-active-form input:focus,
.edit-active-form select:focus,
.edit-active-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.edit-active-form .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .calendar-detail-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .week-navigation {
        justify-content: center;
    }
    .calendar-detail-grid {
        overflow-x: scroll;
    }
    .week-calendar {
        min-width: 700px;
    }
    .time-label {
        font-size: 10px;
        padding: 4px;
    }
    .day-column-header {
        padding: 4px;
    }
    .day-name {
        font-size: 10px;
    }
    .day-date {
        font-size: 14px;
    }
    .calendar-entry {
        font-size: 9px !important;
    }
    .edit-session-btn {
        width: 100%;
    }
}

body.dark-mode .day-column-header.today {
    background: #1e3a5f;
}

body.dark-mode .time-slot.today-slot {
    background: #1a2332;
}

body.dark-mode .entry-detail-close:hover {
    background: var(--bg-secondary);
}