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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle, rgba(238, 174, 202, 0.5) 0%, rgba(148, 187, 233, 0.5) 100%);
    min-height: 100vh;
    color: #1a202c;
    margin: 0;
    padding: 0;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sticky header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    z-index: 1000;
}

.header-content {
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Legacy header for login */
header:not(.main-header) {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 20px auto 30px auto;
}

header h1 {
    color: #4a5568;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-style: italic;
}

/* Icons */
.header-icon, .btn-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Main app with header offset */
#main-app {
    flex: 1;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
}

/* Full page calendar */
.calendar-section.full-page {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - 60px);
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
}

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

/* Loading screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-screen.fade-out {
    opacity: 0;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

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

.loading-content h2 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-style: italic;
}

.loading-content p {
    margin: 0;
    opacity: 0.8;
}

.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-card h2 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.login-card p {
    color: #718096;
    margin-bottom: 30px;
    line-height: 1.5;
}

.timesheet-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 16px;
    color: #1a202c;
    font-family: 'Poppins', sans-serif;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.entry-project-select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.3);
}

.entry-project-select:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #718096;
    font-size: 14px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    width: 100%;
    border: none;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* Navigation buttons for calendar */
#prev-month,
#next-month {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

#prev-month:hover,
#next-month:hover {
    background: rgba(74, 85, 104, 0.1);
    transform: none;
}

#prev-month:disabled,
#next-month:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    color: #a0aec0;
}

#prev-month:disabled:hover,
#next-month:disabled:hover {
    background: transparent;
    transform: none;
}

#prev-month:disabled .btn-icon,
#next-month:disabled .btn-icon {
    color: #a0aec0;
}

#prev-month .btn-icon,
#next-month .btn-icon {
    width: 20px;
    height: 20px;
    color: #4a5568;
}

/* Bulk entry button */
#bulk-entry-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

#bulk-entry-btn:hover {
    background: rgba(74, 85, 104, 0.1);
}

#bulk-entry-btn .btn-icon {
    width: 20px;
    height: 20px;
    color: #4a5568;
}

/* Admin button */
#admin-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

#admin-btn:hover {
    background: rgba(74, 85, 104, 0.1);
}

#admin-btn .btn-icon {
    width: 20px;
    height: 20px;
    color: #4a5568;
}

/* Sign-out button */
#sign-out {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

#sign-out:hover {
    background: rgba(74, 85, 104, 0.1);
}

#sign-out .btn-icon {
    width: 20px;
    height: 20px;
    color: #4a5568;
}

/* Header actions container */
.header-actions {
    display: none; /* Masqué par défaut, affiché par JS quand connecté */
    align-items: center;
    gap: 12px;
}

.header-separator {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 8px;
}

/* Weekend toggle button */
#weekend-toggle-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

#weekend-toggle-btn:hover {
    background: rgba(74, 85, 104, 0.1);
}

#weekend-toggle-btn.active {
    background: rgba(147, 51, 234, 0.1);
}

#weekend-toggle-btn .btn-icon {
    width: 20px;
    height: 20px;
    color: #4a5568;
}

#weekend-toggle-btn.active .btn-icon {
    color: #9333ea;
}

.recent-entries {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.recent-entries h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

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

.entry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.entry-details {
    flex: 1;
}

.entry-project {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.entry-info {
    font-size: 14px;
    color: #718096;
}

.entry-time {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading p {
    color: white;
    font-size: 16px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #48bb78;
}

.notification.error {
    background: #f56565;
}

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

.time-selector {
    margin-top: 10px;
}

.time-boxes {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.time-box {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #1a202c;
    user-select: none;
    font-family: 'Poppins', sans-serif;
}

.time-box:hover {
    border-color: rgba(99, 102, 241, 0.6);
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.time-box.selected {
    background: rgba(99, 102, 241, 0.8);
    color: white;
    border-color: rgba(99, 102, 241, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.time-box.filled {
    background: rgba(99, 102, 241, 0.8);
    color: white;
    border-color: rgba(99, 102, 241, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.time-display {
    text-align: center;
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
}

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

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .login-card {
        padding: 30px 20px;
    }

    .timesheet-form,
    .recent-entries {
        padding: 20px;
    }

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

    .time-boxes {
        gap: 6px;
    }

    .time-box {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* Calendar Styles */
.calendar-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.calendar-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 0;
}

.calendar-nav {
    display: none; /* Masqué par défaut, affiché par JS quand connecté */
    align-items: center;
    gap: 20px;
}

#current-month {
    color: #4a5568;
    margin: 0;
    font-size: 1.4rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    min-width: 200px;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto;
    gap: 6px;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    flex: 1;
    padding: 8px;
}

.calendar-day-header {
    background: rgba(51, 65, 85, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    padding: 16px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.025em;
    border-radius: 8px;
}

.calendar-day {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    min-height: 80px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 10px;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.45);
}

.calendar-day.other-month {
    visibility: hidden;
}

.calendar-day.today {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(99, 102, 241, 0.8);
    font-weight: 600;
}

.calendar-day.empty {
    background: rgba(254, 242, 242, 0.4);
    border-left: 4px solid rgba(239, 68, 68, 0.8);
    transition: all 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.calendar-day.partial {
    background: rgba(254, 243, 199, 0.4);
    border-left: 4px solid rgba(245, 158, 11, 0.8);
    transition: all 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.calendar-day.complete {
    background: rgba(209, 250, 229, 0.4);
    border-left: 4px solid rgba(16, 185, 129, 0.8);
    transition: all 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.calendar-day.overtime {
    background: rgba(233, 213, 255, 0.4);
    border-left: 4px solid rgba(147, 51, 234, 0.8);
    transition: all 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.calendar-day.weekend {
    background: rgba(241, 245, 249, 0.3);
    color: rgba(148, 163, 184, 0.8);
    cursor: not-allowed;
    opacity: 0.7;
    border: 1px solid rgba(241, 245, 249, 0.5) !important;
}

.calendar-day.future {
    background: rgba(241, 245, 249, 0.3);
    color: rgba(148, 163, 184, 0.8);
    cursor: not-allowed;
    opacity: 0.7;
    border: 1px solid rgba(241, 245, 249, 0.5) !important;
}

.calendar-day-number {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    color: #4a5568;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.calendar-day-time {
    font-size: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    text-align: center;
    color: #4a5568;
    opacity: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}





.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.legend-empty {
    background: #f56565;
}

.legend-partial {
    background: #ed8936;
}

.legend-complete {
    background: #48bb78;
}

.legend-overtime {
    background: #9333ea;
}

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

.modal-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(31, 38, 135, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #1a202c;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #718096;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #2d3748;
}

.modal-body {
    padding: 30px;
    color: #1a202c;
}

.modal-body p {
    margin-bottom: 24px;
    font-weight: 500;
    color: #4a5568;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-radius: 0 0 20px 20px;
}

.existing-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f7fafc;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid #667eea;
}

.existing-entry-info {
    flex: 1;
}

.existing-entry-project {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.existing-entry-time {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
}

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

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-edit {
    background: #ed8936;
    color: white;
    border: none;
}

.btn-edit:hover {
    background: #dd7324;
}

.btn-delete {
    background: #f56565;
    color: white;
    border: none;
}

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

.entry-form-line {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    margin-bottom: 15px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.entry-project-select {
    min-width: 250px;
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: #1a202c;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.entry-time-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.entry-time-boxes {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.entry-time-boxes .time-box {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.entry-delete-btn {
    background: rgba(245, 101, 101, 0.8);
    color: white;
    border: 1px solid rgba(245, 101, 101, 0.3);
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-family: 'Poppins', sans-serif;
}

.entry-delete-btn:hover {
    background: rgba(229, 62, 62, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.4);
}

.entry-form-line:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.entry-time-display {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    min-width: 60px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: btn-spin 1s linear infinite;
}

.btn-loading .btn-text {
    visibility: hidden;
}

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

/* Day Tooltip */
.day-tooltip {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    z-index: 1000;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.day-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.calendar-day:hover .day-tooltip {
    opacity: 1;
    visibility: visible;
    top: -15px;
    animation-delay: 1s;
}

@keyframes tooltip-appear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.day-tooltip.show {
    animation: tooltip-appear 0.3s ease 1s forwards;
}

@media (max-width: 768px) {
    .calendar-section {
        padding: 20px;
    }

    .calendar-header {
        flex-direction: column;
        gap: 15px;
    }

    .calendar-day {
        min-height: 65px;
        padding: 6px;
    }

    .calendar-legend {
        gap: 15px;
    }

    .legend-item {
        font-size: 12px;
    }

    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .entry-form-line {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .entry-project-select {
        min-width: auto;
    }

    .entry-time-selector {
        flex-direction: column;
        gap: 10px;
    }
}

/* Bulk entry modal specific styles */
.bulk-project-select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: #1a202c;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.bulk-project-select:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.bulk-project-select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.3);
}

/* Bulk time selector styles */
.bulk-time-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bulk-time-boxes {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.bulk-time-boxes .time-box {
    width: 35px;
    height: 35px;
    font-size: 12px;
}

/* Ensure bulk modal is centered */
#bulk-entry-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 2000 !important;
    align-items: center !important;
    justify-content: center !important;
}

#bulk-entry-modal[style*="display: block"] {
    display: flex !important;
}

#bulk-entry-modal .modal-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(31, 38, 135, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}
/* Button spinner - smaller for buttons */
.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0;
    display: inline-block;
}

/* Adjust grid when weekends are hidden */
.calendar-grid.hide-weekends {
    grid-template-columns: repeat(5, 1fr);
}

/* User total colors in admin modal */
.user-total.empty {
    color: #4a5568 !important; /* Dark text color for better visibility on light background */
    background-color: rgba(156, 163, 175, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
}

.user-total.partial {
    color: #ffffff !important;
    background-color: rgba(245, 158, 11, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
}

.user-total.complete {
    color: #ffffff !important;
    background-color: rgba(34, 197, 94, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
}

.user-total.overtime {
    color: #ffffff !important;
    background-color: rgba(239, 68, 68, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Transparent loader styles */
.transparent-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9000;
    backdrop-filter: blur(2px);
}

.transparent-loader-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.transparent-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: transparentSpin 1s linear infinite;
}

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

.transparent-loader-content p {
    margin: 0;
    color: #4a5568;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}
