* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #1a202c;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

.header {
    text-align: center;
    margin-bottom: 24px;
    background: white;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #2563eb;
    margin-bottom: 12px;
    font-size: 28px;
    font-weight: 600;
}

.nav-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 24px;
    border: 1px solid #2563eb;
    background: white;
    color: #2563eb;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-btn:hover {
    background: #eff6ff;
}

.nav-btn.active {
    background: #2563eb;
    color: white;
}

.screen {
    display: none;
    background: white;
    padding: 32px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.screen.active {
    display: block;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 24px;
    border: 2px solid #e2e8f0;
    overflow: hidden;
}

#scanner-container {
    width: 100%;
    height: 400px;
    background: #000;
    position: relative;
}

.face-detection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.face-box {
    position: absolute;
    border: 2px solid #22c55e;
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.1);
}

.status-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    text-align: center;
    padding: 24px 32px;
    font-size: 20px;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 500px;
}

.status-enter {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-exit {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.exit-reason {
    margin: 24px 0;
    text-align: center;
}

.reason-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.reason-btn {
    padding: 12px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #374151;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.reason-btn:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

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

.exit-reason input {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    font-size: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

.exit-reason input:focus {
    outline: none;
    border-color: #2563eb;
}

.exit-reason button {
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-weight: 500;
}

.exit-reason button:hover {
    background: #1d4ed8;
}

.log-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    padding: 20px;
    background: #f9fafb;
}

.log-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: white;
    border: 1px solid #e2e8f0;
}

.log-enter {
    border-left: 4px solid #059669;
}

.log-exit {
    border-left: 4px solid #d97706;
}

.log-avatar {
    width: 40px;
    height: 40px;
    margin-right: 16px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.log-info {
    flex: 1;
}

.log-name {
    font-weight: 600;
    font-size: 16px;
    color: #374151;
}

.log-time {
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
}

.log-reason {
    color: #4b5563;
    font-size: 14px;
    margin-top: 4px;
}

.employee-form {
    background: #f9fafb;
    padding: 24px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.form-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-success {
    background: #059669;
    color: white;
}

.btn-success:hover {
    background: #047857;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-info {
    background: #0369a1;
    color: white;
}

.btn-info:hover {
    background: #0284c7;
}

.employee-list {
    max-height: 500px;
    overflow-y: auto;
}

.employee-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
    background: white;
}

.employee-avatar {
    width: 48px;
    height: 48px;
    margin-right: 16px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.employee-info {
    flex: 1;
}

.employee-info div {
    margin-bottom: 4px;
    color: #374151;
}

.employee-info strong {
    color: #1f2937;
}

.employee-actions {
    display: flex;
    gap: 8px;
}

.employee-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.face-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 20;
}

.face-detected {
    background: rgba(34, 197, 94, 0.8);
}

.mic-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #dc2626;
    color: white;
    padding: 12px;
    border-radius: 50%;
    font-size: 18px;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    animation: pulse 1s infinite;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.hidden {
    display: none !important;
}

.greeting {
    font-size: 20px;
    margin-bottom: 8px;
}

h2 {
    color: #1f2937;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
}

h3 {
    color: #374151;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

.employee-name-display {
    text-align: center;
    margin-bottom: 16px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.face-name-label {
    background: #22c55e;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: inline-block;
}