.hotel-hr-attendance-dashboard {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    max-width: 960px;
    margin: 0 auto 32px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.hotel-hr-attendance-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.hotel-hr-attendance-status {
    font-weight: 600;
    color: #2c7be5;
}

/* Location permission notice (mobile): shown when location access is needed for clock in/out */
.hotel-hr-location-notice {
    margin-bottom: 16px;
    padding: 12px 40px 12px 16px;
    position: relative;
    border-radius: 8px;
}

.hotel-hr-location-notice .hotel-hr-location-notice-text {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.hotel-hr-location-notice .hotel-hr-location-notice-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hotel-hr-location-notice .hotel-hr-location-notice-dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: 0.7;
}

.hotel-hr-location-notice .hotel-hr-location-notice-dismiss:hover {
    opacity: 1;
}

.hotel-hr-attendance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
}

.hotel-hr-clock-buttons {
    display: flex;
    gap: 12px;
}

.hotel-hr-manual-clock {
    display: flex;
    gap: 12px;
}

.hotel-hr-attendance-camera {
    background: #f8f9fb;
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

#hotel-hr-camera-preview {
    width: 100%;
    max-width: 100%;
    max-height: 320px;
    border-radius: 6px;
    background: #000;
    object-fit: contain;
    display: block;
}

.hotel-hr-camera-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.hotel-hr-camera-instructions {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    margin-top: 8px;
}

.hotel-hr-camera-status {
    text-align: center;
    font-size: 13px;
    color: #6c757d;
    margin-top: 6px;
    min-height: 18px;
}

.hotel-hr-camera-status.is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hotel-hr-camera-status.is-loading::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid #e3e8f0;
    border-top: 2px solid #2c7be5;
    border-radius: 50%;
    animation: hotel-hr-spin 0.9s linear infinite;
}

.hotel-hr-camera-status.is-success {
    color: #155724;
}

.hotel-hr-camera-status.is-error {
    color: #721c24;
}

.hotel-hr-attendance-alert {
    margin-bottom: 20px;
}

.hotel-hr-attendance-alert .hotel-hr-notice {
    margin: 0;
}

.hotel-hr-attendance-card {
    border: 1px solid #e0e6f1;
    border-radius: 8px;
    padding: 16px;
    background: #fdfdff;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.hotel-hr-attendance-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hotel-hr-attendance-row .label {
    font-size: 13px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.hotel-hr-attendance-row .value {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.hotel-hr-attendance-history,
.hotel-hr-timesheet-summary {
    margin-top: 32px;
}

.hotel-hr-attendance-history .hotel-hr-history-list {
    margin: 0;
    padding-left: 18px;
}

.hotel-hr-attendance-history .hotel-hr-history-list li {
    margin-bottom: 4px;
    color: #4b5675;
}

.hotel-hr-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: #fff;
    border: 1px solid #dfe3eb;
    border-radius: 8px;
    overflow: hidden;
}

.hotel-hr-table th,
.hotel-hr-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #edf0f7;
}

.hotel-hr-table th {
    background: #f5f7fb;
    font-weight: 600;
    font-size: 13px;
    color: #4b5675;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hotel-hr-table tbody tr:last-child td {
    border-bottom: none;
}

.hotel-hr-table .hotel-hr-empty {
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.hotel-hr-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hotel-hr-timesheet-card {
    border: 1px solid #e0e6f1;
    border-radius: 8px;
    padding: 16px;
    background: #f9fbff;
}

.hotel-hr-timesheet-card h4 {
    margin: 0 0 8px;
    font-size: 16px;
}

.hotel-hr-timesheet-card .meta {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 12px;
}

.hotel-hr-timesheet-card .stat {
    font-size: 28px;
    font-weight: 600;
    color: #2c7be5;
}

.hotel-hr-timesheet-card .details {
    margin-top: 12px;
    font-size: 13px;
    color: #4b5675;
    line-height: 1.5;
}

/* Table scroll wrapper for attendance history (mobile) */
.hotel-hr-attendance-dashboard .hotel-hr-table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 12px 0;
    border-radius: 8px;
    border: 1px solid #dfe3eb;
}

.hotel-hr-attendance-dashboard .hotel-hr-table-scroll-wrapper .hotel-hr-table {
    min-width: 480px;
}

@media screen and (max-width: 640px) {
    .hotel-hr-attendance-dashboard {
        padding: 16px;
    }

    .hotel-hr-attendance-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .hotel-hr-attendance-header h2 {
        font-size: 20px;
        word-break: break-word;
    }

    .hotel-hr-attendance-actions {
        width: 100%;
    }

    .hotel-hr-clock-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hotel-hr-clock-buttons .hotel-hr-btn,
    .hotel-hr-manual-clock .hotel-hr-btn {
        width: 100%;
        min-height: 44px;
        box-sizing: border-box;
    }

    .hotel-hr-manual-clock {
        width: 100%;
    }

    .hotel-hr-manual-clock .hotel-hr-btn {
        width: 100%;
    }

    .hotel-hr-attendance-camera {
        padding: 12px;
    }

    .hotel-hr-camera-controls {
        flex-wrap: wrap;
        gap: 10px;
    }

    .hotel-hr-camera-controls .hotel-hr-btn {
        flex: 1;
        min-width: 120px;
        min-height: 44px;
    }

    .hotel-hr-attendance-card {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .hotel-hr-attendance-row .value {
        font-size: 16px;
    }

    .hotel-hr-grid {
        grid-template-columns: 1fr;
    }

    .hotel-hr-timesheet-card .stat {
        font-size: 24px;
    }
}

@media screen and (max-width: 480px) {
    .hotel-hr-attendance-dashboard {
        padding: 12px 10px;
        margin-left: 0;
        margin-right: 0;
        border-radius: 6px;
    }

    .hotel-hr-attendance-header h2 {
        font-size: 18px;
    }

    .hotel-hr-attendance-card {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .hotel-hr-attendance-row .label {
        font-size: 12px;
    }

    .hotel-hr-attendance-row .value {
        font-size: 15px;
    }

    .hotel-hr-attendance-history h3,
    .hotel-hr-timesheet-summary h3 {
        font-size: 16px;
    }

    .hotel-hr-table-scroll-wrapper .hotel-hr-table {
        min-width: 360px;
    }

    .hotel-hr-table th,
    .hotel-hr-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Geofencing Styles */
.hotel-hr-geolocation-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2c7be5;
    font-size: 14px;
}

.hotel-hr-geolocation-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e3e8f0;
    border-top: 2px solid #2c7be5;
    border-radius: 50%;
    animation: hotel-hr-spin 1s linear infinite;
}

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

.hotel-hr-geofence-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.hotel-hr-geofence-status.inside {
    background: #d4edda;
    color: #155724;
}

.hotel-hr-geofence-status.inside::before {
    content: '✓';
    color: #28a745;
}

.hotel-hr-geofence-status.outside {
    background: #f8d7da;
    color: #721c24;
}

.hotel-hr-geofence-status.outside::before {
    content: '✗';
    color: #dc3545;
}

.hotel-hr-geofence-status.bypassed {
    background: #fff3cd;
    color: #856404;
}

.hotel-hr-geofence-status.bypassed::before {
    content: '⚠';
    color: #ffc107;
}

.hotel-hr-location-permission-prompt {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 12px 0;
    color: #004085;
}

.hotel-hr-location-permission-prompt h4 {
    margin: 0 0 8px 0;
    color: #004085;
    font-size: 14px;
}

.hotel-hr-location-permission-prompt p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.hotel-hr-geolocation-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 12px 0;
    color: #721c24;
}

.hotel-hr-geolocation-error h4 {
    margin: 0 0 8px 0;
    color: #721c24;
    font-size: 14px;
}

.hotel-hr-geolocation-error p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.hotel-hr-attendance-dashboard .hotel-hr-notice {
    margin: 12px 0;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid;
}

.hotel-hr-attendance-dashboard .hotel-hr-notice-info {
    background: #e7f3ff;
    border-left-color: #2c7be5;
    color: #004085;
}

.hotel-hr-attendance-dashboard .hotel-hr-notice-success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.hotel-hr-attendance-dashboard .hotel-hr-notice-error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.hotel-hr-attendance-dashboard .hotel-hr-notice-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

