/* ========================================
   RESET & BASE - LIGHT THEME
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    touch-action: manipulation;
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* ========================================
   SCREENSAVER - LIGHT VERSION
======================================== */
#screensaver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    cursor: pointer;
}

#screensaver.active {
    opacity: 1;
    pointer-events: all;
}

.screensaver-content {
    text-align: center;
    animation: pulse 3s ease-in-out infinite;
}

.screensaver-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 200;
    letter-spacing: 10px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.screensaver-content p {
    color: #64748b;
    font-size: clamp(1rem, 2vw, 1.5rem);
    margin-top: 20px;
    letter-spacing: 5px;
}
.hidden {
    display: none !important;
}
.screensaver-time {
    color: #2563eb;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-top: 30px;
    font-weight: 300;
    letter-spacing: 5px;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* ========================================
   KIOSK CONTAINER - LIGHT
======================================== */
.kiosk-container {
    width: 100vw;
    height: 100vh;
    padding: clamp(20px, 4vh, 40px);
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ========================================
   HEADER - LIGHT
======================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: clamp(15px, 2.5vh, 25px);
    border-bottom: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
}

.company-name {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 700;
    color: #dc2626;
    letter-spacing: 0.5px;
}

.clock-section {
    text-align: right;
}

.time {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    letter-spacing: 3px;
    color: #1e293b;
    line-height: 1;
}

.date {
    font-size: clamp(0.8rem, 1.2vw, 1.2rem);
    color: #64748b;
    margin-top: 5px;
    letter-spacing: 1px;
}

/* ========================================
   WELCOME SECTION - LIGHT
======================================== */
.welcome-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(20px, 4vh, 50px) 0;
}

.welcome-section h1 {
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 300;
    letter-spacing: 2px;
    color: #1e293b;
    margin-bottom: 10px;
}

.welcome-section h1 span {
    color: #dc2626;
    font-weight: 600;
}

.welcome-section p {
    font-size: clamp(1rem, 1.8vw, 1.8rem);
    color: #64748b;
    margin-bottom: clamp(30px, 5vh, 60px);
}

/* Action Buttons - LIGHT */
.action-buttons {
    display: flex;
    gap: clamp(20px, 4vw, 50px);
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: clamp(30px, 5vh, 60px);
}

.action-buttons button {
    padding: clamp(20px, 4vh, 45px) clamp(40px, 8vw, 80px);
    border: none;
    border-radius: 20px;
    font-size: clamp(1.5rem, 3vw, 3rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: clamp(180px, 30vw, 350px);
    justify-content: center;
}

.action-buttons .icon {
    font-size: clamp(2rem, 4vw, 4rem);
}

.btn-checkin {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.3);
}

.btn-checkin:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(37, 99, 235, 0.4);
}

.btn-checkin:active {
    transform: scale(0.95);
}

.btn-checkout {
    background: white;
    color: #1e293b;
    border: 2px solid #e2e8f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.btn-checkout:hover {
    border-color: #2563eb;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
}

.btn-checkout:active {
    transform: scale(0.95);
}

/* Stats Bar - LIGHT */
.stats-bar {
    display: flex;
    gap: clamp(30px, 6vw, 80px);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 700;
    color: #2563eb;
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: clamp(0.8rem, 1.2vw, 1.2rem);
    color: #64748b;
    margin-top: 5px;
}

/* ========================================
   FORM SECTIONS - LIGHT
======================================== */
.form-section {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 550px);
    max-height: 90vh;
    background: #ffffff;
    border-radius: 25px;
    padding: clamp(25px, 4vh, 40px);
    z-index: 100;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.form-header h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 600;
    color: #1e293b;
}

.btn-close {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 12px;
    transition: 0.3s;
}

.btn-close:hover {
    background: #e2e8f0;
}

.btn-close:active {
    transform: scale(0.9);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    caret-color: #1e293b;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-group select option {
    color: #1e293b;
}

/* ========================================
   CHECK-IN STEP FLOW
======================================== */
.step-indicator {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.step-nav {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.step-nav .btn-find {
    margin-top: 0;
    flex: 1;
}

.step-nav .btn-submit {
    margin-top: 0;
    flex: 2;
}


.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-find {
    width: 100%;
    padding: 14px;
    background: #f8fafc;
    color: #1e293b;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-find:hover {
    background: #f1f5f9;
    border-color: #2563eb;
}

.btn-find:active {
    transform: scale(0.98);
}

/* ========================================
   SIGNATURE PAD - LIGHT
======================================== */
.signature-section {
    margin-top: 20px;
}

.signature-section label {
    display: block;
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.signature-pad {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

#signatureCanvas {
    width: 100%;
    height: 180px;
    display: block;
    touch-action: none;
    background: #ffffff;
}

.signature-controls {
    padding: 10px;
    display: flex;
    justify-content: flex-end;
    background: #f8fafc;
}

.btn-clear {
    padding: 8px 20px;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
}

.btn-clear:hover {
    background: #fecaca;
}

.btn-clear:active {
    transform: scale(0.95);
}

/* ========================================
   VISITOR DETAILS - LIGHT
======================================== */
.visitor-details {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.visitor-details p {
    margin: 6px 0;
    color: #1e293b;
}

.visitor-details .label {
    color: #64748b;
    font-weight: 400;
}

/* ========================================
   MODAL - LIGHT
======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #ffffff;
    padding: clamp(30px, 5vh, 50px);
    border-radius: 25px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.modal-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}

.modal-content p {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.btn-modal {
    padding: 14px 50px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.btn-modal:active {
    transform: scale(0.95);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (orientation: portrait) {
    .action-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-buttons button {
        min-width: 200px;
        padding: 18px 30px;
    }
    
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .clock-section {
        text-align: center;
    }
    
    .form-section {
        width: 92vw;
        max-height: 85vh;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    .action-buttons button {
        padding: 12px 25px;
        min-width: 120px;
    }
    
    .welcome-section h1 {
        font-size: 1.8rem;
    }
    
    .welcome-section p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .stats-bar {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .form-section {
        max-height: 80vh;
        padding: 20px;
    }
}

/* Scrollbar */
.form-section::-webkit-scrollbar {
    width: 6px;
}

.form-section::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.form-section::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.form-section::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
/* Fix Android keyboard white overlay */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #1e293b !important;
    caret-color: #1e293b !important;
    /* Stops Chrome/Android from animating the autofill background in,
       which is what causes the white "overlay" flash while typing */
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Fix for input focus on mobile */
input:focus, select:focus {
    outline: none;
    background: #ffffff !important;
}

/* Fix clear button (X) visibility */
input[type="tel"]::-webkit-search-decoration,
input[type="tel"]::-webkit-search-cancel-button,
input[type="tel"]::-webkit-search-results-button,
input[type="tel"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

input[type="tel"]::-webkit-clear-button {
    display: block !important;
}
/* ========================================
   PORODO 21.5" SPECIFIC OPTIMIZATION
   ======================================== */

/* Target 1920x1080 screens */
@media (min-width: 1900px) and (min-height: 1000px) {
    .kiosk-container {
        padding: 40px 60px;
    }
    
    .time {
        font-size: 4.5rem !important;
    }
    
    .welcome-section h1 {
        font-size: 4rem !important;
    }
    
    .action-buttons button {
        padding: 35px 70px !important;
        font-size: 2.5rem !important;
        min-width: 300px !important;
    }
    
    .form-section {
        max-width: 650px !important;
        padding: 40px !important;
    }
    
    .form-group input,
    .form-group select {
        padding: 18px 22px !important;
        font-size: 1.2rem !important;
    }
    
    .btn-submit {
        padding: 18px !important;
        font-size: 1.3rem !important;
    }
    
    #signatureCanvas {
        height: 220px !important;
    }
}