/* ----- Reset & Base Styles ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f9fafb;
    color: #111827;
    -webkit-font-smoothing: antialiased;
}

/* ----- Login Screen ----- */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.login-container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.login-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: white;
    letter-spacing: -0.02em;
}

.login-container h2 {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.employee-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    list-style: none;
}

.employee-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    backdrop-filter: blur(10px);
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.employee-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.pin-entry {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 2rem;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    width: 90%;
    max-width: 500px;
    z-index: 1000;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

.login-screen::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.login-screen.modal-active::before {
    display: block;
}

.pin-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.back-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0;
}

.back-btn:hover {
    color: white;
}

.pin-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

.pin-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.pin-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

.pin-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.pin-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin: 0.75rem 0;
}

.pin-submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.pin-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4), 0 4px 6px -2px rgba(16, 185, 129, 0.3);
}

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

/* ----- Kiosk Screen ----- */
.kiosk-screen {
    min-height: 100vh;
}

.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fef3c7;
    color: #92400e;
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    z-index: 50;
}

.lock-screen {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    backdrop-filter: blur(4px);
}

.unlock-btn {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.unlock-btn:hover {
    background: #f9fafb;
}

.kiosk-content {
    padding: 1.5rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Desktop: ensure full width usage */
@media (min-width: 769px) {
    .kiosk-content {
        padding: 1.5rem 2rem;
        max-width: 100%;
        width: 100%;
    }
}

.kiosk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.header-left {
    display: none;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: nowrap;
    margin-left: auto;
}

.header-logo {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.header-left h1,
.header-center h1 {
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    margin: 0;
    white-space: normal;
}

.header-center h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

@media (min-width: 769px) {
    .header-center h1 br {
        display: none;
    }
}

@media (max-width: 768px) {
    .kiosk-header {
        padding: 0.5rem 0.75rem;
        gap: 0.375rem;
        margin-bottom: 0.75rem;
        border-radius: 1.5rem;
    }
    
    .header-center {
        flex-direction: row;
        align-items: center;
        flex: 0 0 auto;
        gap: 0.375rem;
    }
    
    .header-center h1 {
        font-size: 0.55rem;
        line-height: 1;
        white-space: nowrap;
        text-align: center;
    }
    
    .header-logo {
        width: 24px;
        height: 24px;
    }
    
    .time-display {
        padding-right: 0.375rem;
        border-right: 1px solid rgba(255,255,255,0.3);
    }
    
    .time-big {
        font-size: 1rem;
    }
    
    .time-date {
        font-size: 0.5rem;
    }
    
    .admin-btn {
        font-size: 0.625rem;
        padding: 0.375rem 0.625rem;
    }
    
    .account-info {
        display: none;
    }
}

.admin-btn {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.account-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.account-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.account-name {
    font-size: 1rem;
    color: white;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.logout-btn-kiosk {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(220, 38, 38, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(220, 38, 38, 0.5);
    border-radius: 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn-kiosk:hover {
    background: #b91c1c;
}

.logout-btn-kiosk svg {
    width: 1rem;
    height: 1rem;
}

.time-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    border-right: 2px solid #e5e7eb;
    padding-right: 1.5rem;
}

.time-big {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.date-display {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: capitalize;
    font-weight: 600;
}

.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.employee-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 3px solid transparent;
    border-radius: 1.5rem;
    padding: 1.5rem;
    min-height: 14rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.employee-card.clocked-in:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.employee-card.add-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 3px solid #10b981;
}

.employee-card.add-card .name {
    color: #065f46;
}

.employee-card.add-card .status {
    color: #047857;
}

.employee-card.add-card .btn-in {
    background: #10b981;
    border-color: #059669;
}

.employee-card.add-card .btn-in:hover {
    background: #059669;
}

.employee-card.clocked-in {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #86efac;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.1), 0 4px 6px -2px rgba(16, 185, 129, 0.05);
}

.employee-card .name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.employee-card .status {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 700;
    transition: all 0.2s ease;
    text-align: center;
}

.time-elapsed {
    font-family: 'Courier New', monospace;
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0;
    letter-spacing: 2px;
}

.employee-card .status.clocked-in {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3), 0 2px 4px -1px rgba(16, 185, 129, 0.2);
}

.employee-card .status.not-clocked {
    background: #f3f4f6;
    color: #4b5563;
}

.employee-card.sick {
    border: 2px solid #ef4444;
    background: #fef2f2;
}

.employee-card .status.sick {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3), 0 2px 4px -1px rgba(239, 68, 68, 0.2);
}

.employee-card .action-hint {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.employee-action-btn {
    margin-top: auto;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.employee-action-btn.btn-in {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3), 0 2px 4px -1px rgba(16, 185, 129, 0.2);
}

.employee-action-btn.btn-in:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4), 0 4px 6px -2px rgba(16, 185, 129, 0.3);
}

.employee-action-btn.btn-out {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3), 0 2px 4px -1px rgba(239, 68, 68, 0.2);
}

.employee-action-btn.btn-out:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.4), 0 4px 6px -2px rgba(239, 68, 68, 0.3);
}

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

.extra-actions {
    margin-top: 1rem;
}

.add-employee-btn {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 1.25rem;
    padding: 1.25rem;
    width: 100%;
    text-align: center;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.125rem;
    font-weight: 600;
}

.add-employee-btn:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ----- Modal ----- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    width: 100%;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #111827;
}

.modal-body {
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-body p {
    font-size: 1rem;
    color: #374151;
    line-height: 1.6;
    text-align: center;
}

.note-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.note-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    resize: vertical;
    transition: all 0.2s ease;
    font-family: inherit;
}

.note-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0;
}

.btn-cancel {
    padding: 0.75rem 1.5rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

.btn-confirm {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3), 0 4px 6px -2px rgba(16, 185, 129, 0.2);
}

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

/* ----- Toast ----- */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 20px 25px rgba(0,0,0,0.1);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 90%;
}

.toast-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background: #d1fae5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #059669;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.875rem;
    color: #111827;
    max-width: 28rem;
}

.toast-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    margin-left: 0.5rem;
}

.toast-close:hover {
    color: #111827;
}

/* ----- Admin Panel ----- */
.admin-panel {
    min-height: 100vh;
    background: #f9fafb;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
}

.logout-btn {
    padding: 0.75rem 1.5rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
}

.logout-btn:hover {
    background: #b91c1c;
}

.admin-content {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .kiosk-header {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .header-left {
        display: none;
    }

    .header-center {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
    }

    .header-right {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
        flex-wrap: nowrap;
    }

    .header-center h1 {
        font-size: 0.8125rem;
        white-space: normal;
        line-height: 1.2;
        color: white !important;
    }

    .header-logo {
        width: 32px;
        height: 32px;
    }

    .header-right {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .time-display {
        flex: 0 0 auto;
        min-width: 0;
    }

    .admin-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        flex: 0 0 auto;
    }

    .account-info {
        flex: 1 1 auto;
        min-width: 0;
    }

    .account-label {
        display: none;
    }

    .account-name {
        font-size: 0.8125rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logout-btn-kiosk {
        flex: 0 0 auto;
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }

    .logout-btn-kiosk .logout-text {
        display: none;
    }

    .time-big {
        font-size: 1.375rem;
    }

    .date-display {
        font-size: 0.8125rem;
    }

    .employee-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .time-big {
        font-size: 2rem;
    }

    .employee-card {
        padding: 1rem;
        min-height: 12rem;
    }

    .employee-card .name {
        font-size: 1.25rem;
    }

    .employee-action-btn {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
    }

    .add-employee-btn {
        font-size: 1rem;
        padding: 1rem;
    }

    /* Modal adjustments for mobile */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .success-modal {
        padding: 2rem 1.5rem !important;
    }

    #successMessage {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .employee-grid {
        grid-template-columns: 1fr;
    }

    .kiosk-content {
        padding: 0.25rem;
    }
    
    .panel-section {
        padding: 0;
        margin: 0;
        margin-bottom: 0.75rem;
        border-radius: 0.75rem;
        overflow: hidden;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        border: 1px solid #e5e7eb;
    }
    
    .section-header {
        margin-bottom: 0;
        padding: 0.75rem 0.75rem 0.5rem;
        background: white;
        border-bottom: 2px solid #e5e7eb;
    }
    
    .section-header h3 {
        color: #111827;
        font-weight: 700;
    }
    
    .section-header h3 {
        font-size: 0.875rem;
    }
    
    .schedule-table-wrapper {
        margin: 0;
        border-radius: 0;
    }

    /* Login screen mobile adjustments */
    .login-container {
        padding: 1.5rem 1rem;
    }

    .login-logo {
        width: 60px;
        height: 60px;
    }

    .login-container h1 {
        font-size: 1.5rem;
    }

    .login-container h2 {
        font-size: 1.125rem;
    }

    .employee-btn {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .pin-entry {
        padding: 1rem;
    }

    .pin-submit-btn, .pin-input {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
}

/* Success Modal Styles */
.success-modal {
    max-width: 700px !important;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
    padding: 4rem 3rem !important;
    position: relative;
    animation: slideUp 0.3s ease-out;
    width: 90%;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-modal .modal-body {
    padding: 0;
    margin-bottom: 2.5rem;
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
}

#successMessage {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.6;
    color: #111827;
    white-space: pre-line;
    margin: 0;
    letter-spacing: -0.02em;
}

#successTitle {
    color: #10b981;
}

.modal-actions.centered {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 0;
}

.modal-actions.centered .btn-confirm {
    padding: 1rem 4rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modal-actions.centered .btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3), 0 4px 6px -2px rgba(16, 185, 129, 0.2);
}

.modal-actions.centered .btn-confirm:active {
    transform: translateY(0);
}

/* Sign In Employee List Styles */
.sign-in-employee-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.sign-in-employee-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    letter-spacing: -0.01em;
}

.sign-in-employee-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3), 0 4px 6px -2px rgba(16, 185, 129, 0.2);
}

.sign-in-employee-btn:active {
    transform: translateY(0);
}

/* ----- Menu Bar ----- */
.menu-bar {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.menu-bar::-webkit-scrollbar {
    display: none;
}

.menu-item {
    flex: 1;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 3px solid transparent;
    border-radius: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6b7280;
    position: relative;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.menu-item.disabled,
.menu-item[disabled] {
    pointer-events: none;
    opacity: 0.45;
    filter: grayscale(55%);
    cursor: not-allowed;
    box-shadow: none;
}

.menu-item.disabled .menu-item-emoji,
.menu-item[disabled] .menu-item-emoji {
    filter: none;
}

.menu-item.disabled .menu-item-label,
.menu-item[disabled] .menu-item-label {
    opacity: 0.85;
}

.menu-item:hover {
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2e9 100%);
    border-color: #10b981;
    color: #059669;
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.1), 0 4px 6px -2px rgba(16, 185, 129, 0.05);
}

.menu-item:active {
    transform: translateY(-2px);
}

.menu-item-emoji {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item:hover .menu-item-emoji {
    transform: scale(1.15) rotate(5deg);
}

.menu-item:nth-child(2) { border-color: #3b82f6; }
.menu-item:nth-child(2):hover { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); border-color: #3b82f6; color: #2563eb; }

.menu-item:nth-child(3) { border-color: #f59e0b; }
.menu-item:nth-child(3):hover { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); border-color: #f59e0b; color: #d97706; }

.menu-item:nth-child(4) { border-color: #ef4444; }
.menu-item:nth-child(4):hover { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); border-color: #ef4444; color: #dc2626; }

.menu-item:nth-child(5) { border-color: #8b5cf6; }
.menu-item:nth-child(5):hover { background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%); border-color: #8b5cf6; color: #7c3aed; }

.menu-item-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.menu-item.active { border-color: #10b981; color: #059669; background: linear-gradient(135deg, #f0fdf4 0%, #e0f2e9 100%); box-shadow: 0 8px 12px -3px rgba(16, 185, 129, 0.12), 0 3px 6px -2px rgba(16, 185, 129, 0.06); }
.menu-item.active[data-menu="hours"] { border-color: #3b82f6; color: #2563eb; background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); box-shadow: 0 8px 12px -3px rgba(59, 130, 246, 0.12), 0 3px 6px -2px rgba(59, 130, 246, 0.06); }
.menu-item.active[data-menu="leave"] { border-color: #f59e0b; color: #d97706; background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); box-shadow: 0 8px 12px -3px rgba(245, 158, 11, 0.12), 0 3px 6px -2px rgba(245, 158, 11, 0.06); }
.menu-item.active[data-menu="sick"] { border-color: #ef4444; color: #dc2626; background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); box-shadow: 0 8px 12px -3px rgba(239, 68, 68, 0.12), 0 3px 6px -2px rgba(239, 68, 68, 0.06); }
.menu-item.active[data-menu="plan"] { border-color: #8b5cf6; color: #7c3aed; background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%); box-shadow: 0 8px 12px -3px rgba(139, 92, 246, 0.12), 0 3px 6px -2px rgba(139, 92, 246, 0.06); }

.menu-item.active .menu-item-emoji {
    transform: scale(1.1);
}

@media (max-width: 640px) {
    .menu-bar {
        gap: 0.375rem;
        padding: 0.5rem 0.5rem;
        border-radius: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .menu-item {
        min-width: 0;
        padding: 0.5rem 0.375rem;
        gap: 0.375rem;
    }
    
    .menu-item-emoji {
        font-size: 1.25rem;
    }
    
    .menu-item-label {
        font-size: 0.55rem;
    }
}

@media (max-width: 375px) {
    .menu-bar {
        gap: 0.25rem;
        padding: 0.375rem 0.375rem;
    }
    
    .menu-item {
        padding: 0.375rem 0.25rem;
        gap: 0.25rem;
    }
    
    .menu-item-emoji {
        font-size: 1.1rem;
    }
    
    .menu-item-label {
        font-size: 0.5rem;
    }
}

/* ----- My Hours Section ----- */

/* Leave Container */
.leave-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leave-balance-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.leave-balance-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.leave-balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.leave-form {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.leave-form h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.leave-form-group {
    margin-bottom: 1rem;
}

.leave-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.leave-form-group input,
.leave-form-group select,
.leave-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.leave-form-group select {
    background-color: white;
    cursor: pointer;
}

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

.leave-submit-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.leave-submit-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2), 0 2px 4px -1px rgba(16, 185, 129, 0.1);
}

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

.leave-history {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.leave-history h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.leave-entry {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.leave-entry:last-child {
    border-bottom: none;
}

.leave-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.leave-entry-date {
    font-weight: 600;
}

.leave-entry-amount {
    font-family: monospace;
    font-weight: 600;
}

.leave-entry-description {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Panel Section Styles (matching admin) */
.panel-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

/* Ensure mobile overrides take effect after base rules */
@media (max-width: 768px) {
    .panel-section {
        padding: 0 !important;
        border: none !important;
        border-radius: 0.75rem;
        margin-bottom: 0.75rem;
        overflow: hidden;
    }
    .section-header {
        margin-bottom: 0.5rem;
        padding: 0.5rem 0.5rem 0;
    }
    .schedule-table-wrapper {
        margin: 0 !important;
        border-radius: 0;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.employee-list {
    display: block;
    width: 100%;
    overflow: visible;
}

/* Schedule Table Styles */
.schedule-table-wrapper {
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    max-height: 70vh; /* Limit height to enable scrolling */
    -webkit-overflow-scrolling: touch;
}

/* Hide cards on desktop */
.hours-cards-wrapper {
    display: none;
}

.hours-table {
    width: 100%;
}

/* Desktop: ensure all columns are visible without horizontal scroll, use full width */
@media (min-width: 769px) {
    .panel-section {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .employee-list {
        width: 100%;
        max-width: 100%;
    }
    
    .schedule-table-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .hours-table {
        width: 100%;
        table-layout: auto;
    }
    
    .hours-table th,
    .hours-table td {
        padding: 0.75rem 0.875rem;
    }
    
    .hours-table th:nth-child(1),
    .hours-table td:nth-child(1) {
        min-width: 180px;
        width: auto;
    }
    
    .hours-table th:nth-child(2),
    .hours-table td:nth-child(2),
    .hours-table th:nth-child(3),
    .hours-table td:nth-child(3) {
        min-width: 100px;
        width: auto;
    }
    
    .hours-table th:nth-child(4),
    .hours-table td:nth-child(4) {
        min-width: 100px;
        width: auto;
    }
    
    .hours-table th:nth-child(5),
    .hours-table td:nth-child(5) {
        min-width: 120px;
        width: auto;
    }
    
    .hours-table th:nth-child(6),
    .hours-table td:nth-child(6) {
        min-width: 140px;
        width: auto;
    }
}

/* Mobile: Limit height, show ~9 rows with scroll, NO horizontal scroll */
@media (max-width: 768px) {
    .schedule-table-wrapper {
        overflow-x: hidden;
        overflow-y: auto;
        max-height: 420px;
        -webkit-overflow-scrolling: touch;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Make table header sticky on mobile */
    .hours-table thead {
        position: sticky;
        top: 0;
        z-index: 10;
        background: #ffffff;
    }
    
    .hours-table {
        width: 100%;
        font-size: 0.65rem;
        table-layout: auto;
    }
    
    .hours-table th,
    .hours-table td {
        padding: 0.3rem 0.1rem;
        white-space: nowrap;
    }
    
    /* Make specific columns narrower on mobile - use exact widths */
    .hours-table th:nth-child(1),
    .hours-table td:nth-child(1) {
        width: 20%;
    }
    
    .hours-table th:nth-child(2),
    .hours-table td:nth-child(2) {
        width: 15%;
    }
    
    .hours-table th:nth-child(3),
    .hours-table td:nth-child(3) {
        width: 15%;
    }
    
    .hours-table th:nth-child(4),
    .hours-table td:nth-child(4) {
        width: 12%;
    }
    
    .hours-table th:nth-child(5),
    .hours-table td:nth-child(5) {
        width: 18%;
    }
    
    .hours-table th:nth-child(6),
    .hours-table td:nth-child(6) {
        width: 20%;
        padding-right: 0.25rem;
    }

    /* Keep layout compact and prevent horizontal scroll */
    .schedule-table-wrapper { overflow-x: hidden; }
    html, body { overflow-x: hidden; }

    /* Revert visual extras for mobile: keep it clean */
    .panel-section {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }
    .section-header {
        background: transparent !important;
        border-bottom: none !important;
        padding: 0.5rem 0.5rem 0.25rem !important;
    }
    .hours-table tbody tr:hover { background: #f9fafb; }
}

.hours-table {
    width: 100%;
    border-collapse: collapse;
}

/* Styling for grouped shifts per date */
.date-row {
    border-top: 2px solid #e5e7eb;
}

.date-row:first-child {
    border-top: none;
}

.date-cell {
    font-weight: 700;
    font-size: 0.9375rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    vertical-align: top;
    border-right: 2px solid #cbd5e1;
    color: #111827;
    letter-spacing: -0.01em;
}

/* Summary row for multiple shifts per day */
.summary-cell {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    font-weight: 600;
    border-bottom: 2px solid #93c5fd;
    padding: 0.875rem !important;
    font-size: 0.875rem;
}

.summary-cell strong {
    color: #1e40af;
    font-weight: 700;
}

/* Time breakdown display - Mobile First */
.time-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-top: 0.375rem;
}

.time-label {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Single shift breakdown - more compact */
.hours-table td > small {
    display: block;
    font-size: 0.75rem;
    line-height: 1.4;
    margin-top: 0.375rem;
    opacity: 0.9;
}

.hours-table td > small .time-label {
    margin: 0 0.25rem 0 0;
    font-size: 0.6875rem;
    padding: 0.1875rem 0.4375rem;
    display: inline-flex;
}

.time-label.contract {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.time-label.overtime {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.time-label.deficit {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.time-label.sick {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #6b21a8;
    border: 1px solid #c084fc;
}

.time-label.vacation {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0c4a6e;
    border: 1px solid #7dd3fc;
}

.time-label.worked {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .time-breakdown {
        gap: 0.3125rem;
        font-size: 0.75rem;
        margin-top: 0.3125rem;
    }
    
    .time-label {
        padding: 0.1875rem 0.4375rem;
        font-size: 0.6875rem;
        border-radius: 5px;
    }
    
    .hours-table td > small {
        font-size: 0.6875rem;
        margin-top: 0.3125rem;
    }
    
    .hours-table td > small .time-label {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
        margin: 0 0.1875rem 0 0;
    }
}

.shift-row {
    border-top: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
    transition: background 0.2s ease;
}

.shift-row:hover {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.shift-row td {
    padding-left: 1.5rem;
    opacity: 0.95;
}

.shift-row:first-of-type {
    border-top: none;
}

.hours-table th {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
}

.hours-table td {
    padding: 0.75rem 0.875rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    vertical-align: middle;
}

.hours-table tbody tr:hover {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.hours-table tbody tr {
    transition: background 0.2s ease;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-badge.scheduled {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.clocked {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.manual {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge.leave {
    background: #fce7f3;
    color: #9f1239;
}

.status-badge.sick {
    background: #fef2f2;
    color: #dc2626;
}

.today-row {
    background-color: #fef3c7 !important;
    font-weight: 600;
}

.today-row td {
    border-top: 2px solid #f59e0b;
    border-bottom: 2px solid #f59e0b;
}

/* Action buttons */
.btn-action {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-correction {
    background: #3b82f6;
    color: white;
}

.btn-correction:hover {
    background: #2563eb;
}

.btn-vacation {
    background: #f59e0b;
    color: white;
}

.btn-vacation:hover {
    background: #d97706;
}

/* Pending badge for requests awaiting approval */
.pending-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #fce7f3;
    color: #9d174d;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #db2777;
}

/* Kiosk: make correction/vacation modals consistent with system */
#correctionModal .modal-content, #vacationModal .modal-content {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#correctionModal .modal-header h2, #vacationModal .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

#correctionModal .form-group, #vacationModal .form-group {
    margin-bottom: 1rem;
}

#correctionModal .modal-actions, #vacationModal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

#correctionModal .btn-primary, #vacationModal .btn-primary {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
}

#correctionModal .btn-secondary, #vacationModal .btn-secondary {
    background: #e5e7eb;
    color: #111827;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
}

@media (max-width: 768px) {
    #correctionModal .modal-content, #vacationModal .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

/* ===== Leave (Verlof) Module Styles ===== */
.leave-section {
    padding: 1.5rem;
    background: #f9fafb;
}

.leave-container {
    max-width: 600px;
    margin: 0 auto;
}

.leave-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #111827;
}

/* Sick Section - similar to leave section */
.sick-section {
    padding: 1.5rem;
    background: #f9fafb;
}

.sick-container {
    max-width: 600px;
    margin: 0 auto;
}

.sick-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #111827;
}

.sick-main-action {
    margin-bottom: 2rem;
}

.sick-report-btn {
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3), 0 2px 4px -1px rgba(239, 68, 68, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sick-report-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.4), 0 4px 6px -2px rgba(239, 68, 68, 0.3);
}

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

.sick-reported-message {
    padding: 1.5rem;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #ef4444;
    border-radius: 1rem;
    text-align: center;
    color: #991b1b;
    font-weight: 600;
    font-size: 1.125rem;
}

.sick-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.sick-option-btn {
    padding: 1rem 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.sick-option-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

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

.sick-reports-section {
    margin-top: 2rem;
}

.sick-reports-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
}

/* Balance Card */
.balance-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.balance-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.balance-value {
    font-size: 3rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.balance-value.negative {
    color: #dc2626;
}

.balance-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.breakdown-label {
    color: #6b7280;
}

.breakdown-value {
    font-weight: 600;
    color: #111827;
}

/* Leave Request Section */
.leave-request-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.leave-request-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

/* Request Type Tabs */
.request-type-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.request-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.request-tab.active {
    background: #111827;
    color: white;
}

/* Calendar */
.calendar-container {
    margin-bottom: 1.5rem;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.calendar-month {
    font-weight: 600;
    font-size: 1.125rem;
    color: #111827;
}

.calendar-nav {
    background: #f3f4f6;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.25rem;
    color: #111827;
    transition: background 0.2s;
}

.calendar-nav:hover {
    background: #e5e7eb;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    padding: 0.5rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.calendar-day.empty {
    cursor: default;
    visibility: hidden;
}

/* Status colors for calendar */
.calendar-day.status-vacation {
    border-color: #fbbf24;
    background: #fef3c7;
}

.calendar-day.status-sick {
    border-color: #dc2626;
    background: #fee2e2;
}

.calendar-day.status-scheduled {
    border-color: #10b981; /* light green */
    background: #dcfce7;
    color: #065f46;
}

.calendar-day.status-worked {
    border-color: #065f46; /* dark green */
    background: #065f46;
    color: #ecfdf5;
}

.calendar-day.status-manual {
    border-color: #3b82f6;
    background: #dbeafe;
}

.calendar-day.status-pending {
    border-color: #db2777;
    background: #fce7f3;
    color: #9d174d;
}

.calendar-day.selected {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* Override selected color if it has a status */
.calendar-day.selected.status-vacation {
    background: #fbbf24;
    border-color: #fbbf24;
}

.calendar-day.selected.status-sick {
    background: #dc2626;
    border-color: #dc2626;
}

.calendar-day.selected.status-scheduled {
    background: #10b981;
    border-color: #10b981;
}

.calendar-day.selected.status-worked {
    background: #065f46;
    border-color: #065f46;
}

.calendar-day.selected.status-manual {
    background: #3b82f6;
    border-color: #3b82f6;
}

.calendar-day.selected.status-pending {
    background: #db2777;
    border-color: #db2777;
}

/* Mixed status (diagonal split) */
.calendar-day.status-mixed {
    position: relative;
    overflow: hidden;
}

.calendar-day.status-mixed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, transparent 48%, currentColor 48%, currentColor 52%, transparent 52%);
    z-index: 1;
    pointer-events: none;
}

/* Mixed status backgrounds - diagonal split effect */
.calendar-day.status-mixed.status-vacation.status-scheduled {
    background: linear-gradient(to bottom right, #fef3c7 0%, #fef3c7 48%, transparent 48%, transparent 52%, #ffedd5 52%, #ffedd5 100%);
    border-color: #fbbf24;
}

.calendar-day.status-mixed.status-vacation.status-worked {
    background: linear-gradient(to bottom right, #fef3c7 0%, #fef3c7 48%, transparent 48%, transparent 52%, #f0fdf4 52%, #f0fdf4 100%);
    border-color: #fbbf24;
}

.calendar-day.status-mixed.status-scheduled.status-worked {
    background: linear-gradient(to bottom right, #ffedd5 0%, #ffedd5 48%, transparent 48%, transparent 52%, #f0fdf4 52%, #f0fdf4 100%);
    border-color: #f97316;
}

.calendar-day.status-mixed.status-vacation.status-manual {
    background: linear-gradient(to bottom right, #fef3c7 0%, #fef3c7 48%, transparent 48%, transparent 52%, #dbeafe 52%, #dbeafe 100%);
    border-color: #fbbf24;
}

.calendar-day.status-mixed.status-scheduled.status-manual {
    background: linear-gradient(to bottom right, #ffedd5 0%, #ffedd5 48%, transparent 48%, transparent 52%, #dbeafe 52%, #dbeafe 100%);
    border-color: #f97316;
}

/* Additional status-mixed combinations for completeness */
.calendar-day.status-mixed.status-worked.status-scheduled {
    background: linear-gradient(to bottom right, #f0fdf4 0%, #f0fdf4 48%, transparent 48%, transparent 52%, #ffedd5 52%, #ffedd5 100%);
    border-color: #10b981;
}

.calendar-day.status-mixed.status-worked.status-manual {
    background: linear-gradient(to bottom right, #f0fdf4 0%, #f0fdf4 48%, transparent 48%, transparent 52%, #dbeafe 52%, #dbeafe 100%);
    border-color: #10b981;
}

.calendar-day.status-mixed.status-manual.status-scheduled {
    background: linear-gradient(to bottom right, #dbeafe 0%, #dbeafe 48%, transparent 48%, transparent 52%, #ffedd5 52%, #ffedd5 100%);
    border-color: #3b82f6;
}

.calendar-day.status-mixed.status-manual.status-worked {
    background: linear-gradient(to bottom right, #dbeafe 0%, #dbeafe 48%, transparent 48%, transparent 52%, #f0fdf4 52%, #f0fdf4 100%);
    border-color: #3b82f6;
}

.calendar-day.today {
    font-weight: 700;
    border-color: #f59e0b;
}

.calendar-day:hover:not(.empty) {
    background: #e5e7eb;
}

.calendar-day.selected:hover {
    background: #059669;
}

/* Date Inputs */
.date-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.date-input-group {
    display: flex;
    flex-direction: column;
}

.date-input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.date-input-group input[type="date"] {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
}

.btn-view-scheduled {
    width: 100%;
    padding: 0.75rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-view-scheduled:hover {
    background: #059669;
}

/* Request Form */
.request-form {
    margin-top: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #059669;
}

/* Leave Rules Section */
.leave-rules-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.leave-rules-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
    text-align: center;
}

.leave-year-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
}

.leave-year-btn {
    padding: 0.5rem 0.75rem;
    min-width: 44px;
    flex-shrink: 0;
    font-size: 1rem;
}

.leave-year-display {
    font-size: 1rem;
    font-weight: 600;
    min-width: 180px;
    text-align: center;
    flex-shrink: 1;
}

@media (max-width: 480px) {
    .leave-year-controls {
        gap: 0.75rem;
    }
    
    .leave-year-btn {
        min-width: 40px;
        padding: 0.5rem;
    }
    
    .leave-year-display {
        min-width: 140px;
        font-size: 0.9rem;
    }
}

.mutations-section {
    margin-bottom: 1.5rem;
}

.mutations-header {
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.mutations-header.credit {
    background: #f0fdf4;
    color: #059669;
}

.mutations-header.debit {
    background: #fef2f2;
    color: #dc2626;
}

.mutation-category {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.mutation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

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

.mutation-description {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
}

.mutation-amount {
    font-weight: 600;
    font-size: 0.875rem;
}

.mutation-amount.positive {
    color: #059669;
}

.mutation-amount.negative {
    color: #dc2626;
}

.final-balance {
    padding-top: 1rem;
    border-top: 2px solid #e5e7eb;
    margin-top: 1rem;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.final-balance strong {
    color: #111827;
}

.final-balance span {
    font-weight: 700;
    font-size: 1.25rem;
    color: #111827;
}

.final-balance.negative span {
    color: #dc2626;
}

/* Status badge colors (global) */
.status-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge.status-vacation,
.status-badge.leave {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.status-badge.status-sick,
.status-badge.sick {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #dc2626;
}

.status-badge.status-scheduled,
.status-badge.scheduled {
    background: #dcfce7; /* light green */
    color: #065f46;
    border: 1px solid #10b981;
}

.status-badge.status-worked,
.status-badge.clocked {
    background: #065f46; /* dark green */
    color: #ecfdf5;
    border: 1px solid #065f46;
}

/* Pending (magenta) */
.status-badge.status-pending,
.status-badge.pending {
    background: #fce7f3;
    color: #9d174d;
    border: 1px solid #db2777;
}

.status-badge.status-manual,
.status-badge.manual {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* Time info indicators for overtime/deficit */
.time-info {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.time-info.overtime {
    color: #10b981;
}

.time-info.deficit {
    color: #ef4444;
}

/* Mobile optimization for hours table */
@media (max-width: 768px) {
    .hours-table {
        font-size: 0.75rem;
    }
    
    .hours-table th,
    .hours-table td {
        padding: 0.5rem 0.375rem;
    }
    
    /* Keep Status and Action columns visible on mobile */
    .btn-action { 
        font-size: 0.625rem; 
        padding: 0.25rem 0.5rem;
        min-width: 32px;
        justify-content: center;
    }
    
    .btn-action .label { 
        display: none; 
    }
    
    .btn-action .icon {
        font-size: 1rem;
    }
    
    /* Hide table on mobile */
    .schedule-table-wrapper {
        display: none;
    }
    
    /* Mobile Hours Cards */
    .hours-cards-wrapper {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.5rem 0;
    }
    
    .hours-card {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 0.75rem;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }
    
    .hours-card.today-card {
        border-color: #10b981;
        border-width: 2px;
        box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
    }
    
    .hours-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.875rem 1rem;
        cursor: pointer;
        user-select: none;
        background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
        transition: background 0.2s ease;
    }
    
    .hours-card-header:active {
        background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    }
    
    .hours-card.expanded .hours-card-header {
        background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
        border-bottom: 1px solid #cbd5e1;
    }
    
    .hours-card-main {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .hours-card-date {
        font-weight: 700;
        font-size: 0.9375rem;
        color: #111827;
        letter-spacing: -0.01em;
        flex-shrink: 0;
    }
    
    .hours-card-status {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    .hours-card-hours {
        font-size: 0.875rem;
        color: #4b5563;
        font-weight: 600;
        margin-left: auto;
        flex-shrink: 0;
    }
    
    .hours-card-toggle {
        font-size: 0.75rem;
        color: #6b7280;
        transition: transform 0.2s ease;
        flex-shrink: 0;
        margin-left: 0.5rem;
    }
    
    .hours-card-content {
        padding: 1rem;
        background: white;
        border-top: 1px solid #e5e7eb;
    }
    
    .hours-card-entry {
        padding: 0.875rem 0;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .hours-card-entry:last-child {
        border-bottom: none;
    }
    
    .hours-card-entry-label {
        font-weight: 600;
        font-size: 0.8125rem;
        color: #374151;
        margin-bottom: 0.5rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    
    .hours-card-details {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hours-card-row {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8125rem;
    }
    
    .hours-card-label {
        font-weight: 600;
        color: #6b7280;
        min-width: 80px;
        flex-shrink: 0;
    }
    
    .hours-card-value {
        color: #111827;
        font-weight: 500;
    }
    
    .hours-card-breakdown {
        display: flex;
        flex-wrap: wrap;
        gap: 0.375rem;
        align-items: center;
    }
    
    .hours-card-action {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid #f3f4f6;
    }
    
    .hours-card-action .btn-action {
        width: 100%;
        justify-content: center;
        font-size: 0.8125rem;
        padding: 0.625rem 1rem;
    }
    
    .hours-card-action .btn-action .label {
        display: inline;
    }
    
    .hours-card-totals {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 2px solid #e5e7eb;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        padding: 0.875rem;
        border-radius: 0.5rem;
    }
    
    .hours-card-totals .hours-card-label {
        font-weight: 700;
        color: #1e40af;
    }
    
    .hours-card-totals .hours-card-value {
        font-weight: 700;
        font-size: 1rem;
        color: #1e40af;
    }
}

@media (max-width: 768px) {
    .my-hours-section {
        padding: 0;
    }
    
    .hours-item {
        padding: 0.5rem;
    }
}
