/*
 * NewStock PRO — System UI CSS
 * Misma estética que la landing: bg profundo, accent azul-índigo,
 * bordes sutiles, tipografía Inter + JetBrains Mono.
 * No se modificó el HTML ni el JS.
 */

/* ════════════════════════════════════════════════
   TOKENS
════════════════════════════════════════════════ */
:root {
    /* Surfaces – misma escala que landing.css */
    --bg-main:    #080b14;
    --bg-surface: #0d1220;
    --bg-card:    rgba(17, 24, 39, 0.85);
    --bg-input:   #0d1525;

    /* Borders */
    --border-subtle:   rgba(255, 255, 255, 0.06);
    --border-standard: rgba(255, 255, 255, 0.10);
    --border-emphasis: rgba(255, 255, 255, 0.18);

    /* Brand – azul-índigo (mismo que landing) */
    --accent:      #3b82f6;
    --accent-2:    #6366f1;
    --accent-glow: rgba(59, 130, 246, 0.18);
    --accent-light: #60a5fa;

    /* Semantic */
    --success: #22c55e;
    --danger:  #f87171;
    --warning: #fbbf24;

    /* Text hierarchy */
    --text-primary:   #f0f4ff;
    --text-secondary: #94a3b8;
    --text-tertiary:  #64748b;
    --text-muted:     #374151;

    /* Glass */
    --glass:        rgba(13, 18, 32, 0.75);
    --glass-border: rgba(255, 255, 255, 0.06);

    /* Radius */
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm:  6px;

    /* Shadows */
    --shadow-sm:       0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md:       0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg:       0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-terminal: 0 0 40px rgba(0, 0, 0, 0.7);

    /* Easing */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ════════════════════════════════════════════════
   RESET
════════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    display: flex;
    font-size: 14px;
    line-height: 1.5;
}

/* ════════════════════════════════════════════════
   SCROLLBAR
════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.30);
}

#nav-items::-webkit-scrollbar       { width: 3px; }
#nav-items::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.04); }
#nav-items:hover::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.15); }

#nav-items, .modal-content, #main-content, .table-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.15) transparent;
}

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

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96) translateY(-8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

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

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

.spin { animation: spin 1s linear infinite; display: inline-block; }

/* ════════════════════════════════════════════════
   GLASS
════════════════════════════════════════════════ */
.glass {
    background: var(--glass) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid var(--glass-border) !important;
}

/* ════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════ */
#sidebar {
    width: 256px;
    height: 100vh;
    background: var(--bg-main);
    border-right: 1px solid var(--border-subtle);
    padding: 32px 14px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    position: relative;
}

/* Subtle grid texture on sidebar (matches landing hero feel) */
#sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

#sidebar > * { position: relative; z-index: 1; }

.logo-container {
    padding-bottom: 32px;
    text-align: center;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#nav-items {
    flex: 1;
    overflow-y: auto;
    padding-right: 2px;
    margin: 16px 0;
}

.nav-item {
    padding: 9px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.18s var(--ease-out);
    border: 1px solid transparent;
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.nav-item:hover {
    background: rgba(59, 130, 246, 0.06);
    color: var(--text-primary);
    border-color: rgba(59, 130, 246, 0.12);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-light);
    border-color: rgba(59, 130, 246, 0.25);
}

.nav-item.active svg { color: var(--accent-light); }

/* ════════════════════════════════════════════════
   MAIN CONTENT
════════════════════════════════════════════════ */
#main-content {
    flex: 1;
    overflow-y: auto;
    padding: 36px 40px;
    position: relative;
    background: var(--bg-main);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 15px;
    flex-wrap: wrap;
}

/* ════════════════════════════════════════════════
   CARDS
════════════════════════════════════════════════ */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.35s var(--ease-out) forwards;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.card:hover {
    border-color: var(--border-standard);
}

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

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    padding-left: 12px;
    padding-top: 4px;
    padding-bottom: 4px;
    /* Accent left-border para dar identidad */
    border-left: 2px solid var(--accent);
}

/* ════════════════════════════════════════════════
   STAT CARDS
════════════════════════════════════════════════ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
    position: relative;
    overflow: hidden;
}

/* Glow ambient en hover de stat cards */
.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59,130,246,0.07) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.stat-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.stat-card:hover::after { opacity: 1; }

.stat-val {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 8px 0;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--accent-light), var(--text-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-tertiary);
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.07em;
}

/* ════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════ */
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #fff;
    padding: 9px 18px;
    border-radius: 999px;
    border: none;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 3px 14px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.50);
    filter: brightness(1.08);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-emphasis);
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.07);
    color: var(--text-primary);
    border-color: rgba(59, 130, 246, 0.35);
}

/* ════════════════════════════════════════════════
   INPUTS
════════════════════════════════════════════════ */
input, select, textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-standard);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    font-size: 0.875rem;
    resize: vertical;
}

input::placeholder, textarea::placeholder { color: var(--text-tertiary); }

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: var(--bg-surface);
}

.input-group {
    margin-bottom: 18px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── WMS search dropdown ── */
.wms-search-dropdown { position: relative; }
.wms-search-input    { padding-right: 40px; }

.wms-suggest-menu {
    position: absolute;
    left: 0; right: 0; top: 100%;
    margin-top: 6px;
    border: 1px solid var(--border-emphasis);
    border-radius: var(--radius-md);
    max-height: 220px;
    overflow: auto;
    background: var(--bg-surface);
    z-index: 30;
    box-shadow: var(--shadow-lg);
    display: none;
}

.wms-suggest-item {
    display: block; width: 100%; text-align: left;
    padding: 10px 14px; border: none;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent; color: var(--text-primary); cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.12s;
}

.wms-suggest-item:hover  { background: rgba(59, 130, 246, 0.10); }
.wms-suggest-item:last-child { border-bottom: none; }

.sku-field {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.01em;
    font-weight: 500;
}

/* ════════════════════════════════════════════════
   DROP ZONE
════════════════════════════════════════════════ */
#drop-zone {
    border: 2px dashed var(--border-emphasis);
    border-radius: var(--radius-lg);
    padding: 60px 20px;
    text-align: center;
    background: rgba(13, 18, 32, 0.3);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    position: relative;
    overflow: hidden;
}

#drop-zone.dragging {
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
}

#drop-zone.dragging * { pointer-events: none; }

/* ════════════════════════════════════════════════
   LOGIN OVERLAY
════════════════════════════════════════════════ */
#login-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    /* Grid texture del hero de la landing */
    background-image:
        linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    background-color: var(--bg-main);
}

.login-card {
    width: 420px;
    padding: 48px;
    text-align: center;
    border-radius: 24px;
    background: rgba(13, 18, 32, 0.90);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(24px);
    box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 60px rgba(59,130,246,0.08);
    animation: fadeInScale 0.4s var(--ease-out) forwards;
}

/* ════════════════════════════════════════════════
   MODALS
════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(8, 11, 20, 0.88);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-standard);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-terminal);
    animation: fadeInScale 0.25s var(--ease-out) forwards;
}

/* ════════════════════════════════════════════════
   SWITCHES
════════════════════════════════════════════════ */
.switch {
    position: relative; display: inline-block;
    width: 36px; height: 18px; flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--bg-input);
    transition: .35s; border-radius: 20px;
    border: 1px solid var(--border-standard);
}

.slider::before {
    position: absolute; content: '';
    height: 12px; width: 12px;
    left: 2px; bottom: 2px;
    background: var(--text-tertiary);
    transition: .3s; border-radius: 50%;
}

input:checked + .slider {
    background: rgba(59, 130, 246, 0.20);
    border-color: var(--accent);
}

input:checked + .slider::before {
    transform: translateX(18px);
    background: var(--accent-light);
}

/* ════════════════════════════════════════════════
   TABLES
════════════════════════════════════════════════ */
table { width: 100%; border-collapse: separate; border-spacing: 0; }

th {
    background: var(--bg-surface);
    color: var(--text-tertiary);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-standard);
    position: sticky; top: 0; z-index: 10;
}

td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: middle;
    font-size: 0.875rem;
}

tr:last-child td { border-bottom: none; }

tr:hover td {
    background: rgba(59, 130, 246, 0.04);
    color: var(--text-primary);
}

.header-filters th {
    padding: 7px 16px 11px;
    border-bottom: 1px solid var(--border-standard);
    background: var(--bg-surface);
}

.header-filter-input {
    width: 100%; padding: 5px 9px;
    font-size: 0.72rem; height: 28px;
    background: var(--bg-input);
    border: 1px solid var(--border-standard);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.header-filter-input:focus {
    border-color: var(--accent);
    background: var(--bg-surface);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.header-filter-input::placeholder { color: var(--text-tertiary); }

.table-container thead { position: sticky; top: 0; z-index: 20; }

/* ════════════════════════════════════════════════
   COLUMN DROPDOWN
════════════════════════════════════════════════ */
.col-dropdown {
    position: absolute; top: 100%; right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-emphasis);
    border-radius: var(--radius-md);
    padding: 12px; width: 240px;
    z-index: 1000; box-shadow: var(--shadow-lg);
    display: none; margin-top: 8px;
}

.col-item {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 9px 0; font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ════════════════════════════════════════════════
   TOAST
════════════════════════════════════════════════ */
#toast-container {
    position: fixed;
    bottom: 28px; left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 11px 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-standard);
    border-left: 3px solid var(--accent);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem; font-weight: 500;
    display: flex; align-items: center; gap: 12px;
    animation: slideUp 0.3s var(--ease-out) forwards;
    pointer-events: auto;
    backdrop-filter: blur(16px);
}

.toast.success { border-left-color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }

/* ════════════════════════════════════════════════
   ROLES & BADGES
════════════════════════════════════════════════ */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.role-badge.admin {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-light);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.role-badge.control_total {
    background: rgba(34, 197, 94, 0.10);
    color: var(--success);
}

.role-badge.solo_es {
    background: rgba(99, 102, 241, 0.10);
    color: #818cf8;
}

.role-badge.consulta {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-tertiary);
}

.role-badge.vendedor {
    background: rgba(251, 191, 36, 0.10);
    color: var(--warning);
}

/* ════════════════════════════════════════════════
   ICON BUTTONS
════════════════════════════════════════════════ */
.btn-icon-sm {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-standard);
    color: var(--text-tertiary);
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; cursor: pointer;
    transition: all 0.15s;
}

.btn-icon-sm:hover {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-light);
    border-color: rgba(59, 130, 246, 0.30);
}

/* ════════════════════════════════════════════════
   GLOW HELPERS
════════════════════════════════════════════════ */
.success-glow { box-shadow: 0 0 16px rgba(34, 197, 94, 0.25); }
.danger-glow  { box-shadow: 0 0 16px rgba(248, 113, 113, 0.25); }

/* ════════════════════════════════════════════════
   PASSWORD TOGGLE
════════════════════════════════════════════════ */
.pass-wrapper { position: relative; width: 100%; }

.pass-toggle {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-tertiary); cursor: pointer;
    padding: 6px; display: flex;
    align-items: center; justify-content: center;
    transition: color 0.15s; z-index: 5;
}

.pass-toggle:hover { color: var(--accent-light); }
.pass-wrapper input { padding-right: 44px !important; }

/* ════════════════════════════════════════════════
   MOBILE TOGGLE HEADER BUTTON
════════════════════════════════════════════════ */
#mobile-toggle {
    display: none;
    background: var(--bg-surface);
    border: 1px solid var(--border-standard);
    color: var(--text-primary);
    width: 42px; height: 42px;
    border-radius: var(--radius-md);
    cursor: pointer;
    align-items: center; justify-content: center;
    transition: all 0.15s;
}

#mobile-toggle:hover {
    background: rgba(59, 130, 246, 0.10);
    border-color: rgba(59, 130, 246, 0.30);
}

#sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    z-index: 95;
    animation: fadeIn 0.25s ease;
}

/* ════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    #sidebar { width: 230px; }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        overflow-y: auto !important;
        height: auto;
    }

    #sidebar {
        position: fixed;
        left: -264px; top: 0; bottom: 0;
        width: 264px; height: 100vh;
        transition: transform 0.3s var(--ease-out);
        z-index: 2100;
        box-shadow: 20px 0 60px rgba(0,0,0,0.6);
    }

    #sidebar.open { transform: translateX(264px); }
    #sidebar-overlay.open { display: block; }
    #mobile-toggle { display: flex; }

    #main-content { padding: 18px 16px; }
    .main-header  { margin-bottom: 18px; }

    #view-title { font-size: 1.35rem !important; }

    #date-display {
        width: 100%; font-size: 0.78rem; order: 3;
    }

    .stat-grid { grid-template-columns: 1fr; gap: 12px; }

    .card { padding: 16px; margin-bottom: 14px; }

    .table-container {
        width: 100%; overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-standard);
        background: var(--bg-surface);
    }

    table { min-width: 600px; }

    .modal-content {
        width: 95%;
        margin: 10px;
        padding: 20px !important;
    }

    .login-card { width: 90%; padding: 28px 20px; }

    .btn-primary, .btn-secondary {
        width: 100%;
        margin-bottom: 8px;
        padding: 9px 14px;
        font-size: 0.82rem;
    }

    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .card-header .btn-primary,
    .card-header .btn-secondary { width: 100% !important; }

    .mobile-hide  { display: none !important; }
    .mobile-show  { display: block !important; }

    .mobile-stack, .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
    }

    .dashboard-grid > div {
        grid-column: span 1 !important;
        width: 100% !important;
    }

    .col-selector,
    #search-productos { width: 100% !important; }

    .remito-header-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
    }

    .session-status-container {
        text-align: left !important;
        border-top: 1px solid var(--border-subtle);
        padding-top: 12px;
    }

    .session-status-container div { justify-content: flex-start !important; }

    .remito-footer-flex {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .remito-footer-flex button { width: 100% !important; }
}

@media (max-width: 860px) {
    #wms-ubicacion-form,
    #wms-ubicar-form,
    #wms-retirar-form {
        grid-template-columns: 1fr !important;
    }
}
