/* =================================================================
   StockIntel Pro — Modern Dark/Glassmorphic Design System
================================================================= */

:root {
    --bg-primary: #0A0E17;
    --bg-secondary: #111827;
    --bg-tertiary: #1E293B;
    --bg-card: rgba(17, 24, 39, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --accent-emerald: #10B981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.2);
    --accent-cyan: #06B6D4;
    --accent-blue: #3B82F6;
    --accent-amber: #F59E0B;
    --accent-red: #EF4444;
    --accent-purple: #8B5CF6;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    font-size: 28px;
    background: var(--bg-tertiary);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pro-badge {
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

.subtitle {
    font-size: 11px;
    color: var(--text-muted);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-left: 10px;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-emerald);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.status-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-emerald);
    letter-spacing: 0.05em;
}

.nav-search {
    position: relative;
    width: 440px;
    max-width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-muted);
}

.nav-search input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 9px 16px 9px 38px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}
.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Navigation Tabs */
/* Navigation Tabs - Clean 2-Line Row Layout (No Horizontal Scrolling) */
.tabs-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 24px;
    background: #0E1422;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 68px;
    z-index: 90;
    overflow: visible;
}

.sku-cell-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.tabs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
    color: #fff;
    background: var(--bg-tertiary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.45);
}

/* Copy SKU Button Styling */
.btn-copy-sku {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    margin-left: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 5px;
    color: #94A3B8;
    cursor: pointer;
    transition: all 0.15s ease;
    vertical-align: middle;
}

.btn-copy-sku:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    color: #38BDF8;
    transform: scale(1.1);
}

.btn-copy-sku.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10B981;
    color: #10B981;
}

/* Badges */
.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}
.badge-primary { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
.badge-accent { background: rgba(239, 68, 68, 0.2); color: #F87171; }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #FBBF24; }
.badge-success { background: rgba(16, 185, 129, 0.2); color: #34D399; }

/* Status Badges */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}
.tag-rising { background: rgba(16, 185, 129, 0.15); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-stockout { background: rgba(245, 158, 11, 0.15); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.3); }
.tag-crash { background: rgba(239, 68, 68, 0.15); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.tag-slowing { background: rgba(251, 146, 60, 0.15); color: #FB923C; border: 1px solid rgba(251, 146, 60, 0.3); }
.tag-slow { background: rgba(148, 163, 184, 0.15); color: #94A3B8; border: 1px solid rgba(148, 163, 184, 0.2); }
.tag-dead { background: rgba(15, 23, 42, 0.8); color: #64748B; border: 1px solid #334155; }
.tag-stable { background: rgba(59, 130, 246, 0.15); color: #3B82F6; border: 1px solid rgba(59, 130, 246, 0.3); }

/* App Container */
.app-container {
    padding: 16px 20px;
    max-width: 100%;
    margin: 0 auto;
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

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

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(12px);
}
.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

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

.kpi-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.kpi-icon {
    font-size: 18px;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.kpi-sub {
    font-size: 11px;
    color: var(--text-secondary);
}

.kpi-sub strong {
    color: var(--text-primary);
}

.highlight-green .kpi-value { color: var(--accent-emerald); }
.highlight-red .kpi-value { color: var(--accent-red); }
.highlight-blue .kpi-value { color: #60A5FA; }
.highlight-amber .kpi-value { color: var(--accent-amber); }
.highlight-cyan .kpi-value { color: var(--accent-cyan); }

/* Panels */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    backdrop-filter: blur(12px);
}

.panel-header {
    margin-bottom: 18px;
}
.panel-header h2, .panel-header h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.panel-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Analytics Row */
.analytics-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 1024px) {
    .analytics-row {
        grid-template-columns: 1fr;
    }
}

/* Velocity Bars */
.velocity-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.v-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.v-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.v-bar-track {
    background: var(--bg-tertiary);
    height: 10px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.v-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s ease;
}

/* Insights */
.insight-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.insight-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.insight-icon {
    font-size: 20px;
}
.insight-text strong {
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}
.insight-text p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Filter Pills */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pill:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}
.pill.active {
    background: var(--accent-cyan);
    color: #000;
    font-weight: 700;
    border-color: var(--accent-cyan);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.data-table th {
    background: #0E1422;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 9px 8px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.data-table td {
    padding: 8px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    white-space: nowrap;
    font-size: 12px;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.loading-cell {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
    font-style: italic;
}

.order-val-sea {
    font-weight: 700;
    color: #60A5FA;
}
.order-val-air {
    font-weight: 700;
    color: #F87171;
}

/* Pagination Bar */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-muted);
}
.pagination-btns {
    display: flex;
    gap: 8px;
}

/* Settings Form */
.settings-panel {
    max-width: 700px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label strong {
    font-size: 14px;
    color: var(--text-primary);
    display: block;
}
.form-group label span {
    font-size: 12px;
    color: var(--text-muted);
}

.input-control, .select-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    max-width: 300px;
}
.input-control:focus, .select-input:focus {
    outline: none;
    border-color: var(--accent-emerald);
}

.form-actions {
    margin-top: 10px;
}

/* =================================================================
   Live Autocomplete Dropdown
================================================================= */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 520px;
    max-width: 90vw;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    max-height: 440px;
    overflow-y: auto;
    z-index: 1000;
    backdrop-filter: blur(20px);
    display: none;
}
.search-dropdown.active {
    display: block;
    animation: fadeIn 0.15s ease;
}

.search-dropdown-header {
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.15s ease;
}
.search-item:last-child {
    border-bottom: none;
}
.search-item:hover, .search-item.selected {
    background: rgba(255, 255, 255, 0.09);
    border-left: 3px solid var(--accent-cyan);
    padding-left: 11px;
}

.s-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}
.s-sku-name {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}
.s-item-sub {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.s-item-sub span strong {
    color: var(--text-secondary);
}
.sub-sep {
    opacity: 0.4;
}

.s-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 12px;
}

.search-highlight {
    background: rgba(6, 182, 212, 0.3);
    color: #38BDF8;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 700;
}

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

/* Clickable Table SKU rows */
.clickable-sku {
    cursor: pointer;
    color: #60A5FA;
    transition: color 0.15s ease;
}
.clickable-sku:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
}

/* =================================================================
   Interactive SKU Deep-Dive Modal
================================================================= */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-backdrop.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    width: 92%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 28px;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 22px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.modal-close:hover {
    color: #fff;
    background: var(--accent-red);
    border-color: var(--accent-red);
}

.modal-loading {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.modal-header {
    margin-bottom: 20px;
    padding-right: 40px;
}
.modal-tags {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}
.modal-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-all;
}
.modal-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Modal KPI Grid */
.modal-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.m-kpi-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
}
.m-kpi-lbl {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    display: block;
}
.m-kpi-val {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin: 4px 0 2px;
}
.m-kpi-sub {
    font-size: 10px;
    color: var(--text-secondary);
}

.modal-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}
.section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

/* Velocity Pill Row */
.velocity-pill-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.v-pill {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: var(--radius-md);
}
.v-pill span {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}
.v-pill strong {
    font-size: 15px;
    color: var(--text-primary);
    margin-top: 2px;
    display: block;
}

/* History 6M Grid */
.history-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
}
.h-cell {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 8px 4px;
    border-radius: var(--radius-sm);
}
.h-cell span {
    font-size: 10px;
    color: var(--text-muted);
    display: block;
}
.h-cell strong {
    font-size: 13px;
    margin-top: 2px;
    display: block;
}
.h-cell.active {
    border-color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.1);
}
.h-cell.highlight {
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
}

/* Modal Action Card */
.modal-action-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
}
.action-card-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}
.action-icon {
    font-size: 26px;
}
.action-card-header h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-emerald);
}
.action-card-header p {
    font-size: 12px;
    color: var(--text-secondary);
}

.action-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}
.act-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
}
.act-box span {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}
.act-box strong {
    font-size: 16px;
    color: var(--text-primary);
    margin-top: 2px;
    display: block;
}

/* =================================================================
   Top Floating Live Sync & Update Toast Banner
================================================================= */
.sync-toast-banner {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%) translateY(-25px);
    z-index: 999999;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1.5px solid #10B981;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 26px rgba(16, 185, 129, 0.38);
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 420px;
    max-width: 90vw;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
}

.sync-toast-banner.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.sync-toast-banner.toast-hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-25px);
    pointer-events: none;
}

.toast-glow {
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.25), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.toast-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    animation: toastPulseGlow 2s infinite ease-in-out;
}

@keyframes toastPulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); transform: scale(1); }
    50% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); transform: scale(1.05); }
}

.toast-text-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.2px;
}

.toast-detail {
    font-size: 12px;
    color: #94A3B8;
    line-height: 1.4;
}

.toast-dismiss-btn {
    background: transparent;
    border: none;
    color: #64748B;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.15s;
    line-height: 1;
}

.toast-dismiss-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
}

/* Goods Box Manager UI Polish */
.box-qty-badge {
    transition: all 0.25s ease;
}
.edit-qty-input:focus {
    border-color: #38BDF8 !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4) !important;
}


