body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #e9ecef;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    background: #004080;
    color: white;
    padding: 20px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.scanner-container {
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    background: #000;
}

#reader {
    width: 100%;
}

.input-group {
    margin-top: 15px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: #004080;
    outline: none;
}

.btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary {
    background-color: #009E60;
    color: white;
}

.btn-primary:active {
    background-color: #007949;
}

.result-card {
    display: none;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.status-success {
    color: #009E60;
}

.status-error {
    color: #dc3545;
}

.user-details {
    text-align: left;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: bold;
    color: #666;
}

.location-badge {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 15px;
    border: 1px solid #bbdefb;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #004080;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.candidate-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.candidate-item:hover {
    background-color: #f0f8ff;
}

.candidate-item:last-child {
    border-bottom: none;
}

/* --- MODAL UPDATES --- */
/* Universal Modal wrapper */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    overflow-y: auto;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    /* Ensure it doesn't get cut off on small screens if keyboard opens */
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

/* Hide by default (inline style will override) */
#confirmationCard {
    display: none;
}

/* --- FLOATING MENU --- */
/* --- FLOATING MENU --- */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    font-size: 2em;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover~label,
.star-rating input:checked~label {
    color: #ffd700;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;

    /* Prominent & Centered Column Style */
    display: block;
    margin: 15px auto 0 auto;
    padding: 10px 40px;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.2s, transform 0.1s;
}

.menu-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.floating-menu {
    position: fixed;
    top: 0;
    right: -100%;
    /* Hidden (fully off-screen) */
    width: 66%;
    /* 2/3 of screen */
    max-width: 400px;
    /* Optional cap */
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    /* Above modal overlay/backdrop */
    transition: right 0.3s ease;
    padding: 20px;
    padding-top: 60px;
}

.floating-menu.open {
    right: 0;
}

.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.menu-backdrop.open {
    display: block;
}

.menu-link {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
}

.menu-link:last-child {
    border-bottom: none;
}

.menu-link.logout {
    color: #E53935;
}

.menu-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}