/* css/modern.css */
:root {
    /* Light Mode Variables */
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    /* More opacity for legibility */
    --card-border: rgba(255, 255, 255, 0.6);
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --accent: #c0392b;
    /* Deep Red */
    --accent-glow: rgba(192, 57, 43, 0.4);
    --success: #27ae60;
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

body.dark-mode {
    /* Dark Mode Variables */
    /* Dark Mode Variables */
    --bg-gradient: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
    --card-bg: rgba(30, 30, 30, 0.85);
    /* ... other vars ... */

    animation: fadeToDark 1.6s forwards;
    --card-bg: rgba(30, 30, 30, 0.85);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #ecf0f1;
    --text-muted: #bdc3c7;
    --accent: #e74c3c;
    /* Bright Red */
    --accent-glow: rgba(231, 76, 60, 0.4);
    --success: #2ecc71;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    /* HARDCODED Base Light Background for Cross-Fade to work */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    /* Important for gradient stability */
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
    position: relative;
    /* For pseudo-element */
    isolation: isolate;
    /* Create stacking context */

    transition: color 1.6s ease;
    overflow-x: hidden;
}

/* PRELOAD: No Transitions on Load */
body.preload,
body.preload * {
    transition: none !important;
    animation: none !important;
}

/* Dark Mode Gradient Overlay - The "Cross-Fade" Trick */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
    /* Dark Gradient Hardcoded or Var */
    z-index: -1;
    opacity: 0;
    transition: opacity 1.6s ease-in-out;
    pointer-events: none;
}

body.dark-mode::before {
    opacity: 1;
}

/* Apply 1.6s transition to ALL interactive elements for consistency */
input,
textarea,
button,
select,
.glass-card,
.feedback-card,
.menu-link,
.modern-btn,
.header-btn-frame,
.control-icon {
    transition: background-color 1.6s ease, border-color 1.6s ease, color 1.6s ease, box-shadow 1.6s ease, transform 0.2s !important;
}

/* Keep transform fast (0.2s) but colors slow (1.6s) */
.glass-card:hover,
.feedback-card:hover,
.header-btn-frame:hover,
.modern-btn:hover {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        background-color 1.6s ease,
        border-color 1.6s ease,
        color 1.6s ease,
        box-shadow 0.3s ease !important;
    /* Shadow slightly faster for pop */
}

/* Global Box Sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Form Elements - Force Visibility */
html body input,
html body select,
html body textarea {
    color: #000000 !important;
    /* Force Black */
    background-color: #ffffff !important;
    border: 1px solid #ccc !important;
    border-radius: 4px;
    padding: 8px;
    font-family: 'Inter', sans-serif;
}

html body ::placeholder {
    color: #666 !important;
    opacity: 1;
}

/* Zurück Button - Black */
.btn-secondary,
.btn-back,
a.btn-secondary {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #333 !important;
}

/* =========================
   HEADER STYLES (RESTORED)
   ========================= */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    border-radius: 0 0 20px 20px;
}

.logo-container img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s;
}

.logo-container img:hover {
    transform: scale(1.05);
}

.header-middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-badges {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.badge {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.badge-version {
    background: #e0e0e0;
    color: #333;
}

.badge-status {
    background: #d5f5e3;
    color: #27ae60;
}

body.dark-mode .badge-version {
    background: #444;
    color: #fff;
}

body.dark-mode .badge-status {
    background: #27ae60;
    color: #fff;
}

/* Theme Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    border: 1px solid #aaa;
}

.slider:before {
    background-color: white;
    bottom: 4px;
    content: "";
    height: 24px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 24px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: #2c3e50;
    border-color: #555;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider .icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: opacity 0.3s;
}

.slider .sun {
    left: 8px;
    color: #f1c40f;
    opacity: 1;
}

.slider .moon {
    right: 8px;
    color: #f1c40f;
    opacity: 0;
}

input:checked+.slider .sun {
    opacity: 0;
}

input:checked+.slider .moon {
    opacity: 1;
}

/* Header Button Frame */
.header-btn-frame {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    /* Fix for alignment */
    align-items: center;
    gap: 8px;
    /* Gap between icon and text */
    margin-right: 10px;
}

/* Feedback Control Icons */
.control-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
    /* Default Light Mode bg */
    border: 1px solid #ccc;
    /* Light Mode Border */
}

/* Dark Mode Checkbox Override */
body.dark-mode .control-icon {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #fff;
}

/* Checkbox Logic */
.checkbox-wrapper i {
    opacity: 0;
    /* Hidden by default */
    transform: scale(0.5);
    transition: all 0.2s;
    color: #bdc3c7;
}

body.dark-mode .checkbox-wrapper i {
    color: #fff;
}

.checkbox-wrapper:hover {
    background: rgba(39, 174, 96, 0.1);
    border-color: #27ae60;
}

body.dark-mode .checkbox-wrapper:hover {
    background: rgba(39, 174, 96, 0.4);
    border-color: #2ecc71;
}

.checkbox-wrapper:hover i {
    opacity: 1;
    transform: scale(1);
}

/* Inline Editor Styles */
.inline-editor {
    width: 100%;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 5px;
    font-family: inherit;
    color: #000;
    margin-bottom: 5px;
}

.edit-actions {
    display: flex;
    gap: 5px;
}

.save-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.cancel-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Edit Logic */
.edit-wrapper:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-color: #3498db;
}

.edit-wrapper i {
    transition: transform 0.2s;
}

.edit-wrapper:hover i {
    transform: scale(1.3);
}

.header-btn-frame:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Glassmorphism Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Fill grid cell */
    min-height: 250px;
    /* Safe minimum */
    justify-content: flex-start;
    /* Default alignment */
    gap: 15px;
    position: relative;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

/* Card Top Fixed - Align Icons */
.card-top-fixed {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CSS Barcode (Stock) */
.css-barcode {
    display: flex;
    gap: 2px;
    width: 40px;
    height: 30px;
    align-items: flex-end;
    opacity: 0.8;
    margin-right: 5px;
}

.bar {
    background: var(--text-main);
    width: 3px;
}

.b-thin {
    width: 1px;
}

.b-thick {
    width: 5px;
}

/* ... Header ... */

/* Buttons */
.modern-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #a93226 100%);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    /* Push to bottom */
    text-decoration: none !important;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.modern-btn:active {
    transform: translateY(1px);
}

.modern-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Checklist UI */
.checklist-container {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 15px;
    display: none;
    /* Hidden by default */
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.3s;
}

.checklist-item.pending i {
    color: #bdc3c7;
}

.checklist-item.running {
    color: var(--text-main);
    font-weight: 600;
}

.checklist-item.running i {
    color: var(--accent);
    animation: spin 2s linear infinite;
}

.checklist-item.done {
    color: var(--success);
    font-weight: 500;
}

.checklist-item.done i {
    color: var(--success);
}

.checklist-item.error {
    color: #e74c3c;
}

/* Animations */
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spin on Hover Helper */
.fa-spin-hover:hover {
    animation: spin 2s infinite linear;
}

/* Main Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Default Desktop 4 columns */
    gap: 2rem;
    padding: 2rem;
    max-width: 1800px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .app-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 1rem;
    }

    .header-middle {
        width: 100%;
    }
}

.card-icon {
    font-size: 2rem;
    /* Reduced from 2.5rem */
    margin-bottom: 0.5rem;
    color: var(--accent);
    background: rgba(231, 76, 60, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.card-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--text-main);
}

p {
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    /* Reduced margin */
    font-size: 0.95rem;
}

.small-meta {
    margin-top: 5px;
    display: block;
}

/* Animations */

/* 1. Logs: Thin Circle Arrow (Vexels PNG) - CCW */
.log-icon-v7 {
    position: relative;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

/* Removed ScaleX(-1) as user wants "Exact opposite direction" and "Mirror" logic is confusing. I will just Spin CW. If they want mirror, they can ask again, but "Anders herum drehen" */
.log-icon-v7 .fa-clock {
    font-size: 11px;
    position: absolute;
    z-index: 2;
    color: var(--text-main);
}

.arrow-thin-img {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    background-image: url('https://images.vexels.com/media/users/3/154680/isolated/preview/9ae6ae37db26b9ebc58066a0f50ef8f5-ein-duenner-pfeilkreis.png');
    background-size: contain;
    background-repeat: no-repeat;
    /* Default (Light Mode): Black */
    filter: brightness(0);
}

/* Dark Mode Override */
body.dark-mode .arrow-thin-img {
    filter: brightness(0) invert(1);
}

/* Spin CCW */
@keyframes spin-ccw {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

.header-btn-frame:hover .arrow-thin-img {
    animation: spin-ccw 2s linear infinite;
}

/* Clockwise Spin Helper */
@keyframes spin-cw {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* 2. Feedback: Lightbulb V3 */
.bulb-container {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    text-align: center;
    margin-right: 5px;
}

.bulb-off {
    color: var(--text-muted);
    transition: 0.3s;
    font-size: 0.9rem;
}

.header-btn-frame:hover .bulb-off {
    color: #f1c40f;
    text-shadow: 0 0 10px #f1c40f;
}

.rays {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 28px;
    height: 28px;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
}

@keyframes spin-rays {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.header-btn-frame:hover .rays {
    opacity: 1;
    animation: spin-rays 4s linear infinite;
}

.ray {
    position: absolute;
    background: #f1c40f;
    width: 2px;
    height: 3px;
    left: 13px;
    top: 0;
    transform-origin: 0 14px;
    border-radius: 2px;
}

.ray:nth-child(1) {
    transform: rotate(0deg) translateY(-10px);
}

.ray:nth-child(2) {
    transform: rotate(45deg) translateY(-10px);
}

.ray:nth-child(3) {
    transform: rotate(90deg) translateY(-10px);
}

.ray:nth-child(4) {
    transform: rotate(135deg) translateY(-10px);
}

.ray:nth-child(5) {
    transform: rotate(180deg) translateY(-10px);
}

.ray:nth-child(6) {
    transform: rotate(225deg) translateY(-10px);
}

.ray:nth-child(7) {
    transform: rotate(270deg) translateY(-10px);
}

.ray:nth-child(8) {
    transform: rotate(315deg) translateY(-10px);
}


/* 3. Cache: Clockwise Spin */
.recycle-trigger:hover i {
    color: #2ecc71;
    animation: spin-cw 1.5s linear infinite;
}


/* 4. Dashboard: Printer Animation */
.printer-v7 {
    width: 60px;
    height: 45px;
    margin: 0 auto;
    position: relative;
    background: #34495e;
    border-radius: 8px;
    box-shadow: 0 4px 0 #2c3e50;
    z-index: 5;
    transform: scale(1.4);
    transform-origin: center bottom;
    /* Scaled Up */
}

.paper-in {
    position: absolute;
    top: -10px;
    left: 10px;
    right: 10px;
    height: 15px;
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    border-radius: 2px 2px 0 0;
    background-image: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.05) 50%);
    background-size: 100% 4px;
    z-index: 1;
}

.printer-screen {
    position: absolute;
    top: 10px;
    left: 5px;
    right: 5px;
    height: 15px;
    background: #5dade2;
    border-radius: 0 0 10px 10px;
    opacity: 0.8;
}

.printer-dots {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.p-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.pd-1 {
    background: #e91e63;
}

.pd-2 {
    background: #f1c40f;
}

.pd-3 {
    background: #9b59b6;
}

.paper-out {
    position: absolute;
    top: 40px;
    left: 12px;
    right: 12px;
    width: 36px;
    height: 0;
    background: #fff;
    border: 1px solid #ccc;
    z-index: 0;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

@keyframes stutter-print {
    0% {
        height: 0;
    }

    20% {
        height: 10px;
    }

    40% {
        height: 20px;
    }

    60% {
        height: 30px;
    }

    80% {
        height: 40px;
    }

    100% {
        height: 45px;
    }
}

.glass-card:hover .paper-out {
    animation: stutter-print 1.5s steps(5) forwards;
}

.txt-line {
    height: 2px;
    background: #999;
    margin: 4px 2px;
    width: 80%;
}


/* 5. Dashboard: Products Showcase (Centered & Lower) */
.showcase-stage {
    width: 50px;
    height: 10px;
    background: #333;
    border-radius: 50%;
}

/* Keyframes removed - Cross-fade logic used instead */

.showcase-item {
    font-size: 2rem;
    position: absolute;
    top: -5px;
    /* Touching Stage */
    left: 0;
    width: 100%;
    text-align: center;
    margin: 0;
    transform: none;
    transition: 0.5s;
}

.glass-card:hover .showcase-item {
    animation: spin-showcase 2s infinite linear;
}

@keyframes spin-showcase {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

/* 6. Dashboard: Sync Orbit (ROBUST FIX) */
.sync-final-container {
    position: relative;
    width: 80px;
    height: 90px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sync-orbit-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
}

.planet {
    font-size: 1.5rem;
    color: var(--text-main);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Rotating Ring Container */
.sat-orbit {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    animation: spin-sat-final 3s linear infinite;
    z-index: 11;
}

/* Satellite: Positioned at Top Center of Ring */
.sat {
    position: absolute;
    top: -8px;
    /* Offset from ring edge */
    left: 50%;
    font-size: 0.8rem;
    color: #e74c3c;
    text-shadow: 0 0 5px #e74c3c;
    transform: translateX(-50%) rotate(45deg);
}

/* Force Animation Keyframes */
@keyframes spin-sat-final {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Loaders */
.glass-card:hover .sat-orbit {
    animation-duration: 1s;
}

/* Loader */
.loading-track {
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    margin-top: 5px;
}

.loading-fill {
    height: 100%;
    width: 0%;
    background: var(--success);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.loading-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: bold;
    text-align: center;
    min-height: 1rem;
}

.glass-card:hover .loading-fill {
    width: 100%;
    transition: width 2s ease-in-out;
}

/* Text Animation: 0% to 100% on Hover */
.loading-text::after {
    content: "100%";
}

.glass-card:hover .loading-text::after {
    animation: count-up 2s ease-in-out forwards;
}

@keyframes count-up {
    0% {
        content: "0%";
    }

    10% {
        content: "10%";
    }

    20% {
        content: "20%";
    }

    30% {
        content: "30%";
    }

    40% {
        content: "40%";
    }

    50% {
        content: "50%";
    }

    60% {
        content: "60%";
    }

    70% {
        content: "70%";
    }

    80% {
        content: "80%";
    }

    90% {
        content: "90%";
    }

    100% {
        content: "100%";
    }
}

/* 7. Stock Scanner (Framed Barcode - Larger & Thicker Beam) */
.scanner-gun-container {
    position: relative;
    width: 60px;
    height: 50px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(1.4);
    /* Scaled Up */
}

.barcode-frame {
    position: relative;
    width: 60px;
    height: 45px;
}

/* The Barcode Bars (CSS Gradient) */
.barcode-bars {
    width: 46px;
    height: 35px;
    position: absolute;
    top: 5px;
    left: 7px;
    background: repeating-linear-gradient(90deg,
            #2c3e50, #2c3e50 2px,
            transparent 2px, transparent 4px,
            #2c3e50 4px, #2c3e50 7px,
            transparent 7px, transparent 8px,
            #2c3e50 8px, #2c3e50 9px,
            transparent 9px, transparent 11px,
            #2c3e50 11px, #2c3e50 14px,
            transparent 14px, transparent 16px,
            #2c3e50 16px, #2c3e50 19px,
            transparent 19px, transparent 21px);
}

body.dark-mode .barcode-bars {
    filter: invert(1);
}

/* Corners */
.corner-tl {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-top: 2px solid #2c3e50;
    border-left: 2px solid #2c3e50;
}

.corner-tr {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-top: 2px solid #2c3e50;
    border-right: 2px solid #2c3e50;
}

.corner-bl {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-bottom: 2px solid #2c3e50;
    border-left: 2px solid #2c3e50;
}

.corner-br {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-bottom: 2px solid #2c3e50;
    border-right: 2px solid #2c3e50;
}

body.dark-mode .corner-tl,
body.dark-mode .corner-tr,
body.dark-mode .corner-bl,
body.dark-mode .corner-br {
    border-color: #fff;
}

/* The Beam (Thicker, Start Middle, Oscillate) */
.scanner-beam-horiz {
    position: absolute;
    top: 50%;
    left: 2px;
    right: 2px;
    height: 4px;
    /* Thicker */
    background: #e74c3c;
    box-shadow: 0 0 6px #e74c3c;
    opacity: 0.8;
    z-index: 10;
    transform: translateY(-50%);
}

.glass-card:hover .scanner-beam-horiz {
    animation: scan-middle-osc 2s infinite ease-in-out;
}

@keyframes scan-middle-osc {
    0% {
        top: 50%;
        opacity: 0.8;
    }

    25% {
        top: 10%;
        opacity: 1;
    }

    75% {
        top: 90%;
        opacity: 1;
    }

    100% {
        top: 50%;
        opacity: 0.8;
    }
}


/* HEADER Override for Light Mode */
body:not(.dark-mode) .app-header {
    border-bottom: 2px solid #000;
}

body:not(.dark-mode) .header-btn-frame {
    border-color: #000;
    color: #000;
}

body:not(.dark-mode) .header-btn-frame:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Theme Switch Always Dark */
.theme-switch .slider {
    background-color: #2c3e50 !important;
    border-color: #1a252f !important;
}

.theme-switch .slider:before {
    background-color: #fff !important;
}


/* Helpers */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}