/**
 * /public/css/modules/checkin-kiosk.css
 * Premium styling for Check-in Kiosk module with Face Detection
 * Designed for tablet/kiosk full-screen display
 * Updated: Multi-file architecture with face-api.js
 */

/* ============================================================================
   DESIGN TOKENS
   ============================================================================ */

:root {
    /* Colors */
    --kiosk-primary: #667eea;
    --kiosk-secondary: #764ba2;
    --kiosk-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --kiosk-success: #00d084;
    --kiosk-error: #e63946;
    --kiosk-warning: #f4a740;
    
    /* Backgrounds */
    --kiosk-bg: #f8f9fa;
    --kiosk-surface: #ffffff;
    --kiosk-border: #e0e0e0;
    --kiosk-text: #1e293b;
    --kiosk-text-muted: #64748b;
    
    /* Shadows */
    --kiosk-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --kiosk-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    
    /* Geometry */
    --kiosk-radius: 12px;
    --kiosk-radius-lg: 16px;
    
    /* Transitions */
    --kiosk-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --kiosk-transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== KIOSK MODE LAYOUT ===== */
.kiosk-mode {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--kiosk-bg);
    color: var(--kiosk-text);
    overflow: hidden;
    height: 100vh;
}

.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--kiosk-gradient);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    font-size: 4rem;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.loading-screen p {
    font-size: 1.25rem;
    font-weight: 500;
    opacity: 0.9;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* ===== HEADER ===== */
.kiosk-header {
    background: var(--kiosk-surface);
    border-bottom: 2px solid var(--kiosk-border);
    padding: 1.5rem 2rem;
    box-shadow: var(--kiosk-shadow);
    position: relative;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-section i {
    font-size: 2.5rem;
    background: var(--kiosk-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    background: var(--kiosk-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.current-time {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--kiosk-text-muted);
    font-variant-numeric: tabular-nums;
}

/* ===== STAGES ===== */
.stage {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.stage.active {
    display: block;
}

.stage-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

/* ===== LOOKUP STAGE ===== */
.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section h2 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    background: var(--kiosk-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-section p {
    font-size: 1.5rem;
    color: var(--kiosk-text-muted);
    margin: 0;
}

.lookup-form {
    background: var(--kiosk-surface);
    border-radius: var(--kiosk-radius-lg);
    padding: 3rem;
    box-shadow: var(--kiosk-shadow);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--kiosk-text);
}

.input-group input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    font-size: 1.5rem;
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius);
    background: var(--kiosk-bg);
    transition: var(--kiosk-transition);
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.input-group input:focus {
    outline: none;
    border-color: var(--kiosk-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: var(--kiosk-surface);
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--kiosk-text-muted);
}

.input-hint i {
    color: var(--kiosk-primary);
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    border: none;
    border-radius: var(--kiosk-radius);
    cursor: pointer;
    transition: var(--kiosk-transition-bounce);
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: var(--kiosk-gradient);
    color: white;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--kiosk-shadow-lg);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--kiosk-surface);
    color: var(--kiosk-text);
    border: 2px solid var(--kiosk-border);
}

.btn-secondary:hover {
    background: var(--kiosk-bg);
    border-color: var(--kiosk-primary);
    color: var(--kiosk-primary);
    transform: translateY(-1px);
}

/* Retry button for camera errors */
.btn-retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--kiosk-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

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

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--kiosk-error);
    color: var(--kiosk-error);
    padding: 1rem;
    border-radius: var(--kiosk-radius);
    font-weight: 500;
    margin-top: 1rem;
}

/* ===== SEARCH RESULTS ===== */
.search-results {
    margin-top: 1.5rem;
    background: var(--kiosk-surface);
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius);
    max-height: 400px;
    overflow-y: auto;
}

/* ============================================================================
   CAMERA SECTION - TWO COLUMN LAYOUT (CAMERA + MANUAL SEARCH)
   ============================================================================ */

.camera-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin: 3rem 0;
    padding: 2rem;
    background: var(--kiosk-surface);
    border-radius: var(--kiosk-radius-lg);
    box-shadow: var(--kiosk-shadow);
}

/* No Camera Message */
.no-camera-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.05) 0%, rgba(100, 116, 139, 0.05) 100%);
    border-radius: var(--kiosk-radius-lg);
    border: 2px dashed #cbd5e1;
    min-height: 300px;
}

.no-camera-message i {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.no-camera-message h3 {
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.no-camera-message p {
    color: #94a3b8;
    font-size: 0.95rem;
    max-width: 300px;
}

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

/* Coluna Esquerda: Câmera */
.camera-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Camera Container - 50% width, centered */
.camera-container {
    position: relative;
    aspect-ratio: 3 / 4;
    background: #000;
    border-radius: var(--kiosk-radius-lg);
    overflow: hidden;
    box-shadow: var(--kiosk-shadow-lg);
    border: 3px solid var(--kiosk-border);
}

/* Coluna Direita: Busca Manual */
.manual-search-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.manual-search-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius-lg);
    padding: 2rem;
    box-shadow: var(--kiosk-shadow);
}

.search-header {
    margin-bottom: 2rem;
    text-align: center;
}

.search-header h3 {
    font-size: 1.5rem;
    color: var(--kiosk-primary);
    margin-bottom: 0.5rem;
}

.search-header p {
    color: var(--kiosk-text-muted);
    font-size: 0.95rem;
}

.search-box-tablet {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-input-tablet {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.1rem;
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius);
    background: var(--kiosk-bg);
    color: var(--kiosk-text);
    transition: all 0.3s ease;
}

.search-input-tablet:focus {
    outline: none;
    border-color: var(--kiosk-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-search-tablet {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--kiosk-radius);
    cursor: pointer;
    background: var(--kiosk-gradient);
    color: white;
    transition: all 0.3s ease;
}

.btn-search-tablet:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

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

.search-tips {
    background: rgba(102, 126, 234, 0.05);
    border-left: 4px solid var(--kiosk-primary);
    padding: 1.25rem;
    border-radius: var(--kiosk-radius);
}

.search-tips p {
    font-weight: 600;
    color: var(--kiosk-primary);
    margin-bottom: 0.75rem;
}

.search-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-tips li {
    padding: 0.5rem 0;
    color: var(--kiosk-text);
    font-size: 0.95rem;
}

/* Responsive: Tablet Portrait */
@media (max-width: 1024px) {
    .camera-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .manual-search-card {
        padding: 1.5rem;
    }
}

/* Responsive: Mobile */
@media (max-width: 768px) {
    .camera-section {
        padding: 1rem;
    }
    
    .search-box-tablet {
        gap: 0.75rem;
    }
    
    .search-input-tablet,
    .btn-search-tablet {
        font-size: 1rem;
        padding: 1rem;
    }
}

.checkin-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Face Detection Overlay */
.face-detection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.face-outline {
    position: absolute;
    width: 70%;
    height: 70%;
    max-width: 250px;
    max-height: 300px;
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.3));
}

.face-status {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    border-radius: var(--kiosk-radius);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    backdrop-filter: blur(8px);
}

.status-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-top-color: var(--kiosk-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.face-status p {
    margin: 0.5rem 0 0 0;
    display: inline;
    vertical-align: middle;
}

/* Error state styling */
.face-status.error {
    background: rgba(255, 68, 68, 0.15);
    border: 2px solid rgba(255, 107, 107, 0.5);
    backdrop-filter: blur(10px);
}

.face-status.error p {
    display: block;
    margin: 0;
}

/* Detection Stats - Right column */
.detection-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius);
    transition: var(--kiosk-transition);
}

.stat-card:hover {
    border-color: var(--kiosk-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.stat-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--kiosk-text);
}

.quality-badge,
.match-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--kiosk-radius);
    font-weight: 700;
    font-size: 1.125rem;
}

.quality-badge {
    background: var(--kiosk-bg);
    color: var(--kiosk-text-muted);
}

.quality-badge.quality-poor {
    background: rgba(239, 68, 68, 0.1);
    color: var(--kiosk-error);
}

.quality-badge.quality-fair {
    background: rgba(244, 167, 64, 0.1);
    color: var(--kiosk-warning);
}

.quality-badge.quality-good {
    background: rgba(0, 208, 132, 0.1);
    color: var(--kiosk-success);
}

.quality-badge::before {
    content: '●';
    font-size: 0.75rem;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.match-badge {
    background: var(--kiosk-bg);
    color: var(--kiosk-text-muted);
}

.match-badge.match-waiting {
    background: rgba(102, 126, 234, 0.1);
    color: var(--kiosk-primary);
}

.match-badge.match-found {
    background: rgba(0, 208, 132, 0.1);
    color: var(--kiosk-success);
}

.match-badge.match-not-found {
    background: rgba(239, 68, 68, 0.1);
    color: var(--kiosk-error);
}

/* ============================================================================
   FALLBACK SECTION - MANUAL SEARCH
   ============================================================================ */

.fallback-section {
    grid-column: 1 / -1;
    background: var(--kiosk-bg);
    padding: 2rem;
    border-radius: var(--kiosk-radius);
    text-align: center;
}

.fallback-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    color: var(--kiosk-text);
}

.search-box {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative; /* Para posicionar autocomplete dropdown */
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius);
    background: var(--kiosk-surface);
    color: var(--kiosk-text);
    transition: var(--kiosk-transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--kiosk-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    flex: 0 0 auto;
    padding: 1rem 2rem;
    background: var(--kiosk-gradient);
    color: white;
    border: none;
    border-radius: var(--kiosk-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--kiosk-transition-bounce);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--kiosk-shadow-lg);
}

/* ============================================================================
   AUTOCOMPLETE DROPDOWN
   ============================================================================ */

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border: 3px solid var(--kiosk-primary);
    border-radius: var(--kiosk-radius);
    max-height: 450px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-item {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid var(--kiosk-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    gap: 1.5rem;
    min-height: 70px;
}

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

.autocomplete-item:hover {
    background: linear-gradient(90deg, 
        rgba(102, 126, 234, 0.12) 0%, 
        rgba(118, 75, 162, 0.12) 100%);
    padding-left: 2rem;
    transform: scale(1.02);
}

.autocomplete-item .student-name {
    font-weight: 700;
    color: var(--kiosk-text);
    font-size: 1.25rem;
    letter-spacing: 0.02em;
}

.autocomplete-item .student-detail {
    font-size: 1.1rem;
    color: var(--kiosk-text-muted);
    white-space: nowrap;
    font-weight: 500;
}

/* Scrollbar customizada para autocomplete */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: var(--kiosk-surface);
    border-radius: 4px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: var(--kiosk-border);
    border-radius: 4px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--kiosk-primary);
}

/* ============================================================================
   STUDENT SELECTION LIST (Full Search Results)
   ============================================================================ */

.student-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.student-option {
    background: white;
    border: 3px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius-lg);
    padding: 2rem 2.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.student-option:hover {
    border-color: var(--kiosk-primary);
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.05) 0%, 
        rgba(118, 75, 162, 0.05) 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.student-option:active {
    transform: translateY(-2px) scale(1.01);
}

.student-option .student-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kiosk-text);
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.student-option .student-matric {
    font-size: 1.15rem;
    color: var(--kiosk-text-muted);
    font-weight: 500;
}

/* Scrollbar para lista de estudantes */
.student-list::-webkit-scrollbar {
    width: 10px;
}

.student-list::-webkit-scrollbar-track {
    background: var(--kiosk-surface);
    border-radius: 5px;
}

.student-list::-webkit-scrollbar-thumb {
    background: var(--kiosk-primary);
    border-radius: 5px;
}

.student-list::-webkit-scrollbar-thumb:hover {
    background: var(--kiosk-secondary);
}

/* ============================================================================
   HISTORY SECTION
   ============================================================================ */

.checkins-history {
    grid-column: 1 / -1;
    background: var(--kiosk-surface);
    border-radius: var(--kiosk-radius-lg);
    padding: 2rem;
    box-shadow: var(--kiosk-shadow);
}

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

.history-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--kiosk-text);
}

.checkin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--kiosk-gradient);
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
}

.history-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

/* ============================================================================
   RESPONSIVE BREAKPOINTS
   ============================================================================ */

/* ===== TABLET (1024px) ===== */
@media (max-width: 1024px) {
    .camera-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .camera-container {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .detection-stats {
        padding: 1rem;
    }
}

/* ===== MOBILE (768px) ===== */
@media (max-width: 768px) {
    .camera-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .camera-container {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
        border-width: 2px;
    }
    
    .face-outline {
        width: 80%;
        height: 80%;
        max-width: 200px;
        max-height: 250px;
    }
    
    .detection-stats {
        padding: 0.5rem;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    .quality-badge,
    .match-badge {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .fallback-section {
        padding: 1.5rem;
    }
    
    .search-box {
        gap: 0.75rem;
    }
    
    .search-input {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .search-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .checkins-history {
        padding: 1.5rem;
    }
    
    .history-header h3 {
        font-size: 1.125rem;
    }
    
    .history-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        max-height: 300px;
    }
}

/* ===== SMALL MOBILE (480px) ===== */
@media (max-width: 480px) {
    .camera-section {
        gap: 1rem;
        padding: 0.75rem;
    }
    
    .camera-container {
        aspect-ratio: 3 / 4;
        border-width: 1px;
    }
    
    .face-outline {
        width: 85%;
        height: 85%;
        max-width: 150px;
        max-height: 200px;
    }
    
    .face-status {
        bottom: 1rem;
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .detection-stats {
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-label {
        font-size: 0.95rem;
    }
    
    .quality-badge,
    .match-badge {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
    
    .fallback-section {
        padding: 1rem;
    }
    
    .fallback-section h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .search-box {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-input {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .search-btn {
        padding: 0.75rem 1rem;
        width: 100%;
    }
    
    .checkins-history {
        padding: 1rem;
    }
    
    .history-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .history-list {
        grid-template-columns: 1fr;
        max-height: 250px;
    }
}

.search-results-header {
    padding: 1rem 1.5rem;
    background: var(--kiosk-bg);
    border-bottom: 1px solid var(--kiosk-border);
    font-weight: 600;
    color: var(--kiosk-text);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: var(--kiosk-transition);
    border-bottom: 1px solid var(--kiosk-border);
}

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

.search-result-item:hover {
    background: var(--kiosk-bg);
    transform: translateX(4px);
}

.search-result-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--kiosk-border);
    flex-shrink: 0;
}

.search-result-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-avatar .default-avatar {
    width: 100%;
    height: 100%;
    background: var(--kiosk-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: var(--kiosk-text);
}

.search-result-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--kiosk-text-muted);
}

/* 🔥 FIX: Status badges for enrollment and plan */
.search-result-status {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.enrollment-badge,
.plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.enrollment-badge.enrolled {
    background: rgba(16, 185, 129, 0.1);
    color: var(--kiosk-success);
}

.enrollment-badge.not-enrolled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--kiosk-error);
}

.plan-badge.active {
    background: rgba(102, 126, 234, 0.1);
    color: var(--kiosk-primary);
}

.plan-badge.inactive {
    background: rgba(245, 158, 11, 0.1);
    color: var(--kiosk-warning);
}
/* END FIX */

.search-result-match {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--kiosk-primary);
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.search-result-match.name {
    background: var(--kiosk-secondary);
}

.search-result-item.selected {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--kiosk-primary);
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--kiosk-text-muted);
}

.search-no-results i {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.search-no-results h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.search-no-results p {
    margin: 0;
    font-size: 0.875rem;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.action-card {
    background: var(--kiosk-surface);
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--kiosk-transition);
    opacity: 0.6;
}

.action-card i {
    font-size: 2rem;
    color: var(--kiosk-text-muted);
    margin-bottom: 1rem;
}

.action-card span {
    display: block;
    font-weight: 500;
    color: var(--kiosk-text-muted);
}

/* ===== DASHBOARD STAGE ===== */
.student-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--kiosk-surface);
    border-radius: var(--kiosk-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--kiosk-shadow);
}

.student-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.student-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--kiosk-primary);
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-details h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--kiosk-text);
}

.student-meta {
    display: flex;
    gap: 2rem;
    font-size: 1rem;
    color: var(--kiosk-text-muted);
    flex-wrap: wrap;
}

.student-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    transition: var(--kiosk-transition);
}

/* Plan Status Classes */
.plan-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.plan-inactive {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.plan-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.plan-expiring {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    animation: pulse-warning 2s ease-in-out infinite;
}

.plan-expired {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.no-course {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: white !important;
    font-style: italic;
}

@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

/* Enrollment Hint Card */
.enrollment-hint {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--kiosk-radius-lg);
    box-shadow: var(--kiosk-shadow);
    animation: slide-in 0.5s ease-out;
}

.enrollment-hint h4 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.enrollment-hint p {
    color: rgba(255, 255, 255, 0.95);
    margin: 0.5rem 0;
    line-height: 1.6;
}

.enrollment-hint strong {
    color: white;
    font-weight: 700;
}

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

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-card-enhanced {
    background: var(--kiosk-gradient);
    border-radius: var(--kiosk-radius-lg);
    padding: 2rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--kiosk-transition-bounce);
    box-shadow: var(--kiosk-shadow);
}

.stat-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: var(--kiosk-shadow-lg);
}

/* Progress Bar Enhancement */
.progress-card .progress-bar-container {
    margin-top: 1rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
}

/* ===== CLASSES SECTION ===== */
.classes-section, .activity-section {
    background: var(--kiosk-surface);
    border-radius: var(--kiosk-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--kiosk-shadow);
}

.classes-section h3, .activity-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    color: var(--kiosk-text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ===== CLASS GROUPS (COLLAPSIBLE) ===== */
.class-group {
    margin-bottom: 1.5rem;
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius-lg);
    background: var(--kiosk-surface);
    overflow: hidden;
    transition: var(--kiosk-transition);
}

.class-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to right, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    cursor: pointer;
    transition: var(--kiosk-transition);
    border-bottom: 2px solid transparent;
}

.class-group-header:hover {
    background: linear-gradient(to right, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.class-group-header.open {
    border-bottom-color: var(--kiosk-border);
}

.group-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.group-title i {
    font-size: 1.5rem;
}

.group-title h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--kiosk-text);
}

.group-title p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: var(--kiosk-text-muted);
}

.toggle-icon {
    font-size: 1.25rem;
    color: var(--kiosk-text-muted);
    transition: transform 0.3s ease;
}

.class-group-header.open .toggle-icon {
    transform: rotate(180deg);
}

.class-group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.5rem;
}

.class-group-content.open {
    max-height: 3000px;
    padding: 1.5rem;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ===== COUNTDOWN TIMERS ===== */
.time-remaining {
    padding: 0.5rem 0.75rem;
    border-radius: var(--kiosk-radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.75rem;
}

.time-remaining.countdown {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.time-remaining.available {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: pulse-timer 2s infinite;
}

@keyframes pulse-timer {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.02); 
    }
}

.class-card {
    background: var(--kiosk-bg);
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius);
    padding: 1.5rem;
    transition: var(--kiosk-transition);
    position: relative;
}

.class-card.available {
    border-color: var(--kiosk-success);
    background: rgba(16, 185, 129, 0.05);
}

.class-card.not_yet {
    border-color: var(--kiosk-warning);
    background: rgba(245, 158, 11, 0.05);
}

.class-card.checked-in {
    border-color: var(--kiosk-primary);
    background: rgba(102, 126, 234, 0.05);
}

.class-card.expired {
    opacity: 0.6;
}

.class-card:hover:not(.expired) {
    transform: translateY(-2px);
    box-shadow: var(--kiosk-shadow);
}

.class-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: var(--kiosk-text);
}

.class-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--kiosk-text-muted);
}

.class-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.class-status.available {
    background: var(--kiosk-success);
    color: white;
}

.class-status.not_yet {
    background: var(--kiosk-warning);
    color: white;
    animation: pulse-warning 2s infinite;
}

.class-status.checked-in {
    background: var(--kiosk-primary);
    color: white;
}

.class-status.expired {
    background: var(--kiosk-text-muted);
    color: white;
}

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

.checkin-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--kiosk-success);
    color: white;
    border: none;
    border-radius: var(--kiosk-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--kiosk-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.checkin-btn:disabled {
    background: var(--kiosk-text-muted);
    cursor: not-allowed;
    transform: none;
}

/* Time remaining indicator for NOT_YET classes */
.time-remaining {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--kiosk-warning);
    padding: 0.75rem;
    margin: 0.75rem 0;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--kiosk-warning);
}

/* Pulse animation for available check-in button */
.available-pulse {
    animation: pulse-button 2s infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

@keyframes pulse-button {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.available-pulse:hover {
    animation: none;
}

/* ===== ACTIVITY LIST ===== */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--kiosk-bg);
    border-radius: var(--kiosk-radius);
    border-left: 4px solid var(--kiosk-primary);
}

.activity-details h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--kiosk-text);
}

.activity-details p {
    font-size: 0.875rem;
    color: var(--kiosk-text-muted);
    margin: 0;
}

.activity-status {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--kiosk-success);
    color: white;
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--kiosk-surface);
    border-radius: var(--kiosk-radius-lg);
    box-shadow: var(--kiosk-shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content.success {
    text-align: center;
}

.modal-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--kiosk-border);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--kiosk-text);
}

.modal-body {
    padding: 2rem;
}

.modal-body p {
    font-size: 1.125rem;
    color: var(--kiosk-text-muted);
    margin: 0 0 1.5rem 0;
}

.class-details {
    background: var(--kiosk-bg);
    border-radius: var(--kiosk-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.class-details h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: var(--kiosk-text);
}

.class-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--kiosk-text-muted);
}

.modal-actions {
    padding: 1rem 2rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-actions .btn-secondary,
.modal-actions .btn-primary {
    width: auto;
    min-width: 120px;
}

.success-animation {
    font-size: 4rem;
    color: var(--kiosk-success);
    margin-bottom: 1rem;
    animation: successPulse 0.6s ease-out;
}

.success-details {
    background: var(--kiosk-bg);
    border-radius: var(--kiosk-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-weight: 600;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes successPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* ===== RECOMMENDATIONS SECTION ===== */
.recommendations-section {
    margin-bottom: 2rem;
}

.recommendations-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--kiosk-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.recommendation-card {
    background: var(--kiosk-surface);
    border-radius: var(--kiosk-radius);
    padding: 1.25rem;
    border-left: 4px solid var(--kiosk-primary);
    box-shadow: var(--kiosk-shadow);
    transition: var(--kiosk-transition);
    animation: fadeInUp 0.6s ease-out;
}

.recommendation-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.recommendation-card.high-priority {
    border-left-color: var(--kiosk-error);
}

.recommendation-card.normal-priority {
    border-left-color: var(--kiosk-primary);
}

.recommendation-card.low-priority {
    border-left-color: var(--kiosk-text-muted);
}

.recommendation-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.recommendation-icon {
    font-size: 1.5rem;
    color: var(--kiosk-primary);
}

.recommendation-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--kiosk-text);
}

.recommendation-content p {
    font-size: 0.875rem;
    color: var(--kiosk-text-muted);
    margin: 0;
    line-height: 1.4;
}

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

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .kiosk-header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo-section h1 {
        font-size: 1.5rem;
    }
    
    .current-time {
        font-size: 1.25rem;
    }
    
    .stage {
        padding: 1rem;
    }
    
    .welcome-section h2 {
        font-size: 2rem;
    }
    
    .welcome-section p {
        font-size: 1.25rem;
    }
    
    .lookup-form {
        padding: 2rem;
    }
    
    .student-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .student-info {
        flex-direction: column;
        text-align: center;
    }
    
    .student-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .classes-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn-secondary,
    .modal-actions .btn-primary {
        width: 100%;
    }
}

/* ===== ANIMATIONS ===== */
.stage {
    animation: fadeInUp 0.5s ease-out;
}

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

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--kiosk-text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

/* ===== KIOSK REDIRECT INFO ===== */
.kiosk-redirect-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
}

.kiosk-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.kiosk-redirect-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    background: var(--kiosk-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kiosk-redirect-info > p {
    font-size: 1.25rem;
    color: var(--kiosk-text-muted);
    margin-bottom: 3rem;
}

.kiosk-features {
    background: var(--kiosk-surface);
    border-radius: var(--kiosk-radius-lg);
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--kiosk-shadow);
    text-align: left;
}

.kiosk-features h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    color: var(--kiosk-text);
    text-align: center;
}

.kiosk-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kiosk-features li {
    padding: 0.75rem 0;
    font-size: 1.125rem;
    color: var(--kiosk-text);
    border-bottom: 1px solid var(--kiosk-border);
}

.kiosk-features li:last-child {
    border-bottom: none;
}

.kiosk-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.kiosk-actions .btn {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}

@media (max-width: 768px) {
    .kiosk-actions {
        flex-direction: column;
    }
    
    .kiosk-actions .btn {
        width: 100%;
        max-width: none;
    }
}

/* ============================================================================
   CONFIRMATION DASHBOARD - NOVO UX PREMIUM
   ============================================================================ */

.checkin-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    height: 100%;
    overflow-y: auto;
    background: var(--kiosk-bg);
}

/* ===== DASHBOARD HEADER WITH STUDENT INFO ===== */
.dashboard-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: var(--kiosk-radius-lg);
    box-shadow: var(--kiosk-shadow);
    position: relative;
}

.student-photo-large {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    border: 4px solid var(--kiosk-primary);
    flex-shrink: 0;
}

.student-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kiosk-gradient);
    color: white;
    font-size: 3.5rem;
    font-weight: 700;
}

.student-info-large {
    flex: 1;
}

.student-name-huge {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--kiosk-text);
    letter-spacing: -0.02em;
}

.student-meta-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.student-id-badge,
.student-phone {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: var(--kiosk-radius);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--kiosk-primary);
}

.btn-cancel-top {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: white;
    border: 2px solid var(--kiosk-error);
    color: var(--kiosk-error);
    padding: 0.75rem 1.5rem;
    border-radius: var(--kiosk-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--kiosk-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel-top:hover {
    background: var(--kiosk-error);
    color: white;
    transform: scale(1.05);
}

.btn-cancel-top .icon {
    font-size: 1.3rem;
}

/* ===== STATS ROW ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--kiosk-radius-lg);
    box-shadow: var(--kiosk-shadow);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--kiosk-transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--kiosk-shadow-lg);
}

.stat-icon {
    font-size: 3rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--kiosk-radius);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.stat-success .stat-icon {
    background: linear-gradient(135deg, rgba(0, 208, 132, 0.15), rgba(0, 208, 132, 0.05));
}

.stat-danger .stat-icon {
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(230, 57, 70, 0.05));
}

.stat-warning .stat-icon {
    background: linear-gradient(135deg, rgba(244, 167, 64, 0.15), rgba(244, 167, 64, 0.05));
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.05); }
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--kiosk-text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--kiosk-text);
    margin-bottom: 0.25rem;
}

.stat-value-small {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--kiosk-text);
    margin-bottom: 0.25rem;
}

.stat-hint {
    font-size: 0.9rem;
    color: var(--kiosk-text-muted);
    font-weight: 500;
}

.hint-urgent {
    color: var(--kiosk-warning);
    font-weight: 600;
}

/* ===== COURSE SELECTION SECTION ===== */
.course-selection-dashboard {
    background: white;
    padding: 2rem;
    border-radius: var(--kiosk-radius-lg);
    box-shadow: var(--kiosk-shadow);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 2rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--kiosk-text);
}

.title-icon {
    font-size: 2.5rem;
}

.title-hint {
    flex: 1;
    text-align: right;
    font-size: 1.1rem;
    color: var(--kiosk-text-muted);
    font-weight: 500;
}

/* ===== COURSE CARDS - NÚMEROS GRANDES ===== */
.courses-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.course-card-large {
    background: white;
    border: 3px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius-lg);
    padding: 2rem;
    cursor: pointer;
    transition: var(--kiosk-transition-bounce);
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 140px;
    position: relative;
    overflow: hidden;
}

.course-card-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--kiosk-gradient);
    opacity: 0;
    transition: var(--kiosk-transition);
}

.course-card-large:hover {
    border-color: var(--kiosk-primary);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 36px rgba(102, 126, 234, 0.25);
}

.course-card-large:hover::before {
    opacity: 0.05;
}

.course-card-large.selected {
    border-color: var(--kiosk-success);
    background: linear-gradient(135deg, rgba(0, 208, 132, 0.05), rgba(0, 208, 132, 0.02));
    box-shadow: 0 8px 32px rgba(0, 208, 132, 0.2);
}

.course-number {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--kiosk-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 1;
}

.course-card-large.selected .course-number {
    background: linear-gradient(135deg, var(--kiosk-success), #00a868);
    animation: bounce 0.5s ease-out;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.course-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.course-name-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kiosk-text);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.course-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.course-time,
.course-instructor {
    font-size: 1.1rem;
    color: var(--kiosk-text-muted);
    font-weight: 500;
}

.course-check {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--kiosk-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: transparent;
    transition: var(--kiosk-transition);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.course-card-large.selected .course-check {
    background: var(--kiosk-success);
    border-color: var(--kiosk-success);
    color: white;
    transform: scale(1.1);
}

/* ===== EMPTY STATE ===== */
.empty-state-large {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-text {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--kiosk-text);
    margin-bottom: 0.75rem;
}

.empty-hint {
    font-size: 1.25rem;
    color: var(--kiosk-text-muted);
}

/* ===== DASHBOARD FOOTER ===== */
.dashboard-footer {
    background: white;
    padding: 2rem;
    border-radius: var(--kiosk-radius-lg);
    box-shadow: var(--kiosk-shadow);
}

.btn-confirm-huge {
    width: 100%;
    padding: 2rem 3rem;
    background: linear-gradient(135deg, #9ca3af, #9ca3af);
    color: white;
    border: none;
    border-radius: var(--kiosk-radius-lg);
    font-size: 1.75rem;
    font-weight: 700;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: var(--kiosk-transition);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn-confirm-huge.enabled {
    background: linear-gradient(135deg, var(--kiosk-success), #00a868);
    cursor: pointer;
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 8px 32px rgba(0, 208, 132, 0.3); }
    50% { box-shadow: 0 12px 48px rgba(0, 208, 132, 0.5); }
}

.btn-confirm-huge.enabled:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 64px rgba(0, 208, 132, 0.4);
}

.btn-confirm-huge:disabled {
    opacity: 0.6;
}

.btn-confirm-huge .icon {
    font-size: 2.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .courses-grid-large {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .student-photo-large {
        width: 120px;
        height: 120px;
    }
    
    .student-name-huge {
        font-size: 2rem;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .btn-cancel-top {
        position: static;
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================================
   CHECK-IN V2.0 - SALES ENHANCEMENTS
   ============================================================================ */

/* Loading State */
.checkin-dashboard.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.loading-content {
    text-align: center;
    margin-top: 2rem;
}

.spinner-large {
    width: 64px;
    height: 64px;
    border: 4px solid var(--kiosk-border);
    border-top-color: var(--kiosk-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Reactivation Screen */
.reactivation-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
}

.reactivation-header {
    text-align: center;
    margin-bottom: 2rem;
}

.reactivation-header h2 {
    color: var(--kiosk-warning);
    font-size: 2.5rem;
    margin: 1rem 0;
}

.reactivation-content {
    background: white;
    padding: 3rem;
    border-radius: var(--kiosk-radius-lg);
    box-shadow: var(--kiosk-shadow-lg);
    max-width: 600px;
    width: 100%;
}

.reactivation-message {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--kiosk-text);
}

.reactivation-submessage {
    font-size: 1.1rem;
    text-align: center;
    color: var(--kiosk-text-muted);
    margin-bottom: 2rem;
}

.reactivation-benefits {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 2rem;
    border-radius: var(--kiosk-radius);
    margin-bottom: 2rem;
}

.reactivation-benefits h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--kiosk-text);
}

.reactivation-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reactivation-benefits li {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    color: var(--kiosk-text);
}

.reactivation-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-reactivate {
    flex: 2;
    background: var(--kiosk-gradient);
    color: white;
    padding: 1.5rem 2rem;
    border: none;
    border-radius: var(--kiosk-radius);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--kiosk-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-reactivate:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-back {
    flex: 1;
    background: var(--kiosk-border);
    color: var(--kiosk-text);
    padding: 1.5rem 2rem;
    border: none;
    border-radius: var(--kiosk-radius);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--kiosk-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background: #d1d5db;
}

/* ============================================================================
   REACTIVATION FLOW - Plan Selection, PIX Payment, Status Screens
   ============================================================================ */

/* Loading Plans */
.loading-plans {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1.5rem;
}

.loading-plans p {
    font-size: 1.2rem;
    color: var(--kiosk-text-muted);
}

.spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid var(--kiosk-border);
    border-top: 4px solid var(--kiosk-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--kiosk-border);
    border-top: 2px solid var(--kiosk-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* Plans Selection */
.plans-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--kiosk-text);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.plan-card {
    background: white;
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--kiosk-transition);
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--kiosk-shadow-lg);
    border-color: var(--kiosk-primary);
}

.plan-recommended {
    border: 3px solid var(--kiosk-primary);
    background: linear-gradient(to bottom, rgba(102, 126, 234, 0.05), white);
}

.plan-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--kiosk-gradient);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0 var(--kiosk-radius-lg) 0 var(--kiosk-radius);
}

.plan-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--kiosk-text);
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.plan-price {
    margin-bottom: 1rem;
}

.price-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--kiosk-primary);
}

.price-period {
    font-size: 1rem;
    color: var(--kiosk-text-muted);
}

.plan-description {
    font-size: 0.95rem;
    color: var(--kiosk-text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.plan-classes {
    font-size: 1rem;
    color: var(--kiosk-text);
    margin-bottom: 1.5rem;
}

.btn-select-plan {
    width: 100%;
    background: var(--kiosk-gradient);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--kiosk-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--kiosk-transition);
}

.btn-select-plan:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.plans-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Processing Payment */
.processing-payment {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1.5rem;
}

.processing-payment h3 {
    font-size: 1.5rem;
    color: var(--kiosk-text);
}

.processing-payment p {
    font-size: 1.1rem;
    color: var(--kiosk-text-muted);
}

/* PIX Payment Screen */
.pix-payment-screen {
    text-align: center;
}

.pix-title {
    font-size: 1.8rem;
    color: var(--kiosk-text);
    margin-bottom: 0.5rem;
}

.pix-plan {
    font-size: 1.1rem;
    color: var(--kiosk-text-muted);
    margin-bottom: 2rem;
}

.pix-qr-container {
    background: white;
    border: 2px dashed var(--kiosk-border);
    border-radius: var(--kiosk-radius-lg);
    padding: 2rem;
    display: inline-block;
    margin-bottom: 2rem;
}

.pix-qr-image {
    width: 250px;
    height: 250px;
    display: block;
}

.pix-no-qr {
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    color: var(--kiosk-text-muted);
    font-size: 1rem;
}

.pix-copypaste {
    margin-bottom: 2rem;
}

.pix-label {
    font-size: 1rem;
    color: var(--kiosk-text-muted);
    margin-bottom: 0.5rem;
}

.pix-code-container {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.pix-code-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius);
    font-size: 0.85rem;
    font-family: monospace;
    background: #f9fafb;
}

.btn-copy-pix {
    background: var(--kiosk-primary);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--kiosk-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--kiosk-transition);
    white-space: nowrap;
}

.btn-copy-pix:hover {
    background: var(--kiosk-secondary);
}

.pix-status {
    margin: 2rem 0;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: var(--kiosk-radius);
    font-size: 1.1rem;
    font-weight: 500;
}

.status-indicator.waiting {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    color: #f57c00;
}

.status-indicator.success {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
}

.pix-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-cancel {
    background: var(--kiosk-error);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--kiosk-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--kiosk-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel:hover {
    background: #c41c1c;
}

.pix-help {
    font-size: 0.95rem;
    color: var(--kiosk-text-muted);
    margin-top: 2rem;
}

/* Invoice Link Screen */
.invoice-payment-screen {
    text-align: center;
}

.invoice-link-container {
    margin: 2rem 0;
}

.btn-invoice-link {
    display: inline-block;
    background: var(--kiosk-gradient);
    color: white;
    padding: 1.5rem 3rem;
    border-radius: var(--kiosk-radius);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--kiosk-transition);
}

.btn-invoice-link:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

/* Local Payment Screen */
.local-payment-screen {
    text-align: center;
    padding: 2rem;
}

.success-icon, .error-icon, .info-icon, .timeout-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.local-payment-info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    padding: 2rem;
    border-radius: var(--kiosk-radius);
    margin: 2rem 0;
}

.local-payment-info p {
    font-size: 1.2rem;
    color: var(--kiosk-text);
    margin: 0.5rem 0;
}

.payment-id {
    font-family: monospace;
    font-size: 1rem !important;
    color: var(--kiosk-text-muted) !important;
}

.local-actions, .error-actions, .fallback-actions, .timeout-actions, .success-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-confirm {
    background: var(--kiosk-success);
    color: white;
    padding: 1.5rem 3rem;
    border: none;
    border-radius: var(--kiosk-radius);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--kiosk-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-confirm:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 208, 132, 0.4);
}

/* Error Screen */
.payment-error-screen {
    text-align: center;
    padding: 2rem;
}

.error-message {
    font-size: 1.1rem;
    color: var(--kiosk-error);
    margin: 1rem 0 2rem 0;
    padding: 1rem;
    background: #fef2f2;
    border-radius: var(--kiosk-radius);
}

.error-help {
    font-size: 0.95rem;
    color: var(--kiosk-text-muted);
    margin-top: 2rem;
}

/* No Plans Screen */
.no-plans-screen {
    text-align: center;
    padding: 2rem;
}

/* Success Screen */
.payment-success-screen {
    text-align: center;
    padding: 2rem;
}

.success-animation {
    margin-bottom: 1.5rem;
}

.success-checkmark {
    font-size: 5rem;
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message {
    font-size: 1.3rem;
    color: var(--kiosk-success);
    margin-top: 1rem;
}

/* Timeout Screen */
.payment-timeout-screen {
    text-align: center;
    padding: 2rem;
}

.timeout-help {
    font-size: 1rem;
    color: var(--kiosk-text-muted);
    margin: 1rem 0 2rem 0;
}

/* Course Progress Section */
.course-progress-section {
    background: white;
    padding: 2rem;
    border-radius: var(--kiosk-radius-lg);
    box-shadow: var(--kiosk-shadow);
    margin-bottom: 2rem;
}

.progress-content {
    margin-top: 1rem;
}

.progress-info {
    margin-bottom: 1rem;
}

.course-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kiosk-text);
    margin-bottom: 0.5rem;
}

.progress-stats {
    font-size: 1rem;
    color: var(--kiosk-text-muted);
}

/* Progress Bar with Animation */
.progress-bar-container {
    width: 100%;
    height: 32px;
    background: #f3f4f6;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: var(--kiosk-gradient);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-label {
    position: relative;
    z-index: 1;
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

/* Graduation Badge */
.graduation-badge {
    padding: 1rem 1.5rem;
    border-radius: var(--kiosk-radius);
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.graduation-badge.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    animation: pulse-success 2s ease-in-out infinite;
}

.graduation-badge.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

@keyframes pulse-success {
    0%, 100% { box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5); }
}

/* Classes Section */
.classes-section {
    background: white;
    padding: 2rem;
    border-radius: var(--kiosk-radius-lg);
    box-shadow: var(--kiosk-shadow);
    margin-bottom: 2rem;
}

.classes-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--kiosk-text);
    margin: 1.5rem 0 1rem 0;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* Class Cards */
.class-card {
    background: white;
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius);
    padding: 1.5rem;
    transition: var(--kiosk-transition);
    cursor: pointer;
}

.class-card.active {
    border-left: 4px solid #10b981;
}

.class-card.active:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.class-card.selected {
    border-color: var(--kiosk-primary);
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

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

.class-time {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--kiosk-primary);
}

.class-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

.class-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--kiosk-text);
    margin-bottom: 0.75rem;
}

.class-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.class-instructor,
.class-room,
.class-slots {
    font-size: 0.95rem;
    color: var(--kiosk-text-muted);
}

.btn-select-class {
    width: 100%;
    padding: 0.75rem;
    background: var(--kiosk-gradient);
    color: white;
    border: none;
    border-radius: var(--kiosk-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--kiosk-transition);
}

.btn-select-class:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* New: Direct Check-in Button on Cards */
.btn-checkin-turma {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #00d084 0%, #00a66c 100%);
    color: white;
    border: none;
    border-radius: var(--kiosk-radius);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--kiosk-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 208, 132, 0.3);
}

.btn-checkin-turma:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 208, 132, 0.5);
}

.btn-checkin-turma:active {
    transform: scale(0.98);
}

.btn-checkin-turma .icon {
    font-size: 1.3rem;
}

.btn-checkin-turma .text {
    font-weight: 700;
}

/* Upcoming Classes */
.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.upcoming-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #fbbf24;
    border-radius: var(--kiosk-radius);
    padding: 1rem;
}

.upcoming-time {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kiosk-text);
    margin-bottom: 0.5rem;
}

.upcoming-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--kiosk-text);
    margin-bottom: 0.5rem;
}

.upcoming-countdown {
    font-size: 0.95rem;
    color: #d97706;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upcoming-instructor {
    font-size: 0.9rem;
    color: var(--kiosk-text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* ============================================================================
   SCHEDULE SECTION - TURMAS DISPONÍVEIS
   ============================================================================ */

.schedule-section {
    background: var(--kiosk-surface);
    border-radius: var(--kiosk-radius-lg);
    box-shadow: var(--kiosk-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--kiosk-border);
}

.schedule-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kiosk-text);
    margin: 0;
}

.current-time {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--kiosk-primary);
    font-family: 'Courier New', monospace;
}

.available-classes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.class-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--kiosk-radius);
    padding: 1.5rem;
    border-left: 4px solid var(--kiosk-border);
    transition: var(--kiosk-transition);
    position: relative;
    overflow: hidden;
}

.class-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: var(--kiosk-transition);
}

.class-card.status-upcoming {
    border-left-color: var(--kiosk-warning);
}

.class-card.status-upcoming::before {
    background: var(--kiosk-warning);
}

.class-card.status-available {
    border-left-color: var(--kiosk-success);
    box-shadow: 0 4px 16px rgba(0, 208, 132, 0.2);
}

.class-card.status-available::before {
    background: var(--kiosk-success);
}

.class-card.status-closed {
    border-left-color: #9ca3af;
    opacity: 0.6;
}

.class-card.can-checkin {
    cursor: pointer;
    transform: scale(1);
}

.class-card.can-checkin:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

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

.time-badge {
    background: var(--kiosk-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.countdown {
    font-size: 0.85rem;
    color: var(--kiosk-warning);
    font-weight: 600;
    background: rgba(244, 167, 64, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.class-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--kiosk-text);
    margin: 0 0 0.5rem 0;
}

.class-instructor,
.class-capacity {
    font-size: 0.9rem;
    color: var(--kiosk-text-muted);
    margin: 0.25rem 0;
}

.class-status {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--kiosk-border);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.class-status.status-upcoming {
    color: var(--kiosk-warning);
}

.class-status.status-available {
    color: var(--kiosk-success);
}

.class-status.status-closed {
    color: #9ca3af;
}

.loading-state,
.error-state,
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--kiosk-text-muted);
}

.loading-state .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--kiosk-border);
    border-top-color: var(--kiosk-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state {
    color: var(--kiosk-error);
}

.empty-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--kiosk-text);
    margin-bottom: 0.5rem;
}

.empty-hint {
    font-size: 1rem;
    color: var(--kiosk-text-muted);
    font-style: italic;
}

/* Responsive Adjustments for V2 */
@media (max-width: 768px) {
    .classes-grid,
    .upcoming-grid {
        grid-template-columns: 1fr;
    }
    
    .available-classes {
        grid-template-columns: 1fr;
    }
    
    .reactivation-actions {
        flex-direction: column;
    }
    
    .btn-reactivate,
    .btn-back {
        width: 100%;
    }
    
    .schedule-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}


/* ===== TIMEOUT PROGRESS BAR ===== */
.timeout-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

.timeout-progress-fill {
    height: 100%;
    background: var(--kiosk-warning);
    width: 100%;
    transform-origin: left;
}

/* ===== UI TRANSITIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.checkin-dashboard, .checkin-dashboard-v2, .camera-section, .success-view, .success-container, .reactivation-screen {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ============================================================================
   ACCESSIBILITY & FOCUS STATES
   ============================================================================ */

/* Focus indicators for interactive elements */
:focus-visible {
    outline: 3px solid var(--kiosk-primary);
    outline-offset: 2px;
}

/* Specific focus styles for cards */
.course-card-large:focus-visible,
.class-card:focus-visible,
.student-option:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.5);
    border-color: var(--kiosk-primary);
    transform: translateY(-2px);
}

/* Student Selection List Styles (Missing previously) */
.student-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.student-option {
    background: white;
    border: 2px solid var(--kiosk-border);
    border-radius: var(--kiosk-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--kiosk-transition);
}

.student-option:hover {
    border-color: var(--kiosk-primary);
    transform: translateY(-2px);
    box-shadow: var(--kiosk-shadow);
}

.student-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--kiosk-text);
    margin-bottom: 0.5rem;
}

.student-matric {
    font-size: 0.9rem;
    color: var(--kiosk-text-muted);
}

/* Button focus states */
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-confirm-huge:focus-visible,
.btn-cancel-top:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.5);
}

/* Input focus states */
.search-input:focus-visible {
    outline: none;
    border-color: var(--kiosk-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

