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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}



.date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    margin-bottom: 30px;
    position: relative;
    min-height: 50px;
}

.date-display {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.current-date {
    color: #2d3748;
    margin: 0;
    padding: 15px 25px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.day-name {
    font-size: 1.8em;
    font-weight: 600;
    line-height: 1;
}

.date-iso {
    font-size: 1.1em;
    font-weight: 400;
    color: #4a5568;
    line-height: 1;
}

.current-date:hover {
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}



.hidden-date-picker {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.today-btn {
    font-size: 0.9em;
    color: #667eea;
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid #667eea;
    border-radius: 20px;
    transition: all 0.2s;
    background: white;
}

.today-btn:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.month-btn {
    font-size: 0.9em;
    color: #667eea;
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid #667eea;
    border-radius: 20px;
    transition: all 0.2s;
    background: white;
}

.month-btn:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}

.week-chart {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chart-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100px;
    gap: 4px;
}

.day-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    padding: 4px;
    position: relative;
}

.day-bar:hover {
    background: #f7fafc;
    transform: translateY(-1px);
}

.day-bar.today {
    background: rgba(72, 187, 120, 0.1);
}

.day-bar.selected {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid #667eea;
}

.hours-label {
    font-size: 0.8em;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    min-height: 20px;
    display: flex;
    align-items: center;
}

.bar {
    width: 100%;
    background: linear-gradient(to top, #667eea 0%, #764ba2 100%);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: all 0.2s;
}

.day-bar:hover .bar {
    background: linear-gradient(to top, #5a67d8 0%, #6b46c1 100%);
}

.day-bar.today .bar {
    background: linear-gradient(to top, #48bb78 0%, #38a169 100%);
}

.day-bar.selected .bar {
    background: linear-gradient(to top, #4f46e5 0%, #7c3aed 100%);
}

.day-label {
    margin-top: 8px;
    text-align: center;
    line-height: 1.2;
}

.day-name {
    font-size: 0.75em;
    font-weight: 600;
    color: #4a5568;
}

.day-date {
    font-size: 0.7em;
    color: #718096;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 1.5em;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
}

.nav-btn:active {
    transform: translateY(0);
}

.add-entry-form {
    margin-bottom: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    border: 2px dashed #e2e8f0;
}

.add-entry-form form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.task-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.task-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
    transform: translateY(-1px);
}

.entries-container {
    min-height: 200px;
}

.entries {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.time-entry {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.time-entry:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.time-entry:has(.timer-display[data-running="true"]) {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-color: #9ae6b4;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.2);
}

.entry-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.task-info {
    flex: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    margin: -4px -8px;
}

.task-info:hover {
    background: #f7fafc;
}

.task-title {
    font-size: 1.2em;
    color: #2d3748;
    font-weight: 600;
    line-height: 1.3;
}

.task-description {
    margin-top: 4px;
}

.description-line {
    font-size: 0.9em;
    color: #718096;
    line-height: 1.2;
}

.description-edit-input {
    font-family: inherit;
    font-size: 1em;
    color: #2d3748;
    background: white;
    border: 2px solid #667eea;
    border-radius: 6px;
    padding: 8px;
    resize: none;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    line-height: 1.4;
}

.description-edit-input:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.delete-btn {
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
    margin-left: 10px;
}

.delete-btn:hover {
    color: #e53e3e;
    background: #fed7d7;
}







.timer-display-container {
    position: relative;
    min-width: 120px;
}

.timer-display {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1em;
    font-weight: bold;
    color: #2d3748;
    min-width: 100px;
    text-align: center;
    padding: 12px 10px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.timer-display[data-running="true"] {
    color: #48bb78;
    background: #f0fff4;
    border-color: #9ae6b4;
    animation: pulse 2s infinite;
}

.timer-display.editable {
    cursor: pointer;
    transition: all 0.2s;
}

.timer-display.editable:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: scale(1.02);
}

.time-edit-input {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1em;
    font-weight: bold;
    color: #2d3748;
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 2px solid #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    box-sizing: border-box;
}

.time-edit-input:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.time-edit-input::placeholder {
    color: #a0aec0;
    font-weight: normal;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.start-stop-btn {
    min-width: 80px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state p {
    font-size: 1.1em;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    .date-header {
        min-height: 40px;
    }
    
    .current-date {
        padding: 12px 20px;
    }
    
    .day-name {
        font-size: 1.4em;
    }
    
    .date-iso {
        font-size: 1em;
    }
    
    .current-date:hover {
        transform: none; /* Disable hover lift on mobile */
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .today-btn {
        font-size: 0.8em;
        padding: 3px 8px;
    }
    
    .week-chart {
        padding: 15px;
        margin-bottom: 25px;
    }
    
    .chart-container {
        height: 80px;
        gap: 2px;
    }
    
    .hours-label {
        font-size: 0.7em;
        min-height: 16px;
    }
    
    .day-name {
        font-size: 0.7em;
    }
    
    .day-date {
        font-size: 0.65em;
    }
    
    .entry-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .task-info {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .timer-display-container {
        flex: 1;
    }
    
    .start-stop-btn {
        flex-shrink: 0;
    }
    
    .delete-btn {
        margin-left: 0;
    }
    
    .add-entry-form form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .task-input {
        margin-bottom: 10px;
    }
}

/* Monthly view styles */
.month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    margin-bottom: 30px;
    position: relative;
    min-height: 60px;
}

.month-display {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.month-title {
    text-align: center;
    color: #2d3748;
    padding: 20px 30px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.month-name {
    font-size: 2.2em;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 8px;
}

.month-summary {
    font-size: 1.1em;
    color: #4a5568;
    line-height: 1;
}

.month-calendar {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    color: #4a5568;
    padding: 12px 8px;
    background: #f7fafc;
    border-radius: 6px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.calendar-day {
    background: white;
    min-height: 100px;
    padding: 8px;
    position: relative;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.calendar-day.other-month {
    background: #f7fafc;
    color: #a0aec0;
}

.calendar-day.today {
    background: #f0fff4;
    border: 2px solid #48bb78;
}

.calendar-day.has-entries {
    cursor: pointer;
}

.calendar-day.has-entries:hover {
    background: #edf2f7;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.calendar-day.today:hover {
    background: #e6fffa;
}

.day-number {
    font-weight: 600;
    font-size: 1.1em;
    color: #2d3748;
    margin-bottom: 4px;
}

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

.day-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.day-hours {
    font-size: 0.8em;
    font-weight: 600;
    color: #667eea;
    background: #edf2f7;
    padding: 2px 6px;
    border-radius: 10px;
    align-self: flex-start;
    white-space: nowrap;
}

.day-task {
    font-size: 0.7em;
    color: #4a5568;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.more-entries {
    font-size: 0.65em;
    color: #718096;
    font-style: italic;
    margin-top: auto;
}

.month-summary-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.month-summary-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.4em;
    text-align: center;
}

.summary-stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.summary-stat {
    text-align: center;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    flex: 1;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: #4a5568;
    font-weight: 500;
}

/* Responsive design for monthly view */
@media (max-width: 768px) {
    .month-header {
        min-height: 50px;
    }
    
    .month-title {
        padding: 15px 20px;
    }
    
    .month-name {
        font-size: 1.8em;
    }
    
    .month-summary {
        font-size: 1em;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 6px;
    }
    
    .calendar-day-header {
        padding: 8px 4px;
        font-size: 0.8em;
    }
    
    .day-number {
        font-size: 1em;
    }
    
    .day-hours {
        font-size: 0.75em;
    }
    
    .day-task {
        font-size: 0.65em;
    }
    
    .summary-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-value {
        font-size: 1.8em;
    }
}

/* Top Header Styles */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.current-day {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 4px 8px;
    border-radius: 6px;
}

.current-day:hover {
    color: #4c63d2;
    background: rgba(102, 126, 234, 0.1);
}

.hours-summary {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #4a5568;
}

.week-hours, .month-hours {
    background: rgba(102, 126, 234, 0.1);
    color: #4c63d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.week-hours:hover, .month-hours:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #3b4ba8;
    transform: translateY(-1px);
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.today-header-btn {
    background: white;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.today-header-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.export-btn {
    background: white;
    color: #667eea;
    border: 1px solid #e2e8f0;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.export-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* User Menu Styles */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.user-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 140px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #4a5568;
    text-decoration: none;
    border-bottom: 1px solid #f7fafc;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: #f7fafc;
    color: #2d3748;
}

/* Billable Checkbox Styles */
.billable-checkbox {
    display: flex;
    align-items: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.billable-btn {
    width: 28px;
    height: 28px;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    background: white;
    color: #718096;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.billable-btn:hover {
    border-color: #2d3748;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.billable-btn.billable-active {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border-color: #38a169;
    color: white;
    box-shadow: 0 2px 6px rgba(72, 187, 120, 0.3);
}

.billable-btn.billable-active:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    border-color: #2f855a;
    box-shadow: 0 3px 8px rgba(72, 187, 120, 0.4);
}

/* Update entry-row to accommodate billable checkbox */
.entry-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    width: 100%;
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .header-left {
        text-align: center;
    }
    
    .header-right {
        justify-content: center;
        gap: 8px;
    }
    
    .hours-summary {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .billable-btn {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .billable-checkbox {
        margin-right: 8px;
    }
}