:root {
    --primary: #0F2942;
    --primary-light: #1E3A8A;
    --primary-dark: #0A192F;
    --accent: #0284C7;
    --accent-hover: #0369A1;
    --success: #059669;
    --success-light: #ECFDF5;
    --success-border: #A7F3D0;
    --warning: #D97706;
    --warning-light: #FFFBEB;
    --danger: #DC2626;
    --danger-light: #FEF2F2;
    --bg-page: #F1F5F9;
    --bg-card: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 14px rgba(15, 41, 66, 0.08);
    --shadow-lg: 0 10px 25px rgba(15, 41, 66, 0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.4;
    overflow-x: hidden;
    padding-bottom: 24px;
}

/* Top App Bar */
.top-bar {
    background: linear-gradient(135deg, #0F2942 0%, #17375E 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #FFFFFF;
    padding: 2px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.brand-subtitle {
    font-size: 11px;
    color: #94A3B8;
    font-weight: 500;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #FFFFFF;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.icon-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

/* Branch Status Ribbon */
.branch-ribbon {
    background: #E2E8F0;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    border-bottom: 1px solid #CBD5E1;
}

.branch-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    display: inline-block;
    box-shadow: 0 0 6px rgba(5, 150, 105, 0.6);
}

.branch-label {
    color: var(--text-secondary);
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 6px;
}

/* Main Content */
.main-content {
    padding: 14px;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Bar Section */
.search-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px 6px 4px 12px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 8px;
}

#txtSearch {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-primary);
    background: transparent;
    user-select: text;
}

.btn-clear {
    background: #E2E8F0;
    border: none;
    color: #64748B;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    margin-right: 6px;
}

.btn-search-action {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-search-action:active {
    background: var(--primary-light);
}

/* Scan Button (Large Action) */
.btn-scan-main {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    padding: 13px 18px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}

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

/* State: Welcome Screen */
.state-container {
    margin-top: 10px;
}

.welcome-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.welcome-scanner-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.barcode-visual {
    background: #F8FAFC;
    border: 2px dashed #CBD5E1;
    border-radius: 12px;
    padding: 16px 24px;
    font-family: monospace;
    font-size: 24px;
    letter-spacing: 4px;
    color: var(--primary);
}

.welcome-card h3 {
    font-size: 19px;
    color: var(--primary);
    font-weight: 700;
}

.welcome-card p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 320px;
    line-height: 1.5;
}

.btn-primary-large {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(15, 41, 66, 0.2);
}

/* Product Card */
.product-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeIn 0.25s ease-out;
}

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

.product-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.product-image-box {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #F8FAFC;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-badge {
    background: #F1F5F9;
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: monospace;
    border: 1px solid #E2E8F0;
}

/* Tariff Selector Tabs */
.tariff-selector-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tariff-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: #F1F5F9;
    padding: 4px;
    border-radius: 12px;
}

.tariff-tab {
    background: transparent;
    border: none;
    border-radius: 9px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tariff-tab .tab-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.tariff-tab .tab-sub {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
}

.tariff-tab.active {
    background: #FFFFFF;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.tariff-tab.active .tab-title {
    color: var(--primary);
    font-weight: 700;
}

.tariff-tab.active .tab-sub {
    color: var(--success);
}

/* Price Highlight Card */
.price-hero-card {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border: 1.5px solid var(--success-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-hero-main {
    display: flex;
    flex-direction: column;
}

.price-hero-label {
    font-size: 11px;
    font-weight: 700;
    color: #065F46;
    letter-spacing: 0.5px;
}

.price-hero-amount {
    font-size: 32px;
    font-weight: 800;
    color: var(--success);
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin: 2px 0;
}

.price-neto-row {
    font-size: 13px;
    color: #047857;
}

.badge-saving {
    background: #059669;
    color: #FFFFFF;
    padding: 8px 12px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.badge-saving span {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.9;
}

.badge-saving strong {
    font-size: 14px;
    font-weight: 800;
}

/* Volume Discount Card */
.volume-card {
    background: #FFFBEB;
    border: 1.5px solid #FCD34D;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-icon {
    font-size: 26px;
}

.volume-content {
    flex: 1;
}

.volume-title {
    font-size: 13px;
    font-weight: 700;
    color: #92400E;
}

.volume-desc {
    font-size: 12px;
    color: #B45309;
}

.volume-price {
    font-size: 15px;
    font-weight: 800;
    color: #B45309;
    margin-top: 2px;
}

/* Stock Cards Grid */
.stock-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stock-card {
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stock-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.stock-qty-badge {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.stock-qty-badge.in-stock {
    color: var(--success);
}

.stock-qty-badge.out-stock {
    color: var(--danger);
}

/* Expandable Branches Accordion */
.branches-accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.accordion-toggle {
    width: 100%;
    background: #F8FAFC;
    border: none;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.chevron-icon {
    transition: transform 0.2s ease;
}

.accordion-toggle.expanded .chevron-icon {
    transform: rotate(180deg);
}

.branches-table-box {
    background: #FFFFFF;
    border-top: 1px solid var(--border);
    padding: 4px 12px;
}

.branch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid #F1F5F9;
}

.branch-row:last-child {
    border-bottom: none;
}

.branch-row.active-row {
    font-weight: 700;
    color: var(--accent);
}

.branch-row.central-row {
    color: #475569;
    font-style: italic;
}

.stock-num {
    font-weight: 700;
    color: var(--text-primary);
}

/* Action button inside product card */
.btn-primary-block {
    width: 100%;
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary-block:active {
    background: var(--primary-light);
}

/* History Section */
.history-section {
    margin-top: 18px;
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-sm);
}

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

.history-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-text-danger {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.history-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F8FAFC;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    cursor: pointer;
    transition: background 0.15s;
}

.history-item:active {
    background: #E2E8F0;
}

.history-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #FFFFFF;
    object-fit: contain;
    border: 1px solid #CBD5E1;
    flex-shrink: 0;
}

.history-info {
    flex: 1;
    overflow: hidden;
}

.history-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-sub {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.history-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--success);
    margin-left: 6px;
    flex-shrink: 0;
}

.history-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 16px;
}

/* Fullscreen Scanner Modal */
.scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.scanner-header {
    background: rgba(0, 0, 0, 0.7);
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.scanner-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFFFFF;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #EF4444;
    border-radius: 50%;
    animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.scanner-title {
    font-size: 15px;
    font-weight: 700;
}

.scanner-header-controls {
    display: flex;
    gap: 10px;
}

.scanner-icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #FFFFFF;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.scanner-icon-btn.zoom-btn {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.scanner-icon-btn.zoom-btn.active {
    background: #2563EB;
    color: #FFFFFF;
    border-color: #60A5FA;
}

.scanner-viewport-wrapper.zoomed-2x video {
    transform: scale(2.0);
    transform-origin: center center;
    transition: transform 0.2s ease-out;
}

.scanner-viewport-wrapper video {
    transition: transform 0.2s ease-out;
}

.scanner-icon-btn.active {
    background: #F59E0B;
    color: #000000;
}

.scanner-icon-btn.btn-close {
    font-size: 24px;
}

.scanner-viewport-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#scannerVideo,
.scanner-viewport-wrapper video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
    z-index: 1;
}

.scanner-viewport-wrapper canvas.drawingBuffer {
    display: none !important;
}

/* Scanner Reticle */
.scanner-reticle {
    position: relative;
    width: 270px;
    height: 180px;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.55);
    border-radius: 12px;
    z-index: 5;
    pointer-events: none;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.scanner-reticle.success {
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.7), 0 0 30px #10B981 !important;
    transform: scale(1.03);
}

.scanner-reticle.success .reticle-corner {
    border-color: #34D399 !important;
}

.reticle-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: #10B981;
    border-style: solid;
    pointer-events: none;
}

.top-left {
    top: -2px;
    left: -2px;
    border-width: 4px 0 0 4px;
    border-top-left-radius: 8px;
}

.top-right {
    top: -2px;
    right: -2px;
    border-width: 4px 4px 0 0;
    border-top-right-radius: 8px;
}

.bottom-left {
    bottom: -2px;
    left: -2px;
    border-width: 0 0 4px 4px;
    border-bottom-left-radius: 8px;
}

.bottom-right {
    bottom: -2px;
    right: -2px;
    border-width: 0 4px 4px 0;
    border-bottom-right-radius: 8px;
}

/* Laser animation */
.scan-laser-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #10B981 50%, transparent);
    box-shadow: 0 0 8px #10B981;
    animation: scanAnim 2s infinite ease-in-out;
}

@keyframes scanAnim {
    0% { top: 4%; }
    50% { top: 96%; }
    100% { top: 4%; }
}

.scanner-hint {
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
    text-align: center;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.65);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 6;
}

.scanner-footer {
    background: rgba(0, 0, 0, 0.75);
    padding: 14px 20px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    display: flex;
    justify-content: center;
    z-index: 10;
}

/* Toggle Control */
.toggle-control {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
}

.toggle-control input {
    display: none;
}

.toggle-slider {
    width: 38px;
    height: 22px;
    background: #475569;
    border-radius: 20px;
    position: relative;
    transition: background 0.2s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #FFFFFF;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
}

.toggle-control input:checked + .toggle-slider {
    background: #10B981;
}

.toggle-control input:checked + .toggle-slider::after {
    transform: translateX(16px);
}

/* Modals */
.app-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-dialog {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-dialog.bottom-sheet {
    align-self: flex-end;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: -16px;
    width: 100%;
}

.modal-header {
    padding: 14px 18px;
    background: #F8FAFC;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-search-sub {
    padding: 8px 18px;
    background: #F1F5F9;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.modal-scroll-list {
    padding: 12px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 60vh;
}

.match-item {
    padding: 10px 12px;
    background: #F8FAFC;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s;
}

.match-item:active {
    background: #E2E8F0;
}

.match-info {
    flex: 1;
}

.match-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.match-tags {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.match-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--success);
    margin-left: 10px;
}

/* Bodega Options List */
.bodega-list-options {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bodega-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.bodega-option small {
    color: var(--text-muted);
}

.bodega-option.active {
    background: #EFF6FF;
    border-color: #93C5FD;
    color: var(--primary);
}

/* Modal Form */
.modal-form {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    user-select: text;
}

.form-input:focus {
    border-color: var(--accent);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-box {
    background: #FFFFFF;
    padding: 20px 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.app-spinner {
    width: 38px;
    height: 38px;
    border: 3.5px solid #E2E8F0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

#loadingText {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

/* Toast Notification */
.toast-box {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1E293B;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    z-index: 150;
    transition: transform 0.25s ease-out;
    pointer-events: none;
    white-space: nowrap;
}

.toast-box.show {
    transform: translateX(-50%) translateY(0);
}
