.sam-frontend {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.sam-screen {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sam-screen h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

/* Staff Selection Grid */
.sam-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 600px;
}

.sam-staff-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.sam-staff-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.sam-staff-card:active {
    transform: scale(0.98);
}

.sam-staff-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid #f0f0f0;
}

.sam-staff-card .staff-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Action Selection */
.sam-back-btn {
    align-self: flex-start;
    color: #007cba;
    font-size: 18px;
    cursor: pointer;
    margin-bottom: 20px;
    padding: 10px;
}

.sam-back-btn:hover {
    color: #005a87;
}

.sam-staff-header {
    text-align: center;
    margin-bottom: 40px;
}

.sam-staff-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid #007cba;
}

.sam-staff-header h3 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.sam-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 400px;
}

.sam-action-btn {
    background: white;
    border: none;
    border-radius: 16px;
    padding: 30px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.sam-action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.sam-action-btn:active {
    transform: scale(0.98);
}

.sam-action-btn .sam-icon {
    font-size: 32px;
}

.sam-in {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sam-out {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.sam-lunch-out {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.sam-lunch-in {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.sam-payment {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.sam-receipt {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    color: white;
}

/* Amount Input */
#sam-amount-input {
    width: 100%;
    max-width: 400px;
}

#sam-amount-input h3 {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

#amount-input, #notes-input {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

#notes-input {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.sam-submit-btn, .sam-done-btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #007cba;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.sam-submit-btn:hover, .sam-done-btn:hover {
    background: #005a87;
}

/* Success Screen */
#sam-success {
    justify-content: center;
}

.sam-success-icon {
    width: 100px;
    height: 100px;
    background: #43e97b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: white;
    margin-bottom: 20px;
}

#sam-success h3 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

#sam-success p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .sam-frontend {
        padding: 15px;
    }
    
    .sam-staff-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .sam-actions-grid {
        gap: 15px;
    }
    
    .sam-action-btn {
        padding: 25px 15px;
        font-size: 16px;
    }
    
    .sam-action-btn .sam-icon {
        font-size: 28px;
    }
}

/* Loading State */
.sam-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}