* { box-sizing: border-box; }
:root {
    --bg: #f6f8fc;
    --card: #ffffff;
    --ink: #182033;
    --muted: #667085;
    --line: #e7eaf0;
    --primary: #4f46e5;
    --primary2: #06b6d4;
    --dark: #111827;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --shadow: 0 16px 50px rgba(15, 23, 42, .08);
}
body { margin: 0; font-family: Tahoma, Arial, sans-serif; background: radial-gradient(circle at top left, #eef2ff 0, transparent 28%), var(--bg); color: var(--ink); }
a { color: var(--primary); text-decoration: none; }
.topbar { min-height: 72px; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; position: sticky; top: 0; z-index: 10; }
.brand { display: flex; gap: 14px; align-items: center; }
.brand-logo { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--primary2)); color: white; font-weight: 900; box-shadow: 0 12px 30px rgba(79,70,229,.25); overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; background: white; padding: 5px; }
.brand strong { display: block; font-size: 19px; }
.brand span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.userbox { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.userbox a { padding: 8px 12px; background: #eef2ff; border-radius: 999px; }
.sidebar { position: fixed; top: 73px; left: 0; bottom: 0; width: 255px; padding: 18px; background: #0f172a; overflow-y: auto; }
.sidebar a { display: block; color: #cbd5e1; padding: 13px 14px; border-radius: 16px; margin-bottom: 8px; font-weight: 700; }
.sidebar a:hover, .sidebar a.active { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; box-shadow: 0 12px 24px rgba(79,70,229,.25); }
.content { margin-left: 255px; padding: 26px; min-height: calc(100vh - 112px); }
.footer { margin-left: 255px; padding: 14px 26px 22px; color: var(--muted); font-size: 13px; }
h1 { margin: 0 0 18px; font-size: 28px; letter-spacing: -.3px; }
h2 { margin: 0 0 14px; font-size: 20px; }
h3 { margin: 0 0 12px; }
.page-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 18px; }
.card { background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card.soft { box-shadow: none; background: #fff; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: linear-gradient(180deg, #fff, #f8fafc); border: 1px solid var(--line); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); }
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { display: block; font-size: 30px; margin-top: 8px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: block; margin-bottom: 13px; font-weight: 700; color: #334155; }
input, textarea, select { width: 100%; padding: 12px 13px; border: 1px solid #cfd6e3; border-radius: 15px; font-size: 14px; background: #fff; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,.1); }
textarea { min-height: 88px; resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 14px; padding: 10px 15px; background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; font-weight: 800; cursor: pointer; min-height: 42px; }
.btn:hover { filter: brightness(.96); }
.btn.secondary { background: #475569; }
.btn.danger { background: var(--danger); }
.btn.light { background: #eef2ff; color: #312e81; }
.btn.success { background: var(--success); }
.btn.block { width: 100%; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: top; }
th { background: #f8fafc; color: #475569; font-size: 13px; }
.badge { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #e0f2fe; color: #0369a1; font-size: 12px; font-weight: 800; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badge.ok { background: #dcfce7; color: #166534; }
.notice { padding: 12px 14px; border-radius: 15px; background: #dcfce7; color: #166534; margin-bottom: 14px; }
.error { padding: 12px 14px; border-radius: 15px; background: #fee2e2; color: #991b1b; margin-bottom: 14px; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at top left, #dbeafe, transparent 35%), linear-gradient(135deg, #eef2ff, #f8fafc); }
.login-card { width: min(440px, calc(100% - 32px)); background: white; border-radius: 28px; padding: 30px; border: 1px solid var(--line); box-shadow: 0 28px 80px rgba(15,23,42,.14); }
.logo-preview { max-width: 140px; max-height: 90px; object-fit: contain; display: block; margin: 8px 0 12px; background: #f8fafc; border-radius: 16px; padding: 8px; border: 1px solid var(--line); }
.product-thumb { width: 68px; height: 68px; border-radius: 18px; object-fit: cover; background: #f1f5f9; border: 1px solid var(--line); }
.placeholder { width: 68px; height: 68px; border-radius: 18px; background: linear-gradient(135deg, #e0e7ff, #ecfeff); display: grid; place-items: center; color: #4f46e5; font-weight: 900; border: 1px solid var(--line); }
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 18px; align-items: start; }
.pos-tools { display: grid; grid-template-columns: 1fr 180px; gap: 10px; margin-bottom: 14px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 14px; max-height: calc(100vh - 245px); overflow: auto; padding: 3px; }
.product-card { background: white; border: 1px solid var(--line); border-radius: 22px; padding: 12px; box-shadow: 0 10px 26px rgba(15,23,42,.05); cursor: pointer; transition: .18s; display: flex; flex-direction: column; min-height: 230px; }
.product-card:hover { transform: translateY(-2px); border-color: #a5b4fc; box-shadow: 0 16px 36px rgba(79,70,229,.13); }
.product-card.disabled { opacity: .55; cursor: not-allowed; }
.product-card img, .product-card .placeholder { width: 100%; height: 108px; border-radius: 17px; object-fit: cover; margin-bottom: 10px; }
.product-card .name { font-weight: 800; min-height: 40px; }
.product-card .meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.product-card .price { font-size: 18px; font-weight: 900; color: var(--primary); margin-top: auto; }
.cart-card { position: sticky; top: 92px; }
.cart-list { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 18px; }
.cart-item { display: grid; grid-template-columns: minmax(0, 1fr) 158px 96px 40px; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item .title { font-weight: 800; }
.cart-item .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.qtybox { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 150px; }
.qtybox button { width: 38px; height: 38px; border: 0; border-radius: 12px; background: #eef2ff; color: #312e81; font-weight: 900; font-size: 20px; line-height: 1; cursor: pointer; flex: 0 0 38px; }
.qtybox input { width: 64px; min-width: 64px; height: 38px; padding: 6px 4px; text-align: center; border-radius: 12px; font-size: 18px; font-weight: 900; color: var(--dark); }
.cart-item > strong { text-align: right; font-size: 15px; white-space: nowrap; }
.cart-total { background: linear-gradient(135deg, #eef2ff, #ecfeff); border-radius: 20px; padding: 16px; margin-top: 12px; }
.cart-total .row { display: flex; justify-content: space-between; margin: 8px 0; color: #334155; }
.cart-total .grand { font-size: 24px; color: var(--primary); font-weight: 900; border-top: 1px solid #c7d2fe; padding-top: 10px; }
.empty-cart { padding: 24px; text-align: center; color: var(--muted); }
.doc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.doc-tabs a { padding: 10px 13px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-weight: 800; color: #475569; }
.doc-tabs a.active { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; border-color: transparent; }
.print-page { background: #fff; color: #111827; font-family: Tahoma, Arial, sans-serif; }
.print-container { max-width: 820px; margin: 24px auto; border: 1px solid #e5e7eb; padding: 30px; border-radius: 18px; }
.print-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 3px solid #111827; padding-bottom: 18px; margin-bottom: 16px; }
.print-logo { max-width: 110px; max-height: 82px; object-fit: contain; }
.print-title { text-align: right; }
.print-title h1 { margin: 0; font-size: 30px; }
.print-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 16px 0; }
.summary-table { width: 330px; margin-left: auto; }
.label-box { max-width: 620px; margin: 24px auto; border: 3px solid #111827; padding: 24px; font-size: 18px; }
.label-box h1 { text-align: center; border-bottom: 2px solid #111827; padding-bottom: 12px; }
.no-print { margin: 16px auto; max-width: 820px; }
@media print { .no-print, .topbar, .sidebar, .footer { display: none !important; } .content { margin: 0; padding: 0; } body { background: white; } .print-container, .label-box { border-radius: 0; margin: 0 auto; border-color: #111827; } }
@media (max-width: 1100px) { .pos-layout { grid-template-columns: 1fr; } .cart-card { position: static; } .product-grid { max-height: none; } }
@media (max-width: 860px) { .sidebar { position: static; width: auto; display: flex; gap: 8px; overflow-x: auto; padding: 10px; } .sidebar a { white-space: nowrap; } .content, .footer { margin-left: 0; padding: 14px; } .topbar { position: static; flex-direction: column; align-items: flex-start; gap: 8px; } .grid, .form-row, .print-meta, .pos-tools { grid-template-columns: 1fr; } .cart-item { grid-template-columns: 1fr; gap: 10px; } .qtybox { justify-content: flex-start; min-width: 0; } .cart-item > strong { text-align: left; font-size: 17px; } }
small, .muted { color: var(--muted); font-weight: 400; font-size: 12px; }
.stat small { display: block; color: var(--muted); margin-top: 6px; }
.report-grid { margin-bottom: 20px; }
.brand-preview { border-radius: 22px; color: #fff; padding: 20px; font-weight: 900; box-shadow: var(--shadow); text-align: center; }
.qr-preview { width: 180px; max-height: 180px; object-fit: contain; border: 1px solid var(--line); border-radius: 18px; padding: 10px; background: #fff; }
.payment-print-box { display: grid; grid-template-columns: 1fr 150px; gap: 18px; align-items: center; border: 2px dashed var(--primary); border-radius: 18px; padding: 16px; margin: 18px 0; background: #fff; }
.payment-print-box img { width: 140px; height: 140px; object-fit: contain; justify-self: end; }
.mini-help { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: #f8fafc; color: var(--muted); font-size: 12px; }
.product-card .badge { margin-top: 6px; }
@media print { .payment-print-box { break-inside: avoid; } }
@media (max-width: 860px) { .payment-print-box { grid-template-columns: 1fr; } .payment-print-box img { justify-self: start; } }

.danger-zone { border-color: #fecaca; background: #fff7f7; }
.tracking-form { margin-top: 12px; }
.tracking-print-box { border: 1px dashed var(--primary); border-radius: 14px; padding: 12px; margin: 12px 0; background: #f8fafc; }
.cancel-print-box { border: 2px solid #ef4444; color: #991b1b; background: #fee2e2; border-radius: 14px; padding: 12px; margin: 12px 0; font-weight: 900; text-align: center; }

/* V5 customer portal */
.customer-public-page { background: radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 15%, white) 0, transparent 30%), #f6f8fc; }
.portal-shell { width: min(1120px, calc(100% - 28px)); margin: 22px auto 36px; }
.portal-hero { border-radius: 28px; padding: 26px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary2)); box-shadow: 0 22px 70px rgba(15,23,42,.18); margin-bottom: 18px; }
.portal-hero .brand span, .portal-hero p { color: rgba(255,255,255,.84); }
.portal-hero .brand-logo { background: rgba(255,255,255,.18); box-shadow: none; }
.portal-hero h1 { margin: 20px 0 8px; color: #fff; }
.portal-hero.compact h1 { margin-top: 16px; }
.portal-stats { margin-bottom: 18px; }
.portal-footer { text-align: center; color: var(--muted); margin: 18px 0; font-size: 13px; }
.copy-box { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.copy-box input { font-size: 13px; }
@media (max-width: 860px) { .copy-box { grid-template-columns: 1fr; } .portal-shell { width: min(100% - 18px, 1120px); margin-top: 12px; } }


/* V6 cart quantity UI fix */
.cart-card { min-width: 0; }
.qtybox input::-webkit-outer-spin-button,
.qtybox input::-webkit-inner-spin-button { opacity: 1; }
@media (min-width: 1101px) and (max-width: 1360px) {
    .pos-layout { grid-template-columns: minmax(0, 1fr) 460px; }
    .cart-item { grid-template-columns: minmax(0, 1fr) 150px 90px 38px; }
}

/* V6.2 cart quantity strong fix: make quantity visible in POS cart */
.cart-list .cart-item {
    display: block !important;
    grid-template-columns: none !important;
    padding: 12px 14px !important;
}
.cart-list .cart-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.cart-list .cart-product {
    min-width: 0;
}
.cart-list .cart-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
}
.cart-list .qtybox {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto !important;
    min-width: 154px !important;
    flex: 0 0 154px !important;
}
.cart-list .qtybox button {
    width: 34px !important;
    min-width: 34px !important;
    height: 36px !important;
    flex: 0 0 34px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    font-size: 18px !important;
}
.cart-list .qtybox input,
.cart-list .qtybox .cart-qty-input {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    flex: 0 0 72px !important;
    height: 36px !important;
    padding: 4px 6px !important;
    text-align: center !important;
    font-size: 19px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}
.cart-list .cart-line-total,
.cart-list .cart-item > strong {
    min-width: 96px !important;
    text-align: right !important;
    font-size: 15px !important;
    white-space: nowrap !important;
}
.cart-list .cart-remove-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    flex: 0 0 36px !important;
}
@media (max-width: 540px) {
    .cart-list .cart-main { grid-template-columns: 1fr; }
    .cart-list .cart-actions { justify-content: flex-start; margin-top: 10px; }
    .cart-list .cart-line-total,
    .cart-list .cart-item > strong { min-width: 108px !important; text-align: left !important; }
}

/* V7 customer list redesign: search, pagination, large customer database */
.page-subtitle { margin: -8px 0 0; font-size: 13px; }
.customer-stats-grid { margin-bottom: 18px; }
.customer-toolbar-card { padding: 18px 20px; }
.customer-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.customer-search-form label { margin-bottom: 0; }
.customer-search-actions { padding-bottom: 1px; }
.customer-layout { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); gap: 18px; align-items: start; }
.customer-list-card { min-width: 0; }
.list-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.list-head .muted { display: block; margin-top: 4px; }
.customer-list { display: grid; gap: 10px; }
.customer-card-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 22px; padding: 13px; background: linear-gradient(180deg, #fff, #fbfdff); box-shadow: 0 8px 22px rgba(15,23,42,.04); }
.customer-card-row:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); box-shadow: 0 14px 30px rgba(15,23,42,.07); }
.customer-avatar { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; font-weight: 900; font-size: 22px; box-shadow: 0 10px 26px rgba(79,70,229,.18); }
.customer-info { min-width: 0; }
.customer-title-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.customer-title-line strong { font-size: 17px; }
.customer-meta-line { display: flex; gap: 8px 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-top: 6px; }
.customer-address-line { margin-top: 7px; color: #475569; font-size: 12px; line-height: 1.45; max-height: 38px; overflow: hidden; }
.customer-row-actions { justify-content: flex-end; min-width: 310px; }
.customer-row-actions .btn { min-height: 36px; padding: 8px 10px; border-radius: 12px; font-size: 12px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.page-number { color: var(--muted); font-weight: 800; }
.empty-state { text-align: center; padding: 34px 16px; border: 1px dashed var(--line); border-radius: 22px; background: #f8fafc; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
@media (max-width: 1280px) { .customer-layout { grid-template-columns: 1fr; } .customer-row-actions { min-width: 0; justify-content: flex-start; } }
@media (max-width: 860px) { .customer-search-form { grid-template-columns: 1fr; } .customer-card-row { grid-template-columns: 44px minmax(0, 1fr); align-items: flex-start; } .customer-avatar { width: 44px; height: 44px; border-radius: 15px; font-size: 18px; } .customer-row-actions { grid-column: 1 / -1; } .customer-stats-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .customer-stats-grid { grid-template-columns: 1fr; } .customer-row-actions .btn { width: 100%; } .customer-row-actions { display: grid; grid-template-columns: 1fr 1fr; } }

/* V8: เซ็ตสินค้า + อัปเดตสต็อกหลายรายการ */
.section-subtitle{margin:18px 0 10px;font-size:18px;color:#344054}
.bundle-grid{border:1px dashed rgba(79,70,229,.25);border-radius:18px;padding:12px;background:linear-gradient(180deg,rgba(79,70,229,.04),rgba(6,182,212,.035))}
.product-card{position:relative;overflow:hidden}
.product-card.bundle-card{border-color:rgba(79,70,229,.25);box-shadow:0 12px 24px rgba(79,70,229,.08)}
.bundle-ribbon{position:absolute;top:10px;right:-26px;transform:rotate(35deg);background:var(--primary);color:#fff;font-size:11px;font-weight:900;letter-spacing:.6px;padding:4px 32px;box-shadow:0 8px 14px rgba(16,24,40,.15)}
.cart-bundle{background:linear-gradient(90deg,rgba(79,70,229,.06),rgba(6,182,212,.05));border-color:rgba(79,70,229,.18)}
.component-rows{display:grid;gap:10px;margin:10px 0 14px}
.component-row{display:grid;grid-template-columns:minmax(220px,1fr) 120px auto;gap:10px;align-items:center;background:#f8fafc;border:1px solid #eaecf0;border-radius:14px;padding:10px}
.component-row select,.component-row input{width:100%;min-height:42px;border:1px solid #d0d5dd;border-radius:12px;padding:9px;background:#fff}
.checkline{display:flex!important;align-items:center;gap:8px;background:#f8fafc;border:1px solid #eaecf0;border-radius:12px;padding:10px 12px;margin-top:24px}
.checkline input{width:auto!important}
.stock-bulk-table input.stock-input{width:96px;min-height:42px;text-align:center;font-size:17px;font-weight:800;border:1px solid #d0d5dd;border-radius:12px;padding:8px;background:#fff}
.sticky-actions{position:sticky;bottom:0;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);border-top:1px solid #eaecf0;padding-top:12px;margin-top:12px;z-index:5}
@media (max-width: 760px){.component-row{grid-template-columns:1fr}.stock-bulk-table input.stock-input{width:78px}.bundle-grid{padding:8px}}

/* V9: POS set card cleanup for large sets, document set details, multiple parcel sender addresses */
.set-pos-card .set-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}
.set-pos-card .set-card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    border: 1px solid rgba(79,70,229,.18);
    background: rgba(79,70,229,.06);
    color: #334155;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
}
.set-components-toggle {
    margin: 8px 0;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}
.set-components-toggle summary {
    cursor: pointer;
    list-style: none;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 900;
    color: var(--primary);
}
.set-components-toggle summary::-webkit-details-marker { display:none; }
.set-components-mini {
    display: grid;
    gap: 5px;
    max-height: 170px;
    overflow: auto;
    padding: 0 10px 10px;
}
.set-components-mini div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    font-size: 11px;
    padding: 6px 8px;
    border-radius: 10px;
    background: #f8fafc;
}
.set-components-mini span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-components-mini strong { color: #111827; white-space: nowrap; }
.mini-count { padding: 0 10px 10px; margin: 0; }
.set-brief { max-height: 34px; overflow: hidden; }
.set-components-doc {
    margin-top: 8px;
    border: 1px dashed rgba(79,70,229,.25);
    background: #f8fafc;
    border-radius: 12px;
    padding: 8px 10px;
}
.set-components-doc summary { cursor: pointer; font-weight: 900; color: var(--primary); font-size: 12px; }
.set-components-doc-grid, .set-components-print-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 5px 12px;
    margin-top: 7px;
    font-size: 12px;
    color: #475569;
}
.set-components-print {
    margin-top: 8px;
    padding: 8px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}
.sender-address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.sender-address-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px;
    background: linear-gradient(180deg, #fff, #fbfdff);
}
.sender-address-card.primary {
    border-color: rgba(79,70,229,.28);
    box-shadow: 0 10px 24px rgba(79,70,229,.08);
}
.sender-address-card h3 { margin-top: 0; }
.parcel-toolbar { align-items: center; }
.sender-select-form { display: inline-flex; align-items: center; margin: 0; }
.sender-select-form label { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: #475569; }
.sender-select-form select { min-height: 38px; min-width: 190px; border-radius: 12px; border: 1px solid #d0d5dd; padding: 7px 10px; background: #fff; }
@media print {
    .set-components-doc, .set-components-print { break-inside: avoid; }
}
@media (max-width: 760px) {
    .set-components-doc-grid, .set-components-print-grid { grid-template-columns: 1fr; }
    .sender-select-form, .sender-select-form label { width: 100%; }
    .sender-select-form select { width: 100%; }
}

/* V10: document list pagination for large document volume */
.documents-head h1 { margin-bottom: 8px; }
.document-toolbar-card { padding: 18px 20px; }
.document-search-form { display: grid; grid-template-columns: minmax(260px, 1fr) 180px auto; gap: 12px; align-items: end; }
.document-search-form label { margin-bottom: 0; }
.document-search-actions { padding-bottom: 1px; }
.document-list-card { min-width: 0; }
.document-list-head { margin-bottom: 14px; }
.document-list-head h2 { margin-bottom: 4px; }
.document-table-wrap { border: 1px solid var(--line); border-radius: 18px; overflow: auto; background: #fff; }
.document-table th { position: sticky; top: 0; z-index: 1; }
.document-table td { vertical-align: middle; }
.document-table tbody tr:hover { background: #f8fbff; }
.document-row-actions { min-width: 230px; justify-content: flex-end; }
.document-row-actions .btn { min-height: 36px; padding: 8px 10px; border-radius: 12px; font-size: 12px; }
.document-pagination { flex-wrap: wrap; gap: 8px; }
.document-pagination .btn.disabled { opacity: .45; pointer-events: none; cursor: default; }
.page-jump-list { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.page-jump-list a, .page-jump-list span { min-width: 38px; height: 38px; padding: 0 10px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; font-weight: 900; }
.page-jump-list a.active { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; border-color: transparent; }
.page-jump-form { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.page-jump-form input { width: 110px; text-align: center; font-weight: 900; }
@media (max-width: 980px) {
    .document-search-form { grid-template-columns: 1fr; }
    .document-row-actions { min-width: 0; justify-content: flex-start; }
}
@media (max-width: 620px) {
    .document-pagination .btn { width: calc(50% - 4px); }
    .page-jump-list { width: 100%; order: 3; }
    .page-jump-form { flex-wrap: wrap; }
}

/* V11 user management */
.user-admin-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:18px;align-items:start;margin-bottom:18px}
.user-help-card .mini-help{margin-top:10px}
.user-form textarea{width:100%;border:1px solid var(--border);border-radius:14px;padding:12px;font:inherit;resize:vertical;background:#fff}
.user-active-check{display:flex;align-items:center;gap:10px;min-height:56px;background:#f8fafc;border:1px solid var(--border);border-radius:14px;padding:12px;margin-top:22px}
.user-active-check input{width:20px;height:20px}
.inline-search{display:flex;gap:8px;align-items:end;flex-wrap:wrap}
.inline-search input{min-width:280px}
.user-table td{vertical-align:top}
@media (max-width:980px){.user-admin-grid{grid-template-columns:1fr}.inline-search input{min-width:100%}}
