:root {
    --primary-color: #28a745;
    --primary-dark: #1e7e34;
    --secondary-color: #1a1a1a;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body.attendee-body {
    background-color: var(--bg-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%2328a745' fill-opacity='0.03'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z'/%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.attendee-ui.container {
    width: 100%;
    max-width: 480px;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px 35px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.logo {
    text-align: center;
    margin-bottom: 10px;
}

.logo img {
    max-width: 220px;
    height: auto;
}

.logo p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 10px;
    font-weight: 500;
    letter-spacing: 1px;
}

.live-clock {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-top: 10px;
    font-family: 'monospace';
    background: #f0fdf4;
    display: inline-block;
    padding: 5px 20px;
    border-radius: 50px;
    border: 1px solid rgba(40, 167, 69, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.live-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: capitalize;
    margin-bottom: 2px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-transform: uppercase;
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: #ffffff;
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: var(--transition);
}

.input-with-icon input {
    padding-left: 50px !important;
}

.input-with-icon:focus-within .input-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    padding-right: 45px;
}

.custom-file-upload {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 10px;
    border: 2px dashed var(--border-color);
}

.custom-file-upload input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

#file-name {
    font-size: 0.85rem;
    color: var(--text-muted);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
}

.btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.15);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
    margin-top: 10px;
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: var(--text-muted);
    color: var(--secondary-color);
    transform: none;
    box-shadow: none;
}

#camera-container {
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
    position: relative;
    /* Fixed: Added relative positioning */
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#snap-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid var(--primary-color);
    width: 60%;
    height: 70%;
    border-radius: 50% / 40%;
    /* Oval shape for face guide */
    pointer-events: none;
    opacity: 0.3;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.2);
    /* Subtle vignette */
}

.employee-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 5px solid var(--primary-color);
}

.employee-info h3 {
    font-size: 1.15rem;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.employee-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hidden {
    display: none;
}

.success-icon {
    width: 64px;
    height: 64px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

#success-message {
    text-align: center;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.action-btn {
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.action-btn .btn-code {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color);
}

.action-btn .btn-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.action-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: #f8fff9;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.1);
}

.action-btn.active {
    border-color: var(--primary-color);
    background: #f0fff4;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.action-btn.active .btn-label {
    color: var(--secondary-color);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f1f1;
    border-style: dashed;
}

.action-btn:disabled .btn-code {
    color: #999;
}

.tics-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.8px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    opacity: 0.7;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    transition: var(--transition);
}

.tics-footer i {
    margin-top: -5px;
    font-size: 1rem;
    color: var(--primary-color);
}

.tics-footer:hover {
    opacity: 1;
    color: var(--secondary-color);
}

/* Admin Panel Custom Styles - Restored to Standard AdminLTE */
:root {
    --admin-accent: #28a745;
}

.main-header.navbar {
    border-bottom: 1px solid #dee2e6 !important;
}

.nav-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border-right: 1px solid #dee2e6;
    margin-right: 10px;
}

.nav-user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-user-role {
    font-size: 0.75rem;
    color: #6c757d;
    display: block;
    line-height: 1;
}

.nav-link.logout-btn {
    color: #dc3545 !important;
}

@media (max-width: 480px) {
    .card {
        padding: 30px 20px;
    }

    .container {
        padding: 10px;
    }
}