* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-main: #0a0e17;
    --bg-card: rgba(18, 26, 43, 0.85);
    --bg-card-solid: #111927;
    --bg-input: #1a2336;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(59, 130, 246, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;
    --accent-cyan: #06b6d4;
    --font-stack: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    touch-action: manipulation;
}

.ambient-glow {
    position: fixed;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.05) 50%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Mobile Header */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.15rem;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-badge {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.brand-text h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-pro {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
}

.header-loc {
    font-size: 0.75rem;
    color: #60a5fa;
    font-weight: 500;
}

.header-cam-btn {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.header-cam-btn:active {
    transform: scale(0.95);
}

.mobile-main {
    flex: 1;
    padding: 1.25rem 1.15rem 5.5rem 1.15rem;
}

.tab-view {
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.tab-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Search Bar */
.search-hero {
    margin-bottom: 1.5rem;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0.45rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.input-container {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
}

.main-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    padding: 0.65rem 0.85rem;
}

.clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 0.5rem;
}

.quick-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.tag-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
}

.tag-btn:active {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

/* Product Card */
.product-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-indigo));
}

.card-hero-artikel {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(99, 102, 241, 0.06));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.artikel-lbl {
    font-size: 0.75rem;
    font-weight: 600;
    color: #93c5fd;
    text-transform: uppercase;
}

.artikel-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.copy-mini-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.detail-table {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.d-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.d-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

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

.d-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    text-align: right;
    max-width: 65%;
}

.price-text {
    color: var(--accent-emerald);
    font-size: 1.15rem;
}

.stock-tag {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* ==================== BASKET GROUPS & SUCCESS STYLES ==================== */
.baskets-hero-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.hero-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.hero-card-left h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.25rem;
}

.hero-card-left p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.sales-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.banner-icon {
    font-size: 1.5rem;
}

.banner-text span {
    display: block;
    font-size: 0.85rem;
    color: #f8fafc;
}

.banner-text .sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.1rem;
}

.baskets-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.basket-group-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.basket-group-card:active {
    transform: scale(0.98);
    border-color: var(--accent-blue);
}

.bg-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.bg-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.bg-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.bg-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.bg-metric-item .lbl {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.bg-metric-item .val {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin-top: 0.15rem;
}

.bg-metric-item .val.green {
    color: var(--accent-emerald);
}

/* Single Basket Active Detail */
.detail-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.basket-active-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.basket-active-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #f59e0b, #10b981);
}

.badge-basket {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    letter-spacing: 0.04em;
    display: inline-block;
    margin-bottom: 0.35rem;
}

.b-active-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.b-active-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
}

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

.basket-scoreboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 0.85rem;
    text-align: center;
}

.score-box .lbl {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.score-box .val {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-top: 0.2rem;
}

.score-box .val.highlight {
    color: var(--accent-emerald);
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.25rem 0 0.75rem 0;
}

.section-title-row h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.section-title-row .hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Success Tag on Basket Items */
.performance-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    margin-top: 0.35rem;
}

.item-sales-stat {
    font-size: 0.85rem;
    color: #f8fafc;
    font-weight: 700;
    margin-top: 0.2rem;
}

.item-sales-stat .ciro {
    color: var(--accent-emerald);
}

/* Standard Buttons & Rows */
.action-buttons-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.flex-1 { flex: 1; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1.15rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #cbd5e1;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-danger-icon {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #fb7185;
    padding: 0.6rem;
    border-radius: 10px;
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

.btn:active {
    transform: scale(0.97);
}

/* Item List Container */
.item-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scanned-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.scanned-item-info {
    flex: 1;
}

.scanned-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.2rem;
}

.scanned-item-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.scanned-item-qty {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.qty-val {
    font-size: 1.1rem;
    font-weight: 800;
    min-width: 28px;
    text-align: center;
    color: #fff;
}

/* Inventory Differences Indicator */
.diff-pill {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
    margin-top: 0.35rem;
}

.diff-pill.exact { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.diff-pill.surplus { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.diff-pill.missing { background: rgba(244, 63, 94, 0.2); color: #fb7185; }

/* Location Card Details */
.location-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.15rem;
    margin-bottom: 1rem;
}

.loc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.current-loc-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #60a5fa;
}

.depo-selector-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.depo-selector-row label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.custom-select {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}

.inv-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.inv-summary-bar .highlight {
    color: #f59e0b;
}

/* Settings & Upload */
.settings-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
}

.settings-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.settings-card .subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.stat-boxes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-mini-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem;
}

.stat-mini-box .num {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: #60a5fa;
}

.stat-mini-box .lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.upload-section h4 {
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.85rem;
}

.upload-box {
    background: var(--bg-input);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 0.85rem;
    margin-bottom: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.upload-label .title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.upload-label .hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.upload-label input {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.upload-status-msg {
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0.25rem env(safe-area-inset-bottom, 0.5rem) 0.25rem;
    z-index: 99;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    flex: 1;
    padding: 0.35rem 0;
    transition: all 0.2s;
}

.nav-btn.active {
    color: #60a5fa;
}

.nav-btn.active svg {
    color: #60a5fa;
    transform: scale(1.08);
}

.nav-icon-wrapper {
    position: relative;
    display: inline-block;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--accent-rose);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.35rem;
    border-radius: 9999px;
}

/* Camera Modal */
.camera-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.camera-wrapper {
    background: #000;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(10, 14, 23, 0.85);
    z-index: 10;
}

.camera-mode-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #fff;
}

.camera-ctrls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.zoom-pill {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    display: flex;
    padding: 2px;
}

.zoom-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    cursor: pointer;
}

.zoom-btn.active {
    background: #3b82f6;
    color: #fff;
}

.cam-icon-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cam-icon-btn.active {
    background: var(--accent-amber);
    color: #000;
}

.video-container {
    position: relative;
    flex: 1;
    width: 100%;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.scanner-frame {
    position: absolute;
    width: 78%;
    height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.scanner-frame .corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: #34d399;
    border-style: solid;
}

.corner.top-left { top: -2px; left: -2px; border-width: 4px 0 0 4px; border-top-left-radius: 12px; }
.corner.top-right { top: -2px; right: -2px; border-width: 4px 4px 0 0; border-top-right-radius: 12px; }
.corner.bottom-left { bottom: -2px; left: -2px; border-width: 0 0 4px 4px; border-bottom-left-radius: 12px; }
.corner.bottom-right { bottom: -2px; right: -2px; border-width: 0 4px 4px 0; border-bottom-right-radius: 12px; }

.laser-beam {
    position: absolute;
    top: 10%;
    left: 4%;
    right: 4%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f43f5e, #fb7185, #f43f5e, transparent);
    box-shadow: 0 0 12px 2px rgba(244, 63, 94, 0.85);
    animation: scanAnim 2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

@keyframes scanAnim {
    0% { top: 12%; }
    100% { top: 88%; }
}

.scanner-tip {
    position: absolute;
    bottom: 24px;
    background: rgba(0, 0, 0, 0.7);
    color: #cbd5e1;
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    pointer-events: none;
}

.scan-popup {
    position: absolute;
    top: 24px;
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    animation: slideDown 0.3s ease;
    text-align: center;
}

.scan-popup .popup-title {
    font-size: 1.1rem;
    font-weight: 800;
}

.scan-popup .popup-desc {
    font-size: 0.85rem;
    font-weight: 500;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Telegram OTP Modal */
.auth-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 14, 23, 0.96);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-box {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8);
}

.auth-icon {
    width: 60px;
    height: 60px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 18px;
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem auto;
}

.auth-box h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.otp-digit {
    width: 54px;
    height: 62px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    outline: none;
    font-family: inherit;
    transition: all 0.2s;
}

.otp-digit:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.auth-error {
    color: #fb7185;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    padding: 1.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
}

.new-loc-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.input-with-btn {
    display: flex;
    gap: 0.5rem;
}

.input-with-btn input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-family: inherit;
    outline: none;
}

.existing-locs-list h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.locs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.loc-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #cbd5e1;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.loc-chip.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-emerald);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px var(--accent-emerald);
}

/* Canlı Sayım Stok Protokolü Styling */
.protocol-upload-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.06));
    border: 1px dashed rgba(96, 165, 250, 0.35);
    border-radius: 14px;
    padding: 0.9rem;
    margin-top: 0.85rem;
    position: relative;
    overflow: hidden;
}

.protocol-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.protocol-title h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-top: 0.2rem;
}

.protocol-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.protocol-order {
    font-size: 0.72rem;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.protocol-order b {
    color: #38bdf8;
}

.protocol-body {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.file-input-compact {
    flex: 1;
    font-size: 0.78rem;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.5);
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.protocol-status-text {
    margin-top: 0.55rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.highlight-protocol {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(99, 102, 241, 0.08)) !important;
    border: 1px solid rgba(96, 165, 250, 0.4) !important;
}

