/* Custom Premium CSS for Shopify Laravel Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-primary: #fbfaf7;
    --bg-secondary: #f4f1ea;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(24, 24, 27, 0.08);
    --glass-highlight: rgba(24, 24, 27, 0.12);
    --text-primary: #18181b;
    --text-secondary: #71717a;
    --accent-gradient: linear-gradient(135deg, #18181b, #27272a);
    --success-gradient: linear-gradient(135deg, #10b981, #059669);
    --danger-gradient: linear-gradient(135deg, #ef4444, #dc2626);
    --warning-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    --info-gradient: linear-gradient(135deg, #0ea5e9, #2563eb);
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow-premium: 0 8px 30px 0 rgba(27, 25, 22, 0.06);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    min-height: 100vh;
    font-family: var(--font-sans);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}
.glass-card:hover {
    border-color: var(--glass-highlight);
    transform: translateY(-2px);
}

/* Layout Grid */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(24px);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    flex-shrink: 0;
    z-index: 100;
    font-family: 'Inter', var(--font-sans);
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed state (toggled by hamburger).
   Desktop: pull the in-flow sidebar out so the content expands.
   Mobile: the media query below keeps using transform (fixed offcanvas). */
.app-container.sidebar-collapsed .sidebar {
    margin-left: -256px;
}

/* Hamburger toggle button */
.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 18px;
    margin-right: 16px;
    transition: var(--transition-smooth);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Offcanvas backdrop (shown on mobile when sidebar is open) */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 25, 0.5);
    backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #18181b, #71717a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* User profile card (light grey, fully rounded) */
.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(24, 24, 27, 0.05);
    border: 1px solid rgba(24, 24, 27, 0.06);
    border-radius: 16px;
    margin-bottom: 28px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #18181b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    overflow: hidden;
}

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

.user-role {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* Navigation */
.sidebar-nav {
    flex-grow: 1;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 14px;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition-smooth);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(24, 24, 27, 0.06);
}

.nav-link.active {
    color: #fff;
    background: #18181b;
    box-shadow: 0 6px 16px rgba(24, 24, 27, 0.18);
}

.nav-link.active:hover {
    color: #fff;
    background: #18181b;
}

/* Footer (Logout pinned to bottom) */
.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(24, 24, 27, 0.08);
}

.logout-link {
    color: #b91c1c;
}

.logout-link:hover {
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.08);
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    min-width: 0;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-container.sidebar-collapsed .main-content {
    margin-left: 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    margin-bottom: 32px;
}

/* Main content region: fills the space under the header and gives child
   pages a definite height so they can manage their own internal scrolling
   (e.g. the returns page locks to 100vh with only its tables scrolling). */
#live-content {
    flex: 1;
    min-height: 0;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    color: #fff;
}

.btn-primary {
    background: var(--accent-gradient);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success-gradient);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}
.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-gradient);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}
.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Metrics Dashboard Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 1535px) {
    .metrics-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1279px) {
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1023px) {
    .metrics-grid { grid-template-columns: 1fr; }
}

.metric-card {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
}

.metric-value.positive {
    color: #10b981;
}

.metric-value.negative {
    color: #ef4444;
}

.metric-footer {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Dashboard Bottom Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 1365px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Table Design */
.table-wrapper {
    overflow-x: auto;
}

table.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table.premium-table th {
    padding: 16px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
}

table.premium-table td {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 14px;
    vertical-align: middle;
}

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

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

/* Responsive tables: truncate long cell text */
.table-cell-truncate {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.table-cell-truncate:hover {
    overflow: visible;
    white-space: normal;
    word-break: break-word;
    position: relative;
    background: var(--glass-bg);
    z-index: 1;
}

/* Latest orders table on dashboard */
.latest-orders-table td {
    white-space: nowrap;
}
.latest-orders-table .col-product {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.latest-orders-table .col-product:hover {
    overflow: visible;
    white-space: normal;
    word-break: break-word;
    position: relative;
    background: var(--glass-bg);
    z-index: 1;
}

/* Latest orders status badge inline helper */
.latest-orders-table .badge {
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .latest-orders-table .col-phone,
    .latest-orders-table .col-time {
        display: none;
    }
}
@media (max-width: 767px) {
    .latest-orders-table .col-qty,
    .latest-orders-table .col-total {
        display: none;
    }
}

/* Compact data tables (Returns Scan / Inventory panels) */
table.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table.data-table th {
    padding: 10px 12px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

table.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 13px;
    color: var(--text-primary);
    vertical-align: middle;
}

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

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

/* Status Badges */
.badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-confirmed {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-shipped {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-delivered {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-returned {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-cancelled {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-return_to_stock {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-damaged {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-lost {
    background: rgba(113, 113, 122, 0.15);
    color: #71717a;
    border: 1px solid rgba(113, 113, 122, 0.3);
}
.badge-reship {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-control:focus {
    border-color: #18181b;
    box-shadow: 0 0 10px rgba(24, 24, 27, 0.05);
    background: #fff;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 100%;
    max-width: 500px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Real-time Order Alert Notification Box */
#realtime-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--glass-bg);
    border: 2px solid #a855f7;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    width: 320px;
    backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#realtime-toast.show {
    transform: translateY(0);
}

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toast-title {
    font-weight: 700;
    color: #a855f7;
    font-size: 15px;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
}

.toast-body {
    font-size: 13px;
    color: var(--text-primary);
}

/* Pagination design - global (renders correctly without Bootstrap) */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination-container > span {
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination-links {
    display: flex;
    justify-content: flex-end;
}

/* Neutralize default <ul>/<li> styling and lay the list out horizontally */
.pagination-links nav,
.pagination-links ul.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination-links ul.pagination li {
    list-style: none;
    display: inline-flex;
}

.pagination-links ul.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    font-size: 13px;
    line-height: 1;
    transition: var(--transition-smooth);
}

.pagination-links ul.pagination .page-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.pagination-links ul.pagination .page-item.active .page-link {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
}

.pagination-links ul.pagination .page-item.disabled .page-link {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .pagination-links {
        justify-content: center;
    }
    .pagination-links ul.pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Details Page styling */
.details-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 32px;
}

@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

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

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

.item-info {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 600;
}

.item-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.item-total {
    font-weight: 700;
}

/* Mobile: sidebar becomes a true offcanvas (hidden by default, toggled open) */
/* Responsive header */
@media (max-width: 1535px) {
    header .global-search input {
        width: 180px;
    }
}
@media (max-width: 1279px) {
    header .global-search input {
        width: 140px;
    }
}
@media (max-width: 1023px) {
    header .global-search input {
        width: 100px;
    }
}
.sidebar-close-btn {
    display: none;
}

@media (max-width: 768px) {
    .sidebar-close-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        background: rgba(24, 24, 27, 0.08) !important;
        border: none !important;
        color: #18181b !important;
        font-size: 16px !important;
        cursor: pointer !important;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh !important;
        max-height: 100vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 90px !important;
        margin-left: 0 !important;
        transform: translateX(-100%);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
        z-index: 99999 !important;
        width: 82vw !important;
        max-width: 300px !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    /* On mobile the toggle class opens the offcanvas + shows backdrop */
    .app-container.sidebar-collapsed .sidebar {
        transform: translateX(0);
        margin-left: 0 !important;
    }
    .sidebar-backdrop {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 99995 !important;
        background: rgba(11, 15, 25, 0.6) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
    }
    .app-container.sidebar-collapsed .sidebar-backdrop {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* Returns Scanning Workstation */
.rs-hero {
    cursor: pointer;
}

.rs-input {
    font-family: var(--font-sans);
    outline: none;
    transition: var(--transition-smooth);
}
.rs-input:focus {
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.rs-status {
    min-height: 1.25rem;
    font-weight: 500;
}
.rs-status.ok { color: #10b981; }
.rs-status.err { color: #ef4444; }

.rs-result {
    transition: opacity 0.2s ease;
}

/* Order items inside result card */
.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(24, 24, 27, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}
.order-item img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
}
.oi-name {
    font-weight: 600;
    font-size: 14px;
}
.oi-meta {
    font-size: 12px;
    color: var(--text-secondary);
}
.notes-area {
    width: 100%;
    padding: 12px 16px;
    background: rgba(24, 24, 27, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-primary);
    resize: vertical;
    min-height: 60px;
    outline: none;
    transition: var(--transition-smooth);
}
.notes-area:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}
.reship-box {
    margin-top: 12px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    font-size: 13px;
    color: #10b981;
}

.btn-return { background: var(--success-gradient); box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35); }
.btn-return:hover { box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5); transform: translateY(-1px); }
.btn-damaged { background: var(--danger-gradient); box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35); }
.btn-damaged:hover { box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5); transform: translateY(-1px); }
.btn-lost { background: linear-gradient(135deg, #71717a, #52525b); box-shadow: 0 4px 15px rgba(113, 113, 122, 0.35); }
.btn-lost:hover { box-shadow: 0 6px 20px rgba(113, 113, 122, 0.5); transform: translateY(-1px); }
.btn-reship { background: var(--info-gradient); box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35); }
.btn-reship:hover { box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5); transform: translateY(-1px); }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Period / filter tabs shared across pages */
.period-tab {
    background: rgba(24, 24, 27, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.period-tab:hover {
    background: rgba(24, 24, 27, 0.08);
    color: var(--text-primary);
}
.period-tab.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   Mobile Camera Scanner Modal Popup & Comprehensive Mobile Responsiveness
   ========================================================================== */

/* App Header Styling */
.app-header-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    gap: 16px;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.header-title-box {
    min-width: 0;
}
.header-title-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-subtitle-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

#cameraScannerModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.82) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}
#cameraScannerModal.hidden {
    display: none !important;
}
#cameraScannerModal .camera-modal-card {
    background: #ffffff !important;
    border-radius: 24px !important;
    max-width: 480px !important;
    width: 100% !important;
    padding: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    position: relative !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-sizing: border-box !important;
    margin: auto !important;
}

@media (max-width: 768px) {
    .hide-on-mobile, .app-header-bar #sidebar-toggle {
        display: none !important;
    }

    /* Mobile Header adjustments */
    .app-header-bar {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px 14px !important;
        height: 54px !important;
        min-height: 54px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border-bottom: 1px solid rgba(24, 24, 27, 0.08) !important;
        gap: 12px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .header-left {
        width: auto !important;
        gap: 10px !important;
        flex: 1 !important;
        min-width: 0 !important;
    }
    .header-title-text {
        font-size: 15px !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .header-right {
        width: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
    }

    /* Main Content Padding & Scrolling */
    #live-content, .main-content {
        padding: 12px !important;
        overflow-x: hidden !important;
    }

    /* Action Buttons & Filter Toolbar Scrolling */
    .action-bar, #status-filters-container, #product-tabs-container, .filters-scroll-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        padding-bottom: 6px !important;
        max-width: 100% !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    .filters-scroll-container::-webkit-scrollbar {
        display: none !important;
    }

    /* Tables Container Mobile Touch Scroll */
    .table-responsive, table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Form & Grid Layout Stacking */
    .form-row, .grid-cols-2, .grid-cols-3, .grid-cols-4,
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .glass-card {
        padding: 16px !important;
        border-radius: 12px !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Native Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 64px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        border-top: 1px solid rgba(24, 24, 27, 0.08) !important;
        z-index: 99990 !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 4px 8px !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
    }
    .app-container.sidebar-collapsed .mobile-bottom-nav {
        z-index: 9990 !important;
    }
    .sidebar {
        z-index: 9999999 !important;
    }
    .sidebar-backdrop {
        z-index: 999990 !important;
    }
    .mobile-nav-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        color: #71717a !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        background: none !important;
        border: none !important;
        gap: 3px !important;
        flex: 1 !important;
        padding: 6px 0 !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
    }
    .mobile-nav-item i {
        font-size: 18px !important;
    }
    .mobile-nav-item.active {
        color: #6366f1 !important;
    }
    .mobile-nav-item.active i {
        transform: translateY(-2px) scale(1.1) !important;
    }

    #live-content, .main-content {
        padding-bottom: 84px !important;
    }
}
