/* Modern Design System for QR Multi-Locator */

:root {
    /* Color Palette */
    --bg-dark-base: #080c10;
    --bg-dark-panel: rgba(18, 25, 35, 0.7);
    --bg-dark-hover: rgba(30, 41, 59, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(38, 139, 210, 0.4);
    
    --text-primary: #f0f6fc;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    
    /* Glowing accents */
    --accent-blue: #00d2ff;
    --accent-blue-rgb: 0, 210, 255;
    --accent-green: #00ff66;
    --accent-green-rgb: 0, 255, 102;
    --accent-orange: #ff9900;
    --accent-orange-rgb: 255, 153, 0;
    --accent-red: #ff3366;
    
    /* Layout constants */
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark-base);
    background-image: 
        radial-gradient(at 10% 20%, rgba(0, 210, 255, 0.04) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(0, 255, 102, 0.03) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 20px;
}

/* Header styling */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--bg-dark-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    color: var(--accent-blue);
    background: rgba(0, 210, 255, 0.15);
    padding: 10px;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(0, 210, 255, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
}

.logo-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-text h1 span {
    color: var(--accent-blue);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.logo-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.id-idle {
    background-color: var(--text-muted);
    box-shadow: 0 0 8px var(--text-muted);
}

.id-scanning {
    background-color: var(--accent-orange);
    box-shadow: 0 0 10px var(--accent-orange);
    animation: pulse 1.5s infinite;
}

.id-success {
    background-color: var(--accent-green);
    box-shadow: 0 0 12px var(--accent-green);
}

/* Workspace Layout */
.workspace-grid {
    display: grid;
    grid-template-columns: 350px 1fr 350px;
    gap: 20px;
    flex-grow: 1;
}

@media (max-width: 1200px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

/* Glassmorphism Panel Base */
.panel {
    background: var(--bg-dark-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.step-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.panel-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0 20px 15px 20px;
    line-height: 1.4;
}

/* Tabs Navigation */
.tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    padding: 0 10px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 5px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

/* Tab Contents Container */
.tab-content-container {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tab-pane {
    display: none;
    flex-grow: 1;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
}

/* General Drop Zone Styles */
.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-md);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px 15px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
    min-height: 150px;
    height: 100%;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent-blue);
    background: rgba(0, 210, 255, 0.03);
    box-shadow: inset 0 0 20px rgba(0, 210, 255, 0.05);
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.drop-icon {
    color: var(--text-muted);
    margin-bottom: 12px;
    transition: var(--transition-smooth);
}

.drop-zone:hover .drop-icon {
    color: var(--accent-blue);
    transform: translateY(-2px);
}

.drop-text-primary {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.drop-text-secondary {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Camera Card Layout */
.camera-activation-card {
    text-align: center;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-grow: 1;
}

.camera-icon-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 50%;
    color: var(--text-secondary);
}

.camera-activation-card h3 {
    font-size: 1rem;
    font-weight: 600;
}

.camera-activation-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 250px;
}

/* Manual Input Form */
.manual-input-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    justify-content: center;
}

.manual-input-card label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.manual-input-card textarea {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    padding: 12px;
    font-size: 0.85rem;
    resize: none;
    transition: var(--transition-smooth);
}

.manual-input-card textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.15);
}

/* Target Status Badge */
.target-status-card {
    margin: 0 20px 20px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 15px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.badge-error {
    background: rgba(255, 51, 102, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(255, 51, 102, 0.25);
}

.badge-success {
    background: rgba(0, 255, 102, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(0, 255, 102, 0.25);
}

.target-preview-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.target-preview-image-container {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

.target-preview-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.placeholder-icon {
    color: var(--text-muted);
}

.target-preview-details {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.target-preview-details h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.target-data-content {
    font-size: 0.75rem;
    color: var(--text-muted);
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

/* Center Panel: Multi-QR Source */
.source-panel {
    display: flex;
    flex-direction: column;
}

.canvas-actions-header {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.icon-btn-round {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.icon-btn-round:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.zoom-value {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 38px;
    text-align: center;
}

.canvas-workspace-container {
    flex-grow: 1;
    position: relative;
    background: #040608;
    margin: 0 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
}

.source-drop-zone {
    border: none;
    border-radius: 0;
    height: 100%;
    width: 100%;
}

.drop-icon-large {
    color: var(--accent-blue);
    margin-bottom: 20px;
}

.upload-features-badges {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    justify-content: center;
}

.badge-tag {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 12px;
    color: var(--text-secondary);
}

/* Canvas Viewport */
.canvas-viewport-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
}

.canvas-viewport-wrapper:active {
    cursor: grabbing;
}

#qr-canvas {
    display: block;
    user-select: none;
}

/* Floating HUD */
.canvas-hud {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.hud-item {
    background: rgba(10, 15, 25, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 6px 12px;
    font-size: 0.75rem;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hud-label {
    color: var(--text-muted);
    font-weight: 500;
}

.hud-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Canvas Instruction bar */
.canvas-instruction-bar {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 15, 25, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    white-space: nowrap;
}

/* Scanning loading screen */
.scanning-overlay-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 12, 16, 0.9);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner-wrapper {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px;
}

.loading-spinner-wrapper h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.loading-spinner-wrapper p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Double Bounce Spinner */
.double-bounce-spinner {
    width: 40px;
    height: 40px;
    position: relative;
}

.double-bounce1, .double-bounce2 {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--accent-blue);
    opacity: 0.6;
    position: absolute;
    top: 0;
    left: 0;
    animation: bounce 2.0s infinite ease-in-out;
}

.double-bounce2 {
    animation-delay: -1.0s;
    background-color: var(--accent-green);
}

/* Canvas Footer actions */
.canvas-footer-bar {
    padding: 15px 20px 20px 20px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

/* Right Panel: Results Summary */
.results-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 15px;
    padding: 0 20px 15px 20px;
}

.kpi-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    border-radius: var(--border-radius-md);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 1.6rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.match-kpi.success-match {
    background: rgba(0, 255, 102, 0.05);
    border-color: rgba(0, 255, 102, 0.2);
}

.match-kpi.success-match .kpi-value {
    color: var(--accent-green);
}

.match-kpi.fail-match {
    background: rgba(255, 51, 102, 0.05);
    border-color: rgba(255, 51, 102, 0.2);
}

.match-kpi.fail-match .kpi-value {
    color: var(--accent-red);
}

/* Match Alert Box */
.match-alert-box {
    margin: 0 20px 15px 20px;
    padding: 12px 15px;
    border-radius: var(--border-radius-md);
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid transparent;
}

.alert-empty {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.alert-empty .alert-icon {
    color: var(--text-muted);
}

.alert-matched {
    background: rgba(0, 255, 102, 0.08);
    border-color: rgba(0, 255, 102, 0.25);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.08);
}

.alert-matched .alert-icon {
    color: var(--accent-green);
    filter: drop-shadow(0 0 5px rgba(0, 255, 102, 0.4));
}

.alert-matched h4 {
    color: var(--accent-green);
}

.alert-nomatch {
    background: rgba(255, 51, 102, 0.08);
    border-color: rgba(255, 51, 102, 0.25);
}

.alert-nomatch .alert-icon {
    color: var(--accent-red);
}

.alert-nomatch h4 {
    color: var(--accent-red);
}

.alert-text h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.alert-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Results List */
.results-list-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0 20px 20px 20px;
    min-height: 200px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.list-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-list {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    list-style: none;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.empty-list-placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 40px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-smooth);
    gap: 10px;
}

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

.result-item:hover {
    background: var(--bg-dark-hover);
}

.result-item.matched-item {
    border-left: 3px solid var(--accent-green);
    background: rgba(0, 255, 102, 0.02);
}

.result-item.matched-item:hover {
    background: rgba(0, 255, 102, 0.05);
}

.result-info {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-index {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
}

.result-payload {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-item:hover .result-payload {
    color: var(--text-primary);
}

.result-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.result-badge-match {
    background: var(--accent-green);
    color: #000;
    box-shadow: 0 0 8px rgba(0, 255, 102, 0.3);
}

.result-badge-no {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

/* Button & Controls Styles */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.primary-btn {
    background-color: var(--accent-blue);
    color: #040810;
}

.primary-btn:hover {
    background-color: #33e0ff;
    transform: translateY(-1px);
}

.secondary-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-glow {
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.btn-glow:hover {
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
}

.primary-btn.btn-success {
    background-color: var(--accent-green);
    color: #040810;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.3);
}

.primary-btn.btn-success:hover {
    background-color: #33ff85;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.5);
}

/* Modal Window Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 6, 8, 0.85);
    backdrop-filter: blur(15px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: var(--transition-smooth);
}

.modal-content {
    width: 100%;
    max-width: 600px;
    background: var(--bg-dark-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-icon {
    color: var(--accent-blue);
}

.modal-title-wrapper h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Camera Stream Viewport */
.camera-stream-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--border-radius-md);
    background: #020406;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#webcam-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Camera Scanner Laser overlay */
.scanner-laser-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.laser-beam {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    box-shadow: 0 0 12px 2px var(--accent-blue);
    animation: scan 2.5s infinite linear;
}

.scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border: 1px dashed rgba(0, 210, 255, 0.4);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5); /* dark mask outside scanner box */
}

/* Camera viewfinder corners */
.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--accent-blue);
    border-style: solid;
    border-width: 0;
}

.top-left {
    top: -2px;
    left: -2px;
    border-top-width: 3px;
    border-left-width: 3px;
}

.top-right {
    top: -2px;
    right: -2px;
    border-top-width: 3px;
    border-right-width: 3px;
}

.bottom-left {
    bottom: -2px;
    left: -2px;
    border-bottom-width: 3px;
    border-left-width: 3px;
}

.bottom-right {
    bottom: -2px;
    right: -2px;
    border-bottom-width: 3px;
    border-right-width: 3px;
}

.camera-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #020406;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    animation: spin 1s infinite linear;
}

.camera-controls-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.form-control {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    padding: 10px;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.camera-status-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

@keyframes scan {
    0% {
        top: 20%;
    }
    50% {
        top: 80%;
    }
    100% {
        top: 20%;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

/* Helper utility classes */
.hidden {
    display: none !important;
}

.glow-text {
    text-shadow: 0 0 10px rgba(var(--accent-green-rgb), 0.3);
}

@media (max-width: 768px) {
    .workspace-area {
        min-height: 75vh;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}
