/* ═══════════════════════════════════════════════════════════════════════════
   Danės klinika — Warehouse System
   Soft Professional SaaS design
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ────────────────────────────────────────────────────── */
:root {
    --sidebar-width: 260px;
    --sidebar-bg: #FFFFFF;
    --sidebar-text: #6B7280;
    --sidebar-text-hover: #1A1D23;
    --sidebar-active-bg: #EEF3FF;
    --sidebar-active-text: #3B7FED;
    --sidebar-group-label: #9CA3AF;

    --color-primary: #3B7FED;
    --color-primary-hover: #2563D4;
    --color-primary-light: #EEF3FF;
    --color-primary-bg: rgba(59, 127, 237, 0.08);

    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --color-info: #3B82F6;

    --body-bg: #F0F2F5;
    --card-bg: #FFFFFF;
    --text-primary: #1A1D23;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --border-color: #E5E7EB;
    --border-subtle: #F3F4F6;
    --hover-bg: #F7F8FA;

    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 999px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-fab: 0 2px 8px rgba(59,127,237,0.40);

    --transition: 150ms ease;
}

/* ─── Base ──────────────────────────────────────────────────────────────── */
body {
    font-family: var(--font-family);
    background: var(--body-bg);
    color: var(--text-primary);
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: left 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
}

.sidebar-brand:hover { color: var(--text-primary); }

.sidebar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
}

/* Clinic info block */
.sidebar-clinic {
    padding: 0.5rem 1.5rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-clinic-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

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

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
}

.sidebar-group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-group-label);
    padding: 16px 1.5rem 0.4rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin: 2px 0.75rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.sidebar-link:hover {
    color: var(--sidebar-text-hover);
    background: var(--hover-bg);
}

.sidebar-link.active {
    color: var(--sidebar-active-text);
    background: var(--sidebar-active-bg);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--sidebar-active-text);
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    color: var(--text-tertiary);
}

.sidebar-link:hover i {
    color: var(--sidebar-text-hover);
}

/* User section at bottom */
.sidebar-user {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-name {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.sidebar-user-role {
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: capitalize;
}

.sidebar-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    margin-top: 0.5rem;
    transition: color var(--transition);
}

.sidebar-logout:hover {
    color: var(--color-danger);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════════════════════════════════════════ */
.app-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top bar */
.app-topbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.sidebar-toggle {
    display: none; /* shown only on mobile */
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.6rem;
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition);
}

.sidebar-toggle:hover {
    background: var(--hover-bg);
}

.app-topbar-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Main content */
.app-main {
    flex: 1;
    padding: 24px;
}

/* Footer */
.app-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-card-icon.purple  { background: var(--color-primary-light); color: var(--color-primary); }
.stat-card-icon.green   { background: #ECFDF5; color: var(--color-success); }
.stat-card-icon.orange  { background: #FFFBEB; color: var(--color-warning); }
.stat-card-icon.blue    { background: var(--color-primary-light); color: var(--color-info); }

.stat-card-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS & PANELS
   ═══════════════════════════════════════════════════════════════════════════ */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════════ */
.table {
    font-size: 14px;
}

/* More breathing room */
.table > :not(caption) > * > * {
    padding: 14px 16px;
}

/* Removes vertical column borders from table-bordered */
.table-bordered > :not(caption) > * > * {
    border-right-width: 0;
    border-left-width: 0;
}

/* White header (not gray) */
.table .table-dark,
.table thead.table-dark {
    --bs-table-bg: #FFFFFF;
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-color);
}

.table thead.table-dark th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
    --bs-table-hover-bg: var(--hover-bg);
}

/* Subtle row borders */
.table > tbody > tr {
    border-bottom-color: var(--border-subtle);
}

.table-responsive {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-responsive > .table {
    margin-bottom: 0;
}

/* Allow autocomplete dropdowns to escape the table container */
.table-responsive.overflow-visible {
    overflow: visible;
}

/* Column helpers */
.table .col-id {
    width: 48px;
    color: var(--text-secondary);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.table .col-meta {
    color: var(--text-secondary);
    font-size: 13px;
}

.table .col-actions {
    width: 90px;
    white-space: nowrap;
    text-align: right;
}

/* ── Icon action buttons ─────────────────────────────────────────────────── */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: var(--radius-sm);
    border: 1px solid #B0B5BD;
    background: var(--card-bg);
    color: #4B5563;
    font-size: 0.82rem;
    line-height: 1;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    text-decoration: none;
    cursor: pointer;
    vertical-align: middle;
}

.btn-icon:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.btn-icon.bi-success:hover {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #fff;
}

.btn-icon.bi-warning:hover {
    background: var(--color-warning);
    border-color: var(--color-warning);
    color: #fff;
}

.btn-icon.bi-danger:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: #fff;
}

/* btn-icon inside a form (for POST actions) */
.btn-icon-form {
    display: inline;
    margin: 0;
    padding: 0;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.table-empty-state td {
    padding: 3.5rem 1rem !important;
    text-align: center;
    color: var(--text-secondary);
    background: var(--card-bg);
}

.table-empty-state .empty-icon {
    font-size: 2.25rem;
    margin-bottom: 0.65rem;
    color: #D1D5DB;
    display: block;
}

.table-empty-state .empty-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.table-empty-state .empty-sub {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 0.2rem;
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.table-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.table-filters .form-select,
.table-filters .form-control {
    width: auto;
    min-width: 130px;
    height: 38px;
    padding: 0.3rem 0.65rem;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATUS BADGES — pill style with colored dot
   ═══════════════════════════════════════════════════════════════════════════ */
.badge {
    font-weight: 600;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Colored dot before badge text */
.badge-draft::before,
.badge-submitted::before,
.badge-pending::before,
.badge-completed::before,
.badge-fulfilled::before,
.badge-cancelled::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-draft {
    background-color: #FFFBEB;
    color: #D97706;
}
.badge-draft::before { background-color: #F59E0B; }

.badge-submitted {
    background-color: #DBEAFE;
    color: #1E40AF;
}
.badge-submitted::before { background-color: #3B82F6; }

.badge-pending {
    background-color: #FFFBEB;
    color: #D97706;
}
.badge-pending::before { background-color: #F59E0B; }

.badge-completed {
    background-color: #ECFDF5;
    color: #059669;
}
.badge-completed::before { background-color: #10B981; }

.badge-fulfilled {
    background-color: #ECFDF5;
    color: #059669;
}
.badge-fulfilled::before { background-color: #10B981; }

.badge-cancelled {
    background-color: #FEF2F2;
    color: #DC2626;
}
.badge-cancelled::before { background-color: #EF4444; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.page-header h5 {
    font-weight: 700;
    font-size: 18px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn-sm {
    padding: .4rem .85rem;
}

/* Spacing between tables and action buttons below */
.table-responsive + .d-flex,
.table-responsive + button,
.table-responsive + .btn {
    margin-top: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-success {
    background-color: var(--color-success);
    border-color: var(--color-success);
}

.btn-danger {
    background-color: var(--color-danger);
    border-color: var(--color-danger);
}

.btn-outline-secondary {
    border-color: #B0B5BD;
    color: #4B5563;
}

.btn-outline-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-outline-primary {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hide number input spinners */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

.form-control, .form-select {
    border-color: var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 127, 237, 0.15);
}

/* Pill search inputs */
input[type="search"].form-control,
.form-control.search-pill {
    border-radius: var(--radius-pill);
    background: var(--body-bg);
    border-color: var(--border-color);
}

input[type="search"].form-control:focus,
.form-control.search-pill:focus {
    background: var(--card-bg);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 127, 237, 0.15);
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALERTS — softer look
   ═══════════════════════════════════════════════════════════════════════════ */
.alert {
    border-radius: var(--radius);
    font-size: 14px;
    border: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUTOCOMPLETE
   ═══════════════════════════════════════════════════════════════════════════ */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    z-index: 1050;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 260px;
    overflow-y: auto;
    width: 100%;
    box-shadow: var(--shadow-md);
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition);
}

.autocomplete-item:last-child { border-bottom: none; }

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--color-primary-bg);
}

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

.autocomplete-create-new {
    color: var(--color-primary);
    font-size: 13px;
}

.autocomplete-create-new:hover {
    background: var(--color-primary-bg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STOCK HINTS (in form rows)
   ═══════════════════════════════════════════════════════════════════════════ */
.stock-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.stock-hint .wh-badge {
    display: inline-block;
    background: var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 2px 8px;
    margin-right: 4px;
    font-size: 12px;
}

.stock-hint .wh-badge.central {
    background: #DBEAFE;
    color: #1E40AF;
}

.stock-warn {
    color: var(--color-danger);
    font-weight: 600;
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD STOCK GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.stock-grid th,
.stock-grid td {
    white-space: nowrap;
    vertical-align: middle;
}

.stock-grid td {
    text-align: right;
}

.stock-grid td:first-child,
.stock-grid td:nth-child(2) {
    text-align: left;
}

.stock-grid td.zero,
.stock-grid td.zero.col-central {
    color: #D1D5DB;
}

.stock-grid .col-central {
    background-color: rgba(59, 127, 237, 0.04);
}

.stock-grid thead .col-central {
    background-color: rgba(59, 127, 237, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DYNAMIC FORM ROWS
   ═══════════════════════════════════════════════════════════════════════════ */
.item-row td {
    vertical-align: top;
    padding-top: 0.5rem;
}

.row-template {
    display: none;
}

/* ─── Product thumbnail ────────────────────────────────────────────────── */
.product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    flex-shrink: 0;
}
.product-thumb-placeholder {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

/* ─── Photo hover preview ──────────────────────────────────────────────── */
.photo-preview {
    position: fixed;
    z-index: 9999;
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 2px solid #fff;
    pointer-events: none;
}

/* ─── Diff preview ─────────────────────────────────────────────────────── */
.diff-preview {
    font-size: 13px;
    margin-top: 4px;
}

.diff-positive { color: var(--color-success); font-weight: 600; }
.diff-negative { color: var(--color-danger);  font-weight: 600; }
.diff-zero     { color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EEF3FF 0%, #F0F2F5 50%, #E8EDFB 100%);
}

.login-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.login-brand .brand-icon {
    width: 42px;
    height: 42px;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ORDER FULFILLMENT — Progress bars & demand table
   ═══════════════════════════════════════════════════════════════════════════ */
.item-progress {
    height: 6px;
    border-radius: var(--radius-pill);
    background-color: #E5E7EB;
    overflow: hidden;
    min-width: 60px;
}

.item-progress-bar {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.3s ease;
}

.item-progress-bar.received { background-color: var(--color-success); }
.item-progress-bar.picked   { background-color: var(--color-primary); }

/* Demand table expandable rows */
.demand-row {
    cursor: default;
}

.detail-row td {
    background: #FAFBFC;
    border-top: none !important;
}

.detail-row .table {
    color: var(--text-secondary);
}

.expand-btn {
    color: var(--text-tertiary);
    transition: color var(--transition);
}

.expand-btn:hover {
    color: var(--color-primary);
}

.receive-qty {
    max-width: 100px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .app-sidebar {
        left: calc(-1 * var(--sidebar-width));
    }

    .app-sidebar.open {
        left: 0;
    }

    .app-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1039;
    }

    .app-sidebar.open ~ .app-content .sidebar-overlay {
        display: block;
    }

    .app-main {
        padding: 16px;
    }

    .app-topbar {
        height: 56px;
        padding: 0 16px;
    }

    .app-topbar-title {
        font-size: 18px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card-value {
        font-size: 22px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE TABLES — phone-friendly
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    /* Compact table cells */
    .table th,
    .table td {
        padding: .3rem .35rem;
        font-size: 13px;
    }

    .table thead.table-dark th {
        font-size: 12px;
        padding: .35rem .35rem;
    }

    /* Bigger touch targets for action icons */
    .btn-icon {
        min-width: 36px;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Compact ID column */
    .col-id {
        width: 30px !important;
        font-size: 12px;
    }

    /* Stack page header on mobile */
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    .page-header .d-flex {
        flex-wrap: wrap;
    }

    /* Stat cards tighter */
    .stat-card {
        padding: 12px;
    }

    .stat-card-value {
        font-size: 20px;
    }

    .stat-card-label {
        font-size: 11px;
    }

    /* Dashboard stock grid: sticky product name */
    .stock-grid th:first-child,
    .stock-grid td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        background: #fff;
        box-shadow: 2px 0 4px rgba(0,0,0,0.06);
        min-width: 120px;
    }

    .stock-grid thead th:first-child {
        background: #1A1D23;
        z-index: 2;
    }

    /* Unit column on stock grid */
    .stock-grid th:nth-child(2),
    .stock-grid td:nth-child(2) {
        position: sticky;
        left: 120px;
        z-index: 1;
        background: #fff;
    }

    .stock-grid thead th:nth-child(2) {
        background: #1A1D23;
        z-index: 2;
    }

    /* Product thumbnail smaller on mobile */
    .product-thumb,
    .product-thumb-placeholder {
        width: 28px;
        height: 28px;
    }

    /* Demand receive input */
    .receive-qty {
        max-width: 80px;
    }

    /* Filter form compact */
    .table-filters {
        flex-wrap: wrap;
    }

    .table-filters .form-select {
        font-size: 13px;
    }

    /* Badges compact */
    .badge {
        font-size: 11px;
        padding: 3px 6px;
    }

    /* Progress bar thinner */
    .item-progress {
        min-width: 40px;
    }

    /* Form cards full width */
    .card[style*="max-width"] {
        max-width: 100% !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════════════════ */
.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}
.pagination-info {
    font-size: 0.8rem;
    color: var(--sidebar-text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════════════════ */
@media print {
    .app-sidebar,
    .app-topbar,
    .sidebar-overlay {
        display: none !important;
    }
    .app-content {
        margin-left: 0 !important;
    }
}
