/* ==========================================================================
   EmirERP Depo Yönetimi & Sayım Modülü Stilleri
   Mobil-first, dokunmatik-optimized, depo çalışanı odaklı tasarım
   ========================================================================== */

/* === GENEL KONTEYNER === */
.wh-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-card, #ffffff);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

/* === ÜST BAR (Oturum Bilgisi + Kontroller) === */
.wh-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.wh-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.wh-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wh-session-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.18);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.wh-shelf-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.25);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

/* === TOGGLE SWITCH (Otomatik Geçiş Modu) === */
.wh-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
}

.wh-toggle-wrapper label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
}

.wh-toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

.wh-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wh-toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 24px;
    transition: 0.3s;
    cursor: pointer;
}

.wh-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.wh-toggle input:checked + .wh-toggle-slider {
    background: #22c55e;
}

.wh-toggle input:checked + .wh-toggle-slider::before {
    transform: translateX(20px);
}

/* === ANA İÇERİK (İKİ SÜTUN) === */
.wh-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Barkod Tarama Paneli (Sol) */
.wh-scan-panel {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-card, #fff);
    overflow-y: auto;
}

.wh-scan-inner {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Havuz Paneli (Sağ) */
.wh-pool-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8fafc;
}

.wh-pool-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-card, #fff);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    flex-shrink: 0;
}

.wh-pool-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wh-pool-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* === BARKOD GİRİŞ ALANI + ARAMA === */
.wh-input-area {
    position: relative;
}

.wh-barcode-input-wrapper {
    display: flex;
    align-items: stretch;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card, #fff);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wh-barcode-input-wrapper:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.wh-barcode-input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary, #1e293b);
}

.wh-barcode-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.wh-input-btn {
    width: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-left: 1px solid var(--border-color, #e2e8f0);
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.15s;
}

.wh-input-btn:hover {
    background: #6366f1;
    color: #fff;
}

.wh-input-btn.active {
    background: #6366f1;
    color: #fff;
}

/* === ALAN SEÇİCİ DROPDOWN === */
.wh-fields-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    margin-top: 6px;
    overflow: hidden;
}

.wh-fields-dropdown.show {
    display: block;
    animation: whDropSlide 0.2s ease;
}

@keyframes whDropSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wh-fields-header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.wh-fields-header span {
    font-size: 10px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wh-fields-header button {
    font-size: 10px;
    color: #6366f1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.wh-fields-header button:hover {
    background: #e0e7ff;
}

.wh-fields-list {
    padding: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.wh-field-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: background 0.1s;
}

.wh-field-item:hover {
    background: #f1f5f9;
}

.wh-field-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #6366f1;
    cursor: pointer;
}

.wh-fields-footer {
    padding: 6px 12px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    background: #f8fafc;
}

.wh-fields-count {
    font-size: 10px;
    color: #64748b;
}

/* === ARAMA SONUÇLARI DROPDOWN === */
.wh-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 999;
    margin-top: 4px;
    max-height: 320px;
    overflow-y: auto;
}

.wh-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid #f1f5f9;
}

.wh-search-item:last-child { border-bottom: none; }

.wh-search-item:hover {
    background: #f1f5f9;
}

.wh-search-item:active {
    background: #e0e7ff;
}

.wh-search-item-left {
    flex: 1;
    min-width: 0;
}

.wh-search-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wh-search-item-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wh-search-item-qty {
    flex-shrink: 0;
    margin-left: 10px;
}

/* === KAMERA WRAPPER === */
.wh-camera-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* === KAMERA ALANI === */
.wh-camera-section {
    border: 2px dashed var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    position: relative;
    aspect-ratio: 4 / 3;
}

.wh-camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    color: #94a3b8;
    text-align: center;
    position: absolute;
    inset: 0;
    background: #1a1a2e;
}

.wh-camera-placeholder i {
    font-size: 32px;
    color: #64748b;
}

.wh-camera-placeholder p {
    font-size: 12px;
    margin: 0;
    color: #64748b;
}

#wh-camera-reader {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    inset: 0;
    overflow: hidden !important;
}

#wh-camera-reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

#wh-camera-reader > div {
    overflow: hidden !important;
    width: 100% !important;
    height: 100% !important;
}

/* Tarama çerçevesinin merkezde kalmasını garanti et */
#wh-camera-reader canvas {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* === BÜYÜK BUTONLAR (Kalın parmak dostu) === */
.wh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
    touch-action: manipulation;
    user-select: none;
}

.wh-btn:active {
    transform: scale(0.97);
}

.wh-btn-primary {
    background: #4f46e5;
    color: #fff;
}

.wh-btn-primary:hover {
    background: #4338ca;
}

.wh-btn-success {
    background: #16a34a;
    color: #fff;
}

.wh-btn-success:hover {
    background: #15803d;
}

.wh-btn-danger {
    background: #dc2626;
    color: #fff;
}

.wh-btn-danger:hover {
    background: #b91c1c;
}

.wh-btn-warning {
    background: #f59e0b;
    color: #fff;
}

.wh-btn-warning:hover {
    background: #d97706;
}

.wh-btn-ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid var(--border-color, #e2e8f0);
}

.wh-btn-ghost:hover {
    background: #f1f5f9;
    color: #475569;
}

.wh-btn-block {
    width: 100%;
}

.wh-btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    min-height: 36px;
}

.wh-btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* === HAVUZ LİSTE SATIRLARI === */
.wh-pool-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card, #fff);
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    transition: all 0.2s;
}

.wh-pool-item:hover {
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99,102,241,0.08);
}

.wh-pool-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.wh-pool-item-body {
    flex: 1;
    min-width: 0;
}

.wh-pool-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wh-pool-item-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    align-items: center;
}

.wh-pool-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.wh-pool-meta-item i {
    font-size: 9px;
    opacity: 0.6;
}

.wh-pool-item-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.wh-pool-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.wh-pool-item-actions button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-size: 13px;
    background: #f1f5f9;
    color: #64748b;
}

.wh-pool-item-actions button:hover {
    background: #e2e8f0;
    color: #334155;
}

.wh-pool-item-actions button.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Sayılmamış ürün (quantity_scanned = 0) */
.wh-pool-uncounted {
    opacity: 0.5;
    border-style: dashed;
}

.wh-pool-uncounted .wh-pool-item-icon {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

/* === BADGE'LER === */
.wh-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.wh-badge-green {
    background: #dcfce7;
    color: #16a34a;
}

.wh-badge-red {
    background: #fee2e2;
    color: #dc2626;
}

.wh-badge-blue {
    background: #dbeafe;
    color: #2563eb;
}

.wh-badge-orange {
    background: #ffedd5;
    color: #ea580c;
}

.wh-badge-gray {
    background: #f1f5f9;
    color: #64748b;
}

.wh-badge-amber {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* === RAF DAĞITIM MODAL === */
.wh-assign-modal {
    background: var(--bg-card, #fff);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-height: 80vh;
    overflow-y: auto;
}

.wh-assign-header {
    margin-bottom: 16px;
}

.wh-assign-header h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

.wh-assign-header .sub {
    font-size: 12px;
    color: #64748b;
}

.wh-assign-info {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.wh-assign-info .wh-stat-card {
    flex: 1;
    min-width: 80px;
}

.wh-assign-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.wh-assign-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.wh-assign-row select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #1e293b);
    min-width: 0;
}

.wh-assign-row input[type="number"] {
    width: 80px;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #1e293b);
}

.wh-assign-row .wh-row-delete {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #fee2e2;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: all 0.15s;
}

.wh-assign-row .wh-row-delete:hover {
    background: #dc2626;
    color: #fff;
}

.wh-assign-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f1f5f9;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

.wh-assign-total .total-ok {
    color: #16a34a;
}

.wh-assign-total .total-warn {
    color: #f59e0b;
}

/* Havuz: raf etiketleri (RELOCATE_ASSIGN modu) */
.wh-shelf-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.wh-shelf-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.wh-shelf-tag i {
    font-size: 9px;
}

/* RELOCATE setup: alt-mod butonları */
.wh-subtype-selector {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 500px;
}

.wh-subtype-btn {
    flex: 1;
    padding: 18px 14px;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    background: var(--bg-card, #fff);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.wh-subtype-btn:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}

.wh-subtype-btn.active {
    border-color: #6366f1;
    background: #eef2ff;
}

.wh-subtype-btn i {
    font-size: 28px;
    color: #6366f1;
    display: block;
    margin-bottom: 8px;
}

.wh-subtype-btn .wh-subtype-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    display: block;
    margin-bottom: 4px;
}

.wh-subtype-btn .wh-subtype-desc {
    font-size: 11px;
    color: #64748b;
    display: block;
}

/* === RAF AUTOCOMPLETE BİLEŞENİ === */
.wh-shelf-ac {
    position: relative;
    width: 100%;
}

.wh-shelf-ac-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    outline: none;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #1e293b);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wh-shelf-ac-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.wh-shelf-ac-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    font-size: 13px;
}

.wh-shelf-ac-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1100;
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
}

.wh-shelf-ac-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary, #1e293b);
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.wh-shelf-ac-item:last-child {
    border-bottom: none;
}

.wh-shelf-ac-item:hover {
    background: #f1f5f9;
}

.wh-shelf-ac-item:active {
    background: #e0e7ff;
}

.wh-shelf-ac-item strong {
    color: #6366f1;
}

.wh-shelf-ac-empty {
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

/* Assign row içindeki autocomplete küçültme */
.wh-assign-row .wh-shelf-ac-input {
    padding: 10px 12px;
    font-size: 14px;
    border-width: 1px;
    border-radius: 8px;
}

/* Dark mode */
body.dark-mode .wh-shelf-ac-input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .wh-shelf-ac-list {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .wh-shelf-ac-item {
    color: #e2e8f0;
    border-color: #334155;
}

body.dark-mode .wh-shelf-ac-item:hover {
    background: #334155;
}

/* Dark mode eklentileri */
body.dark-mode .wh-assign-modal {
    background: #1e293b;
}

body.dark-mode .wh-assign-row {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .wh-assign-row select,
body.dark-mode .wh-assign-row input {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .wh-assign-total {
    background: #0f172a;
}

body.dark-mode .wh-subtype-btn {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .wh-subtype-btn:hover {
    background: #1e1b4b;
    border-color: #6366f1;
}

/* === SAYIM FARK GÖSTERGESİ === */
.wh-diff-positive {
    color: #16a34a;
    font-weight: 700;
}

.wh-diff-negative {
    color: #dc2626;
    font-weight: 700;
}

.wh-diff-zero {
    color: #64748b;
    font-weight: 600;
}

/* === RAF SEÇİM EKRANI === */
.wh-setup-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
    gap: 24px;
}

.wh-setup-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
}

.wh-setup-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

.wh-setup-subtitle {
    font-size: 14px;
    color: #64748b;
    max-width: 400px;
}

.wh-shelf-select {
    width: 100%;
    max-width: 400px;
    padding: 16px 18px;
    font-size: 16px;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    outline: none;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #1e293b);
    cursor: pointer;
}

.wh-shelf-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.wh-type-selector {
    display: flex;
    gap: 12px;
}

.wh-type-btn {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    background: var(--bg-card, #fff);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.wh-type-btn:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}

.wh-type-btn.active {
    border-color: #6366f1;
    background: #eef2ff;
}

.wh-type-btn i {
    font-size: 28px;
    color: #6366f1;
    margin-bottom: 8px;
    display: block;
}

.wh-type-btn span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

/* === MİKTAR GİRİŞ MODAL === */
.wh-qty-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.wh-qty-modal {
    background: var(--bg-card, #fff);
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.wh-qty-modal h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

.wh-qty-modal .sub {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 20px;
}

.wh-qty-input {
    width: 100%;
    padding: 16px;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    outline: none;
    margin-bottom: 18px;
    color: var(--text-primary, #1e293b);
    background: var(--bg-card, #fff);
}

.wh-qty-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* === İSTATİSTİK KARTLARI === */
.wh-stats-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wh-stat-card {
    flex: 1;
    min-width: 100px;
    padding: 12px;
    background: var(--bg-card, #fff);
    border-radius: 10px;
    border: 1px solid var(--border-color, #e2e8f0);
    text-align: center;
}

.wh-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary, #1e293b);
}

.wh-stat-label {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === BOŞ DURUM === */
.wh-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #94a3b8;
    text-align: center;
    gap: 12px;
}

.wh-empty i {
    font-size: 48px;
}

.wh-empty p {
    font-size: 14px;
    margin: 0;
}

/* === ALT BAR (Onay Butonları) === */
.wh-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card, #fff);
    border-top: 1px solid var(--border-color, #e2e8f0);
    flex-shrink: 0;
}

/* === TOAST BİLDİRİMLERİ === */
.wh-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 22px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    z-index: 10001;
    animation: whSlideIn 0.3s ease-out;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-width: 360px;
}

.wh-toast-success { background: #16a34a; }
.wh-toast-error { background: #dc2626; }
.wh-toast-warning { background: #f59e0b; }

@keyframes whSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* === İŞLEM LOG TABLOSU === */
.wh-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.wh-log-table th {
    padding: 10px 12px;
    text-align: left;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.wh-log-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary, #1e293b);
}

.wh-log-table tr:hover td {
    background: #f8fafc;
}

.wh-log-reversed {
    opacity: 0.5;
    text-decoration: line-through;
}

/* ===========================================================================
   MOBİL RESPONSIVE — Tam mobil-first yeniden tasarım
   =========================================================================== */
@media (max-width: 768px) {

    /* Container: tam ekran, fixed bottom-bar için padding */
    .wh-container {
        position: relative;
        padding-bottom: 64px;
    }

    /* Topbar: kompakt tek satır */
    .wh-topbar {
        padding: 8px 10px;
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .wh-topbar-left {
        gap: 6px;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    .wh-topbar-right {
        flex-shrink: 0;
    }

    .wh-session-badge {
        padding: 4px 8px;
        font-size: 11px;
        white-space: nowrap;
    }

    .wh-shelf-badge {
        padding: 4px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .wh-toggle-wrapper {
        padding: 4px 8px;
    }

    .wh-toggle-wrapper label {
        font-size: 11px;
    }

    /* Main: tek sütun */
    .wh-main {
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Scan panel: border yok, kompakt */
    .wh-scan-panel {
        flex: none;
        border-right: none;
        overflow: visible;
    }

    .wh-scan-inner {
        padding: 10px;
        gap: 10px;
    }

    /* Barcode input */
    .wh-barcode-input {
        font-size: 16px;
        padding: 12px 14px;
    }

    .wh-input-btn {
        width: 40px;
        font-size: 14px;
    }

    /* Kamera */
    .wh-camera-section {
        border-radius: 10px;
    }

    /* Arama sonuçları */
    .wh-search-results {
        max-height: 250px;
    }

    .wh-search-item {
        padding: 10px 12px;
    }

    .wh-search-item-name {
        font-size: 12px;
    }

    .wh-fields-dropdown {
        width: 200px;
    }

    /* İstatistik kartları: küçült */
    .wh-stats-row {
        gap: 6px;
    }

    .wh-stat-card {
        padding: 8px;
        border-radius: 8px;
    }

    .wh-stat-value {
        font-size: 18px;
    }

    .wh-stat-label {
        font-size: 10px;
    }

    /* Kamera butonu */
    .wh-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
        border-radius: 10px;
    }

    /* Havuz paneli */
    .wh-pool-panel {
        border-top: 1px solid var(--border-color, #e2e8f0);
    }

    .wh-pool-header {
        padding: 10px 12px;
    }

    .wh-pool-header h3 {
        font-size: 13px;
    }

    .wh-pool-body {
        padding: 8px;
    }

    .wh-pool-item {
        padding: 10px;
        gap: 10px;
        border-radius: 8px;
        margin-bottom: 6px;
    }

    .wh-pool-item-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: 12px;
    }

    .wh-pool-item-title {
        font-size: 12px;
    }

    .wh-pool-item-sub {
        font-size: 10px;
    }

    .wh-badge {
        padding: 2px 6px;
        font-size: 11px;
    }

    .wh-pool-item-actions button {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .wh-empty {
        padding: 30px 16px;
    }

    .wh-empty i {
        font-size: 32px;
    }

    .wh-empty p {
        font-size: 12px;
    }

    /* Alt bar: ekranın altına sabitlenmiş */
    .wh-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 900;
        padding: 8px 10px;
        gap: 8px;
        background: var(--bg-card, #fff);
        border-top: 1px solid var(--border-color, #e2e8f0);
        box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    }

    .wh-bottom-bar .wh-btn {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 42px;
    }

    .wh-btn-row {
        gap: 6px;
    }

    /* Setup ekranı: kompakt */
    .wh-setup-screen {
        padding: 20px 16px;
        gap: 18px;
    }

    .wh-setup-icon {
        width: 60px;
        height: 60px;
        border-radius: 16px;
        font-size: 28px;
    }

    .wh-setup-title {
        font-size: 18px;
    }

    .wh-setup-subtitle {
        font-size: 13px;
    }

    .wh-shelf-select {
        padding: 14px 16px;
        font-size: 16px;
    }

    .wh-type-btn {
        padding: 14px 10px;
    }

    .wh-type-btn i {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .wh-type-btn span {
        font-size: 13px;
    }

    /* Miktar modal: mobil uyumlu */
    .wh-qty-modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .wh-qty-modal {
        padding: 20px;
        border-radius: 16px 16px 0 0;
        max-width: 100%;
    }

    .wh-qty-input {
        font-size: 24px;
        padding: 14px;
    }

    /* Toast */
    .wh-toast {
        top: auto;
        bottom: 72px;
        left: 12px;
        right: 12px;
        max-width: none;
        text-align: center;
        font-size: 13px;
        padding: 12px 16px;
    }

    /* Log tablosu: küçük font */
    .wh-log-table th,
    .wh-log-table td {
        padding: 6px 8px;
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .wh-topbar {
        padding: 6px 8px;
    }

    .wh-session-badge {
        font-size: 10px;
        padding: 3px 6px;
    }

    .wh-shelf-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    .wh-scan-inner {
        padding: 8px;
        gap: 8px;
    }

    .wh-setup-screen {
        padding: 16px 12px;
    }

    .wh-type-selector {
        flex-direction: column;
    }
}

/* === DARK MODE UYUMU === */
body.dark-mode .wh-container {
    background: var(--bg-card, #1e293b);
}

body.dark-mode .wh-scan-panel {
    background: var(--bg-card, #1e293b);
}

body.dark-mode .wh-pool-panel {
    background: #0f172a;
}

body.dark-mode .wh-pool-header {
    background: var(--bg-card, #1e293b);
}

body.dark-mode .wh-pool-item {
    background: var(--bg-card, #1e293b);
    border-color: #334155;
}

body.dark-mode .wh-pool-item:hover {
    border-color: #6366f1;
}

body.dark-mode .wh-barcode-input-wrapper {
    border-color: #334155;
    background: #0f172a;
}

body.dark-mode .wh-barcode-input {
    color: #f1f5f9;
}

body.dark-mode .wh-input-btn {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .wh-camera-section {
    background: #000;
    border-color: #334155;
}

body.dark-mode .wh-fields-dropdown {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .wh-fields-header {
    background: #0f172a;
}

body.dark-mode .wh-field-item {
    color: #e2e8f0;
}

body.dark-mode .wh-field-item:hover {
    background: #334155;
}

body.dark-mode .wh-fields-footer {
    background: #0f172a;
}

body.dark-mode .wh-search-results {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .wh-search-item {
    border-color: #334155;
}

body.dark-mode .wh-search-item:hover {
    background: #334155;
}

body.dark-mode .wh-search-item-name {
    color: #f1f5f9;
}

body.dark-mode .wh-stat-card {
    background: var(--bg-card, #1e293b);
    border-color: #334155;
}

body.dark-mode .wh-qty-modal {
    background: #1e293b;
}

body.dark-mode .wh-qty-input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .wh-shelf-select {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .wh-log-table th {
    background: #0f172a;
    color: #94a3b8;
}

body.dark-mode .wh-log-table td {
    border-color: #1e293b;
}

@media (max-width: 768px) {
    body.dark-mode .wh-bottom-bar {
        background: #1e293b;
        border-color: #334155;
    }
}
