@font-face {
    font-family: "NRT Reg";
    src: local("NRT Reg"), local("NRTReg"), url("/assets/fonts/NRT-Reg.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --brand: #6d5dfc;
    --brand-2: #8b5cf6;
    --brand-soft: #f0edff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e7eaf0;
    --page: #f5f7fb;
    --card: #ffffff;
    --sidebar: #111827;
    --sidebar-2: #171f32;
    --success: #059669;
    --danger: #dc2626;
    --radius: 18px;
    --shadow: 0 14px 40px rgba(17, 24, 39, .07);
    --app-font: "Segoe UI", Tahoma, Arial, sans-serif;
}

html[lang="ku"] { --app-font: "NRT Reg", "Segoe UI", Tahoma, Arial, sans-serif; }

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    color: var(--ink);
    font-family: var(--app-font);
    font-size: 14px;
}
a { color: var(--brand); }
button, input, select, textarea, .dropdown-menu, .modal, .offcanvas { font-family: var(--app-font); }
.min-w-0 { min-width: 0; }

/* App shell */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 270px;
    padding: 22px 18px;
    background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
    color: white;
    z-index: 1030;
    overflow-y: auto;
}
[dir="rtl"] .sidebar { right: 0; }
[dir="ltr"] .sidebar { left: 0; }
.main-area { min-height: 100vh; }
[dir="rtl"] .main-area { margin-right: 270px; }
[dir="ltr"] .main-area { margin-left: 270px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark {
    width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), #a78bfa);
    box-shadow: 0 10px 28px rgba(109, 93, 252, .35); font-size: 20px; color: #fff;
}
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { letter-spacing: .08em; font-size: 16px; }
.brand-copy small { color: #94a3b8; font-size: 10px; margin-top: 2px; }
.sidebar > .brand { margin-bottom: 34px; }
.nav-caption { color: #64748b; font-size: 10px; font-weight: 700; padding: 0 12px 8px; text-transform: uppercase; letter-spacing: .08em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 5px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 13px;
    text-decoration: none; color: #aeb7c7; transition: .2s ease;
}
.sidebar-nav a i { width: 20px; text-align: center; font-size: 16px; }
.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-nav a.active { color: #fff; background: linear-gradient(135deg, #7164f6, #8b5cf6); box-shadow: 0 10px 24px rgba(109,93,252,.25); }
.sidebar-bottom { padding-top: 22px; }
.user-mini { display: flex; align-items: center; gap: 10px; padding: 12px 8px; margin-bottom: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.user-mini .avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.1); font-weight: 800; }
.user-mini strong, .user-mini small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-mini small { color: #94a3b8; font-size: 9px; }
.btn-sidebar-logout { color: #cbd5e1; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.btn-sidebar-logout:hover { color: white; background: rgba(255,255,255,.08); }
.language-switch { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.05); }
.language-switch a { flex: 1; text-align: center; text-decoration: none; padding: 6px 8px; border-radius: 9px; color: #94a3b8; font-size: 11px; }
.language-switch a.active { color: #fff; background: rgba(255,255,255,.12); }

/* Header */
.topbar {
    min-height: 112px; padding: 24px 32px; position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    background: rgba(245,247,251,.90); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
}
.eyebrow { color: var(--brand); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.topbar h1 { font-size: 26px; font-weight: 850; margin: 4px 0; }
.topbar p { color: var(--muted); font-size: 11px; margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.content-wrap { padding: 26px 32px 100px; max-width: 1600px; margin: 0 auto; }

/* Common controls */
.btn { border-radius: 12px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; box-shadow: 0 8px 20px rgba(109,93,252,.18); }
.btn-primary:hover { background: linear-gradient(135deg, #5e4ff0, #7c4dec); border-color: transparent; }
.btn-soft { background: #fff; border: 1px solid var(--line); color: #374151; }
.btn-soft:hover { background: #f8fafc; border-color: #d9dee8; color: var(--ink); }
.icon-btn { width: 36px; height: 36px; padding: 0; }
.form-control, .form-select, .input-group-text { border-color: #dfe3eb; border-radius: 12px; min-height: 43px; }
.form-control:focus, .form-select:focus { border-color: #a89dfc; box-shadow: 0 0 0 .2rem rgba(109,93,252,.10); }
.form-label { font-weight: 700; color: #374151; font-size: 12px; }
.form-control-lg, .form-select-lg { min-height: 50px; font-size: 14px; }
.form-control-color { min-height: 48px; }
.money-group .input-group-text { font-size: 11px; font-weight: 800; color: #6b7280; }
.money-input { direction: ltr; text-align: left; font-variant-numeric: tabular-nums; font-weight: 800; }
[dir="rtl"] .money-input { text-align: right; }

/* Cards & panels */
.panel-card, .form-section {
    min-width: 0;
    max-width: 100%;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow);
}
.compact-panel { padding: 15px 18px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-header h2 { font-size: 16px; font-weight: 800; margin: 0 0 3px; }
.panel-header p { color: var(--muted); font-size: 10px; margin: 0; }
.section-title { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.section-title > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--brand-soft); color: var(--brand); font-weight: 850; flex: 0 0 auto; }
.section-title h3 { font-size: 15px; font-weight: 800; margin: 0 0 2px; }
.section-title p { color: var(--muted); font-size: 10px; margin: 0; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); }
.feature-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--brand-soft); color: var(--brand); font-size: 20px; }

/* Dashboard */
.month-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: #6b7280; font-size: 11px; }
.metric-card { height: 100%; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.metric-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 12px; }
.metric-card > span, .metric-card > small { display: block; color: var(--muted); font-size: 10px; }
.metric-card > strong { display: block; font-size: 20px; font-weight: 900; margin: 4px 0 2px; line-height: 1.2; }
.metric-profit .metric-icon { background: #ecfdf5; color: var(--success); }
.metric-profit > strong { color: var(--success); }
.status-dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.status-stat-card { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; background: #fff; transition: .18s ease; }
.status-stat-card:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(17,24,39,.07); color: inherit; }
.status-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--status); box-shadow: 0 0 0 5px color-mix(in srgb, var(--status) 15%, white); flex: 0 0 auto; }
.status-stat-card > div { min-width: 0; flex: 1; }
.status-stat-card strong, .status-stat-card small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-stat-card strong { font-size: 12px; }
.status-stat-card small { color: var(--muted); font-size: 9px; }
.status-stat-card b { font-size: 18px; }
.status-stat-card > i { color: #9ca3af; font-size: 10px; }

.list-stack { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid #f0f2f6; color: inherit; text-decoration: none; }
.list-row:last-child { border-bottom: 0; }
.record-badge { min-width: 48px; padding: 7px 8px; text-align: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 900; direction: ltr; }
.trip-badge { background: #eef6ff; color: #2563eb; }
.list-main { min-width: 0; flex: 1; }
.list-main strong, .list-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-main small { color: var(--muted); font-size: 9px; margin-top: 2px; }

/* Filters */
.filter-bar { display: flex; gap: 9px; flex-wrap: wrap; }
.filter-grid { display: grid; grid-template-columns: minmax(250px, 2fr) 1fr 1fr 150px 150px auto; gap: 9px; }

/* Invoice filters
   The sidebar reduces the real content width, so these columns must be allowed
   to shrink inside the panel instead of pushing controls outside the card. */
.invoice-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
    width: 100%;
    min-width: 0;
}
.invoice-filter-grid > * { min-width: 0; width: 100%; }
.invoice-filter-search { min-width: 0; }
.invoice-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.invoice-filter-actions .btn { min-height: 43px; }
.invoice-filter-actions .btn-dark { min-width: 110px; }

.trip-filter-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 170px auto; gap: 9px; }
.search-box { position: relative; display: flex; align-items: center; min-height: 43px; border: 1px solid #dfe3eb; border-radius: 12px; background: #fff; }
.search-box > i { color: #9ca3af; margin-inline: 12px 0; }
.search-box input { width: 100%; height: 42px; border: 0; outline: 0; background: transparent; padding: 0 12px; font-size: 13px; }

/* Status */
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--status) 12%, white); color: var(--status); font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--status); }
.status-pill.large { padding: 7px 11px; font-size: 11px; }

/* Trip cards */
.trip-card { display: block; height: 100%; text-decoration: none; color: inherit; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: #fff; transition: .18s ease; }
.trip-card:hover { color: inherit; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(17,24,39,.08); }
.trip-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.trip-code { display: inline-flex; color: var(--brand); font-weight: 900; font-size: 11px; }
.trip-card h3 { font-size: 14px; font-weight: 800; margin: 3px 0 0; }
.trip-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 15px 0; }
.trip-stats-grid > div { padding: 10px; border-radius: 11px; background: #f8fafc; }
.trip-stats-grid span, .trip-stats-grid strong { display: block; }
.trip-stats-grid span { color: var(--muted); font-size: 9px; }
.trip-stats-grid strong { font-size: 11px; margin-top: 3px; }
.tracking-preview { display: flex; align-items: center; gap: 8px; color: #6b7280; font-size: 10px; padding-top: 6px; }
.tracking-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tables */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table thead th { color: #7b8494; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; border-bottom-color: var(--line); white-space: nowrap; }
.table tbody td { font-size: 11px; border-bottom-color: #eef0f4; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }

/* Invoice list readability: alternate row backgrounds make long lists easier to scan. */
.invoice-table tbody tr:nth-child(odd) > td { background-color: #ffffff; }
.invoice-table tbody tr:nth-child(even) > td { background-color: #f4f6f9; }
.invoice-table tbody tr:hover > td { background-color: #eef2f7; }
.invoice-table tbody td { transition: background-color .14s ease; }
.invoice-table .invoice-time { display: inline-block; line-height: 1.55; white-space: nowrap; color: #4b5563; }

/* Keep the desktop invoice table readable instead of squeezing names/phones into vertical text. */
.invoice-table { min-width: 1120px; }
.invoice-table .customer-cell { min-width: 145px; max-width: 190px; overflow-wrap: anywhere; }
.invoice-table .phone-cell { min-width: 118px; white-space: nowrap; }
.invoice-table .address-cell { min-width: 165px; max-width: 230px; white-space: normal; overflow-wrap: anywhere; }

.address-cell { max-width: 230px; white-space: normal; }
.order-number { direction: ltr; display: inline-block; color: var(--brand); font-size: 13px; }
.action-buttons { display: flex; gap: 5px; align-items: center; flex-wrap: nowrap; }
.action-buttons form { margin: 0; }
.table-responsive { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Details */
.detail-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.invoice-hero { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.invoice-hero > div span, .invoice-hero > div strong { display: block; }
.invoice-hero > div span { color: var(--muted); font-size: 10px; }
.invoice-hero > div strong { direction: ltr; font-size: 28px; font-weight: 900; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-grid > div { padding: 12px; border-radius: 12px; background: #f8fafc; min-width: 0; }
.info-grid .wide { grid-column: 1 / -1; }
.info-grid span, .info-grid strong { display: block; }
.info-grid span { color: var(--muted); font-size: 9px; margin-bottom: 3px; }
.info-grid strong { font-size: 12px; overflow-wrap: anywhere; }
.note-box { background: #f8fafc; border-radius: 13px; padding: 13px; }
.note-box strong { font-size: 11px; }
.note-box p { margin: 5px 0 0; white-space: pre-line; color: #4b5563; font-size: 11px; }
.cart-link { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #ded9ff; border-radius: 13px; background: #f7f5ff; text-decoration: none; }
.cart-link span { flex: 1; }
.money-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.money-summary > div:last-child { border-bottom: 0; }
.money-summary span { color: var(--muted); font-size: 10px; }
.money-summary strong { font-size: 13px; }
.money-summary .grand strong { font-size: 19px; color: var(--brand); }

/* Forms */
.auto-number-box { display: flex; align-items: center; gap: 11px; padding: 13px; border-radius: 13px; background: #f7f5ff; border: 1px solid #e4dfff; }
.auto-number-box > i { color: var(--brand); font-size: 20px; }
.auto-number-box strong, .auto-number-box small { display: block; }
.auto-number-box small { color: var(--muted); font-size: 9px; }
.total-preview { border-radius: 16px; padding: 16px; background: linear-gradient(135deg, #111827, #1f2937); color: white; }
.total-preview span, .total-preview small { display: block; color: #aab3c3; font-size: 10px; }
.total-preview strong { display: block; font-size: 26px; font-weight: 900; margin: 4px 0; direction: ltr; text-align: inherit; }
.upload-zone { display: grid; place-items: center; text-align: center; min-height: 145px; padding: 20px; border: 1.5px dashed #cbd2dc; border-radius: 15px; cursor: pointer; background: #fafbfc; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.upload-zone:hover { border-color: var(--brand); background: #f8f7ff; }
.upload-zone:active { transform: scale(.995); }
.upload-zone input { display: none; }
.upload-zone i { font-size: 28px; color: var(--brand); }
.upload-zone strong, .upload-zone span { display: block; }
.upload-zone span { color: var(--muted); font-size: 9px; margin-top: 3px; }
.image-list-block { padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfe; }
.image-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.image-list-head strong { font-size: 10px; }
.image-list-head span { min-width: 34px; padding: 3px 7px; border-radius: 999px; background: #eef2ff; color: #4f46e5; font-size: 8px; font-weight: 800; text-align: center; direction: ltr; }
.invoice-view-images { padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfe; }
.image-preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.image-thumb { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: #f8fafc; box-shadow: 0 3px 10px rgba(17,24,39,.04); }
.image-thumb.pending { border-color: #d9d3ff; }
.image-open-button { width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; display: block; }
.image-open-button img { width: 100%; height: 100%; display: block; object-fit: cover; }
.image-zoom-badge { position: absolute; inset-inline-start: 6px; bottom: 6px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: rgba(17,24,39,.72); color: #fff; font-size: 11px; opacity: 0; transform: translateY(2px); transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.image-thumb:hover .image-zoom-badge, .image-thumb:focus-within .image-zoom-badge { opacity: 1; transform: translateY(0); }
.image-remove-button { position: absolute; inset-inline-end: 6px; top: 6px; z-index: 3; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: rgba(255,255,255,.94); color: var(--danger); box-shadow: 0 3px 12px rgba(17,24,39,.12); }
.image-remove-button:hover { background: #fff1f2; }
.image-remove-button.is-loading { opacity: .55; pointer-events: none; }
.image-remove-button.is-loading i { animation: image-spin .8s linear infinite; }
@keyframes image-spin { to { transform: rotate(360deg); } }
body.image-lightbox-open { overflow: hidden; }
.image-lightbox[hidden] { display: none !important; }
.image-lightbox { position: fixed !important; inset: 0 !important; z-index: 99999; width: 100vw; height: 100vh; height: 100dvh; display: grid; place-items: center; padding: 18px; isolation: isolate; }
.image-lightbox-backdrop { position: absolute; inset: 0; z-index: 0; background: rgba(7,10,18,.90); backdrop-filter: blur(5px); }
.image-lightbox-dialog { position: relative; z-index: 1; width: min(94vw, 1100px); height: min(88vh, 820px); height: min(88dvh, 820px); display: flex; flex-direction: column; border-radius: 18px; background: #0b1020; box-shadow: 0 24px 80px rgba(0,0,0,.45); overflow: hidden; }
.image-lightbox-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: auto; overscroll-behavior: contain; padding: 54px 18px 80px; }
.image-lightbox-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transform-origin: center center; transition: transform .16s ease; user-select: none; -webkit-user-drag: none; }
.image-lightbox-close { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 11px; background: rgba(255,255,255,.13); color: #fff; }
.image-lightbox-controls { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 7px; padding: 6px; border-radius: 13px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.image-lightbox-controls button { min-width: 40px; height: 38px; display: grid; place-items: center; padding: 0 11px; border: 0; border-radius: 9px; background: rgba(255,255,255,.12); color: #fff; font-weight: 800; }
.image-lightbox-controls button:hover { background: rgba(255,255,255,.2); }
.image-lightbox-controls #imageZoomReset { min-width: 66px; font-size: 10px; direction: ltr; }
.selected-customer { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid #d9f1e6; background: #f3fcf8; }
.selected-customer-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: #e4f8ee; color: #059669; }
.selected-customer strong, .selected-customer span, .selected-customer small { display: block; }
.selected-customer span { color: #5f6b7a; font-size: 10px; }
.lookup-results { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 1050; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 18px 45px rgba(17,24,39,.14); }
.lookup-item { display: flex; gap: 10px; padding: 11px; cursor: pointer; border-bottom: 1px solid #f1f3f6; }
.lookup-item:hover { background: #f8fafc; }
.lookup-item strong, .lookup-item span, .lookup-item small { display: block; }
.lookup-item span, .lookup-item small { color: var(--muted); font-size: 9px; }
.small-link { text-decoration: none; font-weight: 700; font-size: 11px; }
.record-times { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.record-times span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 8px; background: #f5f6f8; color: #7c8595; font-size: 8px; }
.report-note { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; border-radius: 13px; font-size: 10px; }
.empty-state { padding: 28px 10px; text-align: center; color: #9ca3af; }

/* Admin permissions & audit */
.permission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.permission-check { display: flex; gap: 10px; align-items: flex-start; padding: 11px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.permission-check:hover { background: #fafbff; border-color: #dcd8ff; }
.permission-check input { margin-top: 3px; }
.permission-check span { min-width: 0; }
.permission-check strong, .permission-check small { display: block; }
.permission-check strong { font-size: 11px; }
.permission-check small { font-size: 8px; color: #9ca3af; direction: ltr; text-align: left; }
.permission-summary { display: flex; gap: 7px; flex-wrap: wrap; }
.permission-summary span { padding: 6px 9px; border-radius: 9px; background: #f3f4f6; font-size: 9px; }
.permission-summary i { color: var(--success); }

/* Activity log filters */
.audit-panel { overflow: hidden; }
.audit-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(145px, 1fr)) auto;
    gap: 10px;
    align-items: end;
}
.audit-filter-field { min-width: 0; }
.audit-filter-field .form-label { margin-bottom: 6px; }
.audit-filter-actions { display: flex; gap: 8px; min-width: max-content; }
.audit-filter-actions .btn-dark { min-height: 43px; }
.audit-summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
    border: 1px solid #eef1f5;
}

/* Activity timeline */
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-item {
    display: flex;
    gap: 13px;
    min-width: 0;
    padding: 15px;
    border: 1px solid #edf0f4;
    border-radius: 15px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.activity-item:hover { border-color: #dddff0; box-shadow: 0 8px 24px rgba(17,24,39,.045); }
.activity-icon {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
}
.activity-icon.audit-action-created { background: #ecfdf5; color: #047857; }
.activity-icon.audit-action-updated { background: #eff6ff; color: #2563eb; }
.activity-icon.audit-action-deleted { background: #fef2f2; color: #dc2626; }
.activity-icon.audit-action-security { background: #fff7ed; color: #c2410c; }
.activity-main { min-width: 0; flex: 1; }
.activity-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; min-width: 0; }
.activity-title-group { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.activity-admin { font-size: 12px; color: #111827; }
.audit-action-badge, .audit-module-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 750;
    line-height: 1.15;
}
.audit-action-badge.audit-action-created { background: #ecfdf5; color: #047857; }
.audit-action-badge.audit-action-updated { background: #eff6ff; color: #2563eb; }
.audit-action-badge.audit-action-deleted { background: #fef2f2; color: #dc2626; }
.audit-action-badge.audit-action-security { background: #fff7ed; color: #c2410c; }
.audit-action-badge.audit-action-default { background: #f3f4f6; color: #4b5563; }
.audit-module-badge { background: #f5f3ff; color: #6d5dfc; }
.audit-module-badge b { font-weight: 850; }
.activity-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    color: #8a93a3;
    font-size: 9px;
    direction: ltr;
    white-space: nowrap;
}
.activity-description { margin: 7px 0 5px; color: #4b5563; font-size: 11px; overflow-wrap: anywhere; }
.activity-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.activity-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 8px;
    background: #f8fafc;
    color: #8a93a3;
    font-size: 8px;
    max-width: 100%;
}

/* Readable change details — never show raw JSON */
.audit-details { min-width: 0; border-top: 1px dashed #e5e7eb; padding-top: 10px; }
.audit-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    color: #374151;
    font-size: 10px;
    font-weight: 800;
    user-select: none;
}
.audit-details > summary::-webkit-details-marker { display: none; }
.audit-details > summary > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.audit-details > summary::after { content: "▾"; color: #9ca3af; margin-inline-start: auto; transition: transform .18s ease; }
.audit-details[open] > summary::after { transform: rotate(180deg); }
.audit-change-count { color: #8a93a3; font-size: 8px; font-weight: 650; margin-inline-start: 2px; }
.audit-changes { display: flex; flex-direction: column; gap: 8px; margin-top: 11px; min-width: 0; }
.audit-change-row {
    display: grid;
    grid-template-columns: minmax(120px, .65fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
    padding: 9px;
    border: 1px solid #edf0f4;
    border-radius: 12px;
    background: #fbfcfe;
}
.audit-change-row.audit-single { grid-template-columns: minmax(120px, .65fr) minmax(0, 2fr); }
.audit-change-label {
    min-width: 0;
    align-self: center;
    font-size: 10px;
    font-weight: 800;
    color: #374151;
    overflow-wrap: anywhere;
}
.audit-value-box {
    min-width: 0;
    padding: 8px 9px;
    border-radius: 10px;
    border: 1px solid #e8ebf0;
    background: #fff;
}
.audit-value-box small { display: block; margin-bottom: 4px; color: #9ca3af; font-size: 8px; font-weight: 700; }
.audit-value-box div {
    min-width: 0;
    color: #374151;
    font-size: 9px;
    line-height: 1.75;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.audit-before { border-inline-start: 3px solid #f59e0b; }
.audit-after { border-inline-start: 3px solid #10b981; }

/* Reports */
.report-kpi { height: 100%; padding: 14px; border-radius: 15px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.report-kpi span, .report-kpi strong { display: block; }
.report-kpi span { color: var(--muted); font-size: 9px; }
.report-kpi strong { margin-top: 4px; font-size: 16px; }
.report-kpi.profit strong { color: var(--success); }

/* Alerts */
.app-alert { border-radius: 14px; display: flex; gap: 9px; align-items: flex-start; font-size: 11px; }

/* Login */
.login-page { position: relative; overflow: hidden; background: radial-gradient(circle at 20% 15%, #eeeaff, transparent 30%), radial-gradient(circle at 85% 80%, #e6f3ff, transparent 30%), #f5f7fb; }
.login-orb { position: fixed; border-radius: 50%; filter: blur(10px); opacity: .45; }
.orb-1 { width: 280px; height: 280px; background: #c4b5fd; top: -90px; right: -70px; }
.orb-2 { width: 330px; height: 330px; background: #bae6fd; bottom: -120px; left: -90px; }
.login-card { width: min(440px, 100%); padding: 28px; border-radius: 24px; background: rgba(255,255,255,.93); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 28px 80px rgba(17,24,39,.14); backdrop-filter: blur(20px); }
.login-logo { width: 58px; height: 58px; margin: 0 auto; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 24px; box-shadow: 0 14px 30px rgba(109,93,252,.25); }

/* Mobile navigation */
.mobile-bottom-nav { position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); min-height: 64px; padding: 5px 7px; display: flex; align-items: stretch; justify-content: space-around; gap: 2px; border: 1px solid rgba(229,231,235,.9); border-radius: 20px; background: rgba(255,255,255,.94); backdrop-filter: blur(18px); box-shadow: 0 16px 45px rgba(17,24,39,.16); z-index: 1040; }
.mobile-bottom-nav a, .mobile-bottom-nav button { flex: 1; min-width: 0; border: 0; background: transparent; text-decoration: none; color: #8a93a3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 8px; }
.mobile-bottom-nav i { font-size: 18px; }
.mobile-bottom-nav .active { color: var(--brand); }
.mobile-bottom-nav .mobile-add { flex: 0 0 52px; width: 52px; height: 52px; align-self: center; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 9px 22px rgba(109,93,252,.35); }
.mobile-drawer .offcanvas-body { background: #f8fafc; }
.drawer-nav { display: flex; flex-direction: column; gap: 7px; }
.drawer-nav a { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 13px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: #374151; }
.drawer-nav a span { flex: 1; }
.dark-brand { color: var(--ink); }

@media (max-width: 1200px) {
    .status-dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .invoice-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .invoice-filter-search { grid-column: 1 / -1; }
    .invoice-filter-actions { grid-column: 1 / -1; }
    .filter-grid { grid-template-columns: 1.5fr 1fr 1fr; }
    .filter-actions { grid-column: 1 / -1; }
    .trip-filter-grid { grid-template-columns: 1fr 1fr; }
    .trip-filter-actions { grid-column: 1 / -1; }
    .audit-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .audit-filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 991.98px) {
    .main-area, [dir="rtl"] .main-area, [dir="ltr"] .main-area { margin: 0; }
    .topbar { min-height: auto; padding: 17px 15px; position: relative; }
    .topbar h1 { font-size: 21px; }
    .topbar p { max-width: 58vw; }
    .content-wrap { padding: 12px 13px 100px; }
    .panel-card, .form-section { padding: 15px; border-radius: 16px; }
}

@media (max-width: 767.98px) {
    body { font-size: 13px; }
    .topbar-actions .btn-create span { display: none; }
    .topbar-actions .btn-create { width: 40px; height: 40px; padding: 0; }
    .status-dashboard-grid { grid-template-columns: 1fr 1fr; }
    .metric-card { padding: 14px; }
    .metric-card > strong { font-size: 16px; }
    .filter-grid, .trip-filter-grid, .audit-filter-grid, .invoice-filter-grid { grid-template-columns: 1fr; }
    .invoice-filter-search, .invoice-filter-actions { grid-column: auto; }
    .invoice-filter-actions { justify-content: stretch; }
    .invoice-filter-actions .btn-dark { flex: 1; }
    .filter-actions, .trip-filter-actions { grid-column: auto; }
    .filter-bar { display: grid; grid-template-columns: 1fr auto auto; }
    .filter-bar .search-box { grid-column: 1 / -1; }
    .filter-bar .btn-primary { grid-column: 1 / -1; }
    .info-grid { grid-template-columns: 1fr; }
    .info-grid .wide { grid-column: auto; }
    .permission-grid { grid-template-columns: 1fr; }
    .audit-filter-actions { grid-column: auto; }
    .activity-item { padding: 12px; gap: 10px; }
    .activity-head { flex-direction: column; gap: 7px; }
    .activity-time { white-space: normal; }
    .audit-change-row, .audit-change-row.audit-single { grid-template-columns: 1fr; }
    .audit-change-label { padding-bottom: 2px; }
    .image-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    /* Convert large tables to compact mobile cards. */
    .mobile-table thead { display: none; }
    .mobile-table, .mobile-table tbody, .mobile-table tr, .mobile-table td { display: block; width: 100%; }
    .invoice-table { min-width: 0; }
    .invoice-table .customer-cell, .invoice-table .phone-cell, .invoice-table .address-cell { min-width: 0; max-width: none; white-space: normal; }
    .mobile-table tr { margin-bottom: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(17,24,39,.04); }
    .invoice-table.mobile-table tr:nth-child(even) { background: #f4f6f9; }
    .invoice-table.mobile-table tr:nth-child(odd) { background: #fff; }
    .invoice-table.mobile-table tr > td,
    .invoice-table.mobile-table tr:hover > td { background: transparent; }
    .mobile-table td { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #eceff3; text-align: end; }
    .mobile-table td:last-child { border-bottom: 0; }
    .mobile-table td::before { content: attr(data-label); color: #8a93a3; font-size: 9px; font-weight: 700; text-align: start; flex: 0 0 38%; }
    .mobile-table td[colspan]::before { display: none; }
    .action-buttons { justify-content: flex-end; }
    .address-cell { max-width: none; }
}

@media (max-width: 420px) {
    .status-dashboard-grid { grid-template-columns: 1fr; }
    .image-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .image-list-block { padding: 8px; }
    .image-remove-button { width: 28px; height: 28px; inset-inline-end: 4px; top: 4px; }
    .image-zoom-badge { opacity: 1; width: 23px; height: 23px; inset-inline-start: 4px; bottom: 4px; }
    .image-lightbox { padding: 0; }
    .image-lightbox-dialog { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
    .image-lightbox-stage { padding: 58px 10px 84px; }
    .login-card { padding: 20px; border-radius: 20px; }
}

.record-times .record-updated-by { background: #eef2ff; color: #4f46e5; }

/* --------------------------------------------------------------------------
   Desktop sidebar toggle
   --------------------------------------------------------------------------
   The sidebar can be fully hidden on desktop to give tables and reports the
   entire viewport width. The state is persisted by app.js in localStorage.
*/
.sidebar,
.main-area {
    transition: width .24s ease, margin .24s ease, transform .24s ease;
}

.topbar-heading-group {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-title {
    min-width: 0;
}

.desktop-sidebar-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    flex: 0 0 42px;
    border-color: #dfe3eb;
    box-shadow: 0 6px 18px rgba(17, 24, 39, .05);
}

.desktop-sidebar-toggle i {
    font-size: 18px;
    transition: transform .2s ease;
}

@media (min-width: 992px) {
    [dir="ltr"].sidebar-hidden .sidebar {
        transform: translateX(-105%);
    }

    [dir="rtl"].sidebar-hidden .sidebar {
        transform: translateX(105%);
    }

    [dir="ltr"].sidebar-hidden .main-area,
    [dir="rtl"].sidebar-hidden .main-area {
        margin-left: 0;
        margin-right: 0;
    }

    /* Let wide tables use the newly available space instead of staying narrow. */
    .sidebar-hidden .content-wrap {
        max-width: 1780px;
    }
}


/* --------------------------------------------------------------------------
   Multiple transport tracking numbers
   -------------------------------------------------------------------------- */
.transport-tracking-list {
    display: grid;
    gap: 9px;
}

.transport-tracking-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 42px;
    gap: 8px;
    align-items: center;
}

.transport-tracking-index {
    width: 34px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.transport-tracking-row .icon-btn {
    width: 42px;
    height: 38px;
}

.transport-tracking-row .icon-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.tracking-preview-multi {
    align-items: flex-start;
}

.tracking-chip-list,
.tracking-detail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.tracking-chip {
    display: inline-flex;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 9px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tracking-detail-item {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    width: auto !important;
    padding: 7px 10px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #334155;
    overflow-wrap: anywhere;
}

@media (max-width: 575px) {
    .transport-tracking-row {
        grid-template-columns: 30px minmax(0, 1fr) 40px;
        gap: 6px;
    }

    .transport-tracking-index {
        width: 30px;
    }
}


/* --------------------------------------------------------------------------
   Multiple invoice cart links
   -------------------------------------------------------------------------- */
.cart-url-list {
    display: grid;
    gap: 9px;
}

.cart-url-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto 42px 42px;
    gap: 8px;
    align-items: center;
}

.cart-url-index,
.cart-link-number {
    width: 34px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    flex: 0 0 auto;
}

.cart-url-row .icon-btn {
    width: 42px;
    height: 38px;
}

.cart-url-row .icon-btn:disabled,
.cart-url-row .open-cart-url.disabled {
    opacity: .35;
    pointer-events: none;
}

.cart-links-block {
    display: grid;
    gap: 10px;
}

.cart-links-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
}

.cart-links-title strong {
    font-size: 12px;
}

.cart-links-title > span {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #ede9fe;
    color: #6d5dfc;
    font-size: 10px;
    font-weight: 800;
}

.cart-links-stack {
    display: grid;
    gap: 8px;
}

.cart-links-stack .cart-link {
    margin-top: 0 !important;
}

.cart-links-stack .cart-link-number {
    width: 28px;
    height: 28px;
    background: #ede9fe;
    color: #6d5dfc;
}

@media (max-width: 575px) {
    .cart-url-row {
        grid-template-columns: 30px minmax(0, 1fr) 40px 40px;
        gap: 6px;
    }

    .cart-url-index { grid-column: 1; grid-row: 1; width: 30px; }
    .cart-url-row > input[name="cart_urls[]"] { grid-column: 2; grid-row: 1; }
    .cart-url-row .open-cart-url { grid-column: 3; grid-row: 1; }
    .cart-url-row .remove-cart-url { grid-column: 4; grid-row: 1; }
    .cart-url-row .import-cart-url { grid-column: 2 / 5; grid-row: 2; width: 100%; }
}


.cart-url-row .import-cart-url {
    min-height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 800;
}

.cart-url-row .import-cart-url.disabled,
.cart-url-row .import-cart-url:disabled {
    opacity: .45;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   SHEIN cart import + editable invoice product rows
   -------------------------------------------------------------------------- */
.shein-import-panel {
    border: 1px solid #dce3ec;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
    padding: 14px;
}

.shein-import-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.shein-import-head > div {
    display: grid;
    gap: 3px;
}

.shein-import-head strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
}

.shein-import-head small {
    color: #64748b;
    line-height: 1.6;
}

.shein-item-badge {
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.shein-extension-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px dashed #f59e0b;
    border-radius: 12px;
    background: #fffbeb;
    color: #92400e;
    font-size: 11px;
    line-height: 1.6;
    transition: .2s ease;
}

.shein-extension-note > span { flex: 1; }
.shein-extension-note.is-ready {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}
.shein-extension-note.is-ready::after {
    content: '✓';
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-weight: 900;
}
.shein-extension-note.is-ready .btn { display: none; }
.shein-extension-note.needs-attention { transform: scale(1.015); box-shadow: 0 0 0 4px rgba(245, 158, 11, .12); }

.invoice-manual-item-actions {
    display: flex;
    justify-content: flex-end;
}

.invoice-manual-item-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 800;
}

@media (max-width: 575.98px) {
    .invoice-manual-item-actions .btn {
        width: 100%;
    }
}

.invoice-product-list,
.invoice-products-view-list {
    display: grid;
    gap: 12px;
}

.invoice-product-row,
.invoice-product-view-row {
    position: relative;
    display: grid;
    grid-template-columns: 42px 108px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #dbe3ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .045);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.invoice-product-row:hover,
.invoice-product-view-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}

.invoice-product-number,
.invoice-product-view-number {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 900;
    align-self: start;
}

.invoice-product-image-box {
    position: relative;
    width: 108px;
    height: 108px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #f8fafc;
    padding: 0;
    flex: 0 0 auto;
}

button.invoice-product-image-box {
    appearance: none;
    cursor: zoom-in;
    outline: 0;
}

button.invoice-product-image-box:focus-visible {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
}

.invoice-product-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}

.invoice-product-image-button:hover img { transform: scale(1.025); }

.invoice-product-image-zoom {
    position: absolute;
    inset-inline-start: 7px;
    bottom: 7px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(15, 23, 42, .75);
    color: #fff;
    font-size: 12px;
    pointer-events: none;
    backdrop-filter: blur(5px);
}

.invoice-product-image-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 25px;
}

.invoice-product-fields {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.invoice-product-main-fields {
    display: grid;
    grid-template-columns: minmax(170px, .9fr) minmax(240px, 1.5fr) 86px;
    gap: 10px;
    align-items: end;
}

.invoice-product-field { min-width: 0; }
.invoice-product-fields .form-label {
    margin-bottom: 5px;
    font-size: 10px;
    line-height: 1.2;
    color: #64748b;
    font-weight: 850;
}
.invoice-product-fields .form-control {
    min-height: 42px;
    border-radius: 11px;
    font-size: 12px;
    background: #fff;
}
.invoice-product-fields .product-sku-input {
    font-weight: 850;
    letter-spacing: .01em;
}
.invoice-product-fields .product-variant-input {
    background: #f8fafc;
    font-weight: 750;
}
.invoice-product-fields .product-quantity-input {
    text-align: center;
    font-weight: 900;
}
.invoice-product-fields .product-image-url-input {
    min-height: 38px;
    font-size: 11px;
    color: #64748b;
    background: #fbfdff;
}

.invoice-product-row .remove-invoice-item {
    width: 42px;
    height: 42px;
    align-self: start;
    border-radius: 12px;
}

.shein-items-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 110px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #94a3b8;
    text-align: center;
    font-size: 11px;
}
.shein-items-empty i { font-size: 24px; }

.invoice-products-view {
    display: grid;
    gap: 10px;
}

.invoice-product-view-row {
    grid-template-columns: 42px 108px minmax(0, 1fr);
    align-items: center;
}

.invoice-product-image-box.view-only {
    width: 108px;
    height: 108px;
}

.invoice-product-view-copy {
    display: grid;
    grid-template-columns: minmax(190px, .9fr) minmax(280px, 1.6fr) 86px;
    gap: 10px;
    min-width: 0;
    align-items: stretch;
}

.product-view-field {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #edf1f6;
    border-radius: 12px;
    background: #f8fafc;
}
.invoice-product-view-copy span,
.invoice-product-view-copy strong { display: block; }
.invoice-product-view-copy span {
    color: #64748b;
    font-size: 9px;
    font-weight: 750;
    margin-bottom: 4px;
}
.invoice-product-view-copy strong {
    color: #0f172a;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.quantity-view-field { text-align: center; }
.quantity-view-field strong { font-size: 17px; }

.image-lightbox.quick-close-image .image-lightbox-stage img { cursor: zoom-out; }

@media (max-width: 991px) {
    .invoice-product-main-fields {
        grid-template-columns: minmax(140px, .9fr) minmax(180px, 1.4fr) 76px;
    }
    .invoice-product-view-copy {
        grid-template-columns: minmax(150px, .9fr) minmax(200px, 1.4fr) 76px;
    }
}

@media (max-width: 767px) {
    .shein-extension-note { align-items: flex-start; flex-wrap: wrap; }
    .shein-extension-note .btn { width: 100%; }

    .invoice-product-row,
    .invoice-product-view-row {
        grid-template-columns: 36px 96px minmax(0, 1fr);
        gap: 10px;
        padding: 11px;
        border-radius: 16px;
    }

    .invoice-product-number,
    .invoice-product-view-number {
        width: 34px;
        height: 34px;
    }

    .invoice-product-image-box,
    .invoice-product-image-box.view-only {
        width: 96px;
        height: 96px;
    }

    .invoice-product-row .remove-invoice-item {
        position: absolute;
        top: 11px;
        inset-inline-end: 11px;
        width: 36px;
        height: 36px;
        z-index: 2;
    }

    .invoice-product-row .invoice-product-fields {
        grid-column: 1 / -1;
    }

    .invoice-product-main-fields {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 72px;
        gap: 8px;
    }

    .invoice-product-view-copy {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr);
        gap: 8px;
    }
    .quantity-view-field {
        position: absolute;
        top: 11px;
        inset-inline-end: 11px;
        width: 54px;
        padding: 7px 6px;
    }
}

@media (max-width: 575px) {
    .invoice-product-list,
    .invoice-products-view-list { gap: 10px; }

    .invoice-product-row,
    .invoice-product-view-row {
        grid-template-columns: 34px 88px minmax(0, 1fr);
        gap: 8px;
        padding: 10px;
    }

    .invoice-product-image-box,
    .invoice-product-image-box.view-only {
        width: 88px;
        height: 88px;
        border-radius: 13px;
    }

    .invoice-product-image-zoom {
        width: 26px;
        height: 26px;
        inset-inline-start: 5px;
        bottom: 5px;
    }

    .invoice-product-row .remove-invoice-item {
        top: 10px;
        inset-inline-end: 10px;
        width: 34px;
        height: 34px;
    }

    .invoice-product-main-fields {
        grid-template-columns: minmax(0, 1fr) 68px;
    }
    .invoice-product-main-fields .sku-field,
    .invoice-product-main-fields .variant-field {
        grid-column: 1;
    }
    .invoice-product-main-fields .quantity-field {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: stretch;
        display: flex;
        flex-direction: column;
    }
    .invoice-product-main-fields .quantity-field .form-control {
        flex: 1;
        min-height: 50px;
    }

    .invoice-product-fields .form-control { font-size: 13px; }
    .invoice-product-fields .product-image-url-input { font-size: 10px; }

    .invoice-product-view-copy {
        grid-template-columns: 1fr;
    }
    .product-view-field {
        padding: 8px 10px;
    }
    .quantity-view-field {
        top: 10px;
        inset-inline-end: 10px;
        width: 48px;
    }
}


/* --------------------------------------------------------------------------
   Instant customer suggestions — Invoice & Customer search
   -------------------------------------------------------------------------- */
.live-customer-search {
    position: relative;
    overflow: visible;
    z-index: 20;
}

.live-customer-search:focus-within {
    border-color: #a89cff;
    box-shadow: 0 0 0 4px rgba(109, 93, 252, .09);
}

.live-search-results {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline: 0;
    z-index: 1080;
    max-height: 390px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 7px;
    border: 1px solid #e3e7ef;
    border-radius: 15px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 20px 55px rgba(17, 24, 39, .16);
    backdrop-filter: blur(14px);
}

.live-search-item {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto 18px;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 0;
    border-bottom: 1px solid #f0f2f6;
    border-radius: 10px;
    background: transparent;
    color: #111827;
    text-align: start;
    cursor: pointer;
    transition: background .14s ease, transform .14s ease;
}

.live-search-item:last-child { border-bottom: 0; }
.live-search-item:hover,
.live-search-item.active {
    background: #f5f3ff;
}

.live-search-item:active { transform: scale(.995); }

.live-search-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, #6d5dfc, #8b5cf6);
    color: #fff;
    font-size: 13px;
    font-weight: 850;
    box-shadow: 0 7px 16px rgba(109, 93, 252, .18);
}

.live-search-copy { min-width: 0; }
.live-search-copy strong,
.live-search-copy span,
.live-search-copy small { display: block; min-width: 0; }
.live-search-copy strong {
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.live-search-phone {
    margin-top: 2px;
    color: #475569;
    font-size: 9px;
    text-align: start;
    direction: ltr;
}
.live-search-copy small {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-search-count {
    padding: 5px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 8px;
    font-weight: 750;
    white-space: nowrap;
}

.live-search-go { color: #8b5cf6; font-size: 13px; }
[dir="rtl"] .live-search-go { transform: scaleX(-1); }

.live-search-loading,
.live-search-empty {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    color: #8a93a3;
    font-size: 10px;
}

@media (max-width: 575px) {
    .live-search-results {
        max-height: min(360px, 52vh);
        border-radius: 13px;
    }

    .live-search-item {
        grid-template-columns: 36px minmax(0, 1fr) 18px;
        gap: 8px;
        padding: 9px;
    }

    .live-search-avatar { width: 36px; height: 36px; }
    .live-search-count { display: none; }
}

/* Invoice customer contact shortcuts */
.contact-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.contact-value-row > strong { min-width: 0; }
.contact-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.contact-action:hover { transform: translateY(-1px); }
.contact-action.instagram {
    color: #9d174d;
    background: #fff1f2;
    border: 1px solid #fecdd3;
}
.contact-action.whatsapp {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
.table-contact { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.table-contact > span { min-width: 0; overflow-wrap: anywhere; }
.table-contact-btn {
    width: 27px;
    height: 27px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 27px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
}
.table-contact-btn.instagram { background: #fff1f2; color: #be185d; }
.table-contact-btn.whatsapp { background: #ecfdf5; color: #059669; }
.contact-action-toast {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 2100;
    max-width: min(420px, calc(100vw - 32px));
    padding: 11px 14px;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    box-shadow: 0 14px 36px rgba(17,24,39,.24);
    font-size: 10px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
.contact-action-toast.show { opacity: 1; transform: translateY(0); }
html[dir="rtl"] .contact-action-toast { right: auto; left: 20px; }

@media (max-width: 575.98px) {
    .contact-value-row { align-items: flex-start; }
    .contact-action span { display: none; }
    .contact-action { width: 34px; padding: 0; }
    .contact-action-toast { right: 12px; left: 12px; bottom: 86px; max-width: none; text-align: center; }
    html[dir="rtl"] .contact-action-toast { right: 12px; left: 12px; }
}

@media (max-width: 340px) {
    .image-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* NRT Kurdish font note: upload the user's NRT-Reg.ttf to /public/assets/fonts/NRT-Reg.ttf. */

/* App-wide delete confirmation */
body.app-confirm-open { overflow: hidden; }
.app-confirm-dialog[hidden] { display: none !important; }
.app-confirm-dialog {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: grid;
    place-items: center;
    padding: 18px;
}
.app-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .54);
    backdrop-filter: blur(4px);
}
.app-confirm-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 24px;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 22px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 28px 80px rgba(15,23,42,.24);
    text-align: center;
    animation: appConfirmIn .16s ease-out;
}
.app-confirm-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 24px;
}
.app-confirm-card h3 { margin: 0; font-size: 18px; font-weight: 850; }
.app-confirm-card p { margin: 10px 0 20px; color: #64748b; line-height: 1.7; font-size: 13px; }
.app-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-confirm-actions .btn { min-height: 45px; border-radius: 13px; font-weight: 800; }
.app-confirm-no { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }
.app-confirm-no:hover { background: #e9eef5; }
.app-confirm-yes { background: #dc2626; color: #fff; border: 1px solid #dc2626; }
.app-confirm-yes:hover { background: #b91c1c; color: #fff; }
@keyframes appConfirmIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* Non-blocking app toasts */
.app-toast-stack {
    position: fixed;
    inset-inline-end: 20px;
    bottom: 22px;
    z-index: 2600;
    width: min(380px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 9px;
    pointer-events: none;
}
.app-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    color: #334155;
    box-shadow: 0 18px 45px rgba(15,23,42,.14);
    opacity: 0;
    transform: translateY(8px);
    transition: .2s ease;
    font-size: 12px;
    font-weight: 700;
}
.app-toast.show { opacity: 1; transform: none; }
.app-toast-success i { color: #059669; }
.app-toast-warning i { color: #d97706; }
.app-toast-danger i { color: #dc2626; }

.image-thumb.is-removing { opacity: .45; transform: scale(.96); pointer-events: none; transition: .15s ease; }

@media (max-width: 991.98px) {
    .app-toast-stack { bottom: 82px; inset-inline: 16px; width: auto; }
}
@media (max-width: 575.98px) {
    .app-confirm-dialog { align-items: end; padding: 12px; }
    .app-confirm-card { border-radius: 20px; padding: 20px 16px 16px; }
    .app-confirm-actions { gap: 8px; }
}
html {
    font-size: 15px;
}
body {
    font-size: 16px !important;
}

button,
input,
select,
textarea,
.btn,
.form-control,
.form-select,
.input-group-text,
.dropdown-menu,
.modal,
.offcanvas {
    font-size: 16px !important;
}

/* ناونیشانی خانەکان */
.form-label {
    font-size: 14px !important;
}

/* Table / Rows */
.table thead th {
    font-size: 12px !important;
}

.table tbody td {
    font-size: 14px !important;
}

/* دەقە بچووکەکانی ناو UI */
small,
.small,
.panel-header p,
.section-title p,
.list-main small,
.status-stat-card small,
.trip-stats-grid span,
.record-times span {
    font-size: 12px !important;
}

/* Badge / Status */
.status-pill,
.badge,
.record-badge {
    font-size: 12px !important;
}

/* مۆبایل */
@media (max-width: 767.98px) {
    body {
        font-size: 15px !important;
    }

    .table tbody td {
        font-size: 14px !important;
    }

    .mobile-table td::before {
        font-size: 12px !important;
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        font-size: 11px !important;
    }
}
 body {
        font-size: 18px !important;
    }

    .table tbody td {
        font-size: 16px !important;
    }

    }
/* ========================================================================
   Invoice SHEIN products — responsive card layout v1.4
   Keeps edit/view rows readable inside narrow columns and on phones.
   ======================================================================== */
.invoice-product-list,
.invoice-products-view-list {
    width: 100%;
    min-width: 0;
    gap: 12px;
}

.invoice-product-row,
.invoice-product-view-row {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    align-items: start;
    border-color: #dfe6ef;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 7px 22px rgba(15, 23, 42, .045);
}

/* The number is a badge, not a full grid column. */
.invoice-product-number,
.invoice-product-view-number {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    z-index: 3;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(99, 102, 241, .12);
    border-radius: 10px;
    background: rgba(238, 242, 255, .96);
    box-shadow: 0 4px 12px rgba(79, 70, 229, .08);
}

/* EDIT */
.invoice-product-row {
    grid-template-columns: 112px minmax(0, 1fr) 42px;
    gap: 13px;
    padding: 13px;
}

.invoice-product-row > .invoice-product-image-box {
    grid-column: 1;
}
.invoice-product-row > .invoice-product-fields {
    grid-column: 2;
    width: 100%;
    min-width: 0;
}
.invoice-product-row > .remove-invoice-item {
    grid-column: 3;
    width: 38px;
    height: 38px;
    margin: 0;
    align-self: start;
}

.invoice-product-image-box,
.invoice-product-image-box.view-only {
    width: 112px;
    height: 112px;
    min-width: 0;
    border-radius: 16px;
    border-color: #dbe3ed;
    background: #f4f7fb;
}
.invoice-product-image-box img {
    object-fit: cover;
}

.invoice-product-fields {
    width: 100%;
    min-width: 0;
    gap: 8px;
}
.invoice-product-main-fields {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.35fr) 72px;
    gap: 8px;
    align-items: end;
}
.invoice-product-main-fields > *,
.invoice-product-field,
.invoice-product-field .form-control {
    min-width: 0;
    max-width: 100%;
}
.invoice-product-fields .form-label {
    margin-bottom: 4px;
    font-size: 9px;
    line-height: 1.2;
}
.invoice-product-fields .form-control {
    min-height: 40px;
    height: 40px;
    padding: 8px 10px;
    border-radius: 11px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.invoice-product-fields .product-sku-input {
    font-size: 11px;
}
.invoice-product-fields .product-variant-input {
    font-size: 11px;
}
.invoice-product-fields .product-quantity-input {
    padding-inline: 5px;
    font-size: 12px;
}
.invoice-product-fields .image-url-field {
    width: 100%;
    min-width: 0;
}
.invoice-product-fields .product-image-url-input {
    width: 100%;
    min-width: 0;
    height: 36px;
    min-height: 36px;
    font-size: 9px;
    color: #64748b;
}

/* VIEW */
.invoice-product-view-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    padding: 13px;
}
.invoice-product-view-row > .invoice-product-image-box {
    grid-column: 1;
}
.invoice-product-view-row > .invoice-product-view-copy {
    grid-column: 2;
}
.invoice-product-view-copy {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr) 66px;
    gap: 8px;
}
.product-view-field {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 11px;
    background: #f8fafc;
}
.invoice-product-view-copy span {
    margin-bottom: 3px;
    font-size: 8px;
}
.invoice-product-view-copy strong {
    max-width: 100%;
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.quantity-view-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.quantity-view-field strong {
    font-size: 16px;
}

/* The product picture is the primary tap/click target. */
.invoice-product-image-button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.invoice-product-image-button:active {
    transform: scale(.975);
}
.invoice-product-image-zoom {
    opacity: .94;
}

/* Tablet / narrow desktop columns. */
@media (max-width: 1100px) {
    .invoice-product-row {
        grid-template-columns: 100px minmax(0, 1fr) 40px;
        gap: 10px;
        padding: 11px;
    }
    .invoice-product-image-box,
    .invoice-product-image-box.view-only {
        width: 100px;
        height: 100px;
    }
    .invoice-product-main-fields {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 66px;
        gap: 7px;
    }
    .invoice-product-view-row {
        grid-template-columns: 100px minmax(0, 1fr);
        gap: 10px;
        padding: 11px;
    }
    .invoice-product-view-copy {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 58px;
        gap: 7px;
    }
}

/* Phone layout: picture beside core data, URL below; no horizontal overflow. */
@media (max-width: 767.98px) {
    .invoice-product-list,
    .invoice-products-view-list {
        gap: 10px;
    }

    .invoice-product-row {
        grid-template-columns: 90px minmax(0, 1fr);
        gap: 10px;
        padding: 11px;
        padding-top: 12px;
        border-radius: 16px;
    }
    .invoice-product-row > .invoice-product-image-box {
        grid-column: 1;
        grid-row: 1;
    }
    .invoice-product-row > .invoice-product-fields {
        grid-column: 2;
        grid-row: 1;
    }
    .invoice-product-row > .remove-invoice-item {
        position: absolute;
        top: 10px;
        inset-inline-end: 10px;
        z-index: 4;
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .invoice-product-image-box,
    .invoice-product-image-box.view-only {
        width: 90px;
        height: 90px;
        border-radius: 14px;
    }
    .invoice-product-number,
    .invoice-product-view-number {
        top: 8px;
        inset-inline-start: 8px;
        width: 29px;
        height: 29px;
        border-radius: 9px;
        font-size: 10px;
    }

    .invoice-product-fields {
        padding-inline-end: 34px;
    }
    .invoice-product-main-fields {
        grid-template-columns: minmax(0, 1fr) 58px;
        gap: 7px;
    }
    .invoice-product-main-fields .sku-field {
        grid-column: 1;
        grid-row: 1;
    }
    .invoice-product-main-fields .variant-field {
        grid-column: 1;
        grid-row: 2;
    }
    .invoice-product-main-fields .quantity-field {
        grid-column: 2;
        grid-row: 1 / span 2;
        display: flex;
        min-width: 0;
        flex-direction: column;
    }
    .invoice-product-main-fields .quantity-field .form-control {
        flex: 1;
        height: auto;
        min-height: 44px;
    }
    .invoice-product-fields .form-label {
        font-size: 8px;
    }
    .invoice-product-fields .form-control {
        min-height: 36px;
        height: 36px;
        padding: 7px 8px;
        font-size: 10px;
    }
    .invoice-product-fields .product-image-url-input {
        min-height: 34px;
        height: 34px;
        font-size: 8px;
    }

    .invoice-product-view-row {
        grid-template-columns: 94px minmax(0, 1fr);
        gap: 10px;
        padding: 11px;
        border-radius: 16px;
    }
    .invoice-product-view-row .invoice-product-image-box.view-only {
        width: 94px;
        height: 94px;
    }
    .invoice-product-view-copy {
        grid-template-columns: minmax(0, 1fr) 52px;
        gap: 7px;
    }
    .sku-view-field,
    .variant-view-field {
        grid-column: 1;
    }
    .quantity-view-field {
        grid-column: 2;
        grid-row: 1 / span 2;
        min-width: 0;
        padding: 7px 5px;
    }
    .product-view-field {
        padding: 7px 8px;
    }
    .invoice-product-view-copy span {
        font-size: 7px;
    }
    .invoice-product-view-copy strong {
        font-size: 10px;
    }

    /* Full-screen image popup on phones. Tap the image again to close. */
    .image-lightbox {
        padding: 0 !important;
    }
    .image-lightbox-dialog {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
    }
    .image-lightbox-stage {
        padding: 58px 10px calc(82px + env(safe-area-inset-bottom));
        touch-action: pan-x pan-y;
    }
    .image-lightbox-stage img {
        max-width: 96vw;
        max-height: calc(100dvh - 150px);
    }
    .image-lightbox-controls {
        bottom: calc(12px + env(safe-area-inset-bottom));
    }
    .image-lightbox-close {
        top: calc(10px + env(safe-area-inset-top));
    }
}

@media (max-width: 420px) {
    .invoice-product-row {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 8px;
        padding: 9px;
    }
    .invoice-product-image-box,
    .invoice-product-image-box.view-only {
        width: 78px;
        height: 78px;
        border-radius: 12px;
    }
    .invoice-product-fields {
        padding-inline-end: 30px;
    }
    .invoice-product-main-fields {
        grid-template-columns: minmax(0, 1fr) 52px;
        gap: 6px;
    }
    .invoice-product-fields .form-control {
        padding-inline: 7px;
        font-size: 9px;
    }
    .invoice-product-view-row {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 8px;
        padding: 9px;
    }
    .invoice-product-view-row .invoice-product-image-box.view-only {
        width: 82px;
        height: 82px;
    }
    .invoice-product-view-copy {
        grid-template-columns: minmax(0, 1fr) 46px;
        gap: 6px;
    }
}

/* Imported SHEIN product images are stored locally after import/save. */
.product-image-saved-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    width: fit-content;
    margin-top: .55rem;
    padding: .32rem .62rem;
    border-radius: 999px;
    background: rgba(25, 135, 84, .08);
    color: #198754;
    font-size: .78rem;
    font-weight: 700;
}
.product-image-saved-badge i { font-size: .9rem; }

/* Warehouse receiving state on invoice product rows. */
.invoice-product-view-row.is-received-complete {
    background: #eefbf3;
    border-color: #afe3c2;
}
.invoice-product-view-row.is-received-partial {
    background: #fff2f4;
    border-color: #ffc6d0;
}
.invoice-product-view-row { position: relative; }
.invoice-item-received-badge {
    position: absolute;
    z-index: 5;
    top: 8px;
    inset-inline-end: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 27px;
    padding: 4px 7px;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 850;
    direction: ltr;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}
.invoice-item-received-badge.complete { background: #dcfce7; color: #166534; }
.invoice-item-received-badge.partial { background: #ffe0e6; color: #9f1239; }
.invoice-receiving-title { flex-wrap: wrap; }
.invoice-receiving-progress {
    margin-inline-start: auto;
    direction: ltr;
    background: #eef2ff !important;
    color: #4338ca !important;
    font-weight: 800;
}
@media (max-width: 767.98px) {
    .invoice-item-received-badge {
        top: 7px;
        inset-inline-end: 7px;
        min-height: 24px;
        padding: 3px 6px;
        font-size: 8px;
    }
    .invoice-receiving-progress {
        width: 100%;
        margin-inline-start: 0;
        margin-top: 5px;
        justify-content: center;
    }
}

/* Receiving undo action on invoice item rows. */
.invoice-item-unreceive-button {
    border: 0;
    cursor: pointer;
    font: inherit;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.invoice-item-unreceive-button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(15,23,42,.13); }
.invoice-item-unreceive-button:active { transform: none; }
.invoice-item-unreceive-button:disabled { opacity: .55; cursor: wait; }
.invoice-unreceive-icon { margin-inline-start: 2px; font-size: 10px; }
.invoice-item-unreceive-button.is-loading .invoice-unreceive-icon { animation: receivingUndoSpin .7s linear infinite; }
@keyframes receivingUndoSpin { to { transform: rotate(-360deg); } }

/* --------------------------------------------------------------------------
   Receiving v2.1 — product images must never crop on invoice/mobile view.
   -------------------------------------------------------------------------- */
.invoice-product-image-box img,
.invoice-product-image-box.view-only img,
.invoice-product-image-button img {
    object-fit: contain !important;
    object-position: center !important;
    background: #fff;
}

@media (max-width: 767.98px) {
    .image-lightbox-stage {
        overflow: hidden !important;
        padding: calc(54px + env(safe-area-inset-top)) 8px calc(18px + env(safe-area-inset-bottom)) !important;
    }
    .image-lightbox-stage img {
        width: auto !important;
        height: auto !important;
        max-width: calc(100vw - 16px) !important;
        max-height: calc(100dvh - 82px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        object-fit: contain !important;
        object-position: center !important;
    }
    .image-lightbox-controls {
        display: none !important;
    }
}

/* v2.5.21 — editable invoice product image is an upload/replace target. */
.invoice-product-image-button[data-item-image-upload] {
    cursor: pointer;
}
.invoice-product-image-button[data-item-image-upload]:hover {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .08);
}

/* v2.5.22 — delivery groups (invoice-only delivery consolidation) */
.delivery-group-summary {
    border: 1px solid #dbeafe;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.delivery-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.delivery-group-head > div { min-width: 0; }
.delivery-group-kicker {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 2px;
}
.delivery-group-head strong {
    display: block;
    font-size: 23px;
    line-height: 1;
    font-weight: 900;
}
.delivery-group-count {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: #e8f1ff;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 800;
}
.delivery-group-invoices {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px 0;
}
.delivery-group-invoice-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 5px 10px;
    border: 1px solid #d8e0ea;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
}
.delivery-group-invoice-chip:hover { border-color: #93c5fd; color: #1d4ed8; }
.delivery-group-invoice-chip.active { background: #111827; border-color: #111827; color: #fff; }
.delivery-group-money { border-top: 1px solid var(--line); }
.delivery-group-money > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.delivery-group-money > div:last-child { border-bottom: 0; }
.delivery-group-money span { color: var(--muted); font-size: 10px; }
.delivery-group-money strong { font-size: 13px; }
.delivery-group-money .total strong { color: var(--brand); font-size: 19px; }
.delivery-group-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.delivery-group-actions form { margin: 0; }
.delivery-group-modal .modal-content {
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}
.delivery-group-modal .modal-header,
.delivery-group-modal .modal-footer { border-color: #e5e7eb; }
.delivery-group-modal .modal-title { font-size: 16px; font-weight: 900; }
.delivery-group-modal-subtitle { color: var(--muted); font-size: 11px; margin-top: 3px; }
.delivery-group-rule-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 10px;
    line-height: 1.7;
}
.delivery-group-rule-note i { margin-top: 2px; }
.delivery-group-current-invoice {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: #111827;
    color: #fff;
}
.delivery-group-current-invoice > span { font-size: 10px; opacity: .72; }
.delivery-group-current-invoice > strong { grid-row: 1 / 3; grid-column: 2; font-size: 17px; }
.delivery-group-current-invoice > small { font-size: 9px; opacity: .75; }
.delivery-group-candidate-list { display: grid; gap: 8px; }
.delivery-group-candidate {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid #dde3ea;
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.delivery-group-candidate:hover { border-color: #93c5fd; background: #f8fbff; }
.delivery-group-candidate:has(input:checked) { border-color: #60a5fa; background: #eff6ff; }
.delivery-group-candidate input { position: absolute; opacity: 0; pointer-events: none; }
.delivery-group-check {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    color: transparent;
    background: #fff;
}
.delivery-group-candidate:has(input:checked) .delivery-group-check { background: #2563eb; border-color: #2563eb; color: #fff; }
.delivery-group-candidate-copy { min-width: 0; display: grid; gap: 4px; }
.delivery-group-candidate-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.delivery-group-candidate-top > strong { font-size: 13px; font-weight: 900; }
.delivery-group-candidate .status-pill { font-size: 8px; padding: 4px 7px; }
.delivery-group-candidate-meta { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.delivery-group-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 105px;
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 13px;
    color: var(--muted);
    text-align: center;
    font-size: 10px;
}
.delivery-group-empty i { font-size: 24px; }
@media (max-width: 575.98px) {
    .delivery-group-modal .modal-dialog { margin: 10px; }
    .delivery-group-modal .modal-content { border-radius: 16px; }
    .delivery-group-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .delivery-group-actions > .btn:first-child { grid-column: 1 / -1; }
    .delivery-group-actions form .btn { width: 100%; }
}

/* v2.5.23 — Delivery groups directory + detail view */
.delivery-groups-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}
.delivery-groups-search { flex: 1 1 620px; max-width: 760px; }
.delivery-groups-search .input-group { direction: inherit; }
.delivery-groups-total-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 13px;
    border: 1px solid #dbe4f0;
    border-radius: 13px;
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.delivery-groups-total-badge i { color: #2563eb; font-size: 16px; }
.delivery-groups-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.delivery-group-list-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 224px;
    padding: 15px;
    border: 1px solid #dfe7f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
    overflow: hidden;
}
.delivery-group-list-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #2563eb, #60a5fa);
    opacity: .92;
}
[dir="rtl"] .delivery-group-list-card::before { inset: 0 0 0 auto; }
.delivery-group-list-card:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 13px 30px rgba(37, 99, 235, .10);
    color: inherit;
}
.delivery-group-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 13px;
}
.delivery-group-list-code {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1d4ed8;
}
.delivery-group-list-code i { font-size: 17px; }
.delivery-group-list-code strong { font-size: 20px; font-weight: 950; letter-spacing: -.2px; }
.delivery-group-list-arrow {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
}
.delivery-group-list-customer {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 10px 11px;
    border-radius: 13px;
    background: #f8fafc;
}
.delivery-group-list-customer > i { flex: 0 0 auto; color: #64748b; font-size: 19px; }
.delivery-group-list-customer > div { min-width: 0; display: grid; gap: 2px; }
.delivery-group-list-customer strong {
    display: block;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    overflow-wrap: anywhere;
}
.delivery-group-list-customer small { color: #64748b; font-size: 9px; }
.delivery-group-list-invoices {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 11px 0;
}
.delivery-group-list-invoices span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 9px;
    font-weight: 850;
}
.delivery-group-list-invoices .more { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.delivery-group-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
    color: #64748b;
    font-size: 9px;
    font-weight: 750;
}
.delivery-group-list-meta span { display: inline-flex; align-items: center; gap: 5px; }
.delivery-group-list-meta i { color: #94a3b8; }
.delivery-group-list-total {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #edf2f7;
}
.delivery-group-list-total span { color: #64748b; font-size: 9px; font-weight: 750; }
.delivery-group-list-total strong { color: #0f172a; font-size: 16px; font-weight: 950; }
.delivery-groups-empty-state {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    text-align: center;
    color: #64748b;
}
.delivery-groups-empty-state i { font-size: 38px; color: #94a3b8; }
.delivery-groups-empty-state strong { color: #0f172a; font-size: 15px; }
.delivery-groups-empty-state span { max-width: 480px; font-size: 10px; line-height: 1.8; }
.delivery-group-code-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1d4ed8;
    font-size: 18px;
    font-weight: 950;
    text-decoration: none;
}
.delivery-group-code-link:hover { color: #1e40af; }
.delivery-group-code-link i { font-size: 10px; }
.delivery-group-detail-code {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 13px;
    border-radius: 13px;
    background: #111827;
    color: #fff;
    font-size: 16px;
    font-weight: 950;
}
.delivery-group-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 22px;
}
.delivery-group-detail-customer {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 3px 0;
}
.delivery-group-detail-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 21px;
}
.delivery-group-detail-customer > div { min-width: 0; display: grid; gap: 2px; }
.delivery-group-detail-customer small { color: #64748b; font-size: 9px; font-weight: 800; }
.delivery-group-detail-customer strong { color: #0f172a; font-size: 18px; font-weight: 950; overflow-wrap: anywhere; }
.delivery-group-detail-customer span:not(.delivery-group-detail-icon) { color: #64748b; font-size: 10px; }
.delivery-group-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.delivery-group-detail-stats > div {
    display: grid;
    align-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 74px;
    padding: 10px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #f8fafc;
}
.delivery-group-detail-stats small { color: #64748b; font-size: 8px; font-weight: 800; }
.delivery-group-detail-stats strong { color: #0f172a; font-size: 14px; font-weight: 950; overflow-wrap: anywhere; }
.delivery-group-detail-stats .primary { background: #eff6ff; border-color: #bfdbfe; }
.delivery-group-detail-stats .primary strong { color: #1d4ed8; font-size: 17px; }
.delivery-group-detail-section-head { margin: 0 0 12px; }
.delivery-group-detail-section-head h2 { margin: 0 0 3px; color: #0f172a; font-size: 16px; font-weight: 950; }
.delivery-group-detail-section-head p { margin: 0; color: #64748b; font-size: 9px; }
.delivery-group-detail-invoices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.delivery-group-detail-invoice-card {
    position: relative;
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 13px 42px 13px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .035);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
[dir="rtl"] .delivery-group-detail-invoice-card { padding: 13px 14px 13px 42px; }
.delivery-group-detail-invoice-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .08);
    transform: translateY(-1px);
    color: inherit;
}
.delivery-group-detail-invoice-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.delivery-group-detail-invoice-top > strong { color: #0f172a; font-size: 16px; font-weight: 950; }
.delivery-group-detail-invoice-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 13px;
    color: #64748b;
    font-size: 9px;
}
.delivery-group-detail-invoice-meta span { display: inline-flex; align-items: center; gap: 5px; }
.delivery-group-detail-invoice-meta b { color: #334155; }
.delivery-group-detail-invoice-money {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}
.delivery-group-detail-invoice-money span { color: #64748b; font-size: 9px; }
.delivery-group-detail-invoice-money strong { color: #0f172a; font-size: 13px; font-weight: 950; }
.delivery-group-detail-open {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
}
[dir="rtl"] .delivery-group-detail-open { right: auto; left: 13px; }
.delivery-group-detail-invoice-card:hover .delivery-group-detail-open { background: #2563eb; color: #fff; }

@media (max-width: 1199.98px) {
    .delivery-groups-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .delivery-group-detail-hero { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .delivery-groups-toolbar { align-items: stretch; flex-direction: column; padding: 12px; }
    .delivery-groups-search { flex-basis: auto; max-width: none; }
    .delivery-groups-total-badge { align-self: flex-start; min-height: 34px; padding: 6px 9px; }
    .delivery-groups-grid { grid-template-columns: 1fr; gap: 9px; }
    .delivery-group-list-card { min-height: 0; padding: 12px; border-radius: 15px; }
    .delivery-group-list-head { margin-bottom: 9px; }
    .delivery-group-list-code strong { font-size: 17px; }
    .delivery-group-list-customer { padding: 8px 9px; }
    .delivery-group-list-invoices { margin: 8px 0; }
    .delivery-group-detail-hero { gap: 12px; padding: 13px; }
    .delivery-group-detail-stats { grid-template-columns: 1fr 1fr; }
    .delivery-group-detail-stats > div:first-child:last-child { grid-column: 1 / -1; }
    .delivery-group-detail-stats .primary { grid-column: 1 / -1; }
    .delivery-group-detail-invoices { grid-template-columns: 1fr; gap: 8px; }
    .delivery-group-detail-invoice-card { border-radius: 14px; }
}
.delivery-group-detail-stats.prices-hidden { grid-template-columns: 1fr; }


/* v2.5.24 — delivery group bulk status */
.delivery-group-bulk-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 0 22px;
    padding: 16px 18px;
}
.delivery-group-bulk-status-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.delivery-group-bulk-status-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #eef2ff;
    color: #4338ca;
    font-size: 1.15rem;
}
.delivery-group-bulk-status-copy strong,
.delivery-group-bulk-status-copy small { display: block; }
.delivery-group-bulk-status-copy strong { font-size: 1rem; }
.delivery-group-bulk-status-copy small { margin-top: 3px; color: #64748b; }
.delivery-group-bulk-status-form {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: min(100%, 430px);
}
.delivery-group-bulk-status-form .form-select { min-width: 190px; }
.delivery-group-bulk-status-form .btn { white-space: nowrap; }
@media (max-width: 767.98px) {
    .delivery-group-bulk-status {
        align-items: stretch;
        flex-direction: column;
        padding: 14px;
    }
    .delivery-group-bulk-status-form { min-width: 0; width: 100%; }
    .delivery-group-bulk-status-form .form-select { min-width: 0; flex: 1 1 auto; }
    .delivery-group-bulk-status-form .btn span { display: none; }
    .delivery-group-bulk-status-form .btn { width: 46px; flex: 0 0 46px; }
}
