:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #f9fafc;
    --text: #18202b;
    --muted: #7a8493;
    --line: #e6eaf0;
    --brand: #f28a2e;
    --brand-dark: #d96f13;
    --dark: #171b22;
    --success: #147a4b;
    --success-bg: #eaf8f1;
    --danger: #b43b3b;
    --danger-bg: #fff0f0;
    --warning: #9a6700;
    --warning-bg: #fff6d9;
    --info: #2f63b7;
    --info-bg: #edf4ff;
    --radius: 18px;
    --shadow: 0 10px 35px rgba(27, 35, 50, .06);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Tahoma, Arial, sans-serif; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }

.topbar { background: var(--dark); color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); position: sticky; top: 0; z-index: 20; }
.topbar-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark, .login-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--brand); color: #fff; font-weight: 800; font-size: 22px; }
.brand strong { display: block; font-size: 17px; line-height: 1.2; }
.brand small { color: #9da5b1; font-size: 11px; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a { padding: 9px 12px; color: #c8ced7; border-radius: 10px; font-size: 14px; }
.nav a:hover, .nav a.active { color: #fff; background: rgba(255,255,255,.07); }
.nav .primary-link { background: var(--brand); color: #fff; }
.nav .primary-link:hover { background: var(--brand-dark); }

.page-shell { padding-block: 34px 60px; }
.page-heading, .order-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.page-heading.compact { margin-bottom: 18px; }
.page-heading h1, .order-hero h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.2; }
.page-heading p, .order-hero p { margin: 7px 0 0; color: var(--muted); }
.eyebrow { font-size: 11px !important; font-weight: 800; letter-spacing: 2px; color: var(--brand) !important; margin-bottom: 7px !important; }

.btn { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 11px; padding: 10px 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 22px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 22px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card span { display: block; color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; font-size: 34px; margin-top: 8px; }
.stat-card:hover { border-color: #d5dbe5; transform: translateY(-2px); }

.panel, .form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 22px; margin-bottom: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.panel-head h2, .form-card h2, .detail-side h2 { margin: 0; font-size: 19px; }
.panel-head p, .form-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.panel-head > a { color: var(--brand-dark); font-weight: 700; font-size: 13px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: right; font-size: 13px; }
th { color: var(--muted); font-size: 12px; font-weight: 700; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: #fcfcfd; }

.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; background: #f0f2f5; color: #555f6d; white-space: nowrap; }
.badge.lg { padding: 8px 13px; font-size: 13px; }
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.warning { background: var(--warning-bg); color: var(--warning); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.muted { background: #eceff3; color: #727b88; }

.alert { padding: 13px 16px; border-radius: 12px; margin-bottom: 20px; border: 1px solid var(--line); background: #fff; }
.alert.success { background: var(--success-bg); color: var(--success); border-color: #cdebdc; }
.alert.danger { background: var(--danger-bg); color: var(--danger); border-color: #ffd2d2; }

.filters { display: grid; grid-template-columns: 1fr 220px auto auto; gap: 10px; margin-bottom: 18px; }
input, select, textarea { width: 100%; border: 1px solid #dfe4eb; background: #fff; color: var(--text); border-radius: 11px; padding: 11px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #f0a563; box-shadow: 0 0 0 3px rgba(242,138,46,.12); }
textarea { resize: vertical; }
label > span { display: block; font-size: 12px; font-weight: 800; margin-bottom: 7px; color: #4c5563; }

.order-form { display: grid; gap: 16px; }
.form-card { padding: 22px; }
.section-title { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 18px; }
.section-title > span { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; background: #fff2e5; color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; }
.form-grid { display: grid; gap: 15px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }

.back-link { color: var(--muted); font-size: 12px; display: inline-block; margin-bottom: 13px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hero-meta span, .soft-pill { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: 12px; color: #5f6875; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, .75fr); gap: 20px; align-items: start; }
.detail-main, .detail-side { margin-bottom: 22px; }
.detail-side { position: sticky; top: 96px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.info-grid > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
.info-grid span, .text-block span, .mini-info span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.info-grid strong { font-size: 14px; }
.text-block { padding: 15px 0 0; margin-top: 15px; border-top: 1px solid var(--line); }
.text-block p { margin: 0; }
.muted-block { background: #fafbfc; padding: 14px; border-radius: 12px; border: 1px solid var(--line); }
.detail-side hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.mini-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; }

.pages-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.page-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.page-thumb { aspect-ratio: 4/3; background: linear-gradient(145deg, #f2f4f8, #e8ebf1); display: grid; place-items: center; overflow: hidden; }
.page-thumb span { font-size: 22px; font-weight: 900; color: #a3abb7; letter-spacing: 1px; }
.page-thumb img { width: 100%; height: 100%; object-fit: cover; }
.page-card-body { padding: 12px; }
.page-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.page-card-body small { display: block; color: var(--muted); margin-top: 9px; font-size: 10px; }

.empty-state { text-align: center; padding: 42px 20px; }
.empty-state h3 { margin: 0 0 7px; }
.empty-state p { color: var(--muted); margin: 0 0 18px; }
.footer { color: #8b93a0; font-size: 11px; text-align: center; padding: 24px 0 30px; }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #161a21; }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 22px; padding: 30px; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.login-logo { margin-bottom: 17px; }
.login-card h1 { margin: 0; font-size: 25px; }
.login-card > p { color: var(--muted); margin: 6px 0 24px; }
.form-stack { display: grid; gap: 14px; }

@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .pages-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-side { position: static; }
    .form-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
    .container { width: min(100% - 22px, 1180px); }
    .topbar-inner { align-items: flex-start; flex-direction: column; padding-block: 13px; }
    .nav { width: 100%; overflow-x: auto; padding-bottom: 3px; }
    .nav a { white-space: nowrap; }
    .page-heading, .order-hero { align-items: flex-start; flex-direction: column; }
    .stats-grid, .pages-grid, .form-grid.cols-2, .form-grid.cols-3, .info-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .filters { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
}

/* ===== V2: customer link + private assets ===== */
.customer-link-panel { border-right: 4px solid var(--brand); }
.share-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; align-items: center; direction: ltr; }
.share-row input { direction: ltr; text-align: left; font-family: monospace; font-size: 12px; background: var(--surface-2); }
.link-status-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.btn-sm { padding: 7px 10px; font-size: 12px; }
.asset-upload-form { display: grid; grid-template-columns: 180px minmax(180px,1fr) minmax(240px,1.2fr) auto; gap: 12px; align-items: end; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 18px; }
.file-field input { padding: 8px; background: #fff; }
.assets-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 13px; }
.asset-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.asset-image { display: block; aspect-ratio: 1/1; overflow: hidden; background: #eef1f5; }
.asset-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.file-placeholder { display: grid; place-items: center; font-weight: 900; color: var(--muted); }
.asset-meta { padding: 10px; }
.asset-meta strong, .asset-meta small { display: block; }
.asset-meta strong { font-size: 12px; }
.asset-meta small { color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-meta form { margin-top: 8px; }
.text-danger { padding: 0; border: 0; background: none; color: var(--danger); cursor: pointer; font-size: 11px; }
.empty-state.small { padding: 20px; }

.customer-body { background: #f3f5f8; min-height: 100vh; }
.customer-wrap { width: min(760px, calc(100% - 28px)); margin-inline: auto; padding: 28px 0 46px; }
.customer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; direction: rtl; }
.customer-brand strong { display: block; }
.customer-brand small { color: var(--muted); font-size: 11px; display: block; }
.customer-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 4vw, 38px); box-shadow: var(--shadow); }
.customer-card > h1 { margin: 0; font-size: clamp(25px,5vw,37px); }
.customer-intro { color: var(--muted); margin: 8px 0 28px; }
.public-section { padding: 24px 0; border-top: 1px solid var(--line); }
.public-section:first-of-type { border-top: 0; padding-top: 0; }
.public-section h2 { margin: 0 0 14px; font-size: 18px; }
.helper { color: var(--muted); font-size: 12px; margin-top: -7px; }
.upload-box { display: grid; place-items: center; text-align: center; border: 2px dashed #d6dce5; border-radius: 16px; padding: 22px; cursor: pointer; background: #fbfcfd; }
.upload-box:hover { border-color: #f2a35d; background: #fffaf5; }
.upload-box .upload-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff0e2; color: var(--brand-dark); font-size: 22px; margin-bottom: 8px; }
.upload-box strong { font-size: 14px; }
.upload-box small { color: var(--muted); margin: 4px 0 11px; }
.upload-box input { max-width: 360px; }
.customer-assets { display: grid; grid-template-columns: repeat(5,1fr); gap: 9px; margin-top: 14px; }
.customer-asset { aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #eee; }
.customer-asset img { width: 100%; height: 100%; object-fit: cover; display: block; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 12px; background: #fff8f0; margin-bottom: 14px; cursor: pointer; }
.consent-row input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; }
.consent-row span { font-size: 12px; color: #65594d; margin: 0; }
.customer-footer { text-align: center; color: var(--muted); font-size: 10px; margin: 16px 0 0; }
.customer-success { background: var(--success-bg); border: 1px solid #cdebdc; border-radius: 18px; padding: 22px; margin-bottom: 16px; text-align: center; color: var(--success); }
.customer-success h1 { margin: 6px 0 5px; font-size: 22px; }
.customer-success p { margin: 0; color: #376650; }
.success-icon { width: 40px; height: 40px; display: grid; place-items: center; margin: auto; border-radius: 50%; background: #fff; font-weight: 900; font-size: 20px; }

@media (max-width: 900px) {
    .assets-grid { grid-template-columns: repeat(3, 1fr); }
    .asset-upload-form { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 650px) {
    .share-row { grid-template-columns: 1fr 1fr; direction: rtl; }
    .share-row input { grid-column: 1 / -1; }
    .link-status-row { align-items: flex-start; flex-direction: column; }
    .asset-upload-form { grid-template-columns: 1fr; }
    .assets-grid { grid-template-columns: repeat(2, 1fr); }
    .customer-assets { grid-template-columns: repeat(3,1fr); }
    .customer-card { border-radius: 18px; }
}

/* ===== V3 ===== */
.remember-row { display:flex; align-items:center; gap:9px; cursor:pointer; }
.remember-row input { width:18px; height:18px; flex:0 0 18px; }
.remember-row span { margin:0; font-size:12px; color:var(--muted); }
.btn-danger { background:var(--danger-bg); border-color:#ffd2d2; color:var(--danger); }
.btn-danger:hover { background:#ffe3e3; }
.row-actions { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.row-actions form { margin:0; }
.table-link { display:block; color:var(--text); }
.table-link:hover { color:var(--brand-dark); }
.table-link small, td small { display:block; color:var(--muted); margin-top:2px; font-size:10px; }
.ltr-cell { direction:ltr; text-align:right; }
.address-cell { max-width:220px; min-width:160px; }
.orders-table { min-width:1180px; }
.hero-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.dashboard-link { margin-bottom:24px; }
.legacy-link { margin-top:14px; color:var(--muted); font-size:12px; }
.legacy-link summary { cursor:pointer; font-weight:700; }
.compact-share { grid-template-columns:minmax(0,1fr) auto; margin-top:10px; }

.upload-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.upload-group-card { border:1px solid var(--line); border-radius:16px; background:var(--surface-2); padding:16px; }
.upload-group-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:13px; }
.upload-group-head h3 { margin:0; font-size:16px; }
.upload-group-head p { margin:3px 0 0; color:var(--muted); font-size:11px; }
.group-upload-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; align-items:center; }
.group-upload-form input[type="text"] { grid-column:1/-1; }
.group-upload-form input[type="file"] { padding:7px; background:#fff; }
.mini-assets { grid-template-columns:repeat(4,1fr); margin-top:12px; }
.mini-assets .asset-meta { padding:7px; }

.wide-customer { width:min(980px, calc(100% - 28px)); }
.public-upload-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.public-upload-card { border:2px dashed #d6dce5; border-radius:16px; padding:18px; background:#fbfcfd; display:flex; flex-direction:column; align-items:center; text-align:center; cursor:pointer; }
.public-upload-card:hover { border-color:#f2a35d; background:#fffaf5; }
.public-upload-card .upload-icon { width:36px; height:36px; display:grid; place-items:center; border-radius:50%; background:#fff0e2; color:var(--brand-dark); font-size:20px; margin-bottom:7px; }
.public-upload-card strong { font-size:14px; }
.public-upload-card small { color:var(--muted); margin:4px 0 10px; min-height:38px; }
.public-upload-card input[type="file"] { padding:7px; background:#fff; }
.public-upload-card .other-label, .public-upload-card input[type="text"] { margin-bottom:8px; }
.public-upload-card.static-card { cursor:default; }
.public-upload-card.static-card:hover { border-color:#d6dce5; background:#fbfcfd; }
.public-upload-card .customer-assets { width:100%; grid-template-columns:repeat(4,1fr); }

.upgrade-list { line-height:2; }

.invoice-body { margin:0; background:#eef1f5; color:var(--text); font-family:Tahoma,Arial,sans-serif; }
.invoice-sheet { width:min(900px, calc(100% - 30px)); margin:30px auto; background:#fff; padding:42px; border-radius:18px; box-shadow:var(--shadow); }
.invoice-toolbar { display:flex; justify-content:flex-end; gap:8px; margin-bottom:24px; }
.invoice-header { display:flex; justify-content:space-between; align-items:flex-start; border-bottom:2px solid var(--dark); padding-bottom:24px; }
.invoice-brand { display:flex; align-items:center; gap:10px; }
.invoice-brand strong { display:block; font-size:22px; }
.invoice-brand small { color:var(--muted); }
.invoice-title { text-align:left; direction:rtl; }
.invoice-title p { margin:0; color:var(--muted); }
.invoice-title h1 { margin:2px 0; font-size:24px; }
.invoice-title small { color:var(--muted); }
.invoice-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin:26px 0; }
.invoice-box { border:1px solid var(--line); border-radius:14px; padding:17px; }
.invoice-box h3 { margin:0 0 13px; font-size:15px; }
.invoice-box p { display:grid; grid-template-columns:100px 1fr; gap:10px; margin:8px 0; }
.invoice-box span { color:var(--muted); font-size:12px; }
.invoice-table { min-width:0; margin-top:20px; }
.invoice-table tfoot td { font-weight:900; font-size:16px; border-top:2px solid var(--dark); }
.invoice-status { display:flex; justify-content:flex-end; gap:12px; align-items:center; margin-top:20px; }
.invoice-status span { color:var(--muted); }
.invoice-footer { text-align:center; color:var(--muted); margin-top:50px; padding-top:20px; border-top:1px solid var(--line); font-size:12px; }

@media (max-width:900px) {
  .upload-groups, .public-upload-grid { grid-template-columns:1fr; }
  .mini-assets { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:650px) {
  .group-upload-form { grid-template-columns:1fr; }
  .mini-assets { grid-template-columns:repeat(2,1fr); }
  .invoice-sheet { width:100%; margin:0; border-radius:0; padding:22px; }
  .invoice-header, .invoice-grid { display:block; }
  .invoice-title { margin-top:20px; text-align:right; }
  .invoice-box { margin-bottom:12px; }
}
@media print {
  @page { size:A4; margin:12mm; }
  .no-print { display:none !important; }
  .invoice-body { background:#fff; }
  .invoice-sheet { width:100%; margin:0; padding:0; box-shadow:none; border-radius:0; }
}
/* ===== V4 ===== */
.check-col{width:44px;text-align:center}.check-col input{width:18px;height:18px}.bulk-toolbar{margin-bottom:14px;padding:12px 16px}.bulk-toolbar form{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.bulk-toolbar form span{color:var(--muted);font-size:12px;flex:1}.orders-table{min-width:1320px}

/* ===== V5 Production state machine ===== */
.production-orders-table{min-width:1460px}.production-paused-row{background:#fffaf2}.production-statuses{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.production-progress-wrap{margin:4px 0 18px}.production-progress-meta{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;font-size:12px}.production-progress{height:10px;background:#edf0f3;border-radius:999px;overflow:hidden}.production-progress span{display:block;height:100%;background:currentColor;color:var(--success);border-radius:999px;transition:width .2s ease}.production-stop-box,.production-running-box,.production-done-box{display:flex;justify-content:space-between;gap:18px;align-items:center;border-radius:14px;padding:15px 16px;margin-bottom:18px}.production-stop-box{background:var(--warning-bg);border:1px solid #f3d7a6}.production-running-box{background:var(--info-bg);border:1px solid #cfe4f2}.production-done-box{background:var(--success-bg);border:1px solid #cdebdc}.production-stop-box p,.production-running-box p,.production-done-box p{margin:4px 0 0;color:var(--muted);font-size:12px}.production-actions{display:flex;gap:8px;flex-wrap:wrap}.production-actions form{margin:0}.production-pages .page-card{position:relative}.production-pages .page-prepared{border-color:#bfe0ce}.page-production-action{margin-top:10px}.page-paused-note,.page-ready-note{margin-top:10px;padding:7px 9px;border-radius:9px;font-size:11px;text-align:center;font-weight:800}.page-paused-note{background:var(--warning-bg);color:#8b611a}.page-ready-note{background:var(--success-bg);color:var(--success)}
@media(max-width:700px){.production-stop-box,.production-running-box,.production-done-box{align-items:flex-start;flex-direction:column}.production-actions{width:100%}.production-actions form,.production-actions .btn{width:100%}}

/* ===== V6 Multi-book + Pricing + Revisions + PDF ===== */
.form-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.span-3{grid-column:span 3}.align-end{align-self:end}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.table-input{min-width:110px;padding:8px 9px;border:1px solid var(--line);border-radius:9px;background:#fff}.switch-inline{display:flex;gap:7px;align-items:center}.shipping-add{margin-bottom:20px}.book-builder-card{border:1px solid var(--line);border-radius:18px;padding:18px;margin-bottom:16px;background:var(--surface-2)}.book-builder-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}.book-builder-head h3{margin:3px 0 0}.book-number{display:inline-flex;background:#fff0e2;color:var(--brand-dark);font-size:11px;font-weight:900;padding:5px 9px;border-radius:999px}.btn-add-book{width:100%;border-style:dashed}.book-price-strip{display:flex;gap:18px;flex-wrap:wrap;padding:12px 14px;border-radius:12px;background:#fff;margin-top:14px;border:1px solid var(--line)}.book-price-strip span{font-size:12px;color:var(--muted)}.book-price-strip b{color:var(--text);margin-inline-start:4px}.book-uploads{margin-top:14px}.book-uploads summary,.revision-box summary,.manual-result-box summary{cursor:pointer;font-weight:800}.invoice-live-card{background:linear-gradient(180deg,#fff,#fbfcfd)}.invoice-live-row,.invoice-live-total,.price-breakdown>div{display:flex;justify-content:space-between;gap:18px;padding:7px 0}.invoice-live-total{font-size:18px;font-weight:900;border-top:2px solid var(--dark);margin-top:8px;padding-top:12px}.customer-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.customer-book-card{background:#fff}.compact-uploads{margin-top:14px}.rights-notice{border:1px solid #f1c58f;background:#fff8ef;border-radius:16px;padding:16px;margin:18px 0}.rights-notice strong{display:block;margin-bottom:6px}.rights-notice p{margin:0;color:#785827;line-height:1.8;font-size:13px}.customer-order-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}.customer-order-summary>div{background:var(--surface-2);border:1px solid var(--line);padding:12px;border-radius:12px}.customer-order-summary span{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}.customer-summary-book{border:1px solid var(--line);border-radius:14px;padding:14px;margin:10px 0}.customer-summary-book h3{margin:7px 0 3px}.customer-summary-book p{margin:0 0 8px;color:var(--muted)}.customer-total{margin-top:18px}.order-items-detail{display:grid;gap:16px}.order-item-detail{border:1px solid var(--line);border-radius:16px;padding:16px;background:var(--surface-2)}.item-detail-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}.item-detail-head h3{margin:0}.item-detail-head p{margin:4px 0 0;color:var(--muted);font-size:12px}.pricing-summary-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:20px}.price-breakdown{border:1px solid var(--line);border-radius:14px;padding:14px;background:var(--surface-2)}.price-breakdown>div{border-bottom:1px dashed var(--line)}.price-breakdown>div:last-child{border-bottom:0}.price-breakdown .total{font-size:17px;font-weight:900}.item-assets-section{border-top:1px solid var(--line);padding-top:18px;margin-top:18px}.production-book-block{border:1px solid var(--line);border-radius:18px;padding:16px;margin:18px 0;background:#fff}.production-book-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.production-book-head h3{margin:6px 0 0}.progress-number{font-size:13px;font-weight:900}.revision-box,.manual-result-box{margin-top:10px;border-top:1px solid var(--line);padding-top:9px}.revision-box form,.manual-result-box form{display:grid;gap:8px;margin-top:10px}.revision-box textarea{width:100%}.page-file-actions{margin-top:9px}.pdf-output-card{margin-top:18px;border:2px dashed #ccd3db;border-radius:16px;padding:16px;display:flex;justify-content:space-between;gap:18px;align-items:flex-start;background:#fafbfc}.pdf-output-card.output-prepared{border-style:solid;border-color:#bfe0ce;background:var(--success-bg)}.pdf-output-card h3{margin:3px 0 5px}.pdf-output-card p{margin:0;color:var(--muted);font-size:12px}.output-actions{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap;max-width:520px}.output-actions details{width:100%}.production-pause-box{background:var(--warning-bg);border:1px solid #f3d7a6;border-radius:14px;padding:15px;margin-bottom:18px}.production-pause-box p{color:var(--muted)}
@media(max-width:950px){.settings-grid,.pricing-summary-grid{grid-template-columns:1fr}.form-grid.cols-4{grid-template-columns:repeat(2,1fr)}.span-3{grid-column:span 2}.customer-order-summary{grid-template-columns:1fr}.pdf-output-card{flex-direction:column}}
@media(max-width:650px){.form-grid.cols-4{grid-template-columns:1fr}.span-3{grid-column:auto}.book-price-strip{flex-direction:column;gap:7px}.customer-section-head,.production-book-head{align-items:flex-start;flex-direction:column}}

/* =====================================================================
   HIKAYATI V7 — Brand system, responsive shell, dark mode, accordions
   Visual identity derived from the supplied Hikayati logo.
   ===================================================================== */
:root {
  --navy: #243a60;
  --navy-2: #1b2d4c;
  --navy-soft: #eef2f8;
  --coral: #fc6e5c;
  --coral-dark: #e75b49;
  --gold: #fec246;
  --teal: #52b3bc;
  --cream: #eed3ab;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef3f8;
  --text: #1f2d43;
  --muted: #718096;
  --line: #dde4ed;
  --brand: var(--navy);
  --brand-dark: var(--navy-2);
  --dark: var(--navy-2);
  --success: #24765d;
  --success-bg: #eaf8f1;
  --danger: #b94343;
  --danger-bg: #fff0ef;
  --warning: #946300;
  --warning-bg: #fff7de;
  --info: #366e9f;
  --info-bg: #edf5ff;
  --shadow: 0 12px 36px rgba(36,58,96,.08);
  --shadow-lg: 0 24px 70px rgba(24,42,72,.16);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111927;
  --surface: #182437;
  --surface-2: #1d2b40;
  --surface-3: #22324a;
  --text: #edf3fb;
  --muted: #a7b5c8;
  --line: #30425c;
  --navy-soft: #20304a;
  --success-bg: #17372e;
  --danger-bg: #3d2428;
  --warning-bg: #3a321e;
  --info-bg: #1a324b;
  --shadow: 0 12px 36px rgba(0,0,0,.2);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.38);
}

html { scroll-behavior:smooth; }
body.app-body { min-height:100vh; background:var(--bg); }
body, button, input, select, textarea { font-family: Tahoma, Arial, sans-serif; }
input, select, textarea, .table-input {
  background:var(--surface);
  color:var(--text);
  border-color:var(--line);
}
input::placeholder, textarea::placeholder { color:color-mix(in srgb,var(--muted) 85%, transparent); }
input:focus, select:focus, textarea:focus {
  border-color:var(--teal);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--teal) 18%, transparent);
}
label > span { color:var(--text); opacity:.82; }

/* Header / branding */
.topbar {
  background:linear-gradient(115deg,var(--navy-2),var(--navy));
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 8px 24px rgba(20,34,58,.12);
}
.topbar-inner { min-height:78px; gap:14px; }
.brand-v7 { min-width:max-content; color:#fff; }
.brand-v7 img { width:68px; height:42px; object-fit:contain; filter:drop-shadow(0 4px 10px rgba(0,0,0,.08)); }
.brand-v7 .brand-home-letter {
  width:28px; height:28px; display:grid; place-items:center; margin-inline-start:-14px;
  border-radius:10px; background:var(--coral); color:#fff; border:2px solid var(--navy);
  font-weight:900; font-size:16px; transition:.2s ease;
}
.brand-v7:hover .brand-home-letter { transform:translateY(-2px) scale(1.05); background:var(--gold); color:var(--navy); }
.brand-v7 strong { font-size:16px; }
.brand-v7 small { color:#cbd5e3; }
.nav-v7 { gap:3px; flex:1; justify-content:center; }
.nav-v7 a { color:#d5deea; padding:8px 10px; font-size:12px; }
.nav-v7 a:hover,.nav-v7 a.active { color:#fff; background:rgba(255,255,255,.1); }
.topbar-tools { display:flex; align-items:center; gap:7px; }
.icon-btn {
  min-width:36px; height:36px; padding:0 9px; border:1px solid rgba(255,255,255,.16);
  border-radius:11px; background:rgba(255,255,255,.07); color:#fff; display:inline-flex;
  align-items:center; justify-content:center; cursor:pointer; font-weight:800;
}
.icon-btn:hover { background:rgba(255,255,255,.15); }
.icon-btn.danger-soft:hover { background:rgba(252,110,92,.25); border-color:rgba(252,110,92,.45); }
.user-chip {
  display:flex; align-items:center; gap:9px; color:#fff; padding:5px 8px 5px 6px;
  border-radius:13px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.11);
  max-width:190px;
}
.user-chip img,.user-avatar-fallback { width:34px; height:34px; border-radius:11px; object-fit:cover; flex:0 0 34px; }
.user-avatar-fallback { display:grid; place-items:center; background:var(--gold); color:var(--navy); font-weight:900; }
.user-chip span:last-child { min-width:0; }
.user-chip strong,.user-chip small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-chip strong { font-size:12px; }
.user-chip small { color:#bdcadb; font-size:10px; }
.mobile-nav-toggle { display:none; border:0; background:transparent; color:#fff; font-size:25px; cursor:pointer; }

/* buttons */
.btn { background:var(--surface); color:var(--text); border-color:var(--line); transition:.15s ease; }
.btn:hover { border-color:color-mix(in srgb,var(--navy) 25%,var(--line)); box-shadow:0 6px 16px rgba(36,58,96,.08); }
.btn-primary { background:var(--navy); border-color:var(--navy); color:#fff; }
.btn-primary:hover { background:var(--navy-2); }
.btn-danger { background:var(--danger-bg); color:var(--danger); border-color:color-mix(in srgb,var(--danger) 25%,var(--line)); }
.btn-soft { background:var(--navy-soft); color:var(--navy); border-color:transparent; }
html[data-theme="dark"] .btn-soft { color:#cfe0f6; }
.btn-sm { padding:7px 10px; font-size:11px; border-radius:9px; }
.text-danger { color:var(--danger); }

/* brand accents */
.eyebrow { color:var(--coral)!important; }
.section-title > span { background:color-mix(in srgb,var(--gold) 24%,var(--surface)); color:var(--navy); }
.panel,.form-card,.stat-card,.book-builder-card,.order-item-detail,.production-book-block,.customer-summary-book,.invoice-live-card { background:var(--surface); }
.panel,.form-card { border-color:var(--line); }
.table-link strong { color:var(--navy); }
html[data-theme="dark"] .table-link strong { color:#d8e6fb; }
.table-link small { display:block; color:var(--muted); margin-top:3px; font-size:10px; }
.row-actions { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.row-actions form { margin:0; }
.ltr-cell { direction:ltr; unicode-bidi:plaintext; display:block; }

/* notifications */
.toast {
  position:fixed; inset-inline-end:22px; top:94px; z-index:1000; min-width:min(390px,calc(100vw - 32px));
  max-width:480px; display:flex; align-items:center; gap:10px; padding:14px 14px;
  border:1px solid var(--line); border-radius:15px; background:var(--surface); color:var(--text);
  box-shadow:var(--shadow-lg); animation:toastIn .22s ease-out;
}
.toast-dot { width:10px; height:10px; border-radius:50%; flex:0 0 10px; }
.toast strong { flex:1; font-size:13px; }
.toast button { border:0; background:transparent; color:var(--muted); font-size:22px; cursor:pointer; }
.toast-success { border-inline-start:5px solid var(--success); }
.toast-success .toast-dot { background:var(--success); }
.toast-danger,.toast-error { border-inline-start:5px solid var(--danger); }
.toast-danger .toast-dot,.toast-error .toast-dot { background:var(--danger); }
.toast-warning { border-inline-start:5px solid var(--gold); }
.toast-warning .toast-dot { background:var(--gold); }
.toast-info { border-inline-start:5px solid var(--teal); }
.toast-info .toast-dot { background:var(--teal); }
.toast-out { opacity:0; transform:translateY(-8px); transition:.25s ease; }
@keyframes toastIn { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:none} }

/* book/child accordion */
.accordion-stack { display:grid; gap:12px; }
.book-accordion {
  border:1px solid var(--line); border-radius:17px; background:var(--surface); overflow:clip;
  box-shadow:0 4px 16px rgba(36,58,96,.04);
}
.book-accordion > summary {
  list-style:none; display:grid; grid-template-columns:auto minmax(120px,1fr) minmax(110px,.75fr) auto;
  align-items:center; gap:12px; padding:15px 16px; cursor:pointer; background:var(--surface-2); user-select:none;
}
.book-accordion > summary::-webkit-details-marker { display:none; }
.book-accordion[open] > summary { border-bottom:1px solid var(--line); background:color-mix(in srgb,var(--navy-soft) 55%,var(--surface)); }
.book-accordion .book-number { margin:0; background:color-mix(in srgb,var(--gold) 26%,var(--surface)); color:var(--navy); }
.book-live-title { font-weight:900; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.book-summary-product { color:var(--muted); font-size:12px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.book-chevron { color:var(--navy); transition:.2s; font-size:16px; }
.book-accordion[open] .book-chevron { transform:rotate(180deg); }
.book-accordion-body { padding:17px; }
.book-inline-actions { display:flex; gap:7px; justify-content:flex-end; margin-top:14px; }
.book-builder-card { padding:0; border:0; box-shadow:none; margin:0; }
.book-price-strip { background:var(--surface-2); }

/* customer page */
.customer-body { min-height:100vh; background:radial-gradient(circle at top right,rgba(82,179,188,.11),transparent 34%),var(--bg); }
.customer-wrap { width:min(980px,calc(100% - 28px)); margin:28px auto 60px; }
.customer-card { background:var(--surface); border:1px solid var(--line); border-radius:24px; box-shadow:var(--shadow-lg); padding:26px; }
.customer-brand-v7 { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-bottom:20px; }
.customer-brand-v7 img { width:min(220px,48vw); height:auto; }
.customer-intro { margin-bottom:22px; }
.customer-intro h1 { margin:0 0 7px; color:var(--navy); font-size:clamp(26px,5vw,42px); }
html[data-theme="dark"] .customer-intro h1 { color:#e7effc; }
.customer-intro p { color:var(--muted); margin:0; }
.rights-notice-top { border:1px solid color-mix(in srgb,var(--coral) 35%,var(--line)); border-inline-start:5px solid var(--coral); background:color-mix(in srgb,var(--coral) 7%,var(--surface)); }
.rights-notice-top strong { color:var(--navy); }
html[data-theme="dark"] .rights-notice-top strong { color:#fff; }
.public-section { margin-top:18px; }
.public-upload-card { background:var(--surface-2); border-color:var(--line); }
.public-upload-card:hover { border-color:var(--teal); background:color-mix(in srgb,var(--teal) 5%,var(--surface)); }
.public-upload-card input[type="file"] { background:var(--surface); }
.customer-socials { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-top:22px; }
.customer-socials a { padding:8px 12px; background:var(--navy-soft); color:var(--navy); border-radius:999px; font-size:12px; font-weight:800; }
html[data-theme="dark"] .customer-socials a { color:#d7e4f5; }
.customer-footer { text-align:center; color:var(--muted); margin-top:20px; font-size:11px; }
.consent-row { display:flex; gap:10px; align-items:flex-start; padding:12px 0; }
.consent-row input { width:auto; margin-top:5px; }
.input-action { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:end; }
.promo-public { max-width:520px; }

/* Dashboard */
.dashboard-welcome {
  display:grid; grid-template-columns:1.5fr auto; gap:20px; align-items:center; padding:24px;
  border-radius:22px; margin-bottom:20px; color:#fff;
  background:linear-gradient(125deg,var(--navy-2),var(--navy) 60%,#31517f);
  box-shadow:var(--shadow);
}
.dashboard-welcome h1 { margin:3px 0 7px; font-size:clamp(25px,4vw,38px); }
.dashboard-welcome p { margin:0; color:#d3ddec; }
.dashboard-person { display:flex; align-items:center; gap:12px; min-width:190px; padding:11px 13px; border:1px solid rgba(255,255,255,.16); border-radius:16px; background:rgba(255,255,255,.08); }
.dashboard-person img,.dashboard-person .user-avatar-fallback { width:50px; height:50px; border-radius:15px; }
.dashboard-person strong,.dashboard-person small { display:block; }
.dashboard-person small { color:#c6d3e5; }
.dashboard-stats { grid-template-columns:repeat(6,minmax(0,1fr)); }
.dashboard-stats .stat-card { padding:17px; min-width:0; }
.dashboard-stats .stat-card strong { font-size:26px; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(260px,.65fr); gap:20px; }
.quick-links { display:grid; gap:9px; }
.quick-links a { display:flex; justify-content:space-between; align-items:center; padding:12px 13px; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; }
.quick-links a:hover { border-color:var(--teal); }
.mini-order-list { display:grid; gap:8px; }
.mini-order-list a { display:grid; grid-template-columns:1fr auto; gap:10px; padding:11px 0; border-bottom:1px solid var(--line); }
.mini-order-list a:last-child { border:0; }

/* Team / profile */
.team-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.team-card { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:17px; }
.team-card-head { display:flex; gap:12px; align-items:center; margin-bottom:14px; }
.team-card-head img,.team-card-head .user-avatar-fallback { width:54px; height:54px; border-radius:16px; }
.team-card-head h3 { margin:0; }
.team-card-head p { margin:3px 0 0; color:var(--muted); font-size:11px; }
.permission-checks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.permission-checks label { display:flex; align-items:center; gap:7px; padding:7px 8px; border:1px solid var(--line); border-radius:9px; font-size:11px; }
.permission-checks input { width:auto; }

/* CRM / Finance / settings */
.crm-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(290px,.65fr); gap:20px; }
.crm-detail { position:sticky; top:98px; }
.finance-stats { grid-template-columns:repeat(3,1fr); }
.finance-stats .stat-card:nth-child(3) strong { color:var(--success); }
.money-card strong { direction:ltr; unicode-bidi:plaintext; }
.notification-template-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.notification-template-card { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:15px; }
.notification-template-head { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:12px; }
.brand-preview { display:flex; align-items:center; gap:18px; padding:20px; background:var(--surface-2); border:1px solid var(--line); border-radius:16px; }
.brand-preview img { width:220px; max-width:44%; }
.brand-swatches { display:flex; gap:8px; flex-wrap:wrap; }
.brand-swatches span { width:33px; height:33px; border-radius:10px; border:2px solid rgba(255,255,255,.65); box-shadow:0 0 0 1px var(--line); }

/* Customer review / state */
.review-alert { display:flex; justify-content:space-between; gap:18px; align-items:center; background:var(--warning-bg); border:1px solid color-mix(in srgb,var(--gold) 45%,var(--line)); border-radius:16px; padding:15px; margin-bottom:18px; }
.review-alert p { margin:4px 0 0; color:var(--muted); }
.review-comparison { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.review-col { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:16px; }
.review-col.proposed { border-color:color-mix(in srgb,var(--teal) 50%,var(--line)); }
.review-books { display:grid; gap:10px; }
.warning-card { background:var(--warning-bg); border:1px solid color-mix(in srgb,var(--gold) 45%,var(--line)); border-radius:14px; padding:14px; }
.verified-chip { display:inline-flex; gap:6px; align-items:center; color:var(--success); background:var(--success-bg); border-radius:999px; padding:6px 9px; font-size:11px; font-weight:900; }
.otp-box { border:1px dashed var(--teal); border-radius:15px; padding:15px; background:color-mix(in srgb,var(--teal) 5%,var(--surface)); }

/* Production controls */
.page-action-buttons { display:flex; gap:6px; flex-wrap:wrap; margin-top:9px; }
.inline-action-panel { margin-top:10px; padding:11px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }
.inline-action-panel[hidden] { display:none!important; }
.inline-action-panel form { display:grid; gap:8px; }
.production-pages .page-card { background:var(--surface); }
.page-thumb { background:linear-gradient(145deg,var(--surface-3),var(--surface-2)); }
.pdf-output-card { background:var(--surface-2); border-color:var(--line); }
.output-actions { align-items:center; }

/* Login */
.login-v7 { background:linear-gradient(135deg,var(--navy-2),#14233b); }
.login-shell { width:min(920px,calc(100% - 28px)); display:grid; grid-template-columns:1fr 1fr; background:var(--surface); border-radius:26px; overflow:hidden; box-shadow:0 30px 90px rgba(0,0,0,.32); }
.login-brand-panel { padding:42px; display:flex; flex-direction:column; justify-content:center; color:#fff; background:linear-gradient(145deg,var(--navy),var(--navy-2)); position:relative; overflow:hidden; }
.login-brand-panel:after { content:""; position:absolute; width:220px; height:220px; border-radius:50%; background:rgba(82,179,188,.13); inset-inline-end:-80px; bottom:-80px; }
.login-brand-panel img { width:min(290px,90%); filter:brightness(0) invert(1); margin-bottom:28px; }
.login-brand-panel h2 { font-size:30px; margin:0 0 8px; }
.login-brand-panel p { color:#c9d5e6; }
.login-v7 .login-card { width:auto; border-radius:0; box-shadow:none; background:var(--surface); color:var(--text); padding:42px; display:flex; flex-direction:column; justify-content:center; }
.remember-row { display:flex; gap:8px; align-items:center; }
.remember-row input { width:auto; }

/* invoice branding */
.invoice-body { background:#eef2f7; color:#1f2d43; }
.invoice-brand-logo { width:185px; height:auto; }
.invoice-sheet { border-top:7px solid var(--navy); color:#1f2d43; }
.invoice-grid-compact { grid-template-columns:1fr 1fr; }
.invoice-box { border-color:#dbe2ec; background:#fff; }
.invoice-table thead th { background:#eef2f8; color:#586981; }
.invoice-table tfoot td { border-color:var(--navy); }
.invoice-discount { color:#b94343; }
.invoice-footer { color:#718096; }

/* misc */
.narrow-panel { max-width:760px; }
.span-4 { grid-column:span 4; }
.mini { font-size:10px; }
.compact-form { display:flex; gap:8px; flex-wrap:wrap; align-items:end; }
.compact-form > * { flex:1; min-width:120px; }
.compact-form .btn { flex:0 0 auto; }
.share-row { display:flex; gap:8px; align-items:center; }
.share-row input { flex:1; }
.share-label { font-size:11px; color:var(--muted); }
.customer-link-panel { border:1px solid var(--line); border-radius:14px; padding:14px; background:var(--surface-2); }
.customer-link-qrish { width:40px; height:40px; display:grid; place-items:center; background:var(--navy); color:#fff; border-radius:10px; font-weight:900; }

/* RTL/LTR correctness */
html[dir="ltr"] th,html[dir="ltr"] td { text-align:left; }
html[dir="ltr"] .invoice-title { text-align:right; direction:ltr; }
html[dir="ltr"] .row-actions,html[dir="ltr"] .form-actions { justify-content:flex-end; }

/* Responsive */
@media (max-width:1180px) {
  .nav-v7 a { padding:8px 7px; font-size:11px; }
  .user-chip { max-width:150px; }
  .dashboard-stats { grid-template-columns:repeat(3,1fr); }
  .team-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:980px) {
  .container { width:min(100% - 26px,1180px); }
  .topbar-inner { min-height:70px; flex-wrap:wrap; padding-block:8px; }
  .mobile-nav-toggle { display:inline-flex; order:2; margin-inline-start:auto; }
  .brand-v7 { order:1; }
  .topbar-tools { order:3; }
  .nav-v7 { order:4; display:none; flex-basis:100%; width:100%; justify-content:flex-start; flex-wrap:wrap; padding:8px 0 3px; border-top:1px solid rgba(255,255,255,.1); }
  .nav-v7.open { display:flex; }
  .detail-grid,.dashboard-grid,.crm-layout { grid-template-columns:1fr; }
  .detail-side,.crm-detail { position:static; }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .dashboard-welcome { grid-template-columns:1fr; }
  .dashboard-person { width:max-content; }
  .notification-template-grid { grid-template-columns:1fr; }
  .pages-grid { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:760px) {
  .page-shell { padding-block:22px 44px; }
  .page-heading,.order-hero { align-items:flex-start; flex-direction:column; margin-bottom:20px; }
  .page-heading h1,.order-hero h1 { font-size:28px; }
  .hero-actions { width:100%; display:flex; gap:7px; flex-wrap:wrap; }
  .form-grid.cols-2,.form-grid.cols-3,.form-grid.cols-4,.settings-grid,.review-comparison { grid-template-columns:1fr; }
  .span-2,.span-3,.span-4 { grid-column:auto; }
  .filters,.filters-v7 { grid-template-columns:1fr; }
  .filters .btn { width:100%; }
  .book-accordion > summary { grid-template-columns:auto 1fr auto; }
  .book-summary-product { grid-column:2/3; }
  .book-accordion > summary .book-chevron { grid-column:3; grid-row:1/3; }
  .customer-card { padding:18px; border-radius:18px; }
  .customer-brand-v7 { align-items:flex-start; }
  .pricing-summary-grid { grid-template-columns:1fr; }
  .pages-grid { grid-template-columns:repeat(2,1fr); }
  .team-grid { grid-template-columns:1fr; }
  .permission-checks { grid-template-columns:1fr; }
  .login-shell { grid-template-columns:1fr; }
  .login-brand-panel { display:none; }
  .login-v7 .login-card { padding:30px 24px; }
  .invoice-grid-compact,.invoice-grid { grid-template-columns:1fr 1fr!important; display:grid!important; gap:10px; }
  .invoice-box { margin-bottom:0!important; }
  .topbar-tools .user-chip span:last-child { display:none; }
  .user-chip { padding:4px; }
}
@media (max-width:560px) {
  .container { width:calc(100% - 20px); }
  .brand-v7 img { width:56px; }
  .brand-v7 > div { display:none; }
  .brand-v7 .brand-home-letter { margin-inline-start:-12px; }
  .topbar-tools { gap:4px; }
  .icon-btn { min-width:32px; height:32px; padding:0 7px; font-size:11px; }
  .user-chip img,.user-chip .user-avatar-fallback { width:32px; height:32px; }
  .stats-grid,.dashboard-stats,.finance-stats { grid-template-columns:1fr 1fr; gap:10px; }
  .stat-card { padding:14px; }
  .stat-card strong,.dashboard-stats .stat-card strong { font-size:23px; }
  .panel,.form-card { padding:15px; border-radius:15px; }
  .book-accordion-body { padding:13px; }
  .book-inline-actions { flex-direction:column; }
  .book-inline-actions .btn { width:100%; }
  .pages-grid { grid-template-columns:1fr; }
  .public-upload-grid { grid-template-columns:1fr; }
  .toast { inset-inline:10px; top:82px; min-width:0; max-width:none; }
  .invoice-sheet { padding:14px!important; }
  .invoice-brand-logo { width:130px; }
  .invoice-header { display:flex!important; gap:12px; }
  .invoice-title h1 { font-size:18px; }
  .invoice-grid-compact,.invoice-grid { grid-template-columns:1fr 1fr!important; }
  .invoice-box { padding:10px; }
  .invoice-box p { grid-template-columns:65px 1fr; gap:5px; font-size:10px; }
  .invoice-box span { font-size:9px; }
}
@media print {
  html,body { background:#fff!important; color:#1f2d43!important; }
  .invoice-sheet { border-top:5px solid #243a60; }
  .invoice-grid-compact,.invoice-grid { display:grid!important; grid-template-columns:1fr 1fr!important; }
}
/* Dashboard customer-link card (wrapper, not an icon) */
.customer-link-qrish {
  width:auto; height:auto; display:grid; grid-template-columns:88px minmax(0,1fr); gap:12px;
  align-items:center; background:var(--surface-2); color:var(--text); border:1px solid var(--line);
  border-radius:15px; padding:13px; font-weight:400;
}
.customer-link-qrish > img { width:82px; height:52px; object-fit:contain; grid-row:1/3; }
.customer-link-qrish > input { min-width:0; }
.customer-link-qrish > .row-actions { grid-column:2; }
@media(max-width:560px){.customer-link-qrish{grid-template-columns:1fr}.customer-link-qrish>img{grid-row:auto;width:120px}.customer-link-qrish>.row-actions{grid-column:auto}}
.invoice-brand-logo { width:auto; height:auto; }
.invoice-brand-logo img { width:185px; max-height:86px; object-fit:contain; }
.invoice-footer { display:flex; justify-content:center; align-items:center; gap:12px; }
.invoice-footer img { width:105px; height:54px; object-fit:contain; }
@media(max-width:560px){.invoice-brand-logo img{width:125px}.invoice-footer img{width:82px}}

/* =====================================================================
   HIKAYATI V7.1 — MOBILE FIRST UX / RTL-LTR HARDENING
   ===================================================================== */
:root{
  --tap:44px;
  --mobile-gap:10px;
  --customer-max:1080px;
}
html{font-size:16px;-webkit-text-size-adjust:100%;text-size-adjust:100%;}
body,button,input,select,textarea{font-family:Tahoma,"Segoe UI",Arial,sans-serif;font-kerning:normal;font-variant-ligatures:common-ligatures;text-rendering:optimizeLegibility;}
html[dir="rtl"] body,html[dir="rtl"] button,html[dir="rtl"] input,html[dir="rtl"] select,html[dir="rtl"] textarea{letter-spacing:0!important;}
h1,h2,h3,h4,p,label,button,a,th,td,summary,strong,small,span{overflow-wrap:break-word;word-break:normal;}
input,select,textarea,.btn{min-height:var(--tap);}
input[type="checkbox"],input[type="radio"],input[type="file"]{min-height:0;}
.btn-sm{min-height:38px;}

/* Logo contrast rules: original on light surfaces, white mark on dark/navy surfaces. */
.brand-v7 img,.login-brand-panel img{filter:brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0,0,0,.14));}
.customer-brand-v7 img,.invoice-brand-logo img,.invoice-footer img,.brand-preview img{filter:none;}
html[data-theme="dark"] .customer-brand-v7 img,html[data-theme="dark"] .brand-preview img{filter:brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0,0,0,.18));}
.invoice-brand-logo img,.invoice-footer img{filter:none!important;}
.brand-home-letter{line-height:1;}

/* Admin header: single-row mobile shell + floating drawer, no wrapped collisions. */
@media(max-width:980px){
  .topbar{position:sticky;top:0;z-index:100;}
  .topbar-inner{position:relative;min-height:64px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;padding-block:7px;}
  .brand-v7{grid-column:1;min-width:0;gap:6px;}
  .brand-v7 img{width:58px;height:38px;}
  .brand-v7>div{display:none;}
  .brand-v7 .brand-home-letter{width:25px;height:25px;margin-inline-start:-12px;font-size:14px;}
  .mobile-nav-toggle{display:inline-flex!important;grid-column:2;justify-self:end;order:initial;width:40px;height:40px;align-items:center;justify-content:center;border-radius:11px;background:rgba(255,255,255,.08);}
  .topbar-tools{grid-column:3;order:initial;gap:4px;}
  .topbar-tools .icon-btn{min-width:34px;width:34px;height:34px;padding:0;}
  .user-chip{max-width:none;padding:3px;background:transparent;border:0;}
  .user-chip span:last-child{display:none;}
  .nav-v7{position:absolute!important;inset-inline:10px;top:calc(100% + 7px);display:none!important;width:auto!important;max-height:min(72vh,560px);overflow:auto;z-index:150;flex-direction:column!important;align-items:stretch!important;gap:4px!important;padding:10px!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:16px;background:linear-gradient(145deg,var(--navy-2),var(--navy));box-shadow:0 18px 55px rgba(8,20,39,.32);}
  .nav-v7.open{display:flex!important;}
  .nav-v7 a{width:100%;min-height:42px;display:flex;align-items:center;padding:9px 11px;font-size:13px;border-radius:10px;}
}
@media(max-width:420px){
  .container{width:calc(100% - 16px);}
  .topbar-inner{grid-template-columns:auto 1fr auto;gap:5px;}
  .brand-v7 img{width:51px;height:34px;}
  .brand-v7 .brand-home-letter{display:none;}
  .topbar-tools a.icon-btn:first-child{width:32px;min-width:32px;}
  .user-chip img,.user-chip .user-avatar-fallback{width:31px;height:31px;}
}

/* Tables remain usable on touch screens without shrinking Arabic text into collisions. */
.table-wrap{overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;border-radius:12px;}
@media(max-width:760px){
  .table-wrap{margin-inline:-4px;padding-bottom:3px;}
  table{min-width:700px;}
  th,td{padding:11px 10px;font-size:12px;white-space:nowrap;}
  td .row-actions{flex-wrap:nowrap;}
  .page-shell{padding-block:18px 84px;}
  .page-heading h1,.order-hero h1{font-size:clamp(23px,7vw,30px);}
  .page-heading p,.order-hero p{font-size:12px;}
}

/* Customer shell */
.customer-v71{background:
 radial-gradient(circle at 92% 0,rgba(82,179,188,.18),transparent 30%),
 radial-gradient(circle at 0 30%,rgba(254,194,70,.10),transparent 26%),var(--bg);}
.customer-order-shell{width:min(var(--customer-max),calc(100% - 24px));margin:14px auto 70px;}
.customer-brand-mobile{margin:0 0 12px;padding:5px 3px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;}
.customer-logo-link{display:flex;align-items:center;}
.customer-brand-v7 img{width:154px;max-width:34vw;height:64px;object-fit:contain;object-position:center;}
.customer-brand-copy{min-width:0;}
.customer-brand-copy strong,.customer-brand-copy small{display:block;}
.customer-brand-copy strong{font-size:14px;color:var(--text);}
.customer-brand-copy small{font-size:10px;color:var(--muted);}
.customer-top-actions{display:flex;gap:6px;align-items:center;}
.customer-tool-btn{width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--navy);font-weight:900;cursor:pointer;}
html[data-theme="dark"] .customer-tool-btn{color:#e8f0fb;}

.rights-notice-priority{margin:0 0 12px;display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px;align-items:start;padding:14px 15px;border-radius:17px;box-shadow:0 5px 18px rgba(252,110,92,.06);}
.rights-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:color-mix(in srgb,var(--coral) 16%,var(--surface));color:var(--coral);font-size:18px;font-weight:900;}
.rights-notice-priority p{font-size:12px;line-height:1.75;}
.customer-hero-v71{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;align-items:end;margin:0 0 13px;padding:21px 22px;border-radius:22px;background:linear-gradient(130deg,var(--navy-2),var(--navy));color:#fff;box-shadow:var(--shadow);overflow:hidden;position:relative;}
.customer-hero-v71:after{content:"";position:absolute;width:180px;height:180px;border-radius:50%;background:rgba(82,179,188,.11);inset-inline-end:-65px;top:-80px;pointer-events:none;}
.customer-hero-v71 .eyebrow{margin:0 0 3px!important;color:var(--gold)!important;}
.customer-hero-v71 h1{margin:0;font-size:clamp(25px,5vw,40px);line-height:1.25;}
.customer-hero-v71 p{margin:7px 0 0;color:#dbe5f2;font-size:13px;max-width:680px;}
.hero-mini-steps{display:flex;gap:7px;position:relative;z-index:1;}
.hero-mini-steps span{display:flex;align-items:center;gap:6px;padding:7px 9px;border-radius:999px;background:rgba(255,255,255,.09);font-size:10px;white-space:nowrap;}
.hero-mini-steps b{width:20px;height:20px;display:grid;place-items:center;border-radius:50%;background:var(--gold);color:var(--navy);font-size:10px;}
.customer-order-form{display:grid;gap:12px;}
.customer-form-section{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:18px;box-shadow:var(--shadow);}
.customer-section-title{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:11px;align-items:center;margin-bottom:14px;}
.customer-section-title>span{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:color-mix(in srgb,var(--gold) 28%,var(--surface));color:var(--navy);font-weight:900;}
.customer-section-title h2{margin:0;font-size:18px;line-height:1.25;}
.customer-section-title p{margin:3px 0 0;color:var(--muted);font-size:11px;line-height:1.6;}
.customer-contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.customer-address-field{grid-column:1/-1;}
.customer-form-section label>span{font-size:11px;margin-bottom:5px;}
.customer-form-section input,.customer-form-section select,.customer-form-section textarea{padding:10px 11px;border-radius:11px;}

/* Child/book accordions - compact, photo-aware and touch friendly */
.customer-books-stack,.accordion-stack{gap:9px;}
.book-accordion{border-radius:16px;overflow:hidden;scroll-margin-top:82px;}
.book-accordion>summary{grid-template-columns:42px auto minmax(0,1fr) minmax(90px,.65fr) 24px;gap:8px;padding:10px 12px;min-height:61px;}
.book-summary-avatar{width:39px;height:39px;border-radius:12px;background:var(--surface);border:1px solid var(--line);display:grid;place-items:center;overflow:hidden;font-size:18px;}
.book-summary-avatar img{width:100%;height:100%;object-fit:cover;display:block;}
.book-number{white-space:nowrap;font-size:10px!important;padding:4px 7px!important;}
.book-live-title{font-size:13px;}
.book-summary-product{font-size:10px;}
.book-chevron{display:grid;place-items:center;width:24px;height:24px;}
.book-accordion-body{padding:13px;}
.book-inline-actions{margin:0 0 9px;}
.child-identity-row{display:grid;grid-template-columns:170px minmax(0,1fr);gap:10px;align-items:stretch;margin-bottom:10px;}
.photo-picker{display:grid;grid-template-columns:54px minmax(0,1fr);gap:9px;align-items:center;min-height:67px;padding:6px;border:1px dashed color-mix(in srgb,var(--teal) 58%,var(--line));border-radius:13px;background:color-mix(in srgb,var(--teal) 4%,var(--surface));cursor:pointer;transition:.15s ease;}
.photo-picker:hover{border-color:var(--teal);background:color-mix(in srgb,var(--teal) 8%,var(--surface));}
.photo-picker input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none;}
.photo-picker-preview{width:54px;height:54px;display:grid;place-items:center;border-radius:11px;background:var(--surface-3);overflow:hidden;color:var(--teal);font-size:23px;font-weight:400;}
.photo-picker-preview img{width:100%;height:100%;object-fit:cover;}
.photo-picker-copy{min-width:0;}
.photo-picker-copy strong,.photo-picker-copy small{display:block;}
.photo-picker-copy strong{font-size:11px;}
.photo-picker-copy small{font-size:9px;color:var(--muted);line-height:1.4;}
.child-name-field{display:flex;flex-direction:column;justify-content:center;}
.child-name-field input{font-size:16px;font-weight:800;}
.child-compact-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;}
.compact-pair{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important;margin-top:9px;}
.theme-title-pair{margin-top:10px;}

.characters-section-v71{margin-top:11px;padding:11px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);}
.characters-section-head{display:flex;align-items:end;justify-content:space-between;gap:10px;margin-bottom:8px;}
.characters-section-head h4{margin:0;font-size:13px;}
.characters-section-head small{color:var(--muted);font-size:9px;}
.character-count-wrap{width:132px;}
.character-count-wrap span{font-size:9px!important;}
.character-count-wrap input{height:38px;min-height:38px;}
.characters-list{display:grid;gap:8px;}
.character-person-card{display:grid;grid-template-columns:160px minmax(130px,.75fr) minmax(160px,1fr);gap:8px;align-items:end;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--surface);}
.character-person-card .photo-picker{min-height:60px;grid-template-columns:48px 1fr;padding:5px;}
.character-person-card .photo-picker-preview{width:48px;height:48px;}
.character-person-card label>span{font-size:9px;}
.character-person-card input{min-height:40px;height:40px;padding:8px 9px;}
.book-media-section{margin-top:10px;}
.book-media-section h4{margin:0 0 7px;font-size:12px;}
.two-upload-cards{grid-template-columns:1fr 1fr!important;gap:8px;}
.public-upload-card{min-height:76px;padding:10px!important;border-radius:12px!important;}
.public-upload-card strong{font-size:11px;}
.public-upload-card small{font-size:9px;}
.public-upload-card input[type=file]{padding:6px!important;font-size:10px;}
.book-price-strip{margin-top:10px;padding:9px 11px;display:grid!important;grid-template-columns:repeat(3,1fr);gap:5px!important;}
.book-price-strip span{text-align:center;font-size:10px;}
.book-price-strip b{display:block;margin:2px 0 0;font-size:12px;}
.customer-add-book-wide,.btn-add-book{min-height:46px;margin-top:9px;}
.add-book-top{white-space:nowrap;}

/* Checkout */
.checkout-grid-v71{display:grid;grid-template-columns:minmax(240px,.75fr) minmax(300px,1.25fr);gap:11px;align-items:start;}
.promo-public{padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);}
.input-action{display:flex;gap:6px;}
.input-action input{min-width:0;}
.customer-invoice-live{padding:13px;border:1px solid var(--line);border-radius:14px;box-shadow:none;}
.customer-invoice-live h3{margin:0 0 8px;font-size:13px;}
.invoice-live-divider{height:1px;background:var(--line);margin:6px 0;}
.invoice-live-row{padding:5px 0;font-size:11px;}
.invoice-live-total{padding-top:9px;font-size:16px;}
.customer-consents{display:grid;gap:7px;}
.consent-row{padding:11px 12px!important;border-radius:13px!important;font-size:11px!important;line-height:1.55;}
.consent-row input{width:19px!important;height:19px!important;flex:0 0 19px;}
.customer-submit-btn{min-height:50px;}
.mobile-checkout-bar{display:none;}

/* Customer social / footer */
.customer-socials{margin:14px auto 0;padding:10px;}
.customer-socials span{width:100%;text-align:center;font-size:10px;color:var(--muted);}
.customer-socials a{min-height:38px;display:inline-flex;align-items:center;font-size:10px;}

/* General cards and responsive grids */
.section-title-with-action{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;}
@media(max-width:900px){
  .child-compact-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .character-person-card{grid-template-columns:145px 1fr 1fr;}
  .checkout-grid-v71{grid-template-columns:1fr;}
}
@media(max-width:720px){
  .customer-order-shell{width:calc(100% - 14px);margin-top:7px;margin-bottom:90px;}
  .customer-brand-mobile{grid-template-columns:auto 1fr auto;gap:7px;margin-bottom:7px;}
  .customer-brand-v7 img{width:112px;height:48px;max-width:none;}
  .customer-brand-copy{display:none;}
  .customer-tool-btn{width:37px;height:37px;border-radius:10px;}
  .rights-notice-priority{grid-template-columns:30px 1fr;padding:10px 11px;border-radius:14px;margin-bottom:7px;gap:8px;}
  .rights-icon{width:29px;height:29px;border-radius:9px;font-size:14px;}
  .rights-notice-priority strong{font-size:11px;}
  .rights-notice-priority p{font-size:10px;line-height:1.65;margin-top:3px;}
  .customer-hero-v71{grid-template-columns:1fr;padding:15px 14px;border-radius:16px;margin-bottom:8px;gap:10px;}
  .customer-hero-v71 h1{font-size:24px;}
  .customer-hero-v71 p{font-size:11px;}
  .hero-mini-steps{gap:4px;overflow:auto;padding-bottom:1px;}
  .hero-mini-steps span{padding:5px 7px;font-size:9px;}
  .hero-mini-steps b{width:18px;height:18px;}
  .customer-order-form{gap:8px;}
  .customer-form-section{padding:11px;border-radius:15px;}
  .customer-section-title{grid-template-columns:29px minmax(0,1fr) auto;gap:8px;margin-bottom:9px;}
  .customer-section-title>span{width:29px;height:29px;border-radius:9px;font-size:11px;}
  .customer-section-title h2{font-size:15px;}
  .customer-section-title p{font-size:9px;line-height:1.45;}
  .customer-contact-grid{grid-template-columns:1fr 1fr;gap:7px;}
  .customer-address-field{grid-column:1/-1;}
  .customer-form-section input,.customer-form-section select,.customer-form-section textarea{min-height:42px;padding:8px 9px;font-size:13px;}
  .customer-form-section label>span{font-size:10px;margin-bottom:4px;}
  .book-accordion>summary{grid-template-columns:35px auto minmax(0,1fr) 22px;grid-template-areas:"avatar num title chev" "avatar product product chev";gap:4px 7px;padding:8px;min-height:54px;}
  .book-summary-avatar{grid-area:avatar;width:35px;height:35px;border-radius:10px;}
  .book-number{grid-area:num;}
  .book-live-title{grid-area:title;font-size:12px;}
  .book-summary-product{grid-area:product;font-size:9px;}
  .book-chevron{grid-area:chev;}
  .book-accordion-body{padding:9px;}
  .book-inline-actions{margin-bottom:6px;}
  .book-inline-actions .btn{min-height:32px;padding:5px 8px;font-size:9px;}
  .child-identity-row{grid-template-columns:126px 1fr;gap:7px;margin-bottom:7px;}
  .photo-picker{grid-template-columns:43px 1fr;min-height:56px;gap:6px;padding:5px;border-radius:11px;}
  .photo-picker-preview{width:43px;height:43px;border-radius:9px;font-size:19px;}
  .photo-picker-copy strong{font-size:9px;}.photo-picker-copy small{font-size:8px;}
  .child-name-field input{font-size:14px;}
  .child-compact-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;}
  .compact-pair{grid-template-columns:1fr 1fr!important;gap:6px!important;margin-top:6px;}
  .characters-section-v71{margin-top:7px;padding:7px;border-radius:11px;}
  .characters-section-head{margin-bottom:6px;}
  .character-count-wrap{width:92px;}
  .character-person-card{grid-template-columns:112px minmax(0,1fr);grid-template-areas:"photo name" "photo notes";gap:5px;padding:6px;}
  .character-person-card .photo-picker{grid-area:photo;align-self:stretch;grid-template-columns:38px 1fr;min-height:76px;}
  .character-person-card .photo-picker-preview{width:38px;height:38px;}
  .character-name-field{grid-area:name;}.character-notes-field{grid-area:notes;}
  .character-person-card input{height:35px;min-height:35px;font-size:11px;}
  .two-upload-cards{grid-template-columns:1fr 1fr!important;}
  .public-upload-card{min-height:68px;padding:7px!important;}
  .book-price-strip{grid-template-columns:repeat(3,1fr)!important;padding:7px;}
  .add-book-top{padding:5px 8px;min-height:34px;font-size:9px;}
  .customer-add-book-wide{font-size:11px;}
  .checkout-grid-v71{gap:7px;}
  .customer-submit-row{padding-bottom:6px;}
  .mobile-checkout-bar{position:fixed;z-index:80;display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;inset-inline:7px;bottom:max(7px,env(safe-area-inset-bottom));padding:7px 8px 7px 12px;border:1px solid var(--line);border-radius:15px;background:color-mix(in srgb,var(--surface) 94%,transparent);box-shadow:0 14px 45px rgba(18,35,61,.22);backdrop-filter:blur(12px);}
  .mobile-checkout-bar small,.mobile-checkout-bar strong{display:block;}.mobile-checkout-bar small{font-size:9px;color:var(--muted);}.mobile-checkout-bar strong{font-size:17px;color:var(--navy);}
  html[data-theme="dark"] .mobile-checkout-bar strong{color:#fff;}
  .mobile-checkout-bar .btn{min-height:42px;padding-inline:16px;}
  .customer-footer{margin-bottom:74px;}
}
@media(max-width:430px){
  .customer-contact-grid{grid-template-columns:1fr 1fr;}
  .customer-contact-grid label:first-child,.customer-contact-grid label:nth-child(2),.customer-address-field{grid-column:1/-1;}
  .child-identity-row{grid-template-columns:112px 1fr;}
  .photo-picker{grid-template-columns:39px 1fr;}
  .photo-picker-preview{width:39px;height:39px;}
  .compact-pair{grid-template-columns:1fr 1fr!important;}
  .theme-title-pair{grid-template-columns:1fr 1fr!important;}
  .character-person-card{grid-template-columns:102px 1fr;}
}
@media(max-width:350px){
  .customer-contact-grid,.child-compact-grid,.compact-pair,.theme-title-pair,.two-upload-cards{grid-template-columns:1fr!important;}
  .customer-contact-grid label{grid-column:auto!important;}
  .child-identity-row{grid-template-columns:1fr;}
  .photo-picker{grid-template-columns:45px 1fr;}
  .character-person-card{grid-template-columns:1fr;grid-template-areas:"photo" "name" "notes";}
}

/* LTR/RTL exactness for customer forms and mixed phone/order values */
html[dir="ltr"] .customer-section-title,html[dir="ltr"] .book-accordion>summary,html[dir="ltr"] .customer-brand-mobile{direction:ltr;}
html[dir="rtl"] .customer-section-title,html[dir="rtl"] .book-accordion>summary,html[dir="rtl"] .customer-brand-mobile{direction:rtl;}
html[dir="ltr"] .book-chevron{transform:none;}
html[dir="ltr"] .book-accordion[open] .book-chevron{transform:rotate(180deg);}
html[dir="rtl"] input[dir="ltr"],html[dir="rtl"] .ltr-cell{direction:ltr;text-align:left;unicode-bidi:plaintext;}
html[dir="ltr"] .rights-notice-priority{border-inline-start:5px solid var(--coral);}

/* Better admin accordions on mobile as well */
@media(max-width:720px){
  .form-card .book-accordion>summary{grid-template-columns:35px auto minmax(0,1fr) 22px;}
  .form-card .child-identity-row{grid-template-columns:126px 1fr;}
  .section-title-with-action{grid-template-columns:29px minmax(0,1fr) auto;gap:8px;}
  .section-title-with-action .btn{font-size:9px;padding:5px 7px;}
  .form-actions{position:relative;z-index:1;}
}
.login-toolbar{display:flex;gap:6px;justify-content:flex-end;margin-bottom:12px}.login-toolbar .customer-tool-btn{color:var(--navy)}html[data-theme="dark"] .login-toolbar .customer-tool-btn{color:#fff}

/* =====================================================================
   HIKAYATI V7.2 — MOBILE UX HARDENING / RTL-LTR / ACCESSIBILITY
   ===================================================================== */
html{font-size:17px;text-size-adjust:100%;-webkit-text-size-adjust:100%;}
body,button,input,select,textarea{font-family:system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif;}
body{font-size:17px;line-height:1.72;overflow-x:hidden;}
button,input,select,textarea{font-size:15px;line-height:1.45;}
label>span{font-size:13px;line-height:1.45;}
.btn{font-size:14px;min-height:42px;padding:9px 14px;}
.btn-sm{font-size:12px;min-height:36px;padding:7px 10px;}
th,td{font-size:14px;} th{font-size:13px;}.badge{font-size:12px;}.soft-pill{font-size:12px;}
.panel-head p,.form-card p{font-size:14px;}.panel-head h2,.form-card h2,.detail-side h2{font-size:20px;}
.table-link small,td small{font-size:11px;}
html[dir="rtl"] body{text-align:right;}
html[dir="ltr"] body{text-align:left;}
html[dir="rtl"] input:not([dir="ltr"]),html[dir="rtl"] textarea,html[dir="rtl"] select{text-align:right;direction:rtl;}
html[dir="ltr"] input,html[dir="ltr"] textarea,html[dir="ltr"] select{text-align:left;direction:ltr;}
html[dir="rtl"] input[dir="ltr"],html[dir="rtl"] .ltr-cell{direction:ltr;text-align:left;unicode-bidi:plaintext;}
html[dir="rtl"] select{background-position:left 12px center;}
html[dir="ltr"] select{background-position:right 12px center;}
input,select,textarea{min-height:46px;}
textarea{min-height:92px;}
.table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;border-radius:12px;}
.table-wrap table{margin:0;}
.page-shell{max-width:100%;overflow:visible;}

/* Header/logo clarity */
.brand-v7 img{width:82px;height:48px;object-fit:contain;}
html[data-theme="dark"] .brand-v7 img{filter:brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0,0,0,.15));}
html[data-theme="light"] .brand-v7 img{filter:brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0,0,0,.12));}
.topbar .brand-home-letter{box-shadow:0 3px 9px rgba(0,0,0,.18);}

/* Dashboard mobile first refinement */
.dashboard-welcome{min-width:0;}
.dashboard-person{min-width:0;max-width:100%;}
.dashboard-person>div{min-width:0;}
.dashboard-person h1,.dashboard-person p{overflow-wrap:anywhere;}
.welcome-actions{display:flex;gap:8px;flex-wrap:wrap;}
.dashboard-grid>*{min-width:0;}
.dashboard-side{min-width:0;}
.customer-link-qrish input{min-width:0;}
.quick-links a{gap:12px;}
.quick-links span{text-align:end;}

/* Book accordion: exact RTL/LTR chevron and readable summary */
.book-accordion>summary{position:relative;min-width:0;}
.book-chevron{width:22px;height:22px;display:grid;place-items:center;justify-self:center;align-self:center;font-size:0!important;}
.book-chevron::before{content:"";width:8px;height:8px;border-inline-end:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .2s ease;}
.book-accordion[open] .book-chevron::before{transform:rotate(225deg);}
html[dir="rtl"] .book-chevron,html[dir="ltr"] .book-chevron{transform:none!important;}
.book-live-title{font-size:14px;line-height:1.35;}
.book-summary-product{font-size:11px;line-height:1.3;}

/* Customer V7.2: simpler, larger, touch friendly */
.customer-v72{font-size:17px;}
.customer-v72 .customer-order-shell{width:min(1080px,calc(100% - 20px));margin:10px auto 90px;}
.customer-v72 .customer-brand-mobile{margin-bottom:9px;padding-inline:4px;}
.customer-v72 .customer-brand-v7 img{width:155px;height:62px;object-fit:contain;}
html[data-theme="dark"] .customer-v72 .customer-brand-v7 img{filter:brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0,0,0,.16));}
.customer-v72 .rights-notice-priority{padding:14px 15px;border-radius:17px;gap:11px;margin-bottom:10px;}
.customer-v72 .rights-notice-priority strong{font-size:14px;line-height:1.4;}
.customer-v72 .rights-notice-priority p{font-size:13px;line-height:1.75;margin-top:4px;}
.customer-v72 .customer-hero-v71{padding:20px 21px;border-radius:20px;margin-bottom:11px;}
.customer-v72 .customer-hero-v71 h1{font-size:clamp(27px,6vw,40px);}
.customer-v72 .customer-hero-v71 p{font-size:14px;line-height:1.7;}
.customer-v72 .hero-mini-steps span{font-size:12px;min-height:38px;}
.customer-v72 .customer-order-form{gap:10px;}
.customer-v72 .customer-form-section{padding:17px;border-radius:18px;}
.customer-v72 .customer-section-title{grid-template-columns:36px minmax(0,1fr) auto;gap:10px;margin-bottom:13px;}
.customer-v72 .customer-section-title>span{width:36px;height:36px;font-size:14px;}
.customer-v72 .customer-section-title h2{font-size:19px;}
.customer-v72 .customer-section-title p{font-size:13px;line-height:1.65;}
.customer-v72 .customer-contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.customer-v72 .customer-contact-grid label>span,.customer-v72 .book-accordion label>span{font-size:13px;margin-bottom:6px;}
.customer-v72 input,.customer-v72 select,.customer-v72 textarea{font-size:16px;min-height:50px;border-radius:12px;padding:11px 12px;}
.customer-v72 select{cursor:pointer;}
.customer-v72 .customer-address-field{grid-column:1/-1;}
.customer-v72 .book-accordion{border-radius:16px;}
.customer-v72 .book-accordion>summary{padding:11px 12px;min-height:68px;background:var(--surface-2);}
.customer-v72 .book-accordion-body{padding:12px;}
.customer-v72 .book-number{font-size:12px;padding:5px 8px;}
.customer-v72 .book-live-title{font-size:15px;}
.customer-v72 .book-summary-avatar{width:44px;height:44px;border-radius:12px;overflow:hidden;}
.customer-v72 .book-summary-avatar img{width:100%;height:100%;object-fit:cover;}
.customer-v72 .child-identity-row{display:grid;grid-template-columns:155px minmax(0,1fr);gap:10px;align-items:end;}
.customer-v72 .photo-picker{display:grid;grid-template-columns:54px minmax(0,1fr);gap:8px;align-items:center;min-height:70px;padding:7px;border:2px dashed color-mix(in srgb,var(--teal) 55%,var(--line));border-radius:13px;background:var(--surface-2);cursor:pointer;}
.customer-v72 .photo-picker input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;}
.customer-v72 .photo-picker-preview{width:54px;height:54px;border-radius:11px;overflow:hidden;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line);}
.customer-v72 .photo-picker-preview img{width:100%;height:100%;object-fit:cover;}
.customer-v72 .photo-picker-copy strong{font-size:12px;display:block;}.customer-v72 .photo-picker-copy small{font-size:11px;color:var(--teal);font-weight:800;display:block;margin-top:2px;}
.customer-v72 .child-compact-grid,.customer-v72 .compact-pair,.customer-v72 .theme-title-pair{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:9px;}
.customer-v72 .characters-section-v71{padding:11px;border-radius:13px;margin-top:10px;}
.customer-v72 .characters-section-head{display:flex;align-items:end;justify-content:space-between;gap:10px;}
.customer-v72 .characters-section-head h4{font-size:15px;margin:0;}
.customer-v72 .character-count-wrap{width:145px;}
.customer-v72 .character-count-wrap select{min-height:46px;}
.customer-v72 .character-person-card{grid-template-columns:155px minmax(0,.8fr) minmax(0,1fr);gap:9px;padding:9px;border-radius:13px;}
.customer-v72 .character-person-card .photo-picker{min-height:68px;grid-template-columns:50px 1fr;}
.customer-v72 .character-person-card .photo-picker-preview{width:50px;height:50px;}
.customer-v72 .character-person-card input{font-size:14px;min-height:46px;height:auto;}
.customer-v72 .book-media-section{margin-top:11px;}
.customer-v72 .two-upload-cards{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px;}
.minimal-upload-card{border:1px solid var(--line);border-radius:13px;padding:10px;background:var(--surface-2);}
.minimal-upload-card>strong{display:block;font-size:13px;margin-bottom:7px;}
.simple-upload{display:flex;align-items:center;gap:8px;flex-wrap:wrap;cursor:pointer;}
.simple-upload input[type="file"]{position:absolute!important;opacity:0!important;pointer-events:none!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;}
.simple-upload-btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 12px;border-radius:10px;background:var(--navy);color:#fff;font-weight:900;font-size:12px;}
.simple-upload-state{font-size:11px;color:var(--muted);flex:1;min-width:100px;}
.customer-v72 .book-price-strip{grid-template-columns:repeat(3,1fr)!important;display:grid!important;gap:6px!important;padding:9px;}
.customer-v72 .book-price-strip span{font-size:11px;text-align:center;}.customer-v72 .book-price-strip b{font-size:14px;display:block;}
.customer-v72 .customer-add-book-wide{min-height:50px;font-size:14px;}
.customer-v72 .checkout-grid-v71{gap:10px;}
.customer-v72 .customer-invoice-live h3{font-size:15px;}
.customer-v72 .invoice-live-row{font-size:13px;padding:7px 0;}.customer-v72 .invoice-live-total{font-size:19px;}
.customer-v72 .consent-row{font-size:13px!important;line-height:1.7!important;padding:13px!important;}
.customer-v72 .consent-row input{width:22px!important;height:22px!important;flex:0 0 22px!important;margin-top:1px!important;}
.customer-v72 .customer-submit-btn{min-height:56px;font-size:17px;}
.customer-footer-v72{display:grid;justify-items:center;gap:7px;margin:18px 0 0;padding:14px 0 8px;color:var(--muted);text-align:center;}
.customer-footer-v72 img{width:150px;height:62px;object-fit:contain;}
html[data-theme="dark"] .customer-footer-v72 img{filter:brightness(0) invert(1);}
.customer-footer-v72 small{font-size:11px;}

/* Global style example picker */
.style-picker-block{margin-top:9px;padding:10px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2);}
.style-picker-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:8px;}
.style-picker-head strong{font-size:13px;}.style-picker-head small{font-size:11px;color:var(--muted);}
.style-example-strip{display:flex;gap:9px;overflow-x:auto;scroll-snap-type:x proximity;padding:2px 1px 7px;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;}
.style-example-card{flex:0 0 118px;border:2px solid transparent;border-radius:12px;padding:5px;background:var(--surface);color:var(--text);cursor:pointer;scroll-snap-align:start;text-align:start;box-shadow:0 2px 8px rgba(36,58,96,.05);}
.style-example-card img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px;display:block;}
.style-example-card span{display:block;font-size:11px;font-weight:800;line-height:1.35;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.style-example-card.selected{border-color:var(--teal);box-shadow:0 0 0 3px color-mix(in srgb,var(--teal) 15%,transparent);}
.style-admin-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px;}
.style-admin-card{border:1px solid var(--line);border-radius:15px;padding:10px;background:var(--surface-2);}
.style-admin-card>img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:10px;margin-bottom:8px;}
.style-admin-form{display:grid;gap:7px;}.style-admin-form label>span{font-size:11px;}.style-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;}.sort-mini{width:72px!important;min-height:36px!important;padding:6px!important;}

/* Team permissions: readable, aligned checkboxes */
.team-user-form{display:grid;gap:13px;}.team-basic-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;align-items:end;}
.permission-accordion{border:1px solid var(--line);border-radius:13px;background:var(--surface-2);overflow:hidden;}
.permission-accordion>summary{cursor:pointer;padding:11px 13px;font-size:14px;font-weight:900;list-style:none;}.permission-accordion>summary::-webkit-details-marker{display:none;}
.permission-accordion[open]>summary{border-bottom:1px solid var(--line);}.permission-accordion>.permission-checks,.permission-accordion>.action-permission-groups{padding:11px;}
.action-permission-groups{display:grid;gap:11px;}.action-permission-groups section{border:1px solid var(--line);border-radius:11px;padding:9px;background:var(--surface);}.action-permission-groups h4{margin:0 0 8px;font-size:13px;}
.permission-grid-clean{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}.permission-grid-clean label{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;gap:8px;min-height:42px;padding:8px 9px;font-size:12px;line-height:1.4;}.permission-grid-clean input{width:18px!important;height:18px!important;margin:0!important;justify-self:center;}
.team-form-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;}.switch-clean{min-height:42px;}.switch-clean input{width:20px!important;height:20px!important;}
.compact-team-form .team-basic-grid{grid-template-columns:1fr 1fr;}

/* WhatsApp settings toggles */
.whatsapp-settings-form{display:grid;gap:16px;}.toggle-setting-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}.toggle-setting{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 48px;align-items:center;gap:12px;padding:12px 13px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2);cursor:pointer;}.toggle-setting>span strong,.toggle-setting>span small{display:block;}.toggle-setting>span strong{font-size:13px;}.toggle-setting>span small{font-size:11px;color:var(--muted);margin-top:3px;}.toggle-setting input{position:absolute;opacity:0;pointer-events:none;width:1px!important;height:1px!important;}.toggle-setting i{width:46px;height:26px;border-radius:999px;background:#cfd7e2;position:relative;transition:.2s;}.toggle-setting i:after{content:"";position:absolute;width:20px;height:20px;border-radius:50%;background:#fff;top:3px;inset-inline-start:3px;box-shadow:0 2px 5px rgba(0,0,0,.18);transition:.2s;}.toggle-setting input:checked+i{background:var(--teal);}.toggle-setting input:checked+i:after{inset-inline-start:23px;}.compact-toggle{grid-template-columns:1fr 42px;padding:7px 8px;}.compact-toggle i{width:40px;height:23px;}.compact-toggle i:after{width:17px;height:17px;}.compact-toggle input:checked+i:after{inset-inline-start:20px;}.whatsapp-fields{margin-top:0;}
.notification-template-head input{min-width:0;}

/* CRM */
.crm-table small{display:block;color:var(--muted);font-size:11px;margin-top:3px;}.crm-contact-summary{display:grid;gap:8px;margin-bottom:14px;}.crm-contact-summary p{margin:0;padding:9px 0;border-bottom:1px solid var(--line);}.crm-contact-summary span,.crm-contact-summary strong{display:block;}.crm-contact-summary span{font-size:11px;color:var(--muted);}.crm-contact-summary strong{font-size:13px;margin-top:2px;}.crm-edit-form .compact-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px;}

/* Footer: logo only, no duplicate letter/name */
.app-footer{width:min(1180px,calc(100% - 36px));margin:0 auto 28px;display:flex;justify-content:center;padding:16px 0;border-top:1px solid var(--line);}
.app-footer img{width:132px;height:54px;object-fit:contain;opacity:.9;}
html[data-theme="dark"] .app-footer img{filter:brightness(0) invert(1);opacity:.92;}

/* Native upload controls inside admin: prevent ugly overflow */
input[type="file"]{max-width:100%;overflow:hidden;}
input[type="file"]::file-selector-button{border:0;border-radius:8px;background:var(--navy);color:#fff;padding:7px 9px;margin-inline-end:8px;font-weight:800;cursor:pointer;}

@media(max-width:1100px){
 .team-basic-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
 .style-admin-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
 .permission-grid-clean{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:900px){
 .dashboard-stats{grid-template-columns:repeat(3,minmax(0,1fr));}
 .style-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 .team-basic-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 .toggle-setting-grid{grid-template-columns:1fr;}
 .customer-v72 .character-person-card{grid-template-columns:145px 1fr 1fr;}
}
@media(max-width:720px){
 body{font-size:16px;}
 .container{width:calc(100% - 14px);}
 .page-shell{padding-block:14px 34px;}
 .topbar-inner{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px;padding-block:7px!important;min-height:62px!important;}
 .brand-v7{grid-column:1;min-width:0;}.brand-v7 img{width:70px;height:42px;}.brand-v7>div{display:none!important;}.brand-v7 .brand-home-letter{width:26px;height:26px;margin-inline-start:-12px;}
 .mobile-nav-toggle{grid-column:2!important;display:inline-flex!important;margin:0!important;order:initial!important;width:38px;height:38px;align-items:center;justify-content:center;border-radius:10px;background:rgba(255,255,255,.08);}
 .topbar-tools{grid-column:3;gap:4px;}.topbar-tools .icon-btn{min-width:34px;height:34px;padding:0 6px;}.topbar-tools .user-chip{padding:3px;max-width:40px;}.topbar-tools .user-chip span:last-child{display:none!important;}.topbar-tools .user-chip img,.topbar-tools .user-chip .user-avatar-fallback{width:32px;height:32px;}
 .nav-v7{grid-column:1/-1!important;order:initial!important;display:none!important;width:100%;flex-basis:auto!important;max-height:70vh;overflow:auto;grid-template-columns:1fr 1fr;gap:6px;padding:8px 0 2px!important;}.nav-v7.open{display:grid!important;}.nav-v7 a{font-size:13px;min-height:42px;display:flex;align-items:center;justify-content:center;text-align:center;padding:8px!important;border:1px solid rgba(255,255,255,.08);}
 .page-heading,.order-hero{gap:10px;margin-bottom:14px;}.page-heading h1,.order-hero h1{font-size:27px;}.page-heading p,.order-hero p{font-size:13px;}
 .panel,.form-card{padding:13px;border-radius:14px;margin-bottom:12px;}.panel-head{align-items:flex-start;gap:9px;margin-bottom:12px;}.panel-head h2{font-size:18px;}.panel-head p{font-size:12px;}
 .dashboard-welcome{grid-template-columns:1fr!important;padding:14px;border-radius:16px;gap:11px;margin-bottom:11px;}.dashboard-person{width:100%!important;padding:10px;}.dashboard-person img,.dashboard-person .user-avatar-fallback{width:46px;height:46px;}.dashboard-welcome h1{font-size:24px;}.dashboard-welcome p{font-size:12px;}.welcome-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;}.welcome-actions .btn{width:100%;padding-inline:8px;}
 .dashboard-stats{grid-template-columns:1fr 1fr!important;gap:8px;margin-bottom:11px;}.dashboard-stats .stat-card{padding:12px;min-height:90px;}.dashboard-stats .stat-card span{font-size:11px;}.dashboard-stats .stat-card strong{font-size:24px;margin-top:4px;}.dashboard-stats .stat-card small{font-size:9px;}
 .dashboard-grid{grid-template-columns:1fr!important;gap:10px;}.dashboard-grid .panel{min-width:0;}.dashboard-grid .table-wrap table{min-width:680px;}.customer-link-qrish{grid-template-columns:68px minmax(0,1fr)!important;padding:9px!important;}.customer-link-qrish>img{width:64px!important;}.customer-link-qrish>.row-actions{grid-column:1/-1!important;display:grid;grid-template-columns:1fr 1fr;width:100%;}.quick-links a{padding:10px;font-size:12px;}
 .filters,.filters-v7{gap:7px;}.filters input,.filters select,.filters .btn{min-height:46px;}
 .form-grid.cols-2,.form-grid.cols-3,.form-grid.cols-4,.settings-grid{grid-template-columns:1fr!important;}.span-2,.span-3,.span-4{grid-column:auto!important;}
 .row-actions{gap:5px;}.row-actions .btn{min-height:36px;}
 .crm-layout{grid-template-columns:1fr!important;}.crm-detail{position:static!important;}.crm-table{min-width:850px;}
 .team-grid-v72{grid-template-columns:1fr!important;}.team-card{padding:12px;}.team-basic-grid,.compact-team-form .team-basic-grid{grid-template-columns:1fr!important;}.permission-grid-clean{grid-template-columns:1fr 1fr;}.permission-grid-clean label{font-size:11px;min-height:44px;}.team-form-footer{align-items:stretch;flex-direction:column;}.team-form-footer .btn{width:100%;}
 .notification-template-grid{grid-template-columns:1fr!important;}.notification-template-head{display:grid;grid-template-columns:minmax(0,1fr) auto;}.whatsapp-settings-card .form-grid.cols-2{grid-template-columns:1fr!important;}.toggle-setting{grid-template-columns:minmax(0,1fr) 48px;}
 .style-admin-grid{grid-template-columns:1fr 1fr;}.style-upload-admin{grid-template-columns:1fr!important;}
 .app-footer{width:calc(100% - 20px);margin-bottom:18px;}.app-footer img{width:120px;height:48px;}

 .customer-v72 .customer-order-shell{width:calc(100% - 10px);margin-top:5px;}
 .customer-v72 .customer-brand-v7 img{width:118px;height:48px;}
 .customer-v72 .customer-brand-copy{display:none;}
 .customer-v72 .rights-notice-priority{padding:11px;border-radius:14px;}.customer-v72 .rights-notice-priority strong{font-size:13px;}.customer-v72 .rights-notice-priority p{font-size:12px;line-height:1.7;}
 .customer-v72 .customer-hero-v71{padding:14px 13px;border-radius:15px;}.customer-v72 .customer-hero-v71 h1{font-size:23px;}.customer-v72 .customer-hero-v71 p{font-size:12px;}.customer-v72 .hero-mini-steps span{font-size:10px;}
 .customer-v72 .customer-form-section{padding:11px;border-radius:14px;}.customer-v72 .customer-section-title{grid-template-columns:31px minmax(0,1fr) auto;gap:8px;margin-bottom:10px;}.customer-v72 .customer-section-title>span{width:31px;height:31px;font-size:12px;}.customer-v72 .customer-section-title h2{font-size:16px;}.customer-v72 .customer-section-title p{font-size:11px;}
 .customer-v72 .customer-contact-grid{grid-template-columns:1fr!important;gap:8px;}.customer-v72 .customer-contact-grid>*{grid-column:auto!important;}.customer-v72 input,.customer-v72 select,.customer-v72 textarea{font-size:15px;min-height:49px;padding:10px 11px;}.customer-v72 .customer-form-section label>span,.customer-v72 .book-accordion label>span{font-size:12px;}
 .customer-v72 .book-accordion>summary{grid-template-columns:44px auto minmax(0,1fr) 24px!important;grid-template-areas:"avatar num title chev" "avatar product product chev"!important;gap:4px 8px;padding:9px 10px;min-height:64px;}.customer-v72 .book-summary-avatar{grid-area:avatar;width:44px;height:44px;}.customer-v72 .book-number{grid-area:num;}.customer-v72 .book-live-title{grid-area:title;font-size:14px;}.customer-v72 .book-summary-product{grid-area:product;font-size:10px;}.customer-v72 .book-chevron{grid-area:chev;}
 .customer-v72 .book-accordion-body{padding:9px;}.customer-v72 .book-inline-actions{margin:0 0 7px;}.customer-v72 .child-identity-row{grid-template-columns:132px minmax(0,1fr);gap:7px;}.customer-v72 .photo-picker{grid-template-columns:45px minmax(0,1fr);min-height:62px;padding:6px;}.customer-v72 .photo-picker-preview{width:45px;height:45px;}.customer-v72 .photo-picker-copy strong{font-size:11px;}.customer-v72 .photo-picker-copy small{font-size:10px;}
 .customer-v72 .child-compact-grid,.customer-v72 .compact-pair,.customer-v72 .theme-title-pair{grid-template-columns:1fr 1fr!important;gap:7px;}.customer-v72 .characters-section-head{align-items:end;}.customer-v72 .character-count-wrap{width:122px;}.customer-v72 .character-person-card{grid-template-columns:118px minmax(0,1fr);grid-template-areas:"photo name" "photo notes";gap:6px;padding:7px;}.customer-v72 .character-person-card .photo-picker{grid-area:photo;align-self:stretch;grid-template-columns:40px 1fr;}.customer-v72 .character-person-card .photo-picker-preview{width:40px;height:40px;}.customer-v72 .character-name-field{grid-area:name;}.customer-v72 .character-notes-field{grid-area:notes;}
 .customer-v72 .two-upload-cards{grid-template-columns:1fr 1fr!important;gap:7px;}.minimal-upload-card{padding:8px;}.minimal-upload-card>strong{font-size:11px;}.simple-upload{display:grid;grid-template-columns:1fr;gap:5px;}.simple-upload-btn{min-height:40px;font-size:11px;padding:7px 8px;}.simple-upload-state{font-size:9px;min-width:0;text-align:center;}
 .style-picker-block{padding:8px;}.style-picker-head{display:block;}.style-picker-head strong,.style-picker-head small{display:block;}.style-picker-head strong{font-size:12px;}.style-picker-head small{font-size:10px;}.style-example-card{flex-basis:105px;}.style-example-card span{font-size:10px;}
 .customer-v72 .book-price-strip{padding:7px;}.customer-v72 .book-price-strip span{font-size:10px;}.customer-v72 .book-price-strip b{font-size:13px;}.customer-v72 .checkout-grid-v71{grid-template-columns:1fr!important;}.customer-v72 .consent-row{font-size:12px!important;padding:11px!important;}.customer-v72 .mobile-checkout-bar{inset-inline:5px;bottom:max(5px,env(safe-area-inset-bottom));}.customer-footer-v72{margin-bottom:76px;}
}
@media(max-width:430px){
 .permission-grid-clean{grid-template-columns:1fr;}.style-admin-grid{grid-template-columns:1fr;}
 .dashboard-stats{grid-template-columns:1fr 1fr!important;}.welcome-actions{grid-template-columns:1fr;}
 .customer-v72 .child-identity-row{grid-template-columns:118px minmax(0,1fr);}.customer-v72 .child-compact-grid,.customer-v72 .compact-pair,.customer-v72 .theme-title-pair{grid-template-columns:1fr 1fr!important;}.customer-v72 .two-upload-cards{grid-template-columns:1fr 1fr!important;}.customer-v72 .character-person-card{grid-template-columns:108px minmax(0,1fr);}
}
@media(max-width:350px){
 .dashboard-stats{grid-template-columns:1fr!important;}
 .customer-v72 .child-identity-row,.customer-v72 .child-compact-grid,.customer-v72 .compact-pair,.customer-v72 .theme-title-pair,.customer-v72 .two-upload-cards{grid-template-columns:1fr!important;}.customer-v72 .character-person-card{grid-template-columns:1fr;grid-template-areas:"photo" "name" "notes";}.customer-v72 .character-person-card .photo-picker{min-height:60px;}
}

/* V7.2.1 final control normalization */
input[type="checkbox"],input[type="radio"]{min-height:0!important;width:19px;height:19px;flex:0 0 19px;padding:0!important;margin:0;accent-color:var(--navy);}
input[type="file"]{min-height:0;}
.permission-grid-clean label,.permission-check,.toggle-setting{direction:inherit;text-align:start;}
.permission-grid-clean input[type="checkbox"],.permission-check input[type="checkbox"]{align-self:center;justify-self:start;}
.toggle-setting input[type="checkbox"]{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;pointer-events:none;}
html[dir="rtl"] .permission-grid-clean label,html[dir="rtl"] .toggle-setting{text-align:right;}
html[dir="ltr"] .permission-grid-clean label,html[dir="ltr"] .toggle-setting{text-align:left;}

@media(max-width:720px){
  body{font-size:17px!important;}
  button,input,select,textarea{font-size:16px;}
  label>span{font-size:13px;}
  th,td{font-size:13px;}
  .btn{font-size:14px;}
  .customer-v72 input,.customer-v72 select,.customer-v72 textarea{font-size:16px!important;}
  .customer-v72 .customer-form-section label>span,.customer-v72 .book-accordion label>span{font-size:13px!important;}
}
/* Accordion chevron is vertical (down/up), so it stays visually correct in both RTL and LTR. */
.book-chevron::before{border:0!important;border-right:2px solid currentColor!important;border-bottom:2px solid currentColor!important;transform:rotate(45deg)!important;}
.book-accordion[open] .book-chevron::before{transform:rotate(225deg)!important;}

/* V7.2.1 generic mobile workspace safety net — every admin screen */
@media(max-width:720px){
  .page-heading,.order-hero{width:100%;align-items:stretch!important;}
  .page-heading>div,.order-hero>div{min-width:0;width:100%;}
  .page-heading>.btn,.hero-actions{width:100%;}
  .hero-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-items:stretch;}
  .hero-actions .btn{width:100%;text-align:center;}
  .hero-actions .badge{grid-column:1/-1;justify-self:start;}
  .detail-grid,.pricing-summary-grid,.settings-grid,.dashboard-grid,.crm-layout{grid-template-columns:1fr!important;min-width:0;}
  .detail-side{position:static!important;}
  .share-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:7px;}
  .share-row input{grid-column:1/-1;width:100%;min-width:0;}
  .share-row .btn{min-width:0;}
  .production-book-head,.pdf-output-card,.panel-head{flex-wrap:wrap;}
  .output-actions,.page-action-buttons{width:100%;}
  .output-actions .btn,.page-action-buttons .btn{flex:1 1 145px;text-align:center;}
  .inline-action-panel{width:100%;min-width:0;}
  .inline-action-panel input,.inline-action-panel textarea{width:100%;min-width:0;}
  .finance-stats{grid-template-columns:1fr 1fr!important;}
  .filters,.filters-v7{width:100%;}
  .filters>*{width:100%;min-width:0;}
  .row-actions form{margin:0;}
  .app-footer{padding-block:12px 20px;}
}
@media(max-width:390px){
  .hero-actions{grid-template-columns:1fr;}
  .hero-actions .badge{grid-column:auto;}
  .finance-stats{grid-template-columns:1fr!important;}
}

/* =====================================================================
   HIKAYATI V7.3 — Customer ordering flow / mobile-first final pass
   ===================================================================== */
.customer-v73{--customer-control-h:52px;}
.customer-v73 .customer-section-title>span{
  background:var(--gold)!important;color:#1b2d4c!important;border:1px solid rgba(255,255,255,.16);
  box-shadow:0 7px 18px rgba(254,194,70,.24);font-size:14px!important;
}
.customer-v73 .customer-contact-v73{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:10px!important;}
.customer-v73 .customer-contact-v73 label{min-width:0;grid-column:auto!important;}
.customer-v73 .customer-contact-v73 .customer-address-field{grid-column:1/-1!important;}
.customer-v73 input,.customer-v73 select,.customer-v73 textarea{min-width:0;}
.customer-v73 .theme-title-stack{display:grid;grid-template-columns:1fr;gap:9px;margin-top:10px;}
.customer-v73 .theme-title-stack .theme-input{font-size:16px;font-weight:800;}

/* One active child/book at a time with a horizontal navigator. */
.book-navigator-wrap{position:sticky;top:8px;z-index:24;margin:0 -4px 10px;padding:4px;background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(12px);border-radius:14px;}
.book-navigator{display:flex;gap:7px;overflow-x:auto;scroll-snap-type:x proximity;padding:2px 1px 5px;scrollbar-width:none;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;}
.book-navigator::-webkit-scrollbar{display:none;}
.book-nav-chip{flex:0 0 auto;min-width:118px;max-width:190px;display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:7px;padding:7px 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);color:var(--text);cursor:pointer;text-align:start;scroll-snap-align:start;transition:transform .18s ease,border-color .18s ease,background .18s ease;}
.book-nav-chip span{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:color-mix(in srgb,var(--gold) 24%,var(--surface));color:var(--navy);font-weight:950;font-size:12px;}
.book-nav-chip b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;}
.book-nav-chip.active{border-color:var(--gold);background:color-mix(in srgb,var(--gold) 10%,var(--surface));box-shadow:0 0 0 2px color-mix(in srgb,var(--gold) 15%,transparent);transform:translateY(-1px);}
.customer-books-single .customer-book-single{display:none;animation:hikayatiBookIn .22s ease both;}
.customer-books-single .customer-book-single.is-active-book{display:block;}
@keyframes hikayatiBookIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.customer-v73 .book-accordion>summary{position:relative!important;padding-inline-end:44px!important;}
.customer-v73 .book-chevron{position:absolute!important;inset-inline-end:11px!important;top:50%!important;transform:translateY(-50%)!important;margin:0!important;grid-area:auto!important;}
.customer-v73 .book-accordion[open] .book-chevron{transform:translateY(-50%)!important;}
.customer-v73 .book-chevron::before{transform:rotate(45deg)!important;}
.customer-v73 .book-accordion[open] .book-chevron::before{transform:rotate(225deg)!important;}

/* Primary child photo — one clear action, no tiny instructional clutter. */
.child-identity-v73{grid-template-columns:minmax(0,1fr) 128px!important;align-items:end!important;}
.child-photo-field{min-width:0;}
.child-photo-field>.field-title{display:block;font-size:13px;font-weight:800;margin-bottom:6px;}
.primary-photo-upload{position:relative;display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:7px;min-height:58px;padding:6px;border:2px dashed color-mix(in srgb,var(--teal) 62%,var(--line));border-radius:13px;background:var(--surface-2);cursor:pointer;overflow:hidden;transition:.18s ease;}
.primary-photo-upload input,.character-photo-upload input{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;pointer-events:none!important;}
.primary-photo-thumb{width:46px;height:46px;display:grid;place-items:center;border-radius:10px;background:var(--surface);border:1px solid var(--line);overflow:hidden;color:var(--teal);font-size:22px;}
.primary-photo-thumb img,.character-photo-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.primary-photo-action{min-width:0;display:grid;gap:2px;}
.primary-photo-action strong{font-size:12px;color:var(--text);}
.primary-photo-action em{font-size:9px;font-style:normal;color:var(--coral);font-weight:900;line-height:1.25;}
.primary-photo-upload.has-photo{border-style:solid;border-color:var(--teal);background:color-mix(in srgb,var(--teal) 9%,var(--surface));}

/* Compact upload actions. */
.minimal-upload-v73{display:grid;align-content:center;gap:7px;min-height:82px;}
.simple-upload-v73{display:grid!important;grid-template-columns:1fr!important;gap:5px!important;}
.simple-upload-v73 .simple-upload-btn{width:100%;min-height:43px;border-radius:11px;background:var(--navy);}
.simple-upload-v73 .simple-upload-state:empty{display:none;}
.simple-upload-v73 .simple-upload-state:not(:empty){display:block;text-align:center;color:var(--teal);font-weight:850;font-size:10px;}

/* Style examples: portrait covers + full preview modal. */
.style-picker-v73{margin-top:10px;}
.customer-v73 .style-example-strip{gap:9px;padding-bottom:5px;}
.customer-v73 .style-example-card{flex:0 0 112px;padding:5px;border-radius:13px;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;}
.customer-v73 .style-example-card:hover,.customer-v73 .style-example-card:focus-visible{transform:translateY(-2px);}
.customer-v73 .style-example-card img{aspect-ratio:3/4!important;object-fit:cover!important;border-radius:9px!important;}
.customer-v73 .style-example-card span{font-size:11px!important;text-align:center;margin-top:6px;}
.customer-v73 .style-example-card.selected{border-color:var(--gold)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--gold) 18%,transparent)!important;}
.style-preview-modal{position:fixed;inset:0;z-index:500;display:grid;place-items:center;padding:18px;opacity:0;transition:opacity .18s ease;}
.style-preview-modal[hidden]{display:none!important;}
.style-preview-modal.open{opacity:1;}
.modal-backdrop{position:absolute;inset:0;background:rgba(6,14,28,.76);backdrop-filter:blur(7px);}
.style-preview-card{position:relative;z-index:1;width:min(420px,100%);max-height:92vh;overflow:auto;border:1px solid var(--line);border-radius:22px;background:var(--surface);box-shadow:var(--shadow-lg);padding:12px;transform:translateY(10px) scale(.98);transition:transform .18s ease;}
.style-preview-modal.open .style-preview-card{transform:none;}
.style-preview-card>img{width:100%;max-height:62vh;aspect-ratio:3/4;object-fit:contain;background:var(--surface-3);border-radius:15px;display:block;}
.style-preview-card>div{padding:12px 4px 3px;}
.style-preview-card h3{font-size:20px;margin:2px 0 6px;}.style-preview-card p:not(.eyebrow){font-size:12px;color:var(--muted);line-height:1.7;margin:0 0 12px;}
.modal-close{position:absolute;z-index:2;top:18px;inset-inline-end:18px;width:38px;height:38px;border:0;border-radius:12px;background:rgba(16,31,55,.88);color:#fff;font-size:24px;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.22);}

/* Supporting characters — max 5, compact photo action, explicit imaginary mode. */
.character-person-v73{grid-template-columns:112px minmax(0,.8fr) minmax(0,1fr)!important;grid-template-areas:"photo name notes" "imaginary imaginary imaginary"!important;align-items:end!important;}
.character-photo-cell{grid-area:photo;}
.character-photo-upload{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr);gap:6px;align-items:center;min-height:50px;padding:5px;border:2px dashed color-mix(in srgb,var(--teal) 55%,var(--line));border-radius:11px;background:var(--surface-2);cursor:pointer;}
.character-photo-thumb{width:40px;height:40px;display:grid;place-items:center;border-radius:9px;background:var(--surface);border:1px solid var(--line);overflow:hidden;color:var(--teal);}
.character-photo-upload strong{font-size:10px;line-height:1.3;}
.character-photo-upload.has-photo{border-style:solid;border-color:var(--teal);}
.character-person-v73 .character-name-field{grid-area:name;}.character-person-v73 .character-notes-field{grid-area:notes;}
.imaginary-character-toggle{grid-area:imaginary;display:flex!important;align-items:center!important;gap:8px!important;padding:8px 9px!important;margin-top:2px;border-radius:10px;background:color-mix(in srgb,var(--gold) 9%,var(--surface));border:1px solid color-mix(in srgb,var(--gold) 30%,var(--line));cursor:pointer;}
.imaginary-character-toggle input{accent-color:var(--gold)!important;}.imaginary-character-toggle span{margin:0!important;font-size:11px!important;font-weight:850;}
.character-person-v73.is-imaginary{border-color:color-mix(in srgb,var(--gold) 45%,var(--line));}

/* Stronger section/check visuals. */
.customer-consents-v73{display:grid;gap:8px;}
.customer-v73 .consent-row{margin:0!important;background:color-mix(in srgb,var(--navy) 5%,var(--surface))!important;border:1px solid var(--line);transition:.15s ease;}
.customer-v73 .consent-row:has(input:checked){border-color:var(--gold);background:color-mix(in srgb,var(--gold) 10%,var(--surface))!important;}
.customer-v73 .consent-row input{accent-color:var(--gold)!important;border-radius:5px;}
.customer-v73 .consent-row span{color:var(--text)!important;font-weight:650;}

/* Floating support actions. */
.support-dock{position:fixed;z-index:180;inset-inline-end:18px;bottom:92px;display:grid;justify-items:end;gap:8px;}
.support-main{width:52px;height:52px;border:0;border-radius:17px;background:linear-gradient(145deg,var(--coral),#ff8a62);color:#fff;font-size:22px;cursor:pointer;box-shadow:0 14px 34px rgba(252,110,92,.34);animation:supportPulse 2.7s ease-in-out infinite;}
@keyframes supportPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.055)}}
.support-links{display:grid;gap:7px;transform:translateY(8px) scale(.96);opacity:0;pointer-events:none;transition:.18s ease;transform-origin:bottom right;}
.support-dock.open .support-links{transform:none;opacity:1;pointer-events:auto;}
.support-link{display:grid;grid-template-columns:34px auto;gap:8px;align-items:center;min-height:42px;padding:5px 10px 5px 5px;border:1px solid var(--line);border-radius:13px;background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(10px);color:var(--text);box-shadow:var(--shadow);text-decoration:none;}
.support-link span{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:var(--navy);color:#fff;font-weight:950;}.support-link b{font-size:11px;white-space:nowrap;}
.support-link.whatsapp span{background:#1e9d65}.support-link.messenger span{background:#3276d7}.support-link.instagram span{background:linear-gradient(145deg,#7d3ac1,#e25e72,#f0a340)}
html[dir="ltr"] .support-links{transform-origin:bottom right;}html[dir="rtl"] .support-links{transform-origin:bottom left;}

/* Public promo animation — only coupons explicitly marked public by admin. */
.promo-popover{position:fixed;inset:0;z-index:480;display:grid;place-items:end center;padding:18px;background:rgba(7,15,29,.42);backdrop-filter:blur(3px);opacity:0;transition:opacity .18s ease;}
.promo-popover[hidden]{display:none!important}.promo-popover.open{opacity:1;}
.promo-popover-card{position:relative;width:min(420px,100%);padding:24px 18px 18px;border:1px solid color-mix(in srgb,var(--gold) 38%,var(--line));border-radius:22px;background:linear-gradient(145deg,color-mix(in srgb,var(--gold) 12%,var(--surface)),var(--surface));box-shadow:var(--shadow-lg);text-align:center;transform:translateY(28px);transition:transform .22s cubic-bezier(.2,.8,.2,1);overflow:hidden;}
.promo-popover.open .promo-popover-card{transform:none}.promo-popover-card:before{content:"";position:absolute;width:150px;height:150px;border-radius:50%;background:color-mix(in srgb,var(--gold) 18%,transparent);top:-90px;inset-inline-start:-45px;}
.promo-spark{position:relative;display:grid;place-items:center;width:44px;height:44px;margin:0 auto 7px;border-radius:14px;background:var(--gold);color:var(--navy);font-size:22px;animation:promoSpark 1.8s ease-in-out infinite;}@keyframes promoSpark{50%{transform:rotate(8deg) scale(1.08)}}
.promo-popover-card h3{font-size:22px;margin:2px 0 6px}.promo-popover-card p:not(.eyebrow){color:var(--muted);font-size:13px;margin:0 0 12px}.promo-code-pill{border:1px dashed var(--coral);background:color-mix(in srgb,var(--coral) 9%,var(--surface));color:var(--coral);border-radius:12px;padding:10px 16px;font-weight:950;letter-spacing:1px;font-size:17px;cursor:pointer;}.promo-popover-actions{display:grid;grid-template-columns:1.2fr .8fr;gap:8px;margin-top:14px}.promo-close{position:absolute;top:10px;inset-inline-end:10px;width:34px;height:34px;border:0;border-radius:10px;background:var(--surface-3);color:var(--text);font-size:21px;cursor:pointer;}

/* Dark is the preferred first-run appearance. */
html[data-theme="dark"] .book-navigator-wrap{background:color-mix(in srgb,var(--surface) 90%,transparent);}
html[data-theme="dark"] .primary-photo-upload,html[data-theme="dark"] .character-photo-upload{background:color-mix(in srgb,var(--surface-2) 94%,transparent);}

@media(max-width:720px){
  .customer-v73 .customer-contact-v73{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:7px!important;}
  .customer-v73 .customer-contact-v73 .customer-address-field{grid-column:1/-1!important;}
  .customer-v73 .customer-contact-v73 input,.customer-v73 .customer-contact-v73 select{padding-inline:9px!important;}
  .books-section-v73 .customer-section-head{grid-template-columns:31px minmax(0,1fr) auto!important;align-items:center!important;flex-direction:initial!important;}
  .books-section-v73 .add-book-top{width:auto!important;min-width:0;padding-inline:10px!important;}
  .book-navigator-wrap{top:5px;margin-inline:-2px;}
  .book-nav-chip{min-width:106px;max-width:148px;padding:6px 8px;}
  .child-identity-v73{grid-template-columns:minmax(0,1fr) 118px!important;gap:7px!important;}
  .primary-photo-upload{grid-template-columns:42px minmax(0,1fr);min-height:55px;}.primary-photo-thumb{width:40px;height:40px;}.primary-photo-action strong{font-size:11px}.primary-photo-action em{font-size:8px;}
  .customer-v73 .theme-title-stack{grid-template-columns:1fr!important;gap:7px!important;}
  .customer-v73 .style-example-card{flex-basis:120px;}
  .character-person-v73{grid-template-columns:98px minmax(0,1fr)!important;grid-template-areas:"photo name" "notes notes" "imaginary imaginary"!important;}
  .character-person-v73 .character-notes-field{grid-area:notes;}.character-photo-upload{grid-template-columns:38px minmax(0,1fr);}.character-photo-thumb{width:36px;height:36px;}
  .two-upload-cards{grid-template-columns:1fr 1fr!important;}
  .support-dock{inset-inline-end:10px;bottom:83px;}.support-main{width:48px;height:48px;border-radius:15px;}.support-link b{display:none}.support-link{grid-template-columns:34px;padding:5px;}
  .promo-popover{padding:10px;padding-bottom:max(10px,env(safe-area-inset-bottom));}.promo-popover-card{border-radius:20px;}
  .style-preview-modal{padding:10px;}.style-preview-card{border-radius:18px;}
}
@media(max-width:380px){
  .customer-v73 .customer-contact-v73{grid-template-columns:1fr 1fr!important;}
  .child-identity-v73{grid-template-columns:minmax(0,1fr) 108px!important;}
  .primary-photo-upload{grid-template-columns:36px 1fr;padding:5px}.primary-photo-thumb{width:34px;height:34px}.primary-photo-action em{display:none;}
  .two-upload-cards{grid-template-columns:1fr 1fr!important;}
  .customer-v73 .style-example-card{flex-basis:108px;}
}

/* =========================================================
   Hikayati V7.4 — customer mobile UX refinement
   ========================================================= */
.customer-v74 label>span,.customer-v74 .field-title,.customer-v74 .characters-section-head h4,.customer-v74 .character-count-wrap>span{font-weight:900!important;letter-spacing:0!important}
.customer-v74 .customer-section-title>span{background:var(--gold)!important;color:var(--navy)!important;border:1px solid color-mix(in srgb,var(--gold) 75%,#ff8a3d)!important;box-shadow:0 6px 16px color-mix(in srgb,var(--gold) 22%,transparent)!important;font-weight:950!important}
.customer-form-utility{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-4px 2px 10px;padding:8px 10px;border:1px dashed var(--line);border-radius:12px;background:color-mix(in srgb,var(--surface) 88%,transparent)}
.customer-form-utility small{font-size:11px;color:var(--muted);line-height:1.5}.clear-form-btn{border:1px solid color-mix(in srgb,var(--coral) 45%,var(--line));background:transparent;color:var(--coral);font:inherit;font-size:11px;font-weight:900;padding:7px 10px;border-radius:9px;white-space:nowrap;cursor:pointer}

/* Primary/character image pickers: one large centered action only. */
.image-upload-button-box{position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;min-height:82px!important;padding:10px!important;border:2px dashed color-mix(in srgb,var(--teal) 62%,var(--line))!important;border-radius:14px!important;background:color-mix(in srgb,var(--teal) 4%,var(--surface-2))!important;cursor:pointer!important;overflow:hidden!important}
.image-upload-button-box input[type=file]{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;pointer-events:none!important}
.image-upload-main-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:124px!important;min-height:44px!important;padding:10px 18px!important;border-radius:11px!important;background:var(--navy)!important;color:#fff!important;font-size:13px!important;font-weight:950!important;line-height:1!important;box-shadow:0 7px 18px rgba(21,45,82,.2)!important;transition:transform .16s ease,background .16s ease!important}
.image-upload-button-box:hover .image-upload-main-btn,.image-upload-button-box:focus-within .image-upload-main-btn{transform:translateY(-1px)}
.image-upload-button-box.has-photo{border-style:solid!important;border-color:var(--teal)!important;background:color-mix(in srgb,var(--teal) 10%,var(--surface))!important}.image-upload-button-box.has-photo .image-upload-main-btn{background:var(--teal)!important}
.photo-important-title{display:flex!important;align-items:center!important;gap:6px!important}.photo-important-title i{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:999px;background:var(--coral);color:#fff;font-size:12px;font-style:normal;font-weight:950;box-shadow:0 0 0 3px color-mix(in srgb,var(--coral) 13%,transparent)}
.character-photo-cell .image-upload-button-box{min-height:72px!important}.character-photo-cell .image-upload-main-btn{min-width:112px!important}

/* Imaginary character layout should reflow cleanly in either direction. */
.character-person-v73.is-imaginary{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-areas:"name notes" "imaginary imaginary"!important;align-items:end!important}
.character-person-v73.is-imaginary .character-name-field,.character-person-v73.is-imaginary .character-notes-field{min-width:0!important}
html[dir="rtl"] .character-person-v73.is-imaginary input{text-align:right!important;direction:rtl}html[dir="ltr"] .character-person-v73.is-imaginary input{text-align:left!important;direction:ltr}

/* Dedication pair aligned to the same visual height. */
.customer-v74 .dedication-pair{align-items:stretch!important}.customer-v74 .dedication-pair label{display:flex!important;flex-direction:column!important}.customer-v74 .dedication-pair input,.customer-v74 .dedication-pair textarea{min-height:72px!important;height:72px!important;resize:none!important}

/* Book pricing: stronger visual hierarchy for customers. */
.customer-v74 .book-price-strip{gap:8px!important;padding:0!important;background:transparent!important;border:0!important}
.customer-v74 .book-price-strip span{padding:10px 7px!important;border-radius:12px!important;border:1px solid var(--line)!important;font-size:12px!important;font-weight:900!important;color:var(--text)!important;line-height:1.35!important}
.customer-v74 .book-price-strip span:nth-child(1){background:color-mix(in srgb,var(--teal) 14%,var(--surface))!important;border-color:color-mix(in srgb,var(--teal) 30%,var(--line))!important}
.customer-v74 .book-price-strip span:nth-child(2){background:color-mix(in srgb,var(--gold) 15%,var(--surface))!important;border-color:color-mix(in srgb,var(--gold) 35%,var(--line))!important}
.customer-v74 .book-price-strip span:nth-child(3){background:color-mix(in srgb,var(--coral) 13%,var(--surface))!important;border-color:color-mix(in srgb,var(--coral) 32%,var(--line))!important}
.customer-v74 .book-price-strip b{font-size:16px!important;font-weight:950!important;margin-top:4px!important}

/* Consent boxes: outline only before selection in both light and dark modes. */
.customer-v74 .consent-row input[type=checkbox]{appearance:none!important;-webkit-appearance:none!important;width:22px!important;height:22px!important;flex:0 0 22px!important;border:2px solid color-mix(in srgb,var(--muted) 72%,var(--line))!important;border-radius:6px!important;background:transparent!important;box-shadow:none!important;display:grid!important;place-items:center!important;cursor:pointer!important;margin-top:1px!important;background-repeat:no-repeat!important;background-position:center!important;background-size:14px 14px!important}
.customer-v74 .consent-row input[type=checkbox]:checked{border-color:var(--gold)!important;background-color:var(--gold)!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23172f54' d='M7.8 14.8 3.5 10.5l1.7-1.7 2.6 2.6 6.9-6.9 1.8 1.7z'/%3E%3C/svg%3E")!important}
.customer-v74 .consent-row:focus-within{outline:2px solid color-mix(in srgb,var(--gold) 35%,transparent);outline-offset:2px}

/* Style preview becomes a swipeable portrait carousel with a thumb rail. */
.style-preview-v74{width:min(460px,100%)!important;max-height:min(94dvh,860px)!important;overflow:auto!important;overscroll-behavior:contain!important;scrollbar-width:thin!important}
.style-preview-stage{position:relative;display:grid;place-items:center;min-height:390px;border-radius:16px;background:var(--surface-3);overflow:hidden;touch-action:pan-y}
.style-preview-stage>img{width:100%!important;height:auto!important;max-height:66dvh!important;aspect-ratio:3/4!important;object-fit:contain!important;display:block!important;background:var(--surface-3)!important;border-radius:0!important}
.style-preview-arrow{position:absolute;z-index:3;top:50%;transform:translateY(-50%);width:42px;height:54px;border:1px solid rgba(255,255,255,.22);border-radius:13px;background:rgba(14,31,56,.76);color:#fff;font-size:34px;line-height:1;display:grid;place-items:center;cursor:pointer;backdrop-filter:blur(6px);box-shadow:0 7px 20px rgba(0,0,0,.18)}
.style-preview-arrow.prev{inset-inline-start:9px}.style-preview-arrow.next{inset-inline-end:9px}.style-preview-counter{position:absolute;z-index:3;bottom:10px;inset-inline-start:50%;transform:translateX(-50%);padding:5px 9px;border-radius:999px;background:rgba(14,31,56,.78);color:#fff;font-size:11px;font-weight:900;direction:ltr}
.style-preview-copy{padding:12px 4px 4px!important}.style-preview-thumbs{display:flex;gap:7px;overflow-x:auto;scroll-snap-type:x mandatory;padding:3px 1px 9px;margin-bottom:7px;scrollbar-width:none}.style-preview-thumbs::-webkit-scrollbar{display:none}.style-preview-thumb{flex:0 0 74px;border:2px solid transparent;border-radius:10px;padding:3px;background:var(--surface-2);color:var(--text);cursor:pointer;scroll-snap-align:center}.style-preview-thumb.active{border-color:var(--gold);background:color-mix(in srgb,var(--gold) 11%,var(--surface))}.style-preview-thumb img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:7px;display:block}.style-preview-thumb span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:9px;font-weight:850;margin-top:3px}

/* Coupon discovery + copy. */
.available-promos{margin-top:8px;border:1px dashed color-mix(in srgb,var(--gold) 36%,var(--line));border-radius:11px;background:color-mix(in srgb,var(--gold) 5%,var(--surface));padding:0 9px}.available-promos summary{cursor:pointer;padding:9px 2px;color:var(--gold);font-size:11px;font-weight:950;list-style:none}.available-promos summary::-webkit-details-marker{display:none}.available-promo-list{display:flex;gap:6px;overflow-x:auto;padding:0 0 9px;scrollbar-width:none}.available-promo-list::-webkit-scrollbar{display:none}.available-promo-chip{flex:0 0 auto;display:grid;gap:2px;min-width:98px;padding:7px 9px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);cursor:pointer;text-align:center}.available-promo-chip strong{font-size:12px;color:var(--coral);letter-spacing:.5px}.available-promo-chip span{font-size:10px;color:var(--muted)}
.promo-code-copy-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center}.promo-code-copy-row .promo-code-pill{width:100%}.promo-copy-btn{min-height:42px;padding:8px 12px;border:1px solid color-mix(in srgb,var(--teal) 40%,var(--line));border-radius:11px;background:color-mix(in srgb,var(--teal) 9%,var(--surface));color:var(--teal);font:inherit;font-size:11px;font-weight:950;cursor:pointer}

/* Floating support: main button stays lowest; menu expands upward. */
.support-dock-v74{bottom:18px!important;display:flex!important;flex-direction:column!important;align-items:flex-end!important;gap:8px!important}.support-dock-v74 .support-links{order:1!important;transform:translateY(10px) scale(.96)!important;transform-origin:bottom center!important}.support-dock-v74 .support-main{order:2!important}.support-dock-v74.open .support-links{transform:none!important}.support-main span,.support-link span{display:grid!important;place-items:center!important}.support-main svg{width:26px;height:26px}.support-link svg{width:19px;height:19px}.support-link.call span{background:var(--gold)!important;color:var(--navy)!important}.support-link.whatsapp span{background:#25D366!important}.support-link.messenger span{background:#168AFF!important}.support-link.instagram span{background:linear-gradient(145deg,#833AB4,#E1306C,#FCAF45)!important}

/* Follow Hikayati uses icon-only brand actions. */
.customer-social-icons{display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;flex-wrap:wrap!important}.customer-social-icon-row{display:flex;align-items:center;justify-content:center;gap:7px}.social-icon-link{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:var(--surface-2);border:1px solid var(--line);color:var(--text);transition:transform .15s ease,border-color .15s ease}.social-icon-link:hover{transform:translateY(-2px)}.social-icon-link svg{width:20px;height:20px}.social-icon-link.instagram{color:#E1306C}.social-icon-link.whatsapp{color:#25D366}.social-icon-link.messenger{color:#168AFF}.social-icon-link.facebook{color:#1877F2}.social-icon-link.youtube{color:#FF0000}.social-icon-link.tiktok{color:var(--text)}

@media(max-width:720px){
 .customer-form-utility{align-items:flex-start}.customer-form-utility small{font-size:10px}.clear-form-btn{font-size:10px;padding:7px 8px}
 .image-upload-button-box{min-height:78px!important}.image-upload-main-btn{min-width:116px!important;min-height:43px!important;font-size:12px!important}
 .character-person-v73.is-imaginary{grid-template-columns:1fr 1fr!important;grid-template-areas:"name name" "notes notes" "imaginary imaginary"!important}
 .customer-v74 .book-price-strip{grid-template-columns:repeat(3,minmax(0,1fr))!important}.customer-v74 .book-price-strip span{font-size:11px!important;padding:9px 4px!important}.customer-v74 .book-price-strip b{font-size:15px!important}
 .style-preview-modal{padding:7px!important}.style-preview-v74{max-height:96dvh!important;border-radius:18px!important}.style-preview-stage{min-height:0}.style-preview-stage>img{max-height:62dvh!important}.style-preview-arrow{width:38px;height:48px;font-size:30px}.style-preview-thumb{flex-basis:68px}
 .support-dock-v74{inset-inline-end:10px!important;bottom:78px!important}.support-main{width:50px!important;height:50px!important}.support-link{grid-template-columns:34px!important;padding:5px!important}.support-link b{display:none!important}
 .promo-code-copy-row{grid-template-columns:1fr auto}.promo-copy-btn{padding-inline:10px}
}
@media(max-width:380px){
 .customer-form-utility{display:grid}.clear-form-btn{justify-self:start}
 .image-upload-button-box{min-height:74px!important}.image-upload-main-btn{min-width:108px!important}
 .customer-v74 .book-price-strip{gap:5px!important}.customer-v74 .book-price-strip span{font-size:10px!important}.customer-v74 .book-price-strip b{font-size:14px!important}
}
html[dir="rtl"] .style-preview-arrow{transform:translateY(-50%) scaleX(-1)}
@media(max-width:720px){
 .customer-v74 .support-dock-v74{bottom:max(10px,env(safe-area-inset-bottom))!important}
 .customer-v74 .mobile-checkout-bar{inset-inline-end:70px!important}
}

/* =========================================================
   Hikayati V7.5 — focused customer UX polish
   ========================================================= */
.customer-v75 #booksSection{scroll-margin-top:10px}

/* Clear form: visible, deliberate, but not alarming */
.customer-v75 .customer-form-utility{padding:11px 12px;gap:12px;border-style:solid;background:color-mix(in srgb,var(--coral) 4%,var(--surface));}
.customer-v75 .clear-form-btn{position:relative;min-height:44px;padding:10px 16px!important;border:1.5px solid color-mix(in srgb,var(--coral) 68%,var(--line))!important;border-radius:12px!important;background:color-mix(in srgb,var(--coral) 8%,var(--surface))!important;color:var(--coral)!important;font-size:13px!important;font-weight:950!important;box-shadow:0 5px 16px rgba(252,110,92,.08);animation:hikayatiClearAttention 4.8s ease-in-out infinite;}
.customer-v75 .clear-form-btn:before{content:"↺";display:inline-grid;place-items:center;margin-inline-end:7px;font-size:17px;line-height:1;vertical-align:-1px;}
.customer-v75 .clear-form-btn:hover{transform:translateY(-1px);background:color-mix(in srgb,var(--coral) 14%,var(--surface))!important;}
@keyframes hikayatiClearAttention{0%,72%,100%{transform:none;box-shadow:0 5px 16px rgba(252,110,92,.08)}78%{transform:translateY(-1px) scale(1.018);box-shadow:0 0 0 5px color-mix(in srgb,var(--coral) 9%,transparent),0 8px 20px rgba(252,110,92,.13)}84%{transform:none}}

/* Theme toggle uses a real vector and has a larger touch target on mobile */
.customer-v75 .customer-theme-toggle .theme-icon{width:22px;height:22px;display:block;}
html[data-theme="dark"] .customer-v75 .customer-theme-toggle .theme-icon-moon{display:none}
html[data-theme="light"] .customer-v75 .customer-theme-toggle .theme-icon-sun{display:none}

/* Book summary: delete stays next to the current child/book title */
.customer-v75 .book-accordion>summary{grid-template-columns:42px auto minmax(0,1fr) auto minmax(82px,.55fr) 24px!important;}
.customer-v75 .summary-remove-book{align-self:center;border:1px solid color-mix(in srgb,var(--coral) 50%,var(--line));background:color-mix(in srgb,var(--coral) 7%,var(--surface));color:var(--coral);border-radius:9px;min-height:31px;padding:5px 8px;font:inherit;font-size:10px;font-weight:900;cursor:pointer;white-space:nowrap;line-height:1;}
.customer-v75 .summary-remove-book:hover{background:color-mix(in srgb,var(--coral) 14%,var(--surface));}

/* Theme field + suggested styles are one visual control */
.customer-v75 .style-integrated-field{margin-top:12px;padding:12px;border:1px solid color-mix(in srgb,var(--teal) 22%,var(--line));border-radius:15px;background:color-mix(in srgb,var(--teal) 3%,var(--surface-2));}
.customer-v75 .style-integrated-field .theme-main-label{display:block;margin:0;}
.customer-v75 .style-integrated-field .theme-main-label>span{font-weight:950!important;color:var(--text)!important;}
.customer-v75 .style-picker-v75{margin-top:10px;padding-top:10px;border-top:1px dashed color-mix(in srgb,var(--teal) 30%,var(--line));}
.customer-v75 .style-picker-v75 .style-picker-head{margin-bottom:8px;}
.customer-v75 .cover-title-alone{display:block;margin-top:10px;}

/* Character card: real character = photo + name; imaginary = description only */
.customer-v75 .character-person-v75{display:grid!important;grid-template-columns:118px minmax(0,1fr)!important;grid-template-areas:"photo name" "imaginary imaginary"!important;gap:10px!important;align-items:end!important;}
.customer-v75 .character-person-v75 .character-photo-cell{grid-area:photo;}
.customer-v75 .character-person-v75 .character-name-field{grid-area:name;min-width:0;}
.customer-v75 .character-person-v75 .character-imaginary-desc{grid-area:desc;min-width:0;}
.customer-v75 .character-person-v75 .imaginary-character-toggle{grid-area:imaginary;}
.customer-v75 .character-person-v75.is-imaginary{grid-template-columns:1fr!important;grid-template-areas:"desc" "imaginary"!important;}
.customer-v75 .character-person-v75 [hidden]{display:none!important;}
.customer-v75 .character-person-v75 textarea{min-height:76px;resize:vertical;}

/* Promo codes: discount and minimum purchase are both visible */
.customer-v75 .available-promo-chip{min-width:132px;padding:9px 10px;grid-template-columns:1fr auto;align-items:center;text-align:start;}
.customer-v75 .available-promo-chip strong{font-size:13px;}
.customer-v75 .available-promo-chip .promo-chip-discount{font-size:11px;font-weight:900;color:var(--gold);}
.customer-v75 .available-promo-chip small{grid-column:1/-1;font-size:9px;color:var(--muted);border-top:1px dashed var(--line);padding-top:5px;margin-top:2px;}
.customer-v75 .promo-code-with-min{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center;}
.customer-v75 .promo-code-with-min .promo-code-pill{min-width:0;}
.customer-v75 .promo-minimum-badge{display:flex;align-items:center;gap:5px;justify-content:center;min-height:40px;padding:7px 9px;border-radius:11px;border:1px solid color-mix(in srgb,var(--gold) 35%,var(--line));background:color-mix(in srgb,var(--gold) 10%,var(--surface));font-size:10px;color:var(--muted);white-space:nowrap;}
.customer-v75 .promo-minimum-badge b{font-size:12px;color:var(--gold);}
.customer-v75 .promo-code-with-min .promo-copy-btn{grid-column:1/-1;width:100%;}

/* Generic support icon; menu still opens upward */
.customer-v75 .support-main{background:linear-gradient(145deg,var(--navy),#315486)!important;color:#fff!important;}
.customer-v75 .support-main svg{width:28px!important;height:28px!important;}

/* Official social colors, larger and easier to hit */
.customer-v75 .customer-social-icons{gap:12px!important;padding:12px 0;}
.customer-v75 .customer-social-icons>span{font-weight:950;font-size:13px;}
.customer-v75 .customer-social-icon-row{gap:10px!important;}
.customer-v75 .social-icon-link{width:46px!important;height:46px!important;border-radius:14px!important;background:var(--surface)!important;box-shadow:0 6px 18px rgba(0,0,0,.07);}
.customer-v75 .social-icon-link svg{width:25px!important;height:25px!important;}
.customer-v75 .social-icon-link.instagram{color:#E1306C!important;border-color:color-mix(in srgb,#E1306C 32%,var(--line))!important;}
.customer-v75 .social-icon-link.whatsapp{color:#25D366!important;border-color:color-mix(in srgb,#25D366 32%,var(--line))!important;}
.customer-v75 .social-icon-link.messenger{color:#168AFF!important;border-color:color-mix(in srgb,#168AFF 32%,var(--line))!important;}
.customer-v75 .social-icon-link.facebook{color:#1877F2!important;border-color:color-mix(in srgb,#1877F2 32%,var(--line))!important;}
.customer-v75 .social-icon-link.youtube{color:#FF0000!important;border-color:color-mix(in srgb,#FF0000 30%,var(--line))!important;}
.customer-v75 .social-icon-link.tiktok{color:var(--text)!important;}

/* Stronger labels, including placeholders without crowding */
.customer-v75 .customer-form-section label>span,.customer-v75 .field-title{font-weight:950!important;}
.customer-v75 textarea::placeholder,.customer-v75 input::placeholder{opacity:.7;}

@media(max-width:650px){
  .customer-v75 .customer-form-utility{display:grid;grid-template-columns:1fr;}
  .customer-v75 .clear-form-btn{width:100%;min-height:48px;font-size:14px!important;justify-self:stretch!important;}
  .customer-v75 .customer-theme-toggle{width:43px!important;height:43px!important;}
  .customer-v75 .customer-theme-toggle .theme-icon{width:27px;height:27px;}
  .customer-v75 .book-accordion>summary{grid-template-columns:42px auto minmax(0,1fr) auto 24px!important;grid-template-areas:"avatar num title remove chev" "avatar product product product chev"!important;padding-inline:9px 7px!important;}
  .customer-v75 .book-summary-avatar{grid-area:avatar}.customer-v75 .book-number{grid-area:num}.customer-v75 .book-live-title{grid-area:title}.customer-v75 .summary-remove-book{grid-area:remove;padding:5px 7px;}
  .customer-v75 .summary-remove-book span{display:none}.customer-v75 .book-summary-product{grid-area:product}.customer-v75 .book-chevron{grid-area:chev}
  .customer-v75 .style-integrated-field{padding:10px;}
  .customer-v75 .character-person-v75{grid-template-columns:104px minmax(0,1fr)!important;}
  .customer-v75 .promo-code-with-min{grid-template-columns:1fr;}
  .customer-v75 .promo-code-with-min .promo-copy-btn{grid-column:auto;}
  .customer-v75 .promo-minimum-badge{white-space:normal;}
  .customer-v75 .social-icon-link{width:48px!important;height:48px!important;}
  .customer-v75 .social-icon-link svg{width:27px!important;height:27px!important;}
}
@media(max-width:390px){
  .customer-v75 .book-accordion>summary{grid-template-columns:40px auto minmax(0,1fr) auto 22px!important;gap:4px 6px!important;}
  .customer-v75 .character-person-v75{grid-template-columns:94px minmax(0,1fr)!important;}
}
@media(prefers-reduced-motion:reduce){.customer-v75 .clear-form-btn{animation:none!important}}

/* =========================================================
   Hikayati V7.6 — Customer form refinements
   ========================================================= */
.customer-v76 .books-section-actions{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:7px;
  min-width:146px;
}
.customer-v76 .books-section-actions .add-book-top,
.customer-v76 .books-section-actions .clear-form-btn{
  width:100%;
  margin:0;
}
.customer-v76 .books-section-actions .clear-form-btn{
  min-height:40px!important;
  padding:8px 12px!important;
  font-size:12px!important;
}

.customer-v76 .section-inline-notice{
  width:100%;
  margin:8px 0 12px;
  padding:10px 12px;
  border-radius:11px;
  border:1px solid var(--line);
  font-size:12px;
  font-weight:850;
  line-height:1.55;
  animation:hikayatiInlineNotice .18s ease both;
}
.customer-v76 .section-inline-notice[hidden]{display:none!important}
.customer-v76 .section-inline-notice.notice-success{background:color-mix(in srgb,#22a06b 12%,var(--surface));border-color:color-mix(in srgb,#22a06b 38%,var(--line));color:#158052}
.customer-v76 .section-inline-notice.notice-danger{background:color-mix(in srgb,var(--coral) 10%,var(--surface));border-color:color-mix(in srgb,var(--coral) 40%,var(--line));color:var(--coral)}
.customer-v76 .section-inline-notice.notice-warning{background:color-mix(in srgb,var(--gold) 15%,var(--surface));border-color:color-mix(in srgb,var(--gold) 46%,var(--line));color:color-mix(in srgb,var(--gold) 65%,var(--text))}
.customer-v76 .section-inline-notice.notice-info{background:color-mix(in srgb,var(--teal) 9%,var(--surface));border-color:color-mix(in srgb,var(--teal) 36%,var(--line));color:var(--text)}
@keyframes hikayatiInlineNotice{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

/* Keep delete directly beside the child/book title. */
.customer-v76 .book-accordion>summary{
  grid-template-columns:42px auto minmax(0,1fr) auto minmax(78px,.5fr) 24px!important;
}
.customer-v76 .summary-remove-book{
  margin-inline-start:2px;
  align-self:center;
}

/* Image upload: no blue/dashed container — just a strong text action. */
.customer-v76 .image-upload-button-box,
html[data-theme="dark"] .customer-v76 .image-upload-button-box{
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
  justify-content:flex-start!important;
}
.customer-v76 .image-upload-button-box.has-photo,
html[data-theme="dark"] .customer-v76 .image-upload-button-box.has-photo{
  border:0!important;
  background:transparent!important;
}
.customer-v76 .image-upload-main-btn,
.customer-v76 .image-upload-button-box.has-photo .image-upload-main-btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-width:0!important;
  min-height:0!important;
  padding:4px 0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--teal)!important;
  box-shadow:none!important;
  font-size:15px!important;
  font-weight:950!important;
  line-height:1.3!important;
  text-decoration:none!important;
}
.customer-v76 .image-upload-main-btn:hover{text-decoration:underline!important;text-underline-offset:3px}
.customer-v76 .child-photo-field,
.customer-v76 .character-photo-cell{align-self:center}

/* Compact promo popup: code, copy and minimum in one row. */
.customer-v76 .promo-popover-card{
  width:min(92vw,390px)!important;
  max-width:390px!important;
  padding:18px!important;
}
.customer-v76 .promo-code-with-min{
  display:grid!important;
  grid-template-columns:minmax(96px,1fr) auto minmax(92px,.82fr)!important;
  gap:6px!important;
  align-items:stretch!important;
}
.customer-v76 .promo-code-with-min .promo-code-pill,
.customer-v76 .promo-code-with-min .promo-copy-btn,
.customer-v76 .promo-code-with-min .promo-minimum-badge{
  grid-column:auto!important;
  width:auto!important;
  min-width:0!important;
  min-height:42px!important;
  margin:0!important;
  border-radius:10px!important;
}
.customer-v76 .promo-code-with-min .promo-code-pill{padding:8px 10px!important;font-size:14px!important}
.customer-v76 .promo-code-with-min .promo-copy-btn{padding:8px 11px!important;font-size:11px!important;white-space:nowrap!important}
.customer-v76 .promo-code-with-min .promo-minimum-badge{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:center!important;
  padding:5px 8px!important;
  line-height:1.15!important;
  text-align:center!important;
}
.customer-v76 .promo-code-with-min .promo-minimum-badge small{font-size:8px!important;opacity:.75}
.customer-v76 .promo-code-with-min .promo-minimum-badge b{font-size:11px!important;margin-top:2px}

/* Official-looking brand treatment: white glyph on each brand color. */
.customer-v76 .customer-social-icon-row .social-icon-link.instagram{background:linear-gradient(135deg,#833AB4,#E1306C 55%,#FCAF45)!important;color:#fff!important;border-color:transparent!important}
.customer-v76 .customer-social-icon-row .social-icon-link.facebook{background:#1877F2!important;color:#fff!important;border-color:transparent!important}
.customer-v76 .customer-social-icon-row .social-icon-link.whatsapp{background:#25D366!important;color:#fff!important;border-color:transparent!important}
.customer-v76 .customer-social-icon-row .social-icon-link.messenger{background:#168AFF!important;color:#fff!important;border-color:transparent!important}
.customer-v76 .customer-social-icon-row .social-icon-link.youtube{background:#FF0000!important;color:#fff!important;border-color:transparent!important}
.customer-v76 .customer-social-icon-row .social-icon-link.instagram svg,
.customer-v76 .customer-social-icon-row .social-icon-link.facebook svg,
.customer-v76 .customer-social-icon-row .social-icon-link.whatsapp svg,
.customer-v76 .customer-social-icon-row .social-icon-link.messenger svg,
.customer-v76 .customer-social-icon-row .social-icon-link.youtube svg{color:#fff!important}

@media(max-width:700px){
  .customer-v76 .customer-section-head.customer-section-title{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) minmax(118px,auto)!important;
    align-items:start!important;
  }
  .customer-v76 .books-section-actions{min-width:118px;gap:5px}
  .customer-v76 .books-section-actions .add-book-top{min-height:39px;padding:7px 9px!important;font-size:11px!important}
  .customer-v76 .books-section-actions .clear-form-btn{min-height:39px!important;padding:7px 8px!important;font-size:11px!important}
  .customer-v76 .book-accordion>summary{
    grid-template-columns:40px auto minmax(0,1fr) auto 22px!important;
    grid-template-areas:"avatar num title remove chev" "avatar product product product chev"!important;
    gap:4px 6px!important;
  }
  .customer-v76 .summary-remove-book span{display:inline!important}
  .customer-v76 .summary-remove-book{padding:5px 6px!important;font-size:9px!important;min-height:29px!important}
  .customer-v76 .promo-popover-card{width:min(94vw,370px)!important;padding:15px!important}
  .customer-v76 .promo-code-with-min{grid-template-columns:minmax(88px,1fr) auto minmax(82px,.8fr)!important;gap:5px!important}
  .customer-v76 .promo-code-with-min .promo-code-pill{font-size:12px!important;padding:7px 8px!important}
  .customer-v76 .promo-code-with-min .promo-copy-btn{font-size:10px!important;padding:7px 8px!important}
  .customer-v76 .promo-code-with-min .promo-minimum-badge{padding:4px 6px!important}
  .customer-v76 .image-upload-main-btn{font-size:14px!important}
}
@media(max-width:390px){
  .customer-v76 .customer-section-head.customer-section-title{grid-template-columns:auto minmax(0,1fr) 104px!important;gap:7px!important}
  .customer-v76 .books-section-actions{min-width:104px}
  .customer-v76 .books-section-actions .add-book-top,
  .customer-v76 .books-section-actions .clear-form-btn{font-size:10px!important;padding-inline:6px!important}
  .customer-v76 .promo-code-with-min{grid-template-columns:minmax(78px,1fr) auto minmax(76px,.75fr)!important}
  .customer-v76 .promo-code-with-min .promo-minimum-badge small{font-size:7px!important}
  .customer-v76 .promo-code-with-min .promo-minimum-badge b{font-size:10px!important}
  .customer-v76 .summary-remove-book span{display:none!important}
}


/* =========================================================
   Hikayati V7.7 — Unified media upload + cleaner book controls
   ========================================================= */
.customer-v77 .media-upload-card{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:92px;
  padding:14px;
  border:1px solid color-mix(in srgb,var(--line) 86%,transparent);
  border-radius:15px;
  background:color-mix(in srgb,var(--navy) 5%,var(--surface-2));
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--surface) 45%,transparent);
}
html[data-theme="dark"] .customer-v77 .media-upload-card{background:color-mix(in srgb,#fff 4%,var(--surface-2));border-color:color-mix(in srgb,#fff 12%,var(--line));}
.customer-v77 .media-upload-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}
.customer-v77 .media-upload-empty,.customer-v77 .media-upload-ready{width:100%}
.customer-v77 .media-upload-primary{
  width:100%;min-height:52px;border:0;border-radius:12px;background:var(--navy);color:#fff;
  padding:12px 16px;font:inherit;font-size:15px;font-weight:950;cursor:pointer;box-shadow:0 7px 17px rgba(20,44,80,.16);
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;
}
.customer-v77 .media-upload-primary:hover,.customer-v77 .media-upload-primary:focus-visible{transform:translateY(-1px);filter:brightness(1.06);box-shadow:0 9px 20px rgba(20,44,80,.22)}
.customer-v77 .media-upload-ready{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.customer-v77 .media-upload-ready[hidden]{display:none!important}
.customer-v77 .media-upload-view,.customer-v77 .media-upload-change{
  min-height:46px;border-radius:11px;padding:9px 10px;font:inherit;font-size:13px;font-weight:950;cursor:pointer;
}
.customer-v77 .media-upload-view{border:0;background:var(--navy);color:#fff}
.customer-v77 .media-upload-change{border:1px solid color-mix(in srgb,var(--teal) 42%,var(--line));background:color-mix(in srgb,var(--teal) 8%,var(--surface));color:var(--text)}
.customer-v77 .child-photo-field .field-title,.customer-v77 .character-photo-cell .field-title,.customer-v77 .media-reference-card>strong{display:block;margin-bottom:7px;font-weight:950}
.customer-v77 .character-photo-cell{align-self:stretch!important}
.customer-v77 .character-photo-cell .media-upload-card{min-height:84px}
.customer-v77 .single-upload-card{display:grid;grid-template-columns:1fr;width:100%}
.customer-v77 .media-reference-card{width:100%}
.customer-v77 .media-reference-card .media-upload-card{min-height:90px}

.media-preview-modal{position:fixed;inset:0;z-index:1300;display:grid;place-items:center;padding:14px;opacity:0;pointer-events:none;transition:opacity .16s ease}
.media-preview-modal[hidden]{display:none!important}.media-preview-modal.open{opacity:1;pointer-events:auto}
.media-preview-modal .modal-backdrop{position:absolute;inset:0;background:rgba(6,14,28,.76);backdrop-filter:blur(5px)}
.media-preview-card{position:relative;z-index:2;width:min(94vw,620px);max-height:90dvh;overflow:auto;border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:0 24px 70px rgba(0,0,0,.3);padding:18px}
.media-preview-head{padding-inline-end:40px;margin-bottom:12px}.media-preview-head h3{margin:2px 0 0;font-size:20px}
.media-preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.media-preview-item{position:relative;margin:0;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface-2);padding:7px}
.media-preview-item img{display:block;width:100%;aspect-ratio:4/5;object-fit:contain;border-radius:9px;background:var(--surface-3)}
.media-preview-delete{width:100%;min-height:40px;margin-top:7px;border:1px solid color-mix(in srgb,var(--coral) 48%,var(--line));border-radius:9px;background:color-mix(in srgb,var(--coral) 8%,var(--surface));color:var(--coral);font:inherit;font-size:12px;font-weight:950;cursor:pointer}

.customer-v77 .summary-remove-book{
  min-width:54px!important;min-height:32px!important;padding:6px 10px!important;border-radius:9px!important;
  font-size:11px!important;font-weight:950!important;line-height:1!important;
}
.customer-v77 .clear-form-btn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  min-height:46px!important;padding:10px 14px!important;border-radius:12px!important;
  border:1px solid color-mix(in srgb,var(--coral) 55%,var(--line))!important;
  background:color-mix(in srgb,var(--coral) 10%,var(--surface))!important;color:var(--coral)!important;
  font-size:13px!important;font-weight:950!important;line-height:1.2!important;box-shadow:none!important;animation:none!important;
}
.customer-v77 .clear-form-btn:before{content:"↺";font-size:18px;line-height:1;margin:0!important}
.customer-v77 .clear-form-btn:hover{background:color-mix(in srgb,var(--coral) 16%,var(--surface))!important;transform:translateY(-1px)}
.customer-v77 .style-example-card.selected{border-color:var(--gold)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--gold) 30%,transparent)!important;background:color-mix(in srgb,var(--gold) 10%,var(--surface))!important}

@media(max-width:700px){
  .customer-v77 .media-upload-card{min-height:86px;padding:11px}
  .customer-v77 .media-upload-primary{min-height:50px;font-size:14px}
  .customer-v77 .media-upload-view,.customer-v77 .media-upload-change{min-height:44px;font-size:12px;padding:8px}
  .media-preview-card{width:min(96vw,560px);padding:13px;border-radius:17px}.media-preview-grid{grid-template-columns:1fr;gap:10px}
  .media-preview-item img{max-height:62dvh}
  .customer-v77 .summary-remove-book{min-width:49px!important;font-size:10px!important;padding-inline:8px!important}
  .customer-v77 .clear-form-btn{min-height:44px!important;font-size:12px!important;padding:9px 10px!important}
}
@media(max-width:390px){
  .customer-v77 .summary-remove-book{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:45px!important;font-size:10px!important}
  .customer-v77 .media-upload-ready{grid-template-columns:1fr 1fr;gap:6px}
}

/* =========================================================
   Hikayati V7.8 — Customer polish: media, promo, navigator
   ========================================================= */
.customer-v78,
.customer-v78 .customer-order-form,
.customer-v78 .customer-form-section,
.customer-v78 .books-section-v71,
.customer-v78 .book-navigator-wrap,
.customer-v78 .book-navigator,
.customer-v78 .customer-books-stack,
.customer-v78 .customer-book-card{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.customer-v78 .books-section-v71{overflow-x:clip!important;}
.customer-v78 .book-navigator-wrap{
  width:100%!important;
  overflow:hidden!important;
  contain:inline-size;
}
.customer-v78 .book-navigator{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  flex-wrap:nowrap!important;
  scrollbar-gutter:stable both-edges;
  overscroll-behavior-x:contain!important;
  touch-action:pan-x pan-y;
}
.customer-v78 .book-nav-chip{
  flex:0 0 clamp(108px,34vw,158px)!important;
  min-width:108px!important;
  max-width:158px!important;
}

/* Softer, smaller multi-image upload cards. */
.customer-v78 .media-upload-card{
  min-height:70px!important;
  padding:8px!important;
  border:1px solid color-mix(in srgb,var(--navy) 15%,var(--line))!important;
  border-radius:13px!important;
  background:color-mix(in srgb,var(--navy) 3%,var(--surface-2))!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .customer-v78 .media-upload-card{
  background:color-mix(in srgb,#fff 3%,var(--surface-2))!important;
  border-color:color-mix(in srgb,#fff 11%,var(--line))!important;
}
.customer-v78 .media-upload-primary{
  min-height:42px!important;
  padding:8px 10px!important;
  border-radius:10px!important;
  font-size:12.5px!important;
  font-weight:900!important;
  line-height:1.25!important;
  background:color-mix(in srgb,var(--navy) 92%,#fff)!important;
  box-shadow:0 4px 10px rgba(20,44,80,.10)!important;
}
.customer-v78 .media-upload-primary:hover,
.customer-v78 .media-upload-primary:focus-visible{
  transform:translateY(-1px)!important;
  box-shadow:0 6px 14px rgba(20,44,80,.16)!important;
}
.customer-v78 .media-upload-ready{
  grid-template-columns:1fr 1fr!important;
  gap:6px!important;
}
.customer-v78 .media-upload-view,
.customer-v78 .media-upload-change{
  min-height:39px!important;
  padding:7px 7px!important;
  border-radius:9px!important;
  font-size:10.5px!important;
  line-height:1.2!important;
  white-space:normal!important;
}
.customer-v78 .child-photo-field>.field-title,
.customer-v78 .character-photo-cell>.field-title,
.customer-v78 .media-reference-card>strong{
  font-size:12px!important;
  margin-bottom:5px!important;
}
.customer-v78 .character-photo-cell .media-upload-card,
.customer-v78 .media-reference-card .media-upload-card{
  min-height:70px!important;
}

/* Promo: Apply + Remove state. */
.customer-v78 .promo-input-action{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  gap:7px!important;
  align-items:stretch!important;
}
.customer-v78 .promo-input-action input{min-width:0!important;}
.customer-v78 .promo-remove-btn{
  border-color:color-mix(in srgb,var(--coral) 48%,var(--line))!important;
  background:color-mix(in srgb,var(--coral) 8%,var(--surface))!important;
  color:var(--coral)!important;
  white-space:nowrap!important;
}
.customer-v78 .promo-remove-btn[hidden]{display:none!important;}

/* Media preview keeps every uploaded image individually removable. */
.customer-v78 .media-preview-grid{align-items:start;}
.customer-v78 .media-preview-item img{aspect-ratio:4/5;object-fit:contain;}

@media(max-width:700px){
  .customer-v78 .book-navigator-wrap{margin-inline:0!important;padding-inline:0!important;}
  .customer-v78 .book-navigator{padding-inline:1px!important;}
  .customer-v78 .book-nav-chip{flex-basis:112px!important;min-width:112px!important;max-width:138px!important;}
  .customer-v78 .child-identity-v73{grid-template-columns:minmax(0,1fr) 116px!important;gap:8px!important;}
  .customer-v78 .media-upload-card{min-height:66px!important;padding:7px!important;}
  .customer-v78 .media-upload-primary{min-height:40px!important;font-size:12px!important;padding:7px 8px!important;}
  .customer-v78 .media-upload-view,.customer-v78 .media-upload-change{min-height:38px!important;font-size:10px!important;padding:6px!important;}
  .customer-v78 .promo-input-action{grid-template-columns:minmax(0,1fr) auto!important;}
  .customer-v78 .promo-input-action .promo-remove-btn{grid-column:1/-1;width:100%!important;min-height:38px!important;}
}
@media(max-width:390px){
  .customer-v78 .book-nav-chip{flex-basis:104px!important;min-width:104px!important;max-width:126px!important;}
  .customer-v78 .child-identity-v73{grid-template-columns:minmax(0,1fr) 108px!important;}
  .customer-v78 .media-upload-primary{font-size:11.5px!important;}
}

/* V7.9 - single character photo + removable applied promo chip */
.customer-v78 .applied-promo-chip{
  margin-top:8px;
  display:inline-flex;
  align-items:center;
  gap:9px;
  max-width:100%;
  padding:7px 8px 7px 12px;
  border:1px solid color-mix(in srgb,var(--gold) 58%,var(--line));
  border-radius:999px;
  background:color-mix(in srgb,var(--gold) 12%,var(--surface));
  color:var(--text);
  font-size:12.5px;
  font-weight:800;
}
.customer-v78 .applied-promo-chip[hidden]{display:none!important;}
.customer-v78 .applied-promo-chip strong{font-weight:950;color:var(--gold-ink,var(--text));letter-spacing:.02em;}
.customer-v78 .applied-promo-chip button{
  width:28px;
  height:28px;
  min-width:28px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:50%;
  background:color-mix(in srgb,var(--danger,#d54b4b) 14%,var(--surface));
  color:var(--danger,#d54b4b);
  font-size:19px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
}
.customer-v78 .applied-promo-chip button:hover,
.customer-v78 .applied-promo-chip button:focus-visible{transform:scale(1.06);filter:brightness(1.06);}
html[data-theme="dark"] .customer-v78 .applied-promo-chip{background:color-mix(in srgb,var(--gold) 14%,var(--surface-2));}
@media (max-width:560px){
  .customer-v78 .applied-promo-chip{font-size:12px;padding-inline-start:10px;}
}

/* =========================================================
   V8.0 — platform currency, uploaded logo, admin theme + checks
   ========================================================= */
.header-home-brand{display:inline-flex;align-items:center;gap:9px;min-width:max-content;color:#fff;text-decoration:none;padding:4px 8px 4px 5px;border-radius:13px;transition:.18s ease;}
.header-home-brand:hover,.header-home-brand.active{background:rgba(255,255,255,.1);color:#fff;}
.header-home-brand strong{font-size:14px;font-weight:900;white-space:nowrap;}
.header-logo-shell{width:58px;height:42px;display:grid;place-items:center;padding:4px 6px;border-radius:10px;background:rgba(255,255,255,.96);box-shadow:0 3px 12px rgba(0,0,0,.13);overflow:hidden;}
.header-logo-shell img{width:100%;height:100%;object-fit:contain;filter:none!important;}
.admin-theme-toggle{display:grid!important;place-items:center!important;}
.admin-theme-toggle .theme-icon{width:21px;height:21px;display:block;}
html[data-theme="dark"] .admin-theme-toggle .theme-icon-moon{display:none;}
html[data-theme="light"] .admin-theme-toggle .theme-icon-sun{display:none;}

/* Keep uploaded platform marks in their original colors on a safe surface. */
.header-home-brand img,.app-footer img,.customer-logo-link img,.invoice-brand-logo img,.invoice-footer img,.brand-preview img,.customer-link-qrish img{filter:none!important;}
.app-footer a{display:grid;place-items:center;min-width:150px;min-height:58px;padding:7px 12px;border-radius:14px;background:var(--surface);border:1px solid var(--line);}
.app-footer img{max-width:138px!important;max-height:48px!important;width:auto!important;height:auto!important;object-fit:contain;}
.platform-logo-preview{display:grid;place-items:center;min-height:150px;padding:18px;border:1px dashed var(--line);border-radius:16px;background:var(--surface-2);}
.platform-logo-preview img{max-width:260px;max-height:105px;width:auto;height:auto;object-fit:contain;filter:none!important;}
.currency-preview{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px;padding:11px 13px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line);}
.currency-preview small{color:var(--muted);font-weight:800}.currency-preview strong{font-size:18px;color:var(--gold);}

/* Customer promo: clear the applied code from the opposite edge of the input. */
.promo-input-action{align-items:stretch!important;}
.promo-input-shell{position:relative;flex:1 1 auto;min-width:0;}
.promo-input-shell>input{width:100%;padding-inline-end:42px!important;}
.promo-field-clear{position:absolute;inset-inline-end:7px;top:50%;transform:translateY(-50%);width:30px;height:30px;border-radius:50%;border:1px solid color-mix(in srgb,var(--coral) 55%,var(--line));background:color-mix(in srgb,var(--coral) 11%,transparent);color:var(--coral);font-size:22px;font-weight:900;line-height:1;display:grid;place-items:center;cursor:pointer;padding:0;transition:.16s ease;}
.promo-field-clear:hover{transform:translateY(-50%) scale(1.08);background:var(--coral);color:#fff;border-color:var(--coral);}
.promo-field-clear[hidden]{display:none!important;}
.promo-input-shell.has-applied-promo>input{border-color:color-mix(in srgb,var(--gold) 62%,var(--line));box-shadow:0 0 0 3px color-mix(in srgb,var(--gold) 10%,transparent);}

/* Admin checkboxes: outline only by default, Hikayati gold when selected. */
.app-body input[type="checkbox"]{appearance:none!important;-webkit-appearance:none!important;width:19px!important;height:19px!important;min-width:19px!important;min-height:19px!important;flex:0 0 19px!important;margin:0!important;padding:0!important;border:2px solid color-mix(in srgb,var(--muted) 72%,var(--line))!important;border-radius:5px!important;background:transparent!important;box-shadow:none!important;display:inline-grid!important;place-items:center!important;vertical-align:middle!important;cursor:pointer!important;background-repeat:no-repeat!important;background-position:center!important;background-size:13px 13px!important;accent-color:transparent!important;}
.app-body input[type="checkbox"]:checked{border-color:var(--gold)!important;background-color:var(--gold)!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23172f54' d='M7.8 14.8 3.5 10.5l1.7-1.7 2.6 2.6 6.9-6.9 1.8 1.7z'/%3E%3C/svg%3E")!important;}
.app-body input[type="checkbox"]:focus-visible{outline:3px solid color-mix(in srgb,var(--gold) 28%,transparent)!important;outline-offset:2px;}
.app-body input[type="checkbox"]:disabled{opacity:.45;cursor:not-allowed!important;}
/* Existing switch widgets hide the native checkbox; preserve their visual switch. */
.app-body .toggle-setting input[type="checkbox"]{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;min-width:1px!important;min-height:1px!important;pointer-events:none!important;border:0!important;}

/* Uploaded logo on login remains colored and readable. */
.login-brand-panel img{filter:none!important;background:rgba(255,255,255,.96);border-radius:14px;padding:7px 10px;max-width:230px;}
.login-toolbar .customer-theme-toggle .theme-icon{width:22px;height:22px;display:block;}
html[data-theme="dark"] .login-toolbar .customer-theme-toggle .theme-icon-moon{display:none;}
html[data-theme="light"] .login-toolbar .customer-theme-toggle .theme-icon-sun{display:none;}

@media(max-width:980px){
  .header-home-brand{grid-column:1;min-width:0;padding:3px 5px;gap:7px;}
  .header-logo-shell{width:50px;height:38px;padding:4px 5px;}
  .header-home-brand strong{font-size:13px;}
}
@media(max-width:720px){
  .header-home-brand{grid-column:1!important;overflow:hidden;}
  .header-logo-shell{width:46px;height:36px;flex:0 0 46px;}
  .header-home-brand strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;}
  .topbar-tools .admin-theme-toggle{width:38px!important;height:38px!important;min-width:38px!important;}
  .admin-theme-toggle .theme-icon{width:25px;height:25px;}
  .promo-input-action{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important;}
}
@media(max-width:390px){
  .header-home-brand strong{display:none;}
  .header-logo-shell{width:52px;height:38px;}
}

/* =========================================================
   Hikayati V8.1 — RTL/LTR, logo contrast, team flex, UX fixes
   ========================================================= */

/* Customer top bar: tools sit on the far opposite edge from the logo. */
.customer-v81 .customer-brand-mobile{
  direction:ltr!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  width:100%;
  padding-inline:0!important;
  gap:10px!important;
}
.customer-v81 .customer-logo-link{min-width:0;}
.customer-v81 .customer-brand-copy{min-width:0;}
.customer-v81 .customer-top-actions{display:flex!important;align-items:center!important;gap:7px!important;}
html[dir="rtl"] .customer-v81 .customer-logo-link{grid-column:3;grid-row:1;justify-self:end;direction:rtl;}
html[dir="rtl"] .customer-v81 .customer-brand-copy{grid-column:2;grid-row:1;text-align:right;direction:rtl;}
html[dir="rtl"] .customer-v81 .customer-top-actions{grid-column:1;grid-row:1;justify-self:start;direction:ltr;}
html[dir="ltr"] .customer-v81 .customer-logo-link{grid-column:1;grid-row:1;justify-self:start;direction:ltr;}
html[dir="ltr"] .customer-v81 .customer-brand-copy{grid-column:2;grid-row:1;text-align:left;direction:ltr;}
html[dir="ltr"] .customer-v81 .customer-top-actions{grid-column:3;grid-row:1;justify-self:end;direction:ltr;}

/* Logo behavior: white on dark/navy surfaces, original artwork on light surfaces. */
.header-logo-shell{
  width:112px!important;
  height:48px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.header-logo-shell img{width:100%!important;height:100%!important;object-fit:contain!important;filter:brightness(0) invert(1)!important;}
.header-home-brand,.header-home-brand:hover,.header-home-brand.active{background:transparent!important;padding:0!important;box-shadow:none!important;}
.header-logo-only{min-width:112px!important;}
html[data-theme="dark"] .customer-logo-link img,
html[data-theme="dark"] .app-footer img,
html[data-theme="dark"] .customer-link-qrish img,
html[data-theme="dark"] .platform-logo-preview img,
html[data-theme="dark"] .brand-preview img{
  filter:brightness(0) invert(1) drop-shadow(0 2px 7px rgba(0,0,0,.16))!important;
}
html[data-theme="light"] .customer-logo-link img,
html[data-theme="light"] .app-footer img,
html[data-theme="light"] .customer-link-qrish img,
html[data-theme="light"] .platform-logo-preview img,
html[data-theme="light"] .brand-preview img{filter:none!important;}
.login-brand-panel img{filter:brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0,0,0,.16))!important;background:transparent!important;border-radius:0!important;padding:0!important;}
.app-footer a{background:transparent!important;border:0!important;padding:5px!important;}

/* Admin theme toggle mirrors the customer control. */
.topbar-tools .admin-theme-toggle{
  width:40px!important;height:40px!important;min-width:40px!important;padding:0!important;
  border:1px solid rgba(255,255,255,.18)!important;border-radius:12px!important;
  background:rgba(255,255,255,.06)!important;color:#fff!important;
}
.topbar-tools .admin-theme-toggle:hover{background:rgba(255,255,255,.12)!important;}
.topbar-tools .admin-theme-toggle .theme-icon{width:24px!important;height:24px!important;}

/* Coral book indexes requested from the Hikayati identity. */
.customer-v81 .book-nav-chip>span,
.customer-v81 .book-number{
  background:#fc6f5c!important;
  color:#fff!important;
  border-color:#fc6f5c!important;
  box-shadow:0 3px 10px rgba(252,111,92,.18)!important;
}
.customer-v81 .book-nav-chip.active>span{background:#fc6f5c!important;color:#fff!important;}

/* Child avatar placeholder becomes a real blue vector icon in both themes. */
.customer-v81 .book-summary-avatar{color:#3b82f6!important;}
.customer-v81 .book-avatar-placeholder{display:grid!important;place-items:center!important;width:100%;height:100%;color:#3b82f6!important;background:color-mix(in srgb,#3b82f6 8%,var(--surface))!important;}
.customer-v81 .book-avatar-placeholder svg{width:23px;height:23px;display:block;}

/* The style action is always visible without needing to scroll to the modal bottom. */
.customer-v81 .style-preview-v74{
  position:relative!important;
  overflow:hidden!important;
  padding-bottom:72px!important;
}
.customer-v81 .style-preview-v74 #choosePreviewStyle{
  position:absolute!important;
  z-index:12!important;
  inset-inline:12px!important;
  bottom:12px!important;
  width:auto!important;
  min-height:48px!important;
  box-shadow:0 9px 25px rgba(12,29,52,.25)!important;
}
.customer-v81 .style-preview-copy{max-height:190px!important;overflow:auto!important;overscroll-behavior:contain!important;padding-bottom:4px!important;}
.customer-v81 .style-preview-stage{max-height:calc(94dvh - 285px)!important;}
.customer-v81 .style-preview-stage>img{max-height:calc(94dvh - 285px)!important;}

/* Team permissions: flexible chips instead of cramped fixed columns. */
.team-grid-v72{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important;}
.team-card,.team-user-form,.permission-accordion,.action-permission-groups{min-width:0!important;}
.permission-accordion{overflow:visible!important;}
.permission-grid-clean{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:stretch!important;
  gap:8px!important;
}
.permission-grid-clean label{
  flex:1 1 180px!important;
  min-width:min(180px,100%)!important;
  max-width:100%!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  min-height:46px!important;
  padding:9px 10px!important;
  line-height:1.55!important;
  white-space:normal!important;
  overflow:visible!important;
}
.permission-grid-clean label>span{min-width:0!important;overflow:visible!important;text-overflow:clip!important;white-space:normal!important;}
.action-permission-groups{display:flex!important;flex-wrap:wrap!important;gap:10px!important;}
.action-permission-groups>section{flex:1 1 300px!important;min-width:min(300px,100%)!important;}
.team-basic-grid,.compact-team-form .team-basic-grid{min-width:0!important;}
.team-basic-grid label,.compact-team-form label{min-width:0!important;}

/* Settings: explanation first, logo preview in the middle, currency preview at the bottom. */
.settings-grid-v81{align-items:start!important;}
.brand-preview-v81{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:14px!important;
}
.brand-preview-v81 .brand-preview-copy{order:1;}
.brand-preview-v81 .brand-preview-copy h2{margin:0 0 6px;font-size:19px;}
.brand-preview-v81 .brand-preview-copy p:not(.eyebrow){margin:0;color:var(--muted);font-size:12px;line-height:1.8;}
.brand-preview-v81 .platform-logo-preview{order:2;width:100%;}
.brand-preview-v81 .brand-swatches{order:3;justify-content:center;}
.brand-preview-v81 .currency-preview{order:4;width:100%;margin-top:auto!important;}
.settings-subsection{margin-top:8px;padding:14px 15px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);}
.settings-subsection h3{margin:0 0 5px;font-size:16px;}
.settings-subsection p:not(.eyebrow){margin:0;color:var(--muted);font-size:12px;}

/* Login light mode: no outer stroke on the large shell. */
.login-shell{border:0!important;outline:0!important;}
html[data-theme="light"] .login-shell{border:0!important;outline:0!important;box-shadow:0 24px 65px rgba(29,45,70,.14)!important;}

@media(max-width:980px){
  .header-logo-shell{width:96px!important;height:43px!important;}
  .header-logo-only{min-width:96px!important;}
  .team-grid-v72{grid-template-columns:1fr!important;}
}
@media(max-width:720px){
  .customer-v81 .customer-brand-mobile{gap:6px!important;}
  .customer-v81 .customer-brand-copy{display:none!important;}
  .customer-v81 .customer-tool-btn{width:42px!important;height:42px!important;min-width:42px!important;}
  .customer-v81 .customer-brand-v7 img{width:132px!important;max-width:40vw!important;height:54px!important;}
  .customer-v81 .style-preview-v74{padding-bottom:68px!important;max-height:96dvh!important;}
  .customer-v81 .style-preview-v74 #choosePreviewStyle{inset-inline:9px!important;bottom:9px!important;min-height:46px!important;}
  .customer-v81 .style-preview-stage{max-height:calc(96dvh - 255px)!important;}
  .customer-v81 .style-preview-stage>img{max-height:calc(96dvh - 255px)!important;}
  .customer-v81 .style-preview-copy{max-height:150px!important;}
  .customer-v81 .style-preview-copy p:not(.eyebrow){display:none!important;}
  .permission-grid-clean label{flex:1 1 160px!important;min-width:min(160px,100%)!important;}
  .action-permission-groups>section{flex-basis:100%!important;}
}
@media(max-width:430px){
  .header-logo-shell{width:84px!important;height:40px!important;}
  .header-logo-only{min-width:84px!important;}
  .permission-grid-clean label{flex-basis:100%!important;min-width:100%!important;}
}

/* =========================================================
   Hikayati V8.2 — Modern admin header + dropdown navigation
   ========================================================= */
.topbar-v82{
  background:linear-gradient(180deg,#173052 0%,#132944 100%)!important;
  border-bottom:1px solid rgba(255,255,255,.09)!important;
  box-shadow:0 8px 28px rgba(8,22,42,.14);
  overflow:visible!important;
}
.topbar-inner-v82{
  position:relative!important;
  min-height:72px!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding-block:9px!important;
  overflow:visible!important;
}
.topbar-leading-v82{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
  flex:0 1 auto;
  direction:inherit;
}
/* The menu trigger is deliberately before the logo in logical reading order. */
.admin-menu-trigger-v82{
  display:inline-grid!important;
  place-items:center!important;
  flex:0 0 44px!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.07)!important;
  color:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important;
  cursor:pointer!important;
  transition:background .18s ease,transform .18s ease,border-color .18s ease!important;
}
.admin-menu-trigger-v82:hover,
.admin-menu-trigger-v82[aria-expanded="true"]{
  background:rgba(255,255,255,.14)!important;
  border-color:rgba(255,255,255,.25)!important;
  transform:translateY(-1px);
}
.admin-menu-trigger-v82 svg{width:25px;height:25px;display:block;}

.topbar-v82 .header-logo-only{
  min-width:0!important;
  max-width:none!important;
  overflow:visible!important;
  display:flex!important;
}
.topbar-v82 .header-logo-shell{
  width:142px!important;
  height:52px!important;
  max-width:26vw!important;
  min-width:108px!important;
  display:grid!important;
  place-items:center!important;
}
.topbar-v82 .header-logo-shell img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  filter:brightness(0) invert(1) drop-shadow(0 2px 7px rgba(0,0,0,.16))!important;
}

.topbar-tools-v82{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  flex:0 0 auto!important;
  min-width:0!important;
}
.topbar-tools-v82 .icon-btn{
  display:grid!important;
  place-items:center!important;
  min-width:40px!important;
  width:40px!important;
  height:40px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.06)!important;
  color:#fff!important;
}
.topbar-tools-v82 .icon-btn:hover{background:rgba(255,255,255,.13)!important;}
.topbar-tools-v82 .admin-lang-toggle-v82{font-size:13px!important;font-weight:950!important;letter-spacing:.02em;}
.topbar-tools-v82 .admin-logout-v82 svg{width:21px;height:21px;display:block;}
.topbar-tools-v82 .user-chip-v82{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
  padding:4px 8px 4px 5px!important;
  border:1px solid rgba(255,255,255,.11)!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.05)!important;
}
.topbar-tools-v82 .user-chip-v82 img,
.topbar-tools-v82 .user-chip-v82 .user-avatar-fallback{width:34px!important;height:34px!important;flex:0 0 34px!important;border-radius:10px!important;object-fit:cover;}
.topbar-tools-v82 .user-chip-v82>span:last-child{min-width:0;}
.topbar-tools-v82 .user-chip-v82 strong{display:block;color:#fff;font-size:12px;line-height:1.2;white-space:nowrap;max-width:120px;overflow:hidden;text-overflow:ellipsis;}
.topbar-tools-v82 .user-chip-v82 small{display:block;color:rgba(255,255,255,.62);font-size:9px;margin-top:2px;white-space:nowrap;}

/* A true floating dropdown instead of expanding the whole header. */
.nav-v82{
  position:absolute!important;
  z-index:1002!important;
  inset-block-start:calc(100% + 8px)!important;
  inset-inline-start:0!important;
  width:min(390px,calc(100vw - 24px))!important;
  max-width:calc(100vw - 24px)!important;
  max-height:min(72dvh,610px)!important;
  overflow:auto!important;
  display:none!important;
  grid-template-columns:1fr!important;
  gap:0!important;
  padding:10px!important;
  margin:0!important;
  border:1px solid color-mix(in srgb,var(--line) 85%,transparent)!important;
  border-radius:18px!important;
  background:color-mix(in srgb,var(--surface) 97%,transparent)!important;
  color:var(--text)!important;
  box-shadow:0 22px 60px rgba(7,19,37,.28)!important;
  backdrop-filter:blur(18px)!important;
  -webkit-backdrop-filter:blur(18px)!important;
  transform:translateY(-5px) scale(.985)!important;
  transform-origin:top var(--nav-origin, left)!important;
  opacity:0!important;
  pointer-events:none!important;
}
html[dir="rtl"] .nav-v82{--nav-origin:right;}
html[dir="ltr"] .nav-v82{--nav-origin:left;}
.nav-v82.open{
  display:grid!important;
  opacity:1!important;
  pointer-events:auto!important;
  transform:none!important;
  animation:adminNavIn .17s ease-out both;
}
@keyframes adminNavIn{from{opacity:0;transform:translateY(-7px) scale(.98)}to{opacity:1;transform:none}}
.nav-v82-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:4px 4px 10px;
  margin-bottom:7px;
  border-bottom:1px solid var(--line);
}
.nav-v82-head>div{min-width:0;}
.nav-v82-head small{display:block;color:var(--coral);font-size:9px;font-weight:950;letter-spacing:.13em;margin-bottom:2px;}
.nav-v82-head strong{display:block;color:var(--text);font-size:15px;font-weight:950;}
.nav-v82-close{
  width:34px;height:34px;min-width:34px;display:grid;place-items:center;padding:0;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);font-size:22px;line-height:1;cursor:pointer;
}
.nav-v82-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
}
.nav-v82 .nav-v82-grid>a{
  min-width:0!important;
  min-height:54px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:9px!important;
  padding:8px 10px!important;
  border:1px solid var(--line)!important;
  border-radius:12px!important;
  background:var(--surface-2)!important;
  color:var(--text)!important;
  text-align:start!important;
  font-size:12.5px!important;
  font-weight:850!important;
  line-height:1.35!important;
  white-space:normal!important;
  transition:transform .15s ease,border-color .15s ease,background .15s ease!important;
}
.nav-v82 .nav-v82-grid>a:hover{
  transform:translateY(-1px);
  border-color:color-mix(in srgb,var(--gold) 48%,var(--line))!important;
  background:color-mix(in srgb,var(--gold) 7%,var(--surface-2))!important;
}
.nav-v82 .nav-v82-grid>a.active{
  border-color:var(--gold)!important;
  background:color-mix(in srgb,var(--gold) 11%,var(--surface-2))!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--gold) 10%,transparent)!important;
}
.nav-v82-icon{
  width:32px;height:32px;min-width:32px;display:grid;place-items:center;border-radius:9px;background:color-mix(in srgb,var(--navy) 9%,var(--surface));color:var(--navy);
}
.nav-v82-icon svg{width:19px;height:19px;display:block;}
.nav-v82 .nav-v82-grid>a.active .nav-v82-icon{background:var(--gold);color:var(--navy);}
html[data-theme="dark"] .nav-v82-icon{background:rgba(255,255,255,.07);color:#8eb8ff;}
html[data-theme="dark"] .nav-v82 .nav-v82-grid>a.active .nav-v82-icon{background:var(--gold);color:var(--navy);}

.admin-nav-backdrop-v82{
  position:fixed;
  z-index:1001;
  inset:0;
  background:rgba(8,20,38,.18);
  backdrop-filter:blur(1.5px);
  -webkit-backdrop-filter:blur(1.5px);
}
.admin-nav-backdrop-v82[hidden]{display:none!important;}

/* Logical RTL/LTR placement: menu -> logo at the reading start, tools opposite. */
html[dir="rtl"] .topbar-inner-v82{direction:rtl!important;}
html[dir="ltr"] .topbar-inner-v82{direction:ltr!important;}
html[dir="rtl"] .topbar-leading-v82{direction:rtl!important;}
html[dir="ltr"] .topbar-leading-v82{direction:ltr!important;}
html[dir="rtl"] .nav-v82{text-align:right;}
html[dir="ltr"] .nav-v82{text-align:left;}

@media(max-width:820px){
  .topbar-inner-v82{min-height:66px!important;padding-block:7px!important;gap:8px!important;}
  .admin-menu-trigger-v82{width:42px!important;height:42px!important;min-width:42px!important;flex-basis:42px!important;}
  .topbar-v82 .header-logo-shell{width:122px!important;height:47px!important;max-width:31vw!important;min-width:98px!important;}
  .topbar-tools-v82{gap:5px!important;}
  .topbar-tools-v82 .icon-btn{width:38px!important;height:38px!important;min-width:38px!important;}
  .topbar-tools-v82 .admin-theme-toggle{width:38px!important;height:38px!important;min-width:38px!important;}
  .topbar-tools-v82 .user-chip-v82{padding:3px!important;max-width:42px!important;overflow:hidden!important;}
  .topbar-tools-v82 .user-chip-v82>span:last-child{display:none!important;}
  .topbar-tools-v82 .user-chip-v82 img,
  .topbar-tools-v82 .user-chip-v82 .user-avatar-fallback{width:34px!important;height:34px!important;}
  .nav-v82{inset-block-start:calc(100% + 6px)!important;}
}
@media(max-width:520px){
  .topbar-inner-v82{padding-inline:10px!important;}
  .topbar-leading-v82{gap:7px!important;}
  .admin-menu-trigger-v82{width:40px!important;height:40px!important;min-width:40px!important;flex-basis:40px!important;border-radius:11px!important;}
  .admin-menu-trigger-v82 svg{width:23px;height:23px;}
  .topbar-v82 .header-logo-shell{width:112px!important;height:43px!important;max-width:33vw!important;min-width:86px!important;}
  .topbar-tools-v82 .admin-logout-v82{display:none!important;}
  .topbar-tools-v82 .icon-btn{width:36px!important;height:36px!important;min-width:36px!important;border-radius:10px!important;}
  .topbar-tools-v82 .admin-theme-toggle{width:36px!important;height:36px!important;min-width:36px!important;}
  .topbar-tools-v82 .admin-theme-toggle .theme-icon{width:22px!important;height:22px!important;}
  .nav-v82{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;inset-inline-start:0!important;padding:9px!important;border-radius:16px!important;}
  .nav-v82-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
  .nav-v82 .nav-v82-grid>a{min-height:52px!important;padding:8px!important;font-size:12px!important;gap:7px!important;}
  .nav-v82-icon{width:30px;height:30px;min-width:30px;border-radius:8px;}
  .nav-v82-icon svg{width:18px;height:18px;}
}
@media(max-width:360px){
  .topbar-v82 .header-logo-shell{width:94px!important;min-width:76px!important;max-width:29vw!important;}
  .topbar-tools-v82 .user-chip-v82{display:none!important;}
  .nav-v82 .nav-v82-grid>a{font-size:11px!important;}
}

/* =========================================================
   Hikayati V8.3 — desktop navigation + customer flow polish
   ========================================================= */

/* Desktop: normal navigation bar, not a dropdown. */
@media (min-width:1100px){
  .topbar-inner-v82{
    display:grid!important;
    grid-template-columns:auto minmax(20px,1fr) auto!important;
    grid-template-rows:auto auto!important;
    gap:8px 18px!important;
    padding-block:10px 8px!important;
    min-height:112px!important;
  }
  html[dir="rtl"] .topbar-inner-v82{grid-template-areas:"tools spacer lead" "nav nav nav"!important;}
  html[dir="ltr"] .topbar-inner-v82{grid-template-areas:"lead spacer tools" "nav nav nav"!important;}
  .topbar-leading-v82{grid-area:lead!important;}
  .topbar-tools-v82{grid-area:tools!important;}
  .admin-menu-trigger-v82{display:none!important;}
  .admin-nav-backdrop-v82{display:none!important;}
  .nav-v82{
    grid-area:nav!important;
    position:static!important;
    inset:auto!important;
    width:100%!important;
    max-width:none!important;
    max-height:none!important;
    overflow:visible!important;
    display:block!important;
    opacity:1!important;
    pointer-events:auto!important;
    transform:none!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  .nav-v82-head{display:none!important;}
  .nav-v82-grid{
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    flex-wrap:wrap!important;
    width:100%!important;
  }
  html[dir="rtl"] .nav-v82-grid{justify-content:flex-start!important;direction:rtl!important;}
  html[dir="ltr"] .nav-v82-grid{justify-content:flex-start!important;direction:ltr!important;}
  .nav-v82 .nav-v82-grid>a{
    min-height:38px!important;
    padding:6px 10px!important;
    border-color:rgba(255,255,255,.10)!important;
    border-radius:10px!important;
    background:rgba(255,255,255,.045)!important;
    color:#fff!important;
    white-space:nowrap!important;
    font-size:11.5px!important;
    gap:6px!important;
  }
  .nav-v82 .nav-v82-grid>a:hover{
    background:rgba(255,255,255,.10)!important;
    border-color:rgba(255,255,255,.18)!important;
    transform:none!important;
  }
  .nav-v82 .nav-v82-grid>a.active{
    background:var(--gold)!important;
    border-color:var(--gold)!important;
    color:var(--navy)!important;
    box-shadow:none!important;
  }
  .nav-v82-icon{
    width:24px!important;height:24px!important;min-width:24px!important;
    border-radius:7px!important;background:rgba(255,255,255,.07)!important;color:#a9c7f7!important;
  }
  .nav-v82-icon svg{width:15px!important;height:15px!important;}
  .nav-v82 .nav-v82-grid>a.active .nav-v82-icon{background:rgba(18,43,76,.10)!important;color:var(--navy)!important;}
  .topbar-v82 .header-logo-shell{width:168px!important;height:58px!important;max-width:none!important;}
}

/* Customer numbered sections: collapsed by default; total always stays visible. */
.customer-v83 .major-section-shell{
  padding:0!important;
  overflow:hidden;
}
.customer-v83 .major-section-accordion{margin:0;border:0;background:transparent;}
.customer-v83 .major-section-summary{
  list-style:none;
  cursor:pointer;
  margin:0!important;
  padding:14px 15px!important;
  min-height:68px;
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr) 28px!important;
  align-items:center!important;
  gap:10px!important;
  user-select:none;
}
.customer-v83 .major-section-summary::-webkit-details-marker{display:none;}
.customer-v83 .major-section-summary::marker{content:"";}
.customer-v83 .major-section-summary:hover{background:color-mix(in srgb,var(--gold) 5%,transparent);}
.customer-v83 .major-section-chevron{
  width:11px;height:11px;display:block;border-inline-end:2px solid var(--muted);border-block-end:2px solid var(--muted);transform:rotate(45deg);transition:transform .18s ease;
}
html[dir="rtl"] .customer-v83 .major-section-chevron{transform:rotate(45deg);}
.customer-v83 .major-section-accordion[open] .major-section-chevron{transform:rotate(225deg);}
.customer-v83 .major-section-body{
  padding:0 14px 14px;
  border-top:1px solid color-mix(in srgb,var(--line) 76%,transparent);
  animation:v83SectionOpen .18s ease both;
}
@keyframes v83SectionOpen{from{opacity:.25;transform:translateY(-4px)}to{opacity:1;transform:none}}
.customer-v83 .books-section-actions{padding-top:12px;}
.customer-v83 .customer-invoice-always{
  margin:0 12px 12px!important;
  border:1px solid color-mix(in srgb,var(--gold) 42%,var(--line))!important;
  box-shadow:0 7px 20px color-mix(in srgb,var(--gold) 8%,transparent);
}
.customer-v83 .checkout-options-stack{display:grid;gap:11px;padding-top:12px;}

/* Book heading gets a strong yellow visual anchor. */
.customer-v83 .customer-book-card>summary{
  background:linear-gradient(135deg,#ffd45d 0%,#ffbe35 100%)!important;
  border-bottom-color:rgba(25,52,86,.12)!important;
  color:#18365e!important;
}
.customer-v83 .customer-book-card>summary .book-live-title,
.customer-v83 .customer-book-card>summary .book-summary-product,
.customer-v83 .customer-book-card>summary .book-number{color:#18365e!important;}
.customer-v83 .customer-book-card>summary .summary-remove-book{
  border-color:rgba(121,55,31,.25)!important;
  background:rgba(255,255,255,.48)!important;
  color:#8d332a!important;
}
.customer-v83 .customer-book-card>summary .book-chevron::before{border-color:#18365e!important;}
.customer-v83 .customer-book-card>summary .book-summary-avatar{
  background:rgba(255,255,255,.60)!important;border-color:rgba(25,52,86,.18)!important;
}

/* Optional book customization accordion. */
.customer-v83 .optional-customizations{
  margin-top:11px;
  border:1px solid var(--line);
  border-radius:14px;
  background:color-mix(in srgb,var(--surface-2) 90%,transparent);
  overflow:hidden;
}
.customer-v83 .optional-customizations>summary{
  min-height:54px;padding:10px 12px;list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.customer-v83 .optional-customizations>summary::-webkit-details-marker{display:none;}
.customer-v83 .optional-customizations>summary span{display:grid;gap:2px;min-width:0;}
.customer-v83 .optional-customizations>summary strong{font-size:14px;font-weight:950;color:var(--text);}
.customer-v83 .optional-customizations>summary small{font-size:10.5px;line-height:1.45;color:var(--muted);}
.customer-v83 .optional-customizations>summary i{width:9px;height:9px;border-inline-end:2px solid var(--gold);border-block-end:2px solid var(--gold);transform:rotate(45deg);transition:.18s;flex:0 0 auto;}
.customer-v83 .optional-customizations[open]>summary i{transform:rotate(225deg);}
.customer-v83 .optional-customizations-body{padding:0 11px 11px;border-top:1px solid var(--line);}

/* Special admin discount request: request only, no automatic price change. */
.admin-discount-box{
  border:1px solid color-mix(in srgb,var(--coral) 35%,var(--line));
  border-radius:14px;padding:11px;background:color-mix(in srgb,var(--coral) 5%,var(--surface));
}
.admin-discount-toggle{display:flex!important;align-items:flex-start!important;gap:10px!important;cursor:pointer;margin:0!important;}
.admin-discount-toggle>input{width:21px!important;height:21px!important;min-height:21px!important;flex:0 0 21px!important;margin-top:1px!important;}
.admin-discount-toggle>span{display:grid;gap:3px;min-width:0;}
.admin-discount-toggle strong{font-size:13px;font-weight:950;color:var(--text);}
.admin-discount-toggle small{font-size:10.5px;line-height:1.55;color:var(--muted);}
.admin-discount-note{margin-top:10px!important;display:block!important;}
.admin-discount-note[hidden]{display:none!important;}
.admin-discount-review-alert{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 15px;margin-bottom:12px;border:1px solid color-mix(in srgb,var(--coral) 45%,var(--line));border-radius:14px;background:color-mix(in srgb,var(--coral) 8%,var(--surface));}
.admin-discount-review-alert strong{font-size:14px;color:var(--text);}
.admin-discount-review-alert p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.6;}

@media(max-width:700px){
  .customer-v83 .major-section-summary{padding:11px 10px!important;grid-template-columns:32px minmax(0,1fr) 24px!important;min-height:60px;}
  .customer-v83 .major-section-body{padding:0 9px 10px;}
  .customer-v83 .customer-invoice-always{margin:0 8px 8px!important;}
  .customer-v83 .optional-customizations>summary{padding:9px 10px;}
  .customer-v83 .optional-customizations>summary strong{font-size:13px;}
  .customer-v83 .optional-customizations>summary small{font-size:9.5px;}
  .admin-discount-review-alert{align-items:flex-start;flex-direction:column;}
}
.customer-v83 .checkout-consents-inline{margin-top:11px!important;margin-bottom:0!important;}

/* =========================================================
   Hikayati V8.4 — customer flow + modern admin header polish
   ========================================================= */

/* ---------- Customer: actions and notices live between hero and section 1 ---------- */
.customer-v84 .customer-global-actions{
  display:grid;
  gap:8px;
  margin:10px 0 12px;
}
.customer-v84 .clear-form-btn-global{
  width:100%!important;
  min-height:45px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  border:1px solid color-mix(in srgb,var(--coral) 58%,var(--line))!important;
  border-radius:13px!important;
  background:color-mix(in srgb,var(--coral) 7%,var(--surface))!important;
  color:var(--coral)!important;
  font-size:13px!important;
  font-weight:950!important;
  letter-spacing:0!important;
  box-shadow:none!important;
}
.customer-v84 .clear-form-btn-global:hover,
.customer-v84 .clear-form-btn-global:focus-visible{
  background:color-mix(in srgb,var(--coral) 14%,var(--surface))!important;
  border-color:var(--coral)!important;
  transform:translateY(-1px);
  outline:0;
}
.customer-v84 .customer-global-notice{
  margin:0!important;
  min-height:0;
}

/* ---------- Numbered sections: logical arrow on the far end ---------- */
.customer-v84 .major-section-summary{
  position:relative!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  padding-inline-end:52px!important;
}
.customer-v84 .major-section-chevron{
  position:absolute!important;
  inset-inline-end:17px!important;
  top:50%!important;
  transform:translateY(-50%) rotate(45deg)!important;
  width:12px!important;
  height:12px!important;
  border-inline-end:2.4px solid var(--navy)!important;
  border-block-end:2.4px solid var(--navy)!important;
  transition:transform .18s ease,color .18s ease!important;
}
.customer-v84 .major-section-accordion[open] .major-section-chevron{
  transform:translateY(-50%) rotate(225deg)!important;
}
html[data-theme="dark"] .customer-v84 .major-section-chevron{
  border-color:var(--gold)!important;
}
html[dir="rtl"] .customer-v84 .major-section-summary{text-align:right!important;}
html[dir="ltr"] .customer-v84 .major-section-summary{text-align:left!important;}

/* ---------- Book switcher: bounded horizontal rail + compact add button ---------- */
.customer-v84 .book-navigator-with-add{
  display:flex!important;
  align-items:stretch!important;
  gap:8px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  margin-top:12px!important;
  padding:0!important;
}
.customer-v84 .book-navigator-with-add .book-navigator{
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overscroll-behavior-inline:contain!important;
  scrollbar-width:thin;
  scroll-snap-type:x proximity;
  padding:2px!important;
}
.customer-v84 .book-nav-chip{
  scroll-snap-align:start;
  border:1px solid color-mix(in srgb,var(--gold) 66%,var(--line))!important;
  background:color-mix(in srgb,var(--gold) 9%,var(--surface))!important;
  box-shadow:0 3px 11px rgba(9,31,57,.05)!important;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease!important;
}
.customer-v84 .book-nav-chip:hover,
.customer-v84 .book-nav-chip:focus-visible{
  transform:translateY(-2px)!important;
  border-color:var(--gold)!important;
  box-shadow:0 8px 18px color-mix(in srgb,var(--gold) 15%,transparent)!important;
  outline:none!important;
}
.customer-v84 .book-nav-chip.active{
  background:linear-gradient(135deg,color-mix(in srgb,var(--gold) 22%,var(--surface)),color-mix(in srgb,#fc6f5c 11%,var(--surface)))!important;
  border-color:var(--gold)!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--gold) 15%,transparent),0 8px 20px rgba(18,43,76,.08)!important;
}
.customer-v84 .book-nav-chip>span{
  background:#fc6f5c!important;
  color:#fff!important;
  box-shadow:0 2px 7px rgba(252,111,92,.24)!important;
}
.customer-v84 .book-nav-add{
  flex:0 0 46px!important;
  width:46px!important;
  min-width:46px!important;
  height:auto!important;
  min-height:46px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid var(--gold)!important;
  border-radius:13px!important;
  background:linear-gradient(145deg,#ffd65f,#ffbd34)!important;
  color:#18365e!important;
  font-size:28px!important;
  font-weight:900!important;
  line-height:1!important;
  cursor:pointer!important;
  box-shadow:0 6px 15px rgba(255,193,54,.20)!important;
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease!important;
}
.customer-v84 .book-nav-add:hover,
.customer-v84 .book-nav-add:focus-visible{
  transform:translateY(-2px) scale(1.025)!important;
  filter:saturate(1.08)!important;
  box-shadow:0 10px 21px rgba(255,193,54,.29)!important;
  outline:2px solid color-mix(in srgb,var(--gold) 38%,transparent)!important;
  outline-offset:2px!important;
}
.customer-v84 .customer-add-book-wide,
.customer-v84 .books-section-actions{display:none!important;}

/* ---------- Active book card: stronger brand identity, still readable ---------- */
.customer-v84 .customer-book-card{
  border:1px solid color-mix(in srgb,var(--gold) 45%,var(--line))!important;
  box-shadow:0 8px 24px rgba(19,48,82,.07)!important;
  overflow:hidden!important;
}
.customer-v84 .customer-book-card>summary{
  position:relative!important;
  background:linear-gradient(118deg,#ffe58a 0%,#ffd04f 64%,#ffbc42 100%)!important;
  color:#17345a!important;
  border-bottom:1px solid rgba(23,52,90,.10)!important;
  box-shadow:inset 4px 0 0 #fc6f5c!important;
  transition:filter .16s ease,box-shadow .16s ease!important;
}
html[dir="rtl"] .customer-v84 .customer-book-card>summary{box-shadow:inset -4px 0 0 #fc6f5c!important;}
.customer-v84 .customer-book-card>summary:hover{
  filter:saturate(1.04) brightness(1.01);
}
.customer-v84 .customer-book-card>summary .book-number{
  background:#fc6f5c!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.42)!important;
  box-shadow:0 3px 9px rgba(252,111,92,.22)!important;
}
.customer-v84 .customer-book-card>summary .book-live-title{
  color:#17345a!important;
  font-weight:950!important;
}
.customer-v84 .customer-book-card>summary .book-summary-product{color:#355675!important;}
.customer-v84 .customer-book-card>summary .summary-remove-book{
  background:rgba(255,255,255,.62)!important;
  border-color:rgba(252,111,92,.44)!important;
  color:#a93e32!important;
  font-weight:950!important;
}
.customer-v84 .customer-book-card>summary .summary-remove-book:hover{
  background:#fff!important;
  border-color:#fc6f5c!important;
  transform:translateY(-1px);
}

/* ---------- Optional customizations: turquoise attention card ---------- */
.customer-v84 .optional-customizations{
  border-color:color-mix(in srgb,#4eb6bf 60%,var(--line))!important;
  background:linear-gradient(135deg,color-mix(in srgb,#4eb6bf 10%,var(--surface)),color-mix(in srgb,#4eb6bf 4%,var(--surface-2)))!important;
  box-shadow:0 5px 16px color-mix(in srgb,#4eb6bf 8%,transparent)!important;
}
.customer-v84 .optional-customizations>summary{
  min-height:58px!important;
}
.customer-v84 .optional-customizations>summary strong{
  color:color-mix(in srgb,#2195a0 82%,var(--text))!important;
  font-size:14.5px!important;
}
.customer-v84 .optional-customizations>summary i{
  border-color:#32a9b4!important;
}
html[data-theme="dark"] .customer-v84 .optional-customizations{
  background:linear-gradient(135deg,rgba(78,182,191,.15),rgba(78,182,191,.06))!important;
}
html[data-theme="dark"] .customer-v84 .optional-customizations>summary strong{color:#7ed8df!important;}

/* Give guardian inputs breathing room from the accordion header. */
.customer-v84 .customer-contact-section .major-section-body{padding-top:14px!important;}
.customer-v84 .customer-contact-grid{margin-top:0!important;}

/* ---------- Admin V8.4 header: logo -> menu -> theme -> profile ---------- */
.topbar-v84{overflow:visible!important;}
.topbar-inner-v84{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  gap:13px!important;
  min-height:78px!important;
  padding-block:9px!important;
  overflow:visible!important;
}
.admin-brand-v84{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex:0 0 auto!important;
  min-width:0!important;
}
.topbar-v84 .header-logo-shell{
  width:160px!important;
  height:54px!important;
  min-width:124px!important;
  max-width:18vw!important;
}
.admin-menu-trigger-v84{
  display:none!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.15)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.07)!important;
  color:#fff!important;
  place-items:center!important;
}
.admin-menu-trigger-v84 svg{width:24px;height:24px;display:block;}

.nav-v84{
  flex:1 1 auto!important;
  min-width:0!important;
}
@media (min-width:1100px){
  .topbar-inner-v84{
    display:flex!important;
    min-height:80px!important;
    padding-block:10px!important;
  }
  .admin-brand-v84{order:0!important;}
  .nav-v84{
    order:1!important;
    position:static!important;
    display:block!important;
    opacity:1!important;
    pointer-events:auto!important;
    transform:none!important;
    width:auto!important;
    max-width:none!important;
    max-height:none!important;
    overflow:hidden!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
  }
  .nav-v84 .nav-v82-head{display:none!important;}
  .nav-v84-grid{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    gap:5px!important;
    width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:none!important;
    padding:2px 0!important;
  }
  .nav-v84-grid::-webkit-scrollbar{display:none!important;}
  .nav-v84 .nav-v84-grid>a{
    flex:0 0 auto!important;
    min-height:38px!important;
    padding:6px 9px!important;
    border:1px solid rgba(255,255,255,.10)!important;
    border-radius:10px!important;
    background:rgba(255,255,255,.045)!important;
    color:#fff!important;
    font-size:11px!important;
    font-weight:850!important;
    white-space:nowrap!important;
    gap:5px!important;
  }
  .nav-v84 .nav-v84-grid>a:hover{background:rgba(255,255,255,.11)!important;border-color:rgba(255,255,255,.20)!important;}
  .nav-v84 .nav-v84-grid>a.active{background:var(--gold)!important;border-color:var(--gold)!important;color:var(--navy)!important;}
  .nav-v84 .nav-v82-icon{width:24px!important;height:24px!important;min-width:24px!important;}
  .topbar-tools-v84{order:2!important;margin-inline-start:auto!important;}
}

.topbar-tools-v84{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  flex:0 0 auto!important;
}
.topbar-tools-v84>.admin-theme-toggle{
  width:42px!important;height:42px!important;min-width:42px!important;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.07)!important;
  color:#fff!important;
}
.profile-menu-v84{position:relative!important;min-width:0!important;}
.user-chip-v84{
  min-height:44px!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:4px 8px!important;
  border:1px solid rgba(255,255,255,.13)!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.065)!important;
  color:#fff!important;
  cursor:pointer!important;
}
.user-chip-v84:hover,.user-chip-v84[aria-expanded="true"]{background:rgba(255,255,255,.12)!important;border-color:rgba(255,255,255,.23)!important;}
.user-chip-v84 img,.user-chip-v84 .user-avatar-fallback{width:34px!important;height:34px!important;min-width:34px!important;border-radius:10px!important;object-fit:cover!important;}
.user-chip-copy-v84{display:grid;gap:1px;min-width:0;text-align:start;}
.user-chip-copy-v84 strong{color:#fff!important;font-size:11.5px!important;max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.user-chip-copy-v84 small{color:rgba(255,255,255,.63)!important;font-size:9px!important;}
.profile-chevron-v84{width:17px;height:17px;opacity:.8;transition:transform .16s ease;}
.user-chip-v84[aria-expanded="true"] .profile-chevron-v84{transform:rotate(180deg);}
.profile-dropdown-v84{
  position:absolute!important;
  z-index:1200!important;
  inset-block-start:calc(100% + 8px)!important;
  inset-inline-end:0!important;
  width:238px!important;
  padding:8px!important;
  border:1px solid var(--line)!important;
  border-radius:16px!important;
  background:var(--surface)!important;
  color:var(--text)!important;
  box-shadow:0 20px 50px rgba(7,21,41,.30)!important;
  animation:v84ProfileIn .15s ease both;
}
.profile-dropdown-v84[hidden]{display:none!important;}
@keyframes v84ProfileIn{from{opacity:0;transform:translateY(-5px) scale(.985)}to{opacity:1;transform:none}}
.profile-dropdown-head-v84{display:flex;align-items:center;gap:9px;padding:7px 7px 10px;margin-bottom:5px;border-bottom:1px solid var(--line);}
.profile-dropdown-head-v84 img,.profile-dropdown-head-v84 .user-avatar-fallback{width:40px;height:40px;border-radius:11px;object-fit:cover;display:grid;place-items:center;}
.profile-dropdown-head-v84 div{display:grid;gap:2px;min-width:0;}
.profile-dropdown-head-v84 strong{font-size:13px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.profile-dropdown-head-v84 small{font-size:10px;color:var(--muted);}
.profile-dropdown-v84>a{display:flex;align-items:center;gap:9px;min-height:39px;padding:8px 9px;border-radius:10px;color:var(--text)!important;font-size:12px;font-weight:800;text-decoration:none;}
.profile-dropdown-v84>a:hover{background:var(--surface-2)!important;}
.profile-dropdown-v84>a>span{width:22px;text-align:center;}
.profile-dropdown-separator-v84{height:1px;background:var(--line);margin:5px 3px;}
.profile-dropdown-v84 .profile-logout-v84{color:var(--danger)!important;}

html[dir="rtl"] .topbar-inner-v84{direction:rtl!important;}
html[dir="ltr"] .topbar-inner-v84{direction:ltr!important;}

@media(max-width:1099px){
  .topbar-inner-v84{min-height:68px!important;gap:8px!important;}
  .admin-brand-v84{flex:1 1 auto!important;min-width:0!important;}
  .admin-menu-trigger-v84{display:grid!important;}
  .topbar-v84 .header-logo-shell{width:126px!important;height:46px!important;min-width:92px!important;max-width:32vw!important;}
  .nav-v84{
    position:absolute!important;
    inset-block-start:calc(100% + 6px)!important;
    inset-inline-start:0!important;
    width:min(390px,calc(100vw - 20px))!important;
    max-width:calc(100vw - 20px)!important;
    max-height:72dvh!important;
    overflow:auto!important;
    display:none!important;
    opacity:0!important;
    pointer-events:none!important;
    padding:9px!important;
    border:1px solid var(--line)!important;
    border-radius:16px!important;
    background:var(--surface)!important;
    color:var(--text)!important;
    box-shadow:0 22px 60px rgba(7,19,37,.30)!important;
  }
  .nav-v84.open{display:block!important;opacity:1!important;pointer-events:auto!important;}
  .nav-v84-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;}
  .nav-v84 .nav-v84-grid>a{min-height:51px!important;padding:8px!important;font-size:11.5px!important;}
  .topbar-tools-v84{margin-inline-start:auto!important;}
  .user-chip-copy-v84{display:none!important;}
  .user-chip-v84{width:42px!important;min-width:42px!important;padding:3px!important;justify-content:center!important;}
  .profile-chevron-v84{display:none!important;}
}
@media(max-width:520px){
  .topbar-inner-v84{padding-inline:9px!important;}
  .topbar-v84 .header-logo-shell{width:105px!important;height:42px!important;max-width:31vw!important;}
  .admin-menu-trigger-v84{width:39px!important;height:39px!important;min-width:39px!important;}
  .topbar-tools-v84>.admin-theme-toggle{width:39px!important;height:39px!important;min-width:39px!important;}
  .user-chip-v84{width:39px!important;min-width:39px!important;min-height:39px!important;}
  .user-chip-v84 img,.user-chip-v84 .user-avatar-fallback{width:31px!important;height:31px!important;min-width:31px!important;}
  .profile-dropdown-v84{width:min(238px,calc(100vw - 22px))!important;}
  .customer-v84 .major-section-summary{grid-template-columns:32px minmax(0,1fr)!important;padding-inline-end:46px!important;}
  .customer-v84 .major-section-chevron{inset-inline-end:15px!important;}
  .customer-v84 .book-nav-add{flex-basis:43px!important;width:43px!important;min-width:43px!important;min-height:43px!important;font-size:25px!important;}
  .customer-v84 .clear-form-btn-global{min-height:43px!important;font-size:12px!important;}
}


/* =========================================================
   Hikayati V8.5 — customer focus, admin builder sync, header/mobile refinement
   ========================================================= */

/* ---------- Customer: compact high-attention rights notice ---------- */
.customer-v85 .rights-notice-v85{
  scroll-margin-top:8px;
  display:grid!important;
  grid-template-columns:32px minmax(0,1fr)!important;
  align-items:center!important;
  gap:9px!important;
  margin:4px 0 9px!important;
  padding:9px 11px!important;
  border:1px solid color-mix(in srgb,var(--coral) 34%,var(--line))!important;
  border-inline-start:4px solid var(--coral)!important;
  border-radius:13px!important;
  background:linear-gradient(135deg,color-mix(in srgb,var(--coral) 8%,var(--surface)),color-mix(in srgb,var(--gold) 7%,var(--surface)))!important;
  box-shadow:0 5px 16px rgba(20,42,72,.055)!important;
}
.customer-v85 .rights-notice-v85 .rights-icon{
  width:30px!important;height:30px!important;min-width:30px!important;border-radius:10px!important;
  display:grid!important;place-items:center!important;
  background:color-mix(in srgb,var(--coral) 15%,var(--surface))!important;color:var(--coral)!important;
  font-size:15px!important;
}
.customer-v85 .rights-notice-v85 strong{display:block!important;font-size:12.5px!important;line-height:1.35!important;font-weight:950!important;color:var(--text)!important;margin:0!important;}
.customer-v85 .rights-notice-v85 p{margin:2px 0 0!important;font-size:10.5px!important;line-height:1.55!important;color:var(--muted)!important;}
html[data-theme="dark"] .customer-v85 .rights-notice-v85{
  background:linear-gradient(135deg,rgba(252,111,92,.11),rgba(255,197,72,.07))!important;
  border-color:rgba(252,111,92,.28)!important;
}

/* Section 3 is intentionally always open. */
.customer-v85 .checkout-static-v85 .checkout-static-head{
  cursor:default!important;
  padding-inline-end:14px!important;
  grid-template-columns:38px minmax(0,1fr)!important;
}
.customer-v85 .checkout-static-v85 .major-section-body{display:block!important;padding-top:12px!important;}
.customer-v85 .checkout-static-v85 .customer-invoice-always{margin-top:10px!important;}
.customer-v85 .delivery-note-v85{
  margin-top:10px;
  min-height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:9px 11px;
  border:1px solid color-mix(in srgb,var(--teal) 34%,var(--line));
  border-radius:12px;
  background:color-mix(in srgb,var(--teal) 8%,var(--surface-2));
  color:var(--text);
}
.customer-v85 .delivery-note-v85 span{font-size:17px;line-height:1;}
.customer-v85 .delivery-note-v85 strong{font-size:11.5px;line-height:1.55;font-weight:900;}

/* Mobile uses the fixed bottom submit only, larger and easier to tap. */
@media(max-width:760px){
  .customer-v85 .customer-submit-row{display:none!important;}
  .customer-v85 .mobile-checkout-bar{
    grid-template-columns:minmax(84px,.72fr) minmax(170px,1.35fr)!important;
    gap:8px!important;
    inset-inline-end:66px!important;
    padding:8px!important;
  }
  .customer-v85 .mobile-checkout-bar .btn{
    width:100%!important;
    min-height:50px!important;
    font-size:14px!important;
    font-weight:950!important;
    padding-inline:18px!important;
    border-radius:12px!important;
  }
  .customer-v85 .mobile-checkout-bar strong{font-size:16px!important;}
}

/* ---------- Admin header: desktop has all navigation visible ---------- */
.topbar-v85 .topbar-inner-v85{max-width:none!important;}
@media(min-width:1100px){
  .topbar-v85 .container{
    width:min(1540px,calc(100% - 24px))!important;
    max-width:1540px!important;
  }
  .topbar-v85 .topbar-inner-v85{gap:10px!important;min-height:82px!important;}
  .topbar-v85 .admin-brand-v85{flex:0 0 150px!important;}
  .topbar-v85 .header-logo-shell{width:150px!important;max-width:150px!important;height:55px!important;}
  .topbar-v85 .nav-v85{flex:1 1 auto!important;min-width:0!important;overflow:visible!important;}
  .topbar-v85 .nav-v85-grid{
    overflow:visible!important;
    flex-wrap:nowrap!important;
    justify-content:center!important;
    gap:4px!important;
  }
  .topbar-v85 .nav-v85-grid>a{
    padding:6px 8px!important;
    min-height:39px!important;
    font-size:10.6px!important;
    gap:4px!important;
  }
  .topbar-v85 .nav-v82-icon{width:22px!important;height:22px!important;min-width:22px!important;}
  .topbar-v85 .topbar-tools-v85{flex:0 0 auto!important;margin-inline-start:0!important;}
  .admin-mobile-actions-v85,.mobile-account-block-v85{display:none!important;}
}

/* Mobile/tablet header: hamburger + theme on one side, logo alone opposite. */
.admin-mobile-actions-v85{display:none;}
.mobile-account-block-v85{display:none;}
@media(max-width:1099px){
  .topbar-v85 .topbar-inner-v85{
    display:flex!important;
    align-items:center!important;
    min-height:68px!important;
    gap:8px!important;
    padding-block:8px!important;
  }
  .topbar-v85 .admin-brand-v85{order:0!important;flex:0 0 auto!important;margin:0!important;}
  .topbar-v85 .header-logo-shell{
    width:126px!important;height:46px!important;min-width:96px!important;max-width:38vw!important;
  }
  .admin-mobile-actions-v85{
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    margin-inline-start:auto!important;
    order:2!important;
  }
  .admin-mobile-actions-v85 .admin-menu-trigger-v84,
  .admin-mobile-actions-v85 .admin-theme-toggle-mobile-v85{
    display:grid!important;
    place-items:center!important;
    width:42px!important;height:42px!important;min-width:42px!important;
    margin:0!important;
    padding:0!important;
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.07)!important;color:#fff!important;
  }
  .admin-mobile-actions-v85 .admin-theme-toggle-mobile-v85 svg{width:23px!important;height:23px!important;}
  .topbar-v85 .topbar-tools-v85{display:none!important;}
  .topbar-v85 .nav-v85{
    width:min(430px,calc(100vw - 18px))!important;
    max-width:calc(100vw - 18px)!important;
    max-height:78dvh!important;
  }
  .topbar-v85 .nav-v85-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .mobile-account-block-v85{
    display:block!important;
    margin-top:9px!important;
    padding-top:9px!important;
    border-top:1px solid var(--line)!important;
  }
  .mobile-account-user-v85{
    display:flex;align-items:center;gap:9px;padding:7px 8px 9px;
    border-radius:12px;background:var(--surface-2);
  }
  .mobile-account-user-v85 img,.mobile-account-user-v85 .user-avatar-fallback{
    width:40px;height:40px;min-width:40px;border-radius:11px;object-fit:cover;display:grid;place-items:center;
  }
  .mobile-account-user-v85 div{display:grid;gap:2px;min-width:0;}
  .mobile-account-user-v85 strong{font-size:12.5px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .mobile-account-user-v85 small{font-size:10px;color:var(--muted);}
  .mobile-account-links-v85{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    margin-top:7px!important;
  }
  .mobile-account-links-v85 a{
    min-height:42px;display:flex;align-items:center;justify-content:center;
    padding:8px;border:1px solid var(--line);border-radius:10px;
    background:var(--surface);color:var(--text)!important;font-size:11px;font-weight:850;text-align:center;
  }
  .mobile-account-links-v85 .mobile-logout-v85{color:var(--danger)!important;border-color:color-mix(in srgb,var(--danger) 28%,var(--line));}
}
@media(max-width:520px){
  .topbar-v85 .topbar-inner-v85{padding-inline:8px!important;}
  .topbar-v85 .header-logo-shell{width:112px!important;height:43px!important;max-width:39vw!important;}
  .admin-mobile-actions-v85 .admin-menu-trigger-v84,
  .admin-mobile-actions-v85 .admin-theme-toggle-mobile-v85{width:40px!important;height:40px!important;min-width:40px!important;}
  .topbar-v85 .nav-v85{inset-inline-start:0!important;width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;}
}

/* ---------- Add Order: synchronize book builder with customer flow ---------- */
.admin-books-v85{overflow:visible!important;}
.admin-books-v85 .admin-book-nav-wrap{position:static!important;margin:12px 0 10px!important;background:var(--surface-2)!important;}
.admin-books-v85 .customer-books-stack{min-width:0!important;max-width:100%!important;}
.admin-books-v85 .admin-book-slot-v85{
  padding:0!important;
  border:1px solid color-mix(in srgb,var(--gold) 44%,var(--line))!important;
  border-radius:17px!important;
  overflow:hidden!important;
  background:var(--surface)!important;
  box-shadow:0 8px 22px rgba(16,37,65,.07)!important;
}
.admin-books-v85 .admin-book-head-v85{
  display:grid;
  grid-template-columns:42px auto minmax(0,1fr) auto;
  grid-template-areas:"avatar number title remove" "avatar product product remove";
  align-items:center;
  gap:3px 8px;
  min-height:70px;
  padding:10px 12px;
  background:linear-gradient(118deg,#ffe58a 0%,#ffd04f 64%,#ffbc42 100%);
  color:#17345a;
}
.admin-books-v85 .admin-book-head-v85 .book-summary-avatar{grid-area:avatar;}
.admin-books-v85 .admin-book-head-v85 .book-number{grid-area:number;background:#fc6f5c;color:#fff;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:950;}
.admin-books-v85 .admin-book-head-v85 .book-live-title{grid-area:title;color:#17345a;font-size:15px;font-weight:950;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.admin-books-v85 .admin-book-head-v85 .book-summary-product{grid-area:product;color:#355675;font-size:10px;}
.admin-books-v85 .admin-book-head-v85 .remove-book{grid-area:remove;border:1px solid rgba(252,111,92,.45);background:rgba(255,255,255,.62);color:#a93e32;border-radius:10px;padding:6px 9px;font-weight:900;cursor:pointer;}
.admin-books-v85 .book-accordion-body{padding:12px!important;}
.admin-books-v85 .style-integrated-field{margin-top:12px;padding:12px;border:1px solid color-mix(in srgb,var(--teal) 22%,var(--line));border-radius:15px;background:color-mix(in srgb,var(--teal) 3%,var(--surface-2));}
.admin-books-v85 .optional-customizations{margin-top:11px;}
.admin-books-v85 .media-upload-card{min-height:70px;padding:8px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2);}
.admin-books-v85 .media-upload-input{display:none!important;}
.admin-books-v85 .media-upload-empty,.admin-books-v85 .media-upload-ready{height:100%;display:flex;align-items:center;justify-content:center;gap:6px;}
.admin-books-v85 .media-upload-primary,.admin-books-v85 .media-upload-view,.admin-books-v85 .media-upload-change{
  border:0;border-radius:10px;min-height:38px;padding:8px 11px;font-size:11px;font-weight:900;cursor:pointer;
}
.admin-books-v85 .media-upload-primary,.admin-books-v85 .media-upload-view{background:var(--navy);color:#fff;}
.admin-books-v85 .media-upload-change{background:var(--surface);color:var(--text);border:1px solid var(--line);}
.admin-books-v85 .book-summary-avatar{width:40px;height:40px;border-radius:11px;background:#fff;border:1px solid rgba(28,83,160,.28);overflow:hidden;display:grid;place-items:center;color:#3070cf;}
.admin-books-v85 .book-summary-avatar img{width:100%;height:100%;object-fit:cover;}
.admin-books-v85 .book-avatar-placeholder svg{width:24px;height:24px;display:block;}
.admin-books-v85 .character-person-v75{margin-top:9px;}
.admin-books-v85 .book-price-strip{margin-top:10px;}
.order-builder-v85 .style-preview-modal,.order-builder-v85 .media-preview-modal{z-index:1600;}
@media(max-width:720px){
  .admin-books-v85 .admin-book-head-v85{grid-template-columns:38px auto minmax(0,1fr);grid-template-areas:"avatar number title" "avatar product remove";}
  .admin-books-v85 .admin-book-head-v85 .remove-book{justify-self:start;padding:5px 8px;font-size:10px;}
}

/* ======================================================================
   V8.6 — Header alignment + mobile single-row header + child avatar fit
   ====================================================================== */

/* Desktop: keep logo, nav and account controls as one centered composition. */
@media (min-width:1100px){
  .topbar-v85 .container{
    width:min(1320px,calc(100% - 32px))!important;
    max-width:1320px!important;
    margin-inline:auto!important;
  }
  .topbar-v85 .topbar-inner-v85{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    align-items:center!important;
    justify-content:center!important;
    column-gap:12px!important;
    min-height:78px!important;
    padding-inline:0!important;
  }
  .topbar-v85 .admin-brand-v85{
    flex:none!important;
    min-width:0!important;
    margin:0!important;
  }
  .topbar-v85 .header-logo-shell{
    width:136px!important;
    max-width:136px!important;
    height:51px!important;
  }
  .topbar-v85 .nav-v85{
    width:auto!important;
    min-width:0!important;
    justify-self:center!important;
    overflow:visible!important;
  }
  .topbar-v85 .nav-v85-grid{
    width:max-content!important;
    max-width:100%!important;
    justify-content:center!important;
    gap:5px!important;
    margin:0!important;
  }
  .topbar-v85 .topbar-tools-v85{
    justify-self:start!important;
    margin:0!important;
    gap:7px!important;
  }
  html[dir="ltr"] .topbar-v85 .topbar-tools-v85{justify-self:end!important;}
  .topbar-v85 .user-chip-v84{max-width:180px!important;}
}

/* Mobile/tablet: logo and buttons MUST remain on the same row. */
@media (max-width:1099px){
  .topbar-v85 .topbar-inner-v85{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    width:100%!important;
    min-height:66px!important;
    padding:7px 10px!important;
    gap:10px!important;
  }
  .topbar-v85 .admin-brand-v85{
    order:1!important;
    flex:0 0 auto!important;
    margin:0!important;
    min-width:0!important;
  }
  .topbar-v85 .header-home-brand{display:flex!important;align-items:center!important;}
  .topbar-v85 .header-logo-shell{
    width:128px!important;
    height:46px!important;
    min-width:0!important;
    max-width:42vw!important;
    margin:0!important;
  }
  .topbar-v85 .header-logo-shell img{display:block!important;max-width:100%!important;}
  .topbar-v85 .admin-mobile-actions-v85{
    order:2!important;
    flex:0 0 auto!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:7px!important;
    margin:0!important;
  }
  html[dir="rtl"] .topbar-v85 .admin-brand-v85{order:1!important;}
  html[dir="rtl"] .topbar-v85 .admin-mobile-actions-v85{order:2!important;}
  html[dir="ltr"] .topbar-v85 .admin-mobile-actions-v85{order:1!important;}
  html[dir="ltr"] .topbar-v85 .admin-brand-v85{order:2!important;}
  .topbar-v85 .nav-v85{z-index:1005!important;}
}

@media (max-width:520px){
  .topbar-v85 .topbar-inner-v85{padding-inline:10px!important;gap:8px!important;}
  .topbar-v85 .header-logo-shell{width:120px!important;height:44px!important;max-width:43vw!important;}
}

/* Uploaded child photo: show the whole photo cleanly in every book avatar. */
.customer-v85 .book-summary-avatar,
.customer-v84 .book-summary-avatar,
.admin-books-v85 .book-summary-avatar{
  position:relative!important;
  overflow:hidden!important;
  padding:2px!important;
  background:color-mix(in srgb,var(--surface) 92%,#fff 8%)!important;
}
.customer-v85 .book-summary-avatar img,
.customer-v84 .book-summary-avatar img,
.admin-books-v85 .book-summary-avatar img{
  position:absolute!important;
  inset:2px!important;
  width:calc(100% - 4px)!important;
  height:calc(100% - 4px)!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center center!important;
  border-radius:inherit!important;
  background:transparent!important;
}
.customer-v85 .book-summary-avatar:has(img:not([hidden])) .book-avatar-placeholder,
.customer-v84 .book-summary-avatar:has(img:not([hidden])) .book-avatar-placeholder,
.admin-books-v85 .book-summary-avatar:has(img:not([hidden])) .book-avatar-placeholder{
  display:none!important;
}

/* ======================================================================
   V8.7 — Final admin header row lock
   Desktop: Logo -> Menu -> Theme -> Profile, one centered row.
   Mobile: larger logo, still one row with menu/theme controls.
   ====================================================================== */

@media (min-width:1100px){
  .topbar-v85{
    overflow:visible!important;
  }
  .topbar-v85 .container.topbar-inner-v85{
    /* Override older V8.2 grid-area rules completely. */
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:center!important;
    width:max-content!important;
    max-width:calc(100% - 32px)!important;
    min-height:76px!important;
    margin-inline:auto!important;
    padding:8px 0!important;
    gap:10px!important;
    grid-template-columns:none!important;
    grid-template-areas:none!important;
  }
  html[dir="rtl"] .topbar-v85 .container.topbar-inner-v85{direction:rtl!important;}
  html[dir="ltr"] .topbar-v85 .container.topbar-inner-v85{direction:ltr!important;}

  .topbar-v85 .admin-brand-v85{
    order:0!important;
    flex:0 0 auto!important;
    margin:0!important;
    grid-area:auto!important;
  }
  .topbar-v85 .header-logo-shell{
    width:150px!important;
    height:54px!important;
    max-width:150px!important;
    min-width:150px!important;
  }

  .topbar-v85 .nav-v85{
    order:1!important;
    grid-area:auto!important;
    position:static!important;
    inset:auto!important;
    display:block!important;
    flex:0 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    transform:none!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  .topbar-v85 .nav-v85 .nav-v82-head{display:none!important;}
  .topbar-v85 .nav-v85-grid{
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    gap:4px!important;
    overflow:visible!important;
    direction:inherit!important;
  }
  .topbar-v85 .nav-v85-grid>a{
    flex:0 0 auto!important;
    min-height:38px!important;
    padding:6px 8px!important;
    font-size:10.5px!important;
    white-space:nowrap!important;
  }

  .topbar-v85 .topbar-tools-v85{
    order:2!important;
    grid-area:auto!important;
    display:flex!important;
    flex:0 0 auto!important;
    align-items:center!important;
    margin:0!important;
    gap:7px!important;
    justify-self:auto!important;
  }
  .topbar-v85 .user-chip-v84{max-width:170px!important;}
  .topbar-v85 .admin-mobile-actions-v85,
  .topbar-v85 .mobile-account-block-v85{display:none!important;}
}

/* Slightly compress nav only when desktop width gets tight; never create a second row. */
@media (min-width:1100px) and (max-width:1320px){
  .topbar-v85 .container.topbar-inner-v85{gap:7px!important;max-width:calc(100% - 18px)!important;}
  .topbar-v85 .header-logo-shell{width:132px!important;min-width:132px!important;max-width:132px!important;height:50px!important;}
  .topbar-v85 .nav-v85-grid{gap:3px!important;}
  .topbar-v85 .nav-v85-grid>a{padding:5px 6px!important;font-size:9.8px!important;gap:3px!important;}
  .topbar-v85 .nav-v82-icon{width:20px!important;height:20px!important;min-width:20px!important;}
  .topbar-v85 .nav-v82-icon svg{width:14px!important;height:14px!important;}
  .topbar-v85 .user-chip-v84{max-width:145px!important;}
}

/* Mobile/tablet: keep current structure but make the logo noticeably larger. */
@media (max-width:1099px){
  .topbar-v85 .container.topbar-inner-v85{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:space-between!important;
  }
  .topbar-v85 .header-logo-shell{
    width:154px!important;
    height:52px!important;
    max-width:48vw!important;
    min-width:0!important;
  }
  .topbar-v85 .header-logo-shell img{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
  }
}
@media (max-width:520px){
  .topbar-v85 .header-logo-shell{
    width:145px!important;
    height:50px!important;
    max-width:48vw!important;
  }
}
@media (max-width:360px){
  .topbar-v85 .header-logo-shell{
    width:132px!important;
    height:47px!important;
  }
}

/* ======================================================================
   V8.8 — Header vertical alignment + relaxed topbar + no-jump accordions
   ====================================================================== */

@media (min-width:1100px){
  .topbar-v85{
    min-height:96px!important;
    display:flex!important;
    align-items:center!important;
  }
  .topbar-v85 .container.topbar-inner-v85{
    min-height:96px!important;
    padding:14px 0!important;
    align-items:center!important;
    gap:11px!important;
  }
  .topbar-v85 .admin-brand-v85,
  .topbar-v85 .nav-v85,
  .topbar-v85 .topbar-tools-v85{
    align-self:center!important;
  }
  .topbar-v85 .header-home-brand,
  .topbar-v85 .header-logo-shell{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  .topbar-v85 .header-logo-shell{
    width:154px!important;
    min-width:154px!important;
    max-width:154px!important;
    height:58px!important;
    line-height:0!important;
  }
  .topbar-v85 .header-logo-shell img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
    margin:0!important;
    transform:translateY(-2px)!important;
  }
  .topbar-v85 .nav-v85-grid,
  .topbar-v85 .topbar-tools-v85{
    min-height:48px!important;
    align-items:center!important;
  }
}

@media (min-width:1100px) and (max-width:1320px){
  .topbar-v85{min-height:92px!important;}
  .topbar-v85 .container.topbar-inner-v85{min-height:92px!important;padding-block:12px!important;}
  .topbar-v85 .header-logo-shell{width:140px!important;min-width:140px!important;max-width:140px!important;height:54px!important;}
}

@media (max-width:1099px){
  .topbar-v85 .container.topbar-inner-v85{
    min-height:76px!important;
    padding-block:8px!important;
    align-items:center!important;
  }
  .topbar-v85 .admin-brand-v85,
  .topbar-v85 .admin-mobile-actions-v85{
    align-self:center!important;
  }
  .topbar-v85 .header-logo-shell{
    width:174px!important;
    height:58px!important;
    max-width:52vw!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    line-height:0!important;
  }
  .topbar-v85 .header-logo-shell img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
    margin:0!important;
    transform:none!important;
  }
}

@media (max-width:520px){
  .topbar-v85 .container.topbar-inner-v85{min-height:74px!important;}
  .topbar-v85 .header-logo-shell{
    width:164px!important;
    height:56px!important;
    max-width:54vw!important;
  }
}

@media (max-width:360px){
  .topbar-v85 .header-logo-shell{
    width:148px!important;
    height:52px!important;
    max-width:52vw!important;
  }
}

/* Keep accordion interaction anchored where the user tapped. Multiple sections may stay open. */
.customer-v85 .major-section-accordion,
.customer-v84 .major-section-accordion,
.customer-v83 .major-section-accordion{
  scroll-margin-top:0!important;
}
.customer-v85 .major-section-summary,
.customer-v84 .major-section-summary,
.customer-v83 .major-section-summary{
  scroll-margin:0!important;
}


/* ======================================================================
   V8.9 — compact logo asset + Section 1 guided scroll only
   ====================================================================== */

/* The default logo asset is trimmed in V8.9, so let it use the shell fully. */
.topbar-v85 .header-logo-shell{
  overflow:hidden!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:0!important;
}
.topbar-v85 .header-logo-shell img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:0!important;
}

@media (max-width:1099px){
  .topbar-v85 .header-logo-shell{
    width:190px!important;
    height:66px!important;
    max-width:56vw!important;
    min-width:0!important;
  }
}
@media (max-width:520px){
  .topbar-v85 .header-logo-shell{
    width:184px!important;
    height:64px!important;
    max-width:58vw!important;
  }
}
@media (max-width:380px){
  .topbar-v85 .header-logo-shell{
    width:166px!important;
    height:59px!important;
    max-width:56vw!important;
  }
}

/* Section 1 is the only guided section: when opened/clicked we align its top.
   Other sections keep the user's current scroll position and stay independently open. */
#booksSection,
#adminBooksSection{
  scroll-margin-top:8px;
}
#adminBooksSection > .section-title{
  cursor:pointer;
}

/* ======================================================================
   V8.10 — Mobile logo flex-shrink hard fix
   The previous width was being compressed by flex layout to ~46px.
   Lock the brand, link and shell width and preserve the logo aspect ratio.
   ====================================================================== */
@media (max-width:1099px){
  .topbar-v85 .admin-brand-v85{
    flex:0 0 188px!important;
    width:188px!important;
    min-width:188px!important;
    max-width:188px!important;
    overflow:visible!important;
  }
  .topbar-v85 .header-home-brand{
    display:flex!important;
    flex:0 0 188px!important;
    width:188px!important;
    min-width:188px!important;
    max-width:188px!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:visible!important;
  }
  .topbar-v85 .header-logo-shell{
    display:block!important;
    flex:0 0 188px!important;
    width:188px!important;
    min-width:188px!important;
    max-width:188px!important;
    height:auto!important;
    aspect-ratio:325 / 132!important;
    overflow:visible!important;
  }
  .topbar-v85 .header-logo-shell img{
    display:block!important;
    width:188px!important;
    min-width:188px!important;
    max-width:188px!important;
    height:auto!important;
    max-height:none!important;
    object-fit:initial!important;
    object-position:initial!important;
    margin:0!important;
  }
  .topbar-v85 .container.topbar-inner-v85{
    min-height:88px!important;
  }
}

@media (max-width:520px){
  .topbar-v85 .admin-brand-v85,
  .topbar-v85 .header-home-brand,
  .topbar-v85 .header-logo-shell{
    flex-basis:150px!important;
    width:150px!important;
    min-width:150px!important;
    max-width:150px!important;
  }
  .topbar-v85 .header-logo-shell img{
    width:150px!important;
    min-width:150px!important;
    max-width:150px!important;
  }
}

@media (max-width:360px){
  .topbar-v85 .admin-brand-v85,
  .topbar-v85 .header-home-brand,
  .topbar-v85 .header-logo-shell{
    flex-basis:138px!important;
    width:138px!important;
    min-width:138px!important;
    max-width:138px!important;
  }
  .topbar-v85 .header-logo-shell img{
    width:138px!important;
    min-width:138px!important;
    max-width:138px!important;
  }
}


/* ======================================================================
   Hikayati V8.11 — New Order section badges + optional customizations
   ====================================================================== */

/* Bright section numbers on Create Order — desktop + mobile */
.order-builder-v85 > .form-card > .section-title > span,
#adminBooksSection > .section-title > span {
    background:#ffd12a !important;
    color:#17345a !important;
    border:1px solid #ffc21a !important;
    box-shadow:0 5px 14px rgba(255,193,7,.24) !important;
    font-weight:950 !important;
}

/* Make optional customizations a full-width, prominent accordion just like customer flow */
.admin-books-v85 .optional-customizations {
    width:100% !important;
    margin-top:14px !important;
    border:1px solid color-mix(in srgb,#4eb6bf 62%,var(--line)) !important;
    border-radius:16px !important;
    background:linear-gradient(
        135deg,
        color-mix(in srgb,#4eb6bf 12%,var(--surface)),
        color-mix(in srgb,#4eb6bf 5%,var(--surface-2))
    ) !important;
    box-shadow:0 7px 18px color-mix(in srgb,#4eb6bf 10%,transparent) !important;
    overflow:hidden !important;
}

.admin-books-v85 .optional-customizations > summary {
    width:100% !important;
    min-height:64px !important;
    box-sizing:border-box !important;
    padding:12px 15px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:14px !important;
    list-style:none !important;
    cursor:pointer !important;
    user-select:none !important;
}

.admin-books-v85 .optional-customizations > summary::-webkit-details-marker {
    display:none !important;
}

.admin-books-v85 .optional-customizations > summary::marker {
    content:"" !important;
}

.admin-books-v85 .optional-customizations > summary > span {
    display:grid !important;
    gap:3px !important;
    min-width:0 !important;
    flex:1 1 auto !important;
}

.admin-books-v85 .optional-customizations > summary strong {
    font-size:15px !important;
    line-height:1.35 !important;
    font-weight:950 !important;
    color:color-mix(in srgb,#2195a0 84%,var(--text)) !important;
}

.admin-books-v85 .optional-customizations > summary small {
    font-size:11px !important;
    line-height:1.55 !important;
    color:var(--muted) !important;
}

.admin-books-v85 .optional-customizations > summary i {
    width:11px !important;
    height:11px !important;
    flex:0 0 11px !important;
    border-inline-end:2.5px solid #32a9b4 !important;
    border-block-end:2.5px solid #32a9b4 !important;
    transform:rotate(45deg) !important;
    transition:transform .2s ease !important;
}

.admin-books-v85 .optional-customizations[open] > summary i {
    transform:rotate(225deg) !important;
}

.admin-books-v85 .optional-customizations-body {
    padding:14px !important;
    border-top:1px solid color-mix(in srgb,#4eb6bf 35%,var(--line)) !important;
    background:color-mix(in srgb,var(--surface) 94%,transparent) !important;
}

html[data-theme="dark"] .admin-books-v85 .optional-customizations {
    background:linear-gradient(135deg,rgba(78,182,191,.16),rgba(78,182,191,.065)) !important;
    border-color:rgba(78,182,191,.40) !important;
}

html[data-theme="dark"] .admin-books-v85 .optional-customizations > summary strong {
    color:#81e1e8 !important;
}

@media (max-width:720px) {
    .order-builder-v85 > .form-card > .section-title > span,
    #adminBooksSection > .section-title > span {
        width:36px !important;
        height:36px !important;
        flex-basis:36px !important;
        border-radius:11px !important;
        font-size:15px !important;
    }

    .admin-books-v85 .optional-customizations > summary {
        min-height:60px !important;
        padding:11px 12px !important;
    }

    .admin-books-v85 .optional-customizations > summary strong {
        font-size:14px !important;
    }

    .admin-books-v85 .optional-customizations > summary small {
        font-size:10px !important;
    }

    .admin-books-v85 .optional-customizations-body {
        padding:11px !important;
    }
}

/* ======================================================================
   Hikayati V9.0 — OpenAI / AI test UI
   ====================================================================== */
.btn-ai{background:linear-gradient(135deg,#284e7f,#327f91)!important;color:#fff!important;border-color:transparent!important}
.btn-ai:hover{filter:brightness(1.08)}
.btn-danger-soft{border:1px solid color-mix(in srgb,#fc6f5c 55%,var(--line));background:color-mix(in srgb,#fc6f5c 9%,var(--surface));color:#d94e3c}
.ai-settings-entry{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px;background:linear-gradient(135deg,color-mix(in srgb,#183960 95%,var(--surface)),color-mix(in srgb,#327f91 28%,var(--surface)));color:#fff;border-color:rgba(255,255,255,.12)}
.ai-settings-entry h2,.ai-settings-entry p{color:inherit}.ai-settings-entry p{opacity:.82;margin:4px 0 0}.ai-settings-entry .eyebrow{color:#ffc83d}
.ai-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}
.ai-status-card{display:grid;gap:5px;min-height:112px;align-content:center;position:relative;overflow:hidden}
.ai-status-card:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:4px;background:#ffc83d}
.ai-status-card.is-ok:before{background:#44b7a9}.ai-status-card.is-off:before{background:#8f9bad}
.ai-status-card small{color:var(--muted);font-weight:800}.ai-status-card strong{font-size:18px;overflow-wrap:anywhere}.ai-status-card span{font-size:12px;color:var(--muted)}
.ai-security-warning{margin-bottom:18px}.ai-settings-layout{align-items:start}.ai-key-form{margin-top:12px}.ai-connection-actions{margin-top:12px;flex-wrap:wrap}.ai-cost-hints{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.ai-cost-hints>div{padding:10px;border-radius:12px;background:var(--surface);display:grid;gap:4px}.ai-cost-hints small{color:var(--muted)}.ai-cost-hints strong{font-size:17px}.ai-cost-hints p{grid-column:1/-1;margin:0;color:var(--muted);font-size:12px;line-height:1.7}
.ai-next-step{margin-top:18px}.ai-next-step .panel-head{align-items:center}.ai-test-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(290px,.75fr);gap:18px;align-items:start}.ai-test-side{display:grid;gap:18px}.ai-test-form textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:1.65}.ai-run-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.ai-run-summary>div{padding:10px;border:1px solid var(--line);background:var(--surface-2);border-radius:12px;display:grid;gap:3px}.ai-run-summary small{color:var(--muted);font-size:11px}.ai-run-summary strong{font-size:14px;overflow-wrap:anywhere}.btn-ai-generate{min-height:50px;font-weight:900}.ai-ref-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.ai-ref-grid figure{margin:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface-2)}.ai-ref-grid img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block}.ai-ref-grid figcaption{padding:7px;font-size:10px;line-height:1.45;color:var(--muted)}.ai-current-result{display:block;border-radius:14px;overflow:hidden;border:1px solid var(--line);margin-bottom:10px}.ai-current-result img{display:block;width:100%;height:auto}.empty-state.small{padding:16px;font-size:12px}.check-card{display:flex!important;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.check-card input{flex:0 0 auto;margin-top:3px}.check-card span{display:grid;gap:3px}.check-card small{color:var(--muted);line-height:1.5}
@media(max-width:900px){.ai-test-layout{grid-template-columns:1fr}.ai-status-grid{grid-template-columns:1fr}.ai-settings-entry{align-items:flex-start;flex-direction:column}.ai-run-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.ai-cost-hints{grid-template-columns:1fr}.ai-cost-hints p{grid-column:auto}.ai-ref-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ai-run-summary{grid-template-columns:1fr 1fr}.ai-test-form textarea{font-size:12px}}

/* ======================================================================
   Hikayati V9.1 — Skills Manager + Book Blueprint
   ====================================================================== */
.skills-grid-v91{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px}.skill-card-v91{display:grid;gap:14px}.skill-card-v91.skill-synced{border-color:color-mix(in srgb,#24b38a 32%,var(--line))}.skill-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.skill-card-head h3{margin:3px 0;font-size:18px}.skill-card-head code{font-size:11px;color:var(--muted);direction:ltr}.skill-stage{display:inline-flex;padding:4px 8px;border-radius:999px;background:color-mix(in srgb,#4eb6bf 16%,var(--surface));color:#35a5af;font-size:10px;font-weight:900;letter-spacing:.08em}.skill-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.skill-meta-grid>div{padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);display:grid;gap:4px}.skill-meta-grid span{font-size:10px;color:var(--muted);font-weight:800}.skill-meta-grid strong{font-size:12px;overflow-wrap:anywhere}.mono-small{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;direction:ltr}.skill-error{font-size:11px;line-height:1.6;padding:9px;border-radius:10px;background:color-mix(in srgb,#d9534f 10%,var(--surface));color:#d9534f;overflow-wrap:anywhere}.skill-upload-v91{border-top:1px solid var(--line);padding-top:10px}.skill-upload-v91 summary{cursor:pointer;font-weight:850;color:var(--muted)}.skill-upload-v91 form{margin-top:10px}.ai-product-map-v91{margin-top:18px}
.ai-blueprint-card{margin:14px 0 16px;padding:15px;border:1px solid color-mix(in srgb,#6d5dfc 28%,var(--line));border-radius:18px;background:linear-gradient(135deg,color-mix(in srgb,#6d5dfc 8%,var(--surface)),color-mix(in srgb,#4eb6bf 7%,var(--surface)))}.ai-blueprint-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.ai-blueprint-head h4{font-size:18px;margin:2px 0 4px}.ai-blueprint-head p:not(.eyebrow){margin:0;color:var(--muted);font-size:12px}.blueprint-summary-grid{display:grid;grid-template-columns:1fr .45fr 1.4fr;gap:8px;margin-top:12px}.blueprint-summary-grid>div{display:grid;gap:4px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--surface) 88%,transparent)}.blueprint-summary-grid span{font-size:10px;color:var(--muted);font-weight:800}.blueprint-summary-grid strong{font-size:12px;line-height:1.55}.blueprint-preview{margin-top:10px;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface)}.blueprint-preview>summary{cursor:pointer;padding:12px 14px;font-weight:900}.blueprint-preview-body{padding:12px;border-top:1px solid var(--line)}.blueprint-pages-list{display:grid;gap:7px}.blueprint-pages-list article{display:grid;grid-template-columns:70px minmax(120px,.55fr) minmax(0,1.6fr);gap:8px;align-items:start;padding:9px;border-radius:10px;background:var(--surface-2)}.blueprint-pages-list article b{font-size:11px}.blueprint-pages-list article span{font-size:11px;font-weight:850}.blueprint-pages-list article small{font-size:10px;color:var(--muted);line-height:1.55}.blueprint-actions{margin-top:12px}.btn-disabled{opacity:.55;pointer-events:none;cursor:not-allowed}
@media(max-width:850px){.skills-grid-v91{grid-template-columns:1fr}.blueprint-summary-grid{grid-template-columns:1fr 1fr}.blueprint-summary-grid>div:last-child{grid-column:1/-1}.ai-blueprint-head{display:grid}.blueprint-pages-list article{grid-template-columns:58px 1fr}.blueprint-pages-list article small{grid-column:1/-1}}
@media(max-width:520px){.skill-meta-grid{grid-template-columns:1fr 1fr}.ai-blueprint-card{padding:12px;border-radius:15px}.blueprint-summary-grid{grid-template-columns:1fr}.blueprint-summary-grid>div:last-child{grid-column:auto}.blueprint-actions form,.blueprint-actions .btn{width:100%}}

/* ======================================================================
   Hikayati V9.2 — Human Blueprint Editing + Skill Mapping + Book Reset
   ====================================================================== */
.blueprint-human-note{margin-bottom:16px}.blueprint-editor-form{display:grid;gap:16px}.blueprint-editor-pages{display:grid;gap:10px}.blueprint-edit-page{border:1px solid var(--line);border-radius:16px;background:var(--surface);overflow:hidden}.blueprint-edit-page>summary{min-height:58px;padding:12px 15px;display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none}.blueprint-edit-page>summary::-webkit-details-marker{display:none}.blueprint-edit-page>summary strong{flex:1}.blueprint-edit-page-body{padding:14px;border-top:1px solid var(--line);background:var(--surface-2)}.blueprint-cover-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.blueprint-cover-editor{border:1px solid var(--line);border-radius:16px;padding:14px;background:var(--surface-2);display:grid;gap:10px}.blueprint-cover-editor h3{margin:0 0 4px}.sticky-blueprint-save{position:sticky;bottom:12px;z-index:20;padding:12px;border:1px solid var(--line);border-radius:16px;background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(12px)}
.product-skill-cell{min-width:230px}.compact-skill-toggle{margin-top:7px}.ai-product-enable{align-self:end}.production-book-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.customer-edit-production-warning{margin:12px 0}.customer-edit-v92 .optional-customizations{margin-top:12px}.customer-edit-v92 .character-person-card,.order-edit-v92 .character-person-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border:1px solid var(--line);border-radius:14px;padding:12px;margin-top:10px}.customer-edit-v92 .imaginary-character-toggle,.order-edit-v92 .imaginary-character-toggle{grid-column:1/-1}.customer-edit-v92 .char-desc textarea,.order-edit-v92 .char-desc textarea{min-height:76px}.order-edit-v92 .style-example-strip{margin-bottom:10px}
@media(max-width:760px){.blueprint-cover-grid{grid-template-columns:1fr}.blueprint-edit-page-body{grid-template-columns:1fr!important}.blueprint-edit-page-body .span-2{grid-column:auto!important}.product-skill-cell{min-width:190px}.production-book-head-actions{width:100%;justify-content:space-between}.customer-edit-v92 .character-person-card,.order-edit-v92 .character-person-card{grid-template-columns:1fr}.sticky-blueprint-save{bottom:8px}.blueprint-editor-form textarea{font-size:15px}}

/* ======================================================================
   Hikayati production orchestration and manual approval
   ====================================================================== */
.production-test-state{display:block;margin-top:5px;font-size:11px;font-weight:850}.production-test-state.ok{color:#16866f}.production-test-state.wait{color:var(--muted)}
.production-book-live{margin:10px 0;padding:10px 12px;border:1px solid color-mix(in srgb,#4eb6bf 38%,var(--line));border-radius:12px;background:color-mix(in srgb,#4eb6bf 9%,var(--surface));font-size:12px}.production-book-live[hidden]{display:none!important}
.production-approval-summary{margin:8px 0 12px;padding:9px 11px;border-radius:11px;background:var(--surface-2);border:1px solid var(--line);font-size:12px;color:var(--muted)}
.production-print-state{margin-top:7px;font-size:10px;line-height:1.55;color:var(--muted);font-weight:750}.page-approved-production{border-color:color-mix(in srgb,#24b38a 45%,var(--line))!important;box-shadow:0 0 0 1px color-mix(in srgb,#24b38a 12%,transparent) inset}.page-approved-production .page-thumb{outline:2px solid color-mix(in srgb,#24b38a 35%,transparent);outline-offset:-2px}
.production-actions{flex-wrap:wrap}.page-file-actions[hidden],.production-page-approve[hidden],.production-restore-source[hidden],.production-pdf-authorize[hidden],.production-batch-stop[hidden]{display:none!important}
.production-live-notice{position:sticky;top:10px;z-index:60;margin-bottom:12px;box-shadow:0 10px 25px rgba(0,0,0,.08)}
.pdf-output-card[data-pdf-card]{border-color:color-mix(in srgb,#6d5dfc 22%,var(--line))}
@media(max-width:720px){.production-actions .btn{flex:1 1 auto}.production-approval-summary{line-height:1.8}.production-book-live{line-height:1.7}}

/* ===== V9.5.3 — Production UX polish ===== */
.production-page-action-shell{display:grid;gap:8px;margin-top:11px;padding-top:11px;border-top:1px solid var(--line)}
.production-primary-action,.production-approval-action{display:grid}
.production-primary-action .btn,.production-approval-action .btn,.production-primary-disabled{width:100%;min-height:42px}
.production-primary-action .btn{font-weight:900;letter-spacing:.1px}
.production-review-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.production-review-actions[hidden]{display:none!important}
.production-review-btn{background:var(--surface-2);border-color:var(--line);min-height:36px}
.production-secondary-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.production-secondary-actions .btn{min-width:0;white-space:normal;line-height:1.35;min-height:36px;padding-inline:8px}
.production-secondary-actions .production-restore-source{grid-column:1/-1}
.production-page-action-shell .btn:hover{transform:translateY(-1px)}

.production-ai-state{display:inline-flex!important;align-items:center;gap:5px;width:max-content;max-width:100%;margin-top:9px!important;padding:5px 9px;border-radius:999px;font-size:10px!important;font-weight:800;border:1px solid transparent;line-height:1.35}
.production-ai-state strong{font-size:10px}
.production-ai-state .ai-state-count{opacity:.78;font-weight:700}
.ai-state-dot{width:7px;height:7px;border-radius:999px;flex:0 0 7px;background:currentColor}
.ai-state-warning{background:var(--warning-bg);color:var(--warning)!important;border-color:color-mix(in srgb,var(--warning) 22%,var(--line))}
.ai-state-success{background:var(--success-bg);color:var(--success)!important;border-color:color-mix(in srgb,var(--success) 20%,var(--line))}
.ai-state-danger{background:var(--danger-bg);color:var(--danger)!important;border-color:color-mix(in srgb,var(--danger) 20%,var(--line))}
.ai-state-muted{background:var(--surface-2);color:var(--muted)!important;border-color:var(--line)}
.ai-state-warning .ai-state-dot{animation:hikayatiAiDotPulse 1.15s ease-in-out infinite}
.page-ai-busy{border-color:color-mix(in srgb,var(--brand) 55%,var(--line))!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 10%,transparent),var(--shadow)}

.production-focus-action{position:relative;isolation:isolate;transition:transform .16s ease,box-shadow .16s ease,filter .16s ease,border-color .16s ease}
.production-focus-action:focus-visible{outline:0;box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 26%,transparent),0 0 0 1px var(--brand)}
.production-focus-action.is-working,.production-focus-action.is-working:disabled{opacity:1!important;cursor:progress!important;filter:saturate(1.08);box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 18%,transparent),0 8px 24px color-mix(in srgb,var(--brand) 18%,transparent);animation:hikayatiWorkingFocus 1.35s ease-in-out infinite}
.production-focus-action.is-working::after{content:"";position:absolute;inset:-4px;border-radius:14px;border:2px solid color-mix(in srgb,#fff 52%,transparent);pointer-events:none}
.production-bulk-approve.btn-success:disabled{opacity:1;cursor:default}

@keyframes hikayatiWorkingFocus{0%,100%{box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 16%,transparent),0 7px 20px color-mix(in srgb,var(--brand) 12%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--brand) 23%,transparent),0 10px 28px color-mix(in srgb,var(--brand) 20%,transparent)}}
@keyframes hikayatiAiDotPulse{0%,100%{opacity:.42;transform:scale(.84)}50%{opacity:1;transform:scale(1.22)}}

@media(max-width:720px){
  .production-book-head-actions{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}
  .production-book-head-actions .progress-number{grid-column:1/-1}
  .production-book-head-actions form{grid-column:1/-1}
  .production-book-head-actions form .btn{width:100%}
  .production-secondary-actions{grid-template-columns:1fr 1fr}
}
@media(max-width:420px){
  .production-book-head-actions{grid-template-columns:1fr}
  .production-book-head-actions .progress-number,.production-book-head-actions form{grid-column:auto}
  .production-secondary-actions{grid-template-columns:1fr}
  .production-secondary-actions .production-restore-source{grid-column:auto}
}

/* ======================================================================
   Hikayati V9.5.6 — production actions accordion + unified edit UX
   ====================================================================== */

/* Compact page action accordion */
.production-action-accordion{
  width:100%;margin-top:8px;border:1px solid color-mix(in srgb,var(--navy) 16%,var(--line));
  border-radius:14px;background:color-mix(in srgb,var(--surface-2) 78%,var(--surface));overflow:hidden;
}
.production-action-accordion>summary{
  list-style:none;display:grid;grid-template-columns:28px auto minmax(0,1fr) 12px;align-items:center;gap:8px;
  min-height:44px;padding:8px 10px;cursor:pointer;user-select:none;color:var(--text);outline:0;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.production-action-accordion>summary::-webkit-details-marker{display:none}
.production-action-accordion>summary::marker{content:""}
.production-action-accordion>summary:hover{
  background:color-mix(in srgb,var(--teal) 9%,var(--surface));
}
.production-action-accordion>summary:focus-visible{
  box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--teal) 65%,transparent);
  background:color-mix(in srgb,var(--teal) 10%,var(--surface));
}
.production-action-accordion[open]{border-color:color-mix(in srgb,var(--teal) 42%,var(--line));box-shadow:0 7px 18px rgba(13,50,84,.08)}
.production-action-accordion[open]>summary{background:color-mix(in srgb,var(--teal) 8%,var(--surface));border-bottom:1px solid color-mix(in srgb,var(--teal) 25%,var(--line))}
.production-action-accordion>summary strong{font-size:12px;font-weight:950;white-space:nowrap}
.production-action-accordion>summary small{font-size:9px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.production-action-accordion>summary i{width:9px;height:9px;border-inline-end:2px solid var(--muted);border-block-end:2px solid var(--muted);transform:rotate(45deg);transition:transform .18s ease}
.production-action-accordion[open]>summary i{transform:rotate(225deg)}
.production-action-accordion-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:color-mix(in srgb,var(--navy) 8%,var(--surface));border:1px solid var(--line);font-size:13px}
.production-action-accordion-body{display:grid;gap:8px;padding:9px;background:var(--surface)}
.production-action-accordion-body .production-review-actions,
.production-action-accordion-body .production-secondary-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important;margin:0!important}
.production-action-accordion-body .production-approval-action{margin:0!important}
.production-action-accordion-body .btn{min-height:36px!important;border-radius:10px!important;font-size:10px!important;font-weight:900!important;transition:transform .14s ease,box-shadow .14s ease,background .14s ease,border-color .14s ease!important}
.production-action-accordion-body .btn:hover{transform:translateY(-1px)}
.production-action-accordion-body .btn:focus-visible{outline:0!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--teal) 27%,transparent)!important}
.production-action-accordion-body .action-tone-preview{background:color-mix(in srgb,#4a8ee8 9%,var(--surface))!important;border-color:color-mix(in srgb,#4a8ee8 30%,var(--line))!important;color:color-mix(in srgb,#3174ce 82%,var(--text))!important}
.production-action-accordion-body .action-tone-download{background:color-mix(in srgb,#2fb9ad 9%,var(--surface))!important;border-color:color-mix(in srgb,#2fb9ad 30%,var(--line))!important;color:color-mix(in srgb,#198d84 82%,var(--text))!important}
.production-action-accordion-body .action-tone-prompt{background:color-mix(in srgb,#e4ae2b 10%,var(--surface))!important;border-color:color-mix(in srgb,#e4ae2b 34%,var(--line))!important;color:color-mix(in srgb,#9b7412 82%,var(--text))!important}
.production-action-accordion-body .action-tone-edit{background:color-mix(in srgb,#8b6ee8 9%,var(--surface))!important;border-color:color-mix(in srgb,#8b6ee8 30%,var(--line))!important;color:color-mix(in srgb,#7256cc 84%,var(--text))!important}
.production-action-accordion-body .action-tone-upload{background:color-mix(in srgb,#7890a8 9%,var(--surface))!important;border-color:color-mix(in srgb,#7890a8 28%,var(--line))!important;color:var(--text)!important}
.production-action-accordion-body .action-tone-restore{background:color-mix(in srgb,#e47562 9%,var(--surface))!important;border-color:color-mix(in srgb,#e47562 28%,var(--line))!important;color:color-mix(in srgb,#c55443 84%,var(--text))!important}
.production-action-accordion-body .action-tone-approve{width:100%!important;min-height:39px!important}

/* Unified editing language: customer edit + dashboard edit follow the same visual hierarchy */
.unified-order-editor-v956{display:grid;gap:14px}
.customer-edit-unified-v956 .customer-hero-v71{margin-bottom:12px}
.unified-order-editor-v956>.customer-form-section,
.unified-order-editor-v956>.form-card{
  border:1px solid color-mix(in srgb,var(--navy) 12%,var(--line))!important;border-radius:18px!important;
  background:var(--surface)!important;box-shadow:0 9px 26px rgba(14,37,69,.06)!important;padding:14px!important;
}
.unified-order-editor-v956 .customer-section-title>span,
.unified-order-editor-v956 .section-title>span{
  width:38px!important;height:38px!important;flex:0 0 38px!important;display:grid!important;place-items:center!important;
  background:#ffd12a!important;color:#17345a!important;border:1px solid #ffc21a!important;border-radius:12px!important;
  box-shadow:0 5px 14px rgba(255,193,7,.20)!important;font-weight:950!important;
}
.unified-order-editor-v956 .book-builder-card{
  border:1px solid color-mix(in srgb,var(--gold) 42%,var(--line))!important;border-radius:17px!important;
  background:var(--surface)!important;overflow:hidden!important;box-shadow:0 7px 20px rgba(15,39,70,.06)!important;margin-bottom:10px!important;
}
.unified-order-editor-v956 .book-builder-card>summary{
  min-height:64px!important;padding:10px 12px!important;background:linear-gradient(118deg,#ffe58a 0%,#ffd04f 64%,#ffbc42 100%)!important;
  color:#17345a!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;gap:5px 9px!important;
}
.unified-order-editor-v956 .book-builder-card>summary .book-number{background:#fc6f5c!important;color:#fff!important;border:0!important;border-radius:999px!important;padding:4px 8px!important;font-size:10px!important;font-weight:950!important}
.unified-order-editor-v956 .book-builder-card>summary .book-live-title{font-size:15px!important;font-weight:950!important;color:#17345a!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.unified-order-editor-v956 .book-builder-card>summary .book-summary-product{grid-column:2/3!important;color:#355675!important;font-size:10px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.unified-order-editor-v956 .book-accordion-body{padding:13px!important}
.unified-order-editor-v956 .child-compact-grid,
.unified-order-editor-v956 .form-grid.cols-2{gap:10px!important}
.unified-order-editor-v956 label>span{font-weight:850!important}
.unified-order-editor-v956 input,
.unified-order-editor-v956 select,
.unified-order-editor-v956 textarea{border-radius:11px!important}
.unified-order-editor-v956 .style-picker-block{margin:12px 0 4px!important;padding:11px!important;border:1px solid color-mix(in srgb,var(--teal) 24%,var(--line))!important;border-radius:15px!important;background:color-mix(in srgb,var(--teal) 4%,var(--surface-2))!important}
.unified-order-editor-v956 .style-example-strip{display:flex!important;gap:8px!important;overflow-x:auto!important;padding:3px 1px 7px!important;scroll-snap-type:x proximity}
.unified-order-editor-v956 .style-example-card{flex:0 0 98px!important;scroll-snap-align:start;border-radius:12px!important;overflow:hidden!important;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease!important}
.unified-order-editor-v956 .style-example-card:hover{transform:translateY(-2px)!important;border-color:color-mix(in srgb,var(--teal) 55%,var(--line))!important;box-shadow:0 7px 16px rgba(25,88,112,.12)!important}
.unified-order-editor-v956 .style-example-card.selected{border-color:var(--gold)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--gold) 28%,transparent)!important}
.unified-order-editor-v956 .optional-customizations{width:100%!important;margin-top:13px!important;border:1px solid color-mix(in srgb,var(--teal) 52%,var(--line))!important;border-radius:16px!important;background:color-mix(in srgb,var(--teal) 5%,var(--surface))!important;overflow:hidden!important}
.unified-order-editor-v956 .optional-customizations>summary{min-height:60px!important;padding:11px 13px!important}
.unified-order-editor-v956 .optional-customizations-body{padding:12px!important;border-top:1px solid color-mix(in srgb,var(--teal) 25%,var(--line))!important}
.unified-order-editor-v956 input[type=file]{padding:8px!important;background:var(--surface-2)!important;border:1px dashed color-mix(in srgb,var(--teal) 38%,var(--line))!important}
.unified-order-editor-v956 .book-price-strip{margin-top:11px!important;border-radius:13px!important}
.ai-total-spend-card{border-color:color-mix(in srgb,var(--gold) 40%,var(--line))!important;background:linear-gradient(135deg,color-mix(in srgb,var(--gold) 10%,var(--surface)),var(--surface))!important}
.ai-total-spend-card strong{font-size:24px!important}

@media(max-width:640px){
  .production-action-accordion>summary{grid-template-columns:26px auto minmax(0,1fr) 10px;padding:7px 8px}
  .production-action-accordion>summary small{font-size:8px}
  .unified-order-editor-v956>.customer-form-section,.unified-order-editor-v956>.form-card{padding:10px!important;border-radius:15px!important}
  .unified-order-editor-v956 .book-builder-card>summary{grid-template-columns:auto minmax(0,1fr)!important}
  .unified-order-editor-v956 .book-builder-card>summary .book-summary-product{grid-column:1/-1!important;padding-inline-start:0!important}
}
.pdf-local-cost-note{display:inline-flex;align-items:center;gap:5px;margin:4px 0 7px;padding:5px 8px;border-radius:999px;background:color-mix(in srgb,var(--success) 9%,var(--surface));border:1px solid color-mix(in srgb,var(--success) 25%,var(--line));color:color-mix(in srgb,var(--success) 76%,var(--text));font-size:10px;font-weight:900}

/* V9.5.11 — QR / prompt reference / invoice dates */
.production-book-qr-card{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:10px 0 14px;padding:12px 14px;border:1px dashed var(--border);border-radius:14px;background:var(--soft-bg,#f7f9fc)}
.production-book-qr-card>div:first-child{display:grid;gap:2px;min-width:220px;flex:1}.production-book-qr-card small{opacity:.72}.qr-mini-preview{width:48px;height:48px;border-radius:10px;overflow:hidden;border:1px solid var(--border);background:#fff;display:grid;place-items:center}.qr-mini-preview img{width:100%;height:100%;object-fit:contain}.qr-upload-inline{margin:0}.page-ref-upload-btn{position:relative;overflow:hidden}.ai-prompt-actions-v9511{align-items:center;gap:10px;flex-wrap:wrap}.invoice-dates-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 14px}.invoice-dates-strip>div{display:flex;justify-content:space-between;gap:16px;padding:10px 12px;border:1px solid #e3e8ef;border-radius:12px;background:#fafbfd}.invoice-dates-strip span{font-size:12px;opacity:.7}.invoice-dates-strip strong{font-size:13px}
@media(max-width:680px){.invoice-dates-strip{grid-template-columns:1fr}.production-book-qr-card{align-items:flex-start}}
.qr-upload-inline .btn{position:relative;overflow:hidden}

/* ================================================================
   HIKAYATI V10.0.0 — PROFESSIONAL UX FOUNDATION
   Full-width admin workspace · RTL/LTR · Light/Dark · Mobile-first
   ================================================================ */

/* Wider working canvas: products, orders and production should use the screen. */
.container{width:min(1720px,calc(100% - 24px));max-width:none!important}
.page-shell{padding-inline:0!important}
.panel{min-width:0}
html[dir="rtl"] .ltr-cell,html[dir="rtl"] [dir="ltr"]{unicode-bidi:plaintext}

/* -------- Universal professional tables -------- */
.table-wrap{max-width:100%;overflow-x:hidden!important}
.professional-fit-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;border-collapse:separate;border-spacing:0}
.professional-fit-table th,.professional-fit-table td{min-width:0!important;max-width:none;white-space:normal!important;overflow-wrap:anywhere;word-break:normal;vertical-align:middle;line-height:1.45;padding:10px 9px}
.professional-fit-table th{font-size:11px;letter-spacing:.01em}
.professional-fit-table td{font-size:12px}
.professional-fit-table td small{display:block;margin-top:3px;color:var(--muted);line-height:1.4}
.smart-table-scroll-v100{position:relative;max-height:min(68vh,720px);overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:thin;overscroll-behavior:contain;border:1px solid var(--line);border-radius:14px}
.smart-table-scroll-v100 table thead{position:sticky;inset-block-start:0;z-index:4;background:var(--surface)}
.smart-table-scroll-v100 table thead th{background:color-mix(in srgb,var(--surface) 94%,var(--surface-2));box-shadow:0 1px 0 var(--line)}
.smart-table-controls-v100{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 7px;padding-inline:2px;color:var(--muted)}
.smart-table-controls-v100 small{font-size:10px;font-weight:800}
.smart-table-controls-v100 .btn{width:34px;height:30px;padding:0;font-size:16px}

/* -------- Orders -------- */
.orders-heading-v100{align-items:flex-end}
.professional-filter-bar{display:grid!important;grid-template-columns:minmax(260px,1.7fr) repeat(5,minmax(130px,.72fr)) auto;gap:9px;align-items:end;margin-bottom:14px}
.professional-filter-bar label{display:grid;gap:5px;min-width:0}
.professional-filter-bar label>span{font-size:10px;font-weight:850;color:var(--muted)}
.professional-filter-bar input,.professional-filter-bar select{width:100%;min-width:0}
.professional-filter-bar .filter-actions{display:flex;gap:7px;align-items:center;white-space:nowrap}
.orders-bulk-v100{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;margin-bottom:10px;position:sticky;inset-block-start:78px;z-index:8;background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(12px)}
.orders-bulk-v100>div:first-child{display:grid;gap:2px}.orders-bulk-v100 span{font-size:10px;color:var(--muted)}
.orders-table-panel-v100{padding:12px!important}
.orders-table.professional-fit-table th:nth-child(1),.orders-table.professional-fit-table td:nth-child(1){width:3%}
.orders-table.professional-fit-table th:nth-child(2),.orders-table.professional-fit-table td:nth-child(2){width:8%}
.orders-table.professional-fit-table th:nth-child(3),.orders-table.professional-fit-table td:nth-child(3){width:10%}
.orders-table.professional-fit-table th:nth-child(4),.orders-table.professional-fit-table td:nth-child(4){width:7%}
.orders-table.professional-fit-table th:nth-child(5),.orders-table.professional-fit-table td:nth-child(5){width:11%}
.orders-table.professional-fit-table th:nth-child(6),.orders-table.professional-fit-table td:nth-child(6){width:14%}
.orders-table.professional-fit-table th:nth-child(7),.orders-table.professional-fit-table td:nth-child(7),.orders-table.professional-fit-table th:nth-child(8),.orders-table.professional-fit-table td:nth-child(8){width:7%}
.orders-table.professional-fit-table th:nth-child(9),.orders-table.professional-fit-table td:nth-child(9){width:8%}
.orders-table.professional-fit-table th:nth-child(10),.orders-table.professional-fit-table td:nth-child(10){width:7%}
.orders-table.professional-fit-table th:nth-child(11),.orders-table.professional-fit-table td:nth-child(11){width:8%}
.orders-table.professional-fit-table th:nth-child(12),.orders-table.professional-fit-table td:nth-child(12){width:16%}
.orders-address-cell{color:var(--muted)}
.order-row-actions{gap:5px!important}.order-row-actions .btn{padding:6px 8px!important;font-size:10px!important}.order-row-actions form{margin:0}
.badge.status-new{background:color-mix(in srgb,#e54a4a 18%,var(--surface));border-color:color-mix(in srgb,#e54a4a 38%,var(--line));color:#e54a4a}
.badge.status-shipping{background:color-mix(in srgb,#28aa73 18%,var(--surface));border-color:color-mix(in srgb,#28aa73 38%,var(--line));color:#28aa73}
.badge.status-delivered{background:color-mix(in srgb,#17885b 20%,var(--surface));border-color:color-mix(in srgb,#17885b 42%,var(--line));color:#17885b}

/* -------- CRM -------- */
.crm-table.professional-fit-table th:nth-child(1){width:14%}.crm-table.professional-fit-table th:nth-child(2){width:12%}.crm-table.professional-fit-table th:nth-child(3){width:10%}.crm-table.professional-fit-table th:nth-child(4){width:22%}.crm-table.professional-fit-table th:nth-child(5){width:8%}.crm-table.professional-fit-table th:nth-child(6){width:11%}.crm-table.professional-fit-table th:nth-child(7){width:10%}.crm-table.professional-fit-table th:nth-child(8){width:13%}
.crm-layout{align-items:start}.crm-detail{position:sticky;inset-block-start:86px}

/* -------- Employee sales / commission foundation -------- */
.employee-report-v100{margin-bottom:16px;border-color:color-mix(in srgb,var(--gold) 24%,var(--line))}
.employee-report-stats{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:13px}
.team-card-head>div:last-child{min-width:0}.team-card-head .btn{margin-top:6px}

/* -------- AI settings: less visual noise -------- */
.ai-generation-form-v100{display:grid;gap:10px}
.settings-accordion-v100,.compact-info-details,.field-details-v100{border:1px solid var(--line);border-radius:14px;background:var(--surface-2);overflow:hidden}
.settings-accordion-v100>summary{cursor:pointer;list-style:none;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.settings-accordion-v100>summary::-webkit-details-marker,.compact-info-details>summary::-webkit-details-marker,.field-details-v100>summary::-webkit-details-marker{display:none}
.settings-accordion-v100>summary:after{content:"⌄";font-size:18px;color:var(--muted);transition:transform .18s ease}.settings-accordion-v100[open]>summary:after{transform:rotate(180deg)}
.settings-accordion-v100>summary span{display:grid;gap:2px}.settings-accordion-v100>summary strong{font-size:13px}.settings-accordion-v100>summary small{font-size:10px;color:var(--muted)}
.settings-accordion-body-v100{padding:12px;border-top:1px solid var(--line);background:color-mix(in srgb,var(--surface) 70%,transparent)}
.compact-info-details{grid-column:1/-1!important;background:color-mix(in srgb,var(--surface) 86%,transparent)}
.compact-info-details>summary,.field-details-v100>summary{cursor:pointer;padding:9px 11px;font-size:10px;font-weight:850;color:var(--muted)}
.compact-info-details p,.field-details-v100 small{display:block;margin:0;padding:0 11px 10px;line-height:1.65;color:var(--muted);font-size:10px}
.field-details-v100{margin-top:6px}.field-details-v100>summary{padding:7px 9px}
.ai-usage-filters-v100{grid-template-columns:minmax(220px,1.5fr) minmax(130px,.5fr) minmax(170px,.7fr) auto!important}

/* -------- Order view: one workspace per book -------- */
.order-admin-strip-v100{grid-template-columns:1fr!important;margin-bottom:12px}
.order-admin-strip-v100 .detail-side{width:100%;display:grid;grid-template-columns:minmax(220px,1.1fr) repeat(4,minmax(120px,.55fr));gap:10px;align-items:center}
.order-admin-strip-v100 .detail-side>h2{grid-column:1/-1;margin-bottom:0}.order-admin-strip-v100 .detail-side>form.form-stack{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:8px;align-items:end}.order-admin-strip-v100 .detail-side>form.form-stack .btn{align-self:end}.order-admin-strip-v100 .detail-side>hr{display:none}.order-admin-strip-v100 .mini-info{margin:0}
.book-workspaces-panel-v100{display:grid;gap:11px;margin:14px 0}
.book-workspaces-head-v100{display:flex;align-items:flex-end;justify-content:space-between;padding:0 3px}.book-workspaces-head-v100 h2{margin:2px 0 3px}.book-workspaces-head-v100 p:not(.eyebrow){margin:0;color:var(--muted);font-size:11px}
.book-workspace-v100{border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 7px 28px color-mix(in srgb,#000 7%,transparent);overflow:hidden}
.book-workspace-v100>summary{list-style:none;cursor:pointer}.book-workspace-v100>summary::-webkit-details-marker{display:none}
.book-workspace-summary-v100{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;align-items:center;padding:13px 15px;background:linear-gradient(135deg,color-mix(in srgb,var(--gold) 7%,var(--surface)),color-mix(in srgb,#4eb6bf 5%,var(--surface)))}
.book-workspace-index-v100{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:color-mix(in srgb,var(--gold) 16%,var(--surface));color:var(--gold);font-weight:950;font-size:14px;border:1px solid color-mix(in srgb,var(--gold) 28%,var(--line))}
.book-workspace-title-v100{display:grid;gap:2px;min-width:0}.book-workspace-title-v100 strong{font-size:15px}.book-workspace-title-v100 small{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.book-workspace-meta-v100{display:grid;justify-items:end;gap:2px}.book-workspace-meta-v100 b{font-size:12px;color:var(--gold)}.book-workspace-meta-v100 small{font-size:9px;color:var(--muted)}
.book-workspace-body-v100{display:grid;gap:9px;padding:10px;border-top:1px solid var(--line)}
.book-workspace-section-v100{border:1px solid var(--line)!important;border-radius:14px!important;background:var(--surface-2)!important;overflow:hidden!important;margin:0!important}
.book-workspace-section-v100>summary{list-style:none;cursor:pointer;padding:11px 13px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;background:transparent!important}
.book-workspace-section-v100>summary::-webkit-details-marker{display:none}.book-workspace-section-v100>summary strong{font-size:12px!important}.book-workspace-section-v100>summary small{font-size:9px!important;color:var(--muted)!important;font-weight:600!important}
.book-workspace-section-v100[open]>summary{border-bottom:1px solid var(--line)}
.book-workspace-section-v100 .book-accordion-body{padding:11px!important}
.book-production-section-v100>.production-book-block{border:0!important;border-radius:0!important;box-shadow:none!important;margin:0!important;padding:10px!important;background:transparent!important}
.book-ai-cost-v100{display:grid;gap:1px;padding:6px 9px;border-radius:10px;background:color-mix(in srgb,var(--gold) 10%,var(--surface));border:1px solid color-mix(in srgb,var(--gold) 24%,var(--line));min-width:105px}.book-ai-cost-v100 span{font-size:8px;color:var(--muted);font-weight:800}.book-ai-cost-v100 strong{font-size:12px;color:var(--gold)}
.inline-long-details-v100{border:1px dashed var(--line);border-radius:10px;background:var(--surface);margin-top:7px;overflow:hidden}.inline-long-details-v100>summary{cursor:pointer;padding:8px 10px;font-size:10px;font-weight:900;color:var(--muted)}.inline-long-details-v100>p{margin:0;padding:0 10px 10px;font-size:11px;line-height:1.7}
.order-customer-invoice-v100{margin-top:14px}.customer-link-panel#orderCustomerLinks{margin-top:10px}

/* Production page cards: clearer primary actions without visual clutter. */
.production-pages{gap:12px!important}.production-pages .page-card{border-radius:16px!important;overflow:hidden;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}.production-pages .page-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px color-mix(in srgb,#000 8%,transparent)}
.production-primary-action .production-direct-generate{min-height:40px!important;border-radius:11px!important;font-size:11px!important;font-weight:950!important;letter-spacing:.01em;box-shadow:0 6px 16px color-mix(in srgb,#4b73ff 20%,transparent)}
.production-primary-action .production-direct-generate:not(:disabled):before{content:"✦";margin-inline-end:5px;font-size:12px}.production-primary-action .production-direct-generate.is-working:before{content:"◌";display:inline-block;animation:hikayatiSpin .85s linear infinite}
@keyframes hikayatiSpin{to{transform:rotate(360deg)}}
.production-action-accordion{margin-top:8px!important;border-radius:12px!important;border:1px solid var(--line)!important;background:var(--surface-2)!important}.production-action-accordion>summary{min-height:42px!important;padding:9px 11px!important;font-size:11px!important}.production-action-accordion-icon{width:26px;height:26px;border-radius:8px;display:grid!important;place-items:center;background:color-mix(in srgb,var(--gold) 12%,var(--surface));color:var(--gold);font-size:12px!important}.production-action-accordion-body{padding:9px!important}.production-secondary-actions{gap:6px!important}.production-secondary-actions .btn,.production-review-actions .btn{border-radius:9px!important;font-size:10px!important}
.pdf-output-card{border-radius:15px!important;padding:13px!important;background:linear-gradient(135deg,color-mix(in srgb,var(--surface-2) 90%,transparent),color-mix(in srgb,var(--gold) 5%,var(--surface)))!important}.pdf-output-card h3{font-size:14px!important}.pdf-output-card p{font-size:10px!important;line-height:1.55}.pdf-output-card .output-actions{gap:6px!important}

/* AI test page compactness / clarity. */
.ai-test-layout{align-items:start!important}.ai-test-main,.ai-test-side .panel{border-radius:16px!important}.ai-run-summary{gap:8px!important}.ai-test-form textarea{min-height:150px;max-height:360px;resize:vertical}.ai-test-side{position:sticky;inset-block-start:82px}.ai-ref-grid figure{border-radius:11px!important;overflow:hidden}

/* -------- Responsive / Mobile: no off-screen tables -------- */
@media(max-width:1180px){
  .container{width:calc(100% - 16px)!important}
  .professional-filter-bar{grid-template-columns:repeat(3,minmax(0,1fr))!important}.professional-filter-bar .filter-search{grid-column:span 2}.professional-filter-bar .filter-actions{grid-column:auto}
  .order-admin-strip-v100 .detail-side{grid-template-columns:repeat(3,minmax(0,1fr))}.order-admin-strip-v100 .detail-side>form.form-stack{grid-column:1/-1}
}
@media(max-width:820px){
  .container{width:calc(100% - 12px)!important}
  .page-shell{padding-inline:0!important}
  .professional-filter-bar,.ai-usage-filters-v100{grid-template-columns:1fr 1fr!important;gap:7px!important}.professional-filter-bar .filter-search{grid-column:1/-1}.professional-filter-bar .filter-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.professional-filter-bar .filter-actions .btn{width:100%}
  .orders-bulk-v100{inset-block-start:64px;display:grid;grid-template-columns:1fr;padding:9px}.orders-bulk-v100 .row-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.orders-bulk-v100 .btn{width:100%}
  .smart-table-controls-v100{margin-block:3px 6px}.smart-table-scroll-v100{max-height:none!important;overflow:visible!important;border:0!important;background:transparent!important}
  .table-wrap{overflow:visible!important;border-radius:0!important}
  .professional-fit-table,.professional-fit-table tbody{display:block!important;width:100%!important}
  .professional-fit-table thead{display:none!important}
  .professional-fit-table tbody tr{display:grid!important;grid-template-columns:1fr!important;gap:0;margin-bottom:9px;border:1px solid var(--line);border-radius:13px;background:var(--surface);overflow:hidden;box-shadow:0 4px 14px color-mix(in srgb,#000 5%,transparent)}
  .professional-fit-table tbody td{display:grid!important;grid-template-columns:minmax(92px,34%) minmax(0,1fr)!important;gap:9px;align-items:start;width:100%!important;max-width:none!important;padding:8px 10px!important;border:0!important;border-bottom:1px solid color-mix(in srgb,var(--line) 74%,transparent)!important;text-align:start!important}
  .professional-fit-table tbody td:last-child{border-bottom:0!important}
  .professional-fit-table tbody td::before{content:attr(data-label);font-size:9px;font-weight:900;color:var(--muted);line-height:1.45}
  .professional-fit-table tbody td.check-col{grid-template-columns:1fr!important;background:var(--surface-2)}.professional-fit-table tbody td.check-col::before{display:none}.professional-fit-table tbody td.check-col input{justify-self:end}
  .professional-fit-table .row-actions{justify-content:flex-start!important;gap:5px!important}.professional-fit-table .row-actions .btn{flex:1 1 auto;min-width:64px;text-align:center}
  .crm-layout{grid-template-columns:1fr!important}.crm-detail{position:static!important}
  .employee-report-stats{grid-template-columns:1fr 1fr!important}
  .order-admin-strip-v100 .detail-side{display:block!important}.order-admin-strip-v100 .detail-side>form.form-stack{display:grid!important;grid-template-columns:1fr 1fr!important}.order-admin-strip-v100 .mini-info{margin-top:7px!important}
  .book-workspace-summary-v100{grid-template-columns:34px minmax(0,1fr)!important;padding:11px!important}.book-workspace-index-v100{width:30px;height:30px}.book-workspace-meta-v100{grid-column:2;justify-items:start;display:flex;gap:8px;align-items:center}.book-workspace-title-v100 strong{font-size:13px}.book-workspace-body-v100{padding:7px;gap:7px}.book-workspace-section-v100>summary{padding:10px!important}.book-workspace-section-v100>summary small{max-width:50%;text-align:end}.book-production-section-v100>.production-book-block{padding:7px!important}
  .production-book-head{gap:8px!important}.production-book-head-actions{justify-content:flex-start!important}.book-ai-cost-v100{min-width:96px}.production-pages{grid-template-columns:1fr 1fr!important}.production-primary-action .production-direct-generate{width:100%!important}.production-action-accordion-body{padding:8px!important}
  .ai-test-layout{grid-template-columns:1fr!important}.ai-test-side{position:static!important}.ai-prompt-actions-v9511{display:grid!important;grid-template-columns:1fr!important}.ai-prompt-actions-v9511 .btn{width:100%!important}
}
@media(max-width:560px){
  .professional-filter-bar,.ai-usage-filters-v100{grid-template-columns:1fr!important}.professional-filter-bar .filter-search,.professional-filter-bar .filter-actions{grid-column:auto!important}
  .professional-filter-bar .filter-actions{grid-template-columns:1fr 1fr}
  .orders-heading-v100{display:grid!important;gap:9px}.orders-heading-v100 .row-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.orders-heading-v100 .btn{width:100%;text-align:center}
  .orders-bulk-v100 .row-actions{grid-template-columns:1fr}
  .employee-report-stats{grid-template-columns:1fr!important}
  .order-admin-strip-v100 .detail-side>form.form-stack{grid-template-columns:1fr!important}
  .book-workspaces-head-v100 p:not(.eyebrow){display:none}.book-workspace-section-v100>summary small{display:none}.production-pages{grid-template-columns:1fr!important}.production-book-head-actions{width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important}.production-book-head-actions>form,.production-book-head-actions>.btn{width:100%!important}.production-book-head-actions .btn{width:100%!important}.book-ai-cost-v100{width:100%}
  .settings-accordion-body-v100{grid-template-columns:1fr!important}.compact-info-details{grid-column:auto!important}
}
@media(min-width:821px){body.page-index .container{width:min(1180px,calc(100% - 36px))!important}}
@media(min-width:821px){
  body.page-index .professional-fit-table{table-layout:auto!important}
  body.page-index .smart-table-scroll-v100{border:0!important;border-radius:12px;max-height:420px}
}

/* ================================================================
   HIKAYATI V10.0.1 — UX MAINTENANCE HOTFIX
   Dashboard width · CRM fit · reporting ranges · dark-mode hardening
   ================================================================ */

/* Dashboard now follows the same wide professional workspace as the rest of admin. */
@media(min-width:821px){
  body.page-index .container{width:min(1720px,calc(100% - 24px))!important;max-width:none!important}
}

/* CRM: customer list always gets the full canvas; opened customer details flow below. */
body.page-crm .crm-layout{grid-template-columns:1fr!important;gap:14px!important}
body.page-crm .crm-detail{position:static!important;width:100%;min-width:0}
body.page-crm .crm-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
body.page-crm .crm-table th,body.page-crm .crm-table td{overflow-wrap:anywhere}

/* Employee date-range report. */
.employee-report-filter-v1001{grid-template-columns:minmax(150px,.45fr) minmax(150px,.45fr) auto!important;margin:0 0 13px!important;padding:10px 11px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2)}
.employee-report-filter-v1001 .filter-actions{align-self:end}

/* AI custom spend range: compact and readable without adding dashboard noise. */
.ai-spend-range-panel-v1001{padding:10px 12px!important;margin-top:-4px;margin-bottom:18px}
.ai-spend-range-filter-v1001{grid-template-columns:minmax(150px,.45fr) minmax(150px,.45fr) minmax(190px,.6fr) auto!important;margin:0!important}
.ai-spend-range-result-v1001{display:grid;gap:2px;align-self:stretch;align-content:center;padding:8px 11px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2);min-width:0}
.ai-spend-range-result-v1001 span{font-size:9px;font-weight:900;color:var(--muted)}
.ai-spend-range-result-v1001 strong{font-size:17px;color:var(--text)}
.ai-spend-range-result-v1001 small{font-size:9px;color:var(--muted)}

/* Semantic alerts must use theme tokens instead of legacy hard-coded white. */
.alert{background:var(--surface)!important;color:var(--text);border-color:var(--line)!important}
.alert.info{background:var(--info-bg)!important;color:var(--info)!important;border-color:color-mix(in srgb,var(--info) 32%,var(--line))!important}
.alert.warning{background:var(--warning-bg)!important;color:var(--warning)!important;border-color:color-mix(in srgb,var(--warning) 32%,var(--line))!important}
.alert.success{background:var(--success-bg)!important;color:var(--success)!important;border-color:color-mix(in srgb,var(--success) 30%,var(--line))!important}
.alert.danger,.alert.error{background:var(--danger-bg)!important;color:var(--danger)!important;border-color:color-mix(in srgb,var(--danger) 30%,var(--line))!important}

/* Dark mode: raise contrast for semantic text, disabled fields, Skills notices and legacy admin surfaces. */
html[data-theme="dark"]{
  --success:#72d9b5;
  --danger:#ff9393;
  --warning:#ffd56e;
  --info:#8dc7ff;
}
html[data-theme="dark"] body.app-body input:disabled,
html[data-theme="dark"] body.app-body select:disabled,
html[data-theme="dark"] body.app-body textarea:disabled{background:var(--surface-3)!important;color:var(--muted)!important;border-color:var(--line)!important;opacity:1}
html[data-theme="dark"] body.app-body .skill-card-v91,
html[data-theme="dark"] body.app-body .skill-meta-grid>div,
html[data-theme="dark"] body.app-body .settings-accordion-v100,
html[data-theme="dark"] body.app-body .compact-info-details,
html[data-theme="dark"] body.app-body .field-details-v100,
html[data-theme="dark"] body.app-body .permission-accordion,
html[data-theme="dark"] body.app-body .book-price-strip,
html[data-theme="dark"] body.app-body .customer-book-card,
html[data-theme="dark"] body.app-body .production-book-block,
html[data-theme="dark"] body.app-body .page-card,
html[data-theme="dark"] body.app-body .asset-card{background:var(--surface)!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-theme="dark"] body.app-body .skill-upload-v91,
html[data-theme="dark"] body.app-body .skill-upload-v91 summary,
html[data-theme="dark"] body.app-body .compact-info-details summary,
html[data-theme="dark"] body.app-body .field-details-v100 summary{color:var(--muted)!important}
html[data-theme="dark"] body.app-body .hero-meta span,
html[data-theme="dark"] body.app-body .soft-pill{background:var(--surface-2)!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-theme="dark"] body.app-body input[type="file"]{background:var(--surface)!important;color:var(--text)!important}
html[data-theme="dark"] body.app-body input[type="file"]::file-selector-button{background:var(--surface-3);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:6px 9px;margin-inline-end:8px}

@media(max-width:820px){
  .employee-report-filter-v1001,.ai-spend-range-filter-v1001{grid-template-columns:1fr 1fr!important}
  .employee-report-filter-v1001 .filter-actions,.ai-spend-range-filter-v1001 .filter-actions,.ai-spend-range-result-v1001{grid-column:1/-1}
}
@media(max-width:560px){
  .employee-report-filter-v1001,.ai-spend-range-filter-v1001{grid-template-columns:1fr!important}
  .employee-report-filter-v1001 .filter-actions,.ai-spend-range-filter-v1001 .filter-actions,.ai-spend-range-result-v1001{grid-column:auto}
}
#aiUsage,#employeeReport,#aiSpendRange{scroll-margin-top:96px}


/* ================================================================
   HIKAYATI V10.0.2 — POLISH PASS
   Date pickers · order compactness · master layout · 7-up pages · dark cards
   ================================================================ */

/* Dashboard: only fix View all contrast in dark mode; no homepage layout changes. */
html[data-theme="dark"] body.page-index .panel-head>a{color:var(--text)!important}
html[data-theme="dark"] body.page-index .panel-head>a:hover{color:var(--accent)!important}

/* All date fields open a native calendar and visually read as clickable controls. */
input[type="date"].date-picker-clickable-v1002{cursor:pointer;min-inline-size:0}
input[type="date"].date-picker-clickable-v1002::-webkit-calendar-picker-indicator{cursor:pointer;opacity:.82}
html[data-theme="dark"] input[type="date"].date-picker-clickable-v1002{color-scheme:dark}
html[data-theme="light"] input[type="date"].date-picker-clickable-v1002{color-scheme:light}

/* Orders: dedicated customer phone column, fit within the full desktop workspace. */
@media(min-width:821px){
  body.page-orders .orders-table.professional-fit-table{table-layout:fixed!important;width:100%!important;min-width:0!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(1),body.page-orders .orders-table.professional-fit-table td:nth-child(1){width:3%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(2),body.page-orders .orders-table.professional-fit-table td:nth-child(2){width:7%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(3),body.page-orders .orders-table.professional-fit-table td:nth-child(3){width:9%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(4),body.page-orders .orders-table.professional-fit-table td:nth-child(4){width:8%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(5),body.page-orders .orders-table.professional-fit-table td:nth-child(5){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(6),body.page-orders .orders-table.professional-fit-table td:nth-child(6){width:10%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(7),body.page-orders .orders-table.professional-fit-table td:nth-child(7){width:13%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(8),body.page-orders .orders-table.professional-fit-table td:nth-child(8),body.page-orders .orders-table.professional-fit-table th:nth-child(9),body.page-orders .orders-table.professional-fit-table td:nth-child(9){width:6.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(10),body.page-orders .orders-table.professional-fit-table td:nth-child(10){width:7%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(11),body.page-orders .orders-table.professional-fit-table td:nth-child(11){width:6.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(12),body.page-orders .orders-table.professional-fit-table td:nth-child(12){width:7.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(13),body.page-orders .orders-table.professional-fit-table td:nth-child(13){width:10%!important}
  body.page-orders .orders-phone-cell{white-space:nowrap!important;font-size:11px}
}

/* Order top information: management + customer/invoice sit next to each other. */
body.page-order-view .order-admin-strip-v100{display:grid!important;grid-template-columns:minmax(320px,.82fr) minmax(0,1.45fr)!important;gap:14px!important;align-items:stretch}
body.page-order-view .order-admin-strip-v100>.detail-side,
body.page-order-view .order-admin-strip-v100>.order-customer-invoice-v100{width:100%!important;min-width:0;margin:0!important}
body.page-order-view .order-admin-strip-v100>.order-customer-invoice-v100 .pricing-summary-grid{grid-template-columns:minmax(0,1.4fr) minmax(230px,.7fr)!important;gap:12px!important}
body.page-order-view .order-admin-strip-v100>.detail-side .mini-info{padding-block:6px!important}

/* Blueprint metrics: four compact facts on one row on desktop. */
.ai-blueprint-card .blueprint-cost-grid-v1002{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
.ai-blueprint-card .blueprint-cost-grid-v1002>div{min-height:58px!important;padding:8px 10px!important;border-radius:10px!important}
.ai-blueprint-card .blueprint-cost-grid-v1002 span{font-size:9px!important}
.ai-blueprint-card .blueprint-cost-grid-v1002 strong{font-size:12px!important;line-height:1.35!important;overflow-wrap:anywhere}
.ai-blueprint-card .blueprint-cost-grid-v1002 small{font-size:8px!important}

/* Character + Text Panel masters use horizontal workspace space instead of growing vertically. */
.panel-master-card{background:var(--surface)!important;color:var(--text)!important;border-color:var(--line)!important}
.master-layout-v1002{display:grid;grid-template-columns:minmax(210px,285px) minmax(0,1fr);gap:14px;align-items:start}
.master-preview-v1002{min-width:0;align-self:stretch}
.master-preview-v1002 img{background:var(--surface-2)!important;border-color:var(--line)!important;max-height:310px!important}
.master-preview-v1002>div{background:var(--surface-2)!important;color:var(--muted)!important;border-color:var(--line)!important;min-height:190px!important}
.master-control-area-v1002{min-width:0}
.master-control-area-v1002>.text-block{margin-top:0!important;margin-bottom:8px!important;padding:9px 11px!important}
.master-control-area-v1002>.text-block p{margin-block:4px!important;font-size:11px!important;line-height:1.55!important}
.master-control-area-v1002>.row-actions{margin-block:6px!important}
.master-control-area-v1002 .master-generate-form{display:grid!important;grid-template-columns:minmax(210px,1.35fr) minmax(170px,.8fr) minmax(210px,1fr) auto!important;gap:8px 10px!important;align-items:end;margin-top:6px!important}
.master-control-area-v1002 .master-generate-form>label{margin:0!important;min-width:0}
.master-control-area-v1002 .master-generate-form textarea{min-height:64px!important;resize:vertical}
.master-control-area-v1002 .master-generate-form>button{align-self:end;min-height:40px;white-space:nowrap}
.master-control-area-v1002 .master-generate-form .master-async-status{grid-column:1/-1;margin-top:0!important}
.master-manual-upload-v1002{display:grid!important;grid-template-columns:minmax(240px,1fr) auto!important;gap:9px!important;align-items:end;margin-top:8px!important}
.master-manual-upload-v1002>label{margin:0!important}
.master-manual-upload-v1002>button{min-height:40px;white-space:nowrap}
.master-final-actions-v1002{gap:7px!important;align-items:center!important}
.master-final-actions-v1002 form{margin:0!important}

/* Production gallery: 14 pages/covers fit in two rows on wide desktop. */
@media(min-width:1280px){body.page-order-view .production-pages{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:9px!important}}
@media(min-width:1024px) and (max-width:1279px){body.page-order-view .production-pages{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:9px!important}}
body.page-order-view .production-pages .page-card-body{padding:9px!important}
body.page-order-view .production-pages .page-card-top{gap:4px!important}
body.page-order-view .production-pages .page-card-top strong{font-size:10px!important}
body.page-order-view .production-pages .production-ai-state,body.page-order-view .production-pages .production-print-state{font-size:8.5px!important}

/* CRM header line stays perfectly level across phone/LTR and RTL columns. */
body.page-crm .crm-table{border-collapse:separate!important;border-spacing:0!important}
body.page-crm .crm-table thead tr{box-shadow:inset 0 -1px 0 var(--line)!important}
body.page-crm .crm-table thead th{height:44px!important;vertical-align:middle!important;border-bottom:0!important;box-shadow:none!important;padding-block:9px!important}

/* AI usage date filters remain compact despite two extra date fields. */
.ai-usage-filters-v1002{grid-template-columns:minmax(220px,1.5fr) minmax(120px,.55fr) minmax(140px,.7fr) minmax(145px,.62fr) minmax(145px,.62fr) auto!important}

/* Dark mode production surfaces that previously retained hard-coded white. */
html[data-theme="dark"] body.page-order-view .production-book-qr-card,
html[data-theme="dark"] body.page-order-view .panel-master-card{background:var(--surface)!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-theme="dark"] body.page-order-view .production-book-qr-card .qr-mini-preview{background:#fff!important;border-color:var(--line)!important}
html[data-theme="dark"] body.page-order-view .panel-master-card [style*="background:#f6f7fa"],
html[data-theme="dark"] body.page-order-view .panel-master-card [style*="background:#f8f9fc"]{background:var(--surface-2)!important;color:var(--muted)!important;border-color:var(--line)!important}

@media(max-width:1279px){
  .master-control-area-v1002 .master-generate-form{grid-template-columns:1fr 1fr!important}
  .master-control-area-v1002 .master-generate-form>button{width:100%}
}
@media(max-width:1023px){
  body.page-order-view .order-admin-strip-v100{grid-template-columns:1fr!important}
  body.page-order-view .order-admin-strip-v100>.order-customer-invoice-v100 .pricing-summary-grid{grid-template-columns:1fr!important}
  .ai-blueprint-card .blueprint-cost-grid-v1002{grid-template-columns:1fr 1fr!important}
  .master-layout-v1002{grid-template-columns:minmax(180px,250px) minmax(0,1fr)}
  .ai-usage-filters-v1002{grid-template-columns:1fr 1fr!important}
  .ai-usage-filters-v1002 .filter-search,.ai-usage-filters-v1002 .filter-actions{grid-column:1/-1!important}
}
@media(max-width:820px){
  .master-layout-v1002{grid-template-columns:1fr!important}
  .master-preview-v1002{max-width:340px;width:100%;margin-inline:auto}
  .master-control-area-v1002 .master-generate-form{grid-template-columns:1fr!important}
  .master-manual-upload-v1002{grid-template-columns:1fr!important}
  .ai-blueprint-card .blueprint-cost-grid-v1002{grid-template-columns:1fr 1fr!important}
}
@media(max-width:560px){
  .ai-blueprint-card .blueprint-cost-grid-v1002{grid-template-columns:1fr!important}
  .ai-usage-filters-v1002{grid-template-columns:1fr!important}
  .ai-usage-filters-v1002 .filter-search,.ai-usage-filters-v1002 .filter-actions{grid-column:auto!important}
}

/* ================================================================
   HIKAYATI V10.0.3 — TABLE RHYTHM + ORDER VIEW COMPACT POLISH
   ================================================================ */

/* Fix LTR phone cells drawing their own separated underline in tables. */
.professional-fit-table td.ltr-cell,
.professional-fit-table th.ltr-cell,
body.page-orders .orders-phone-cell,
body.page-crm .crm-table td.ltr-cell{display:table-cell!important;vertical-align:middle!important;line-height:1.35!important}
body.page-orders .orders-table.professional-fit-table,
body.page-crm .crm-table.professional-fit-table{border-collapse:separate!important;border-spacing:0!important}
body.page-orders .orders-table.professional-fit-table tbody tr,
body.page-crm .crm-table.professional-fit-table tbody tr{background:transparent!important}
body.page-orders .orders-table.professional-fit-table tbody tr:nth-child(even)>td,
body.page-crm .crm-table.professional-fit-table tbody tr:nth-child(even)>td{background:color-mix(in srgb,var(--accent) 4%,var(--surface))!important}
body.page-orders .orders-table.professional-fit-table tbody tr:nth-child(odd)>td,
body.page-crm .crm-table.professional-fit-table tbody tr:nth-child(odd)>td{background:var(--surface)!important}
body.page-orders .orders-table.professional-fit-table tbody tr:hover>td,
body.page-crm .crm-table.professional-fit-table tbody tr:hover>td{background:color-mix(in srgb,var(--teal) 6%,var(--surface))!important}
body.page-orders .orders-table.professional-fit-table td,
body.page-crm .crm-table.professional-fit-table td{border-bottom:1px solid color-mix(in srgb,var(--line) 88%,transparent)!important;box-shadow:none!important}
body.page-orders .orders-table.professional-fit-table tbody tr:last-child td,
body.page-crm .crm-table.professional-fit-table tbody tr:last-child td{border-bottom:0!important}

/* Orders should read in one glance: truncate long address/details instead of increasing row height. */
@media(min-width:821px){
  body.page-orders .orders-table.professional-fit-table th,
  body.page-orders .orders-table.professional-fit-table td{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;padding:8px 7px!important}
  body.page-orders .orders-table.professional-fit-table td strong,
  body.page-orders .orders-table.professional-fit-table td small,
  body.page-orders .orders-table.professional-fit-table td .table-link{max-width:100%;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;display:block!important}
  body.page-orders .orders-table.professional-fit-table td:nth-child(7) strong,
  body.page-orders .orders-table.professional-fit-table td:nth-child(7) small{line-height:1.25!important;margin-top:0!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(2),body.page-orders .orders-table.professional-fit-table td:nth-child(2){width:7%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(3),body.page-orders .orders-table.professional-fit-table td:nth-child(3){width:8.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(4),body.page-orders .orders-table.professional-fit-table td:nth-child(4){width:8.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(5),body.page-orders .orders-table.professional-fit-table td:nth-child(5){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(6),body.page-orders .orders-table.professional-fit-table td:nth-child(6){width:8.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(7),body.page-orders .orders-table.professional-fit-table td:nth-child(7){width:12%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(13),body.page-orders .orders-table.professional-fit-table td:nth-child(13){width:15%!important;overflow:visible!important}
  body.page-orders .order-row-actions{display:flex!important;flex-wrap:nowrap!important;gap:4px!important;align-items:center!important;justify-content:flex-start!important;white-space:nowrap!important}
  body.page-orders .order-row-actions form{display:inline-flex!important;margin:0!important;flex:0 0 auto!important}
  body.page-orders .order-row-actions .btn{padding:5px 6px!important;font-size:9.2px!important;line-height:1.2!important;min-height:28px!important;white-space:nowrap!important;border-radius:8px!important;flex:0 0 auto!important}
}

/* CRM keeps the same clean horizontal rule and soft row rhythm. */
body.page-crm .crm-table.professional-fit-table th,
body.page-crm .crm-table.professional-fit-table td{vertical-align:middle!important;line-height:1.35!important}
body.page-crm .crm-table.professional-fit-table td:nth-child(2){direction:ltr!important;text-align:start!important;unicode-bidi:plaintext!important}

/* Order view top strip: stop admin values/forms from bleeding into the invoice card. */
body.page-order-view .order-admin-strip-v100{overflow:visible!important}
body.page-order-view .order-admin-strip-v100>.detail-side,
body.page-order-view .order-admin-strip-v100>.order-customer-invoice-v100{overflow:hidden!important;min-width:0!important;align-self:stretch!important}
body.page-order-view .order-admin-strip-v100>.detail-side{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;align-content:start!important}
body.page-order-view .order-admin-strip-v100>.detail-side>h2,
body.page-order-view .order-admin-strip-v100>.detail-side>form.form-stack,
body.page-order-view .order-admin-strip-v100>.detail-side>form[action*="send-order-otp"]{grid-column:1/-1!important;min-width:0!important}
body.page-order-view .order-admin-strip-v100>.detail-side>form.form-stack{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;align-items:end!important}
body.page-order-view .order-admin-strip-v100>.detail-side>form.form-stack label{min-width:0!important}
body.page-order-view .order-admin-strip-v100>.detail-side>form.form-stack select{min-width:0!important;width:100%!important}
body.page-order-view .order-admin-strip-v100>.detail-side>form.form-stack .btn{white-space:nowrap!important;padding-inline:8px!important;min-width:0!important}
body.page-order-view .order-admin-strip-v100 .mini-info{min-width:0!important;padding:7px 8px!important;border-radius:10px;background:var(--surface-2)!important;border:1px solid var(--line)!important}
body.page-order-view .order-admin-strip-v100 .mini-info span{font-size:9px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.page-order-view .order-admin-strip-v100 .mini-info strong{font-size:11px!important;line-height:1.35!important;overflow-wrap:anywhere!important;word-break:normal!important}
body.page-order-view .order-admin-strip-v100>.order-customer-invoice-v100 .info-grid,
body.page-order-view .order-admin-strip-v100>.order-customer-invoice-v100 .price-breakdown{min-width:0!important}
body.page-order-view .order-admin-strip-v100>.order-customer-invoice-v100 .info-grid>div,
body.page-order-view .order-admin-strip-v100>.order-customer-invoice-v100 .price-breakdown>div{min-width:0!important;overflow:hidden!important}
body.page-order-view .order-admin-strip-v100>.order-customer-invoice-v100 strong{overflow-wrap:anywhere!important}

/* Master cards: a neat control desk, not scattered fields. */
body.page-order-view .panel-master-card{padding:13px!important}
body.page-order-view .panel-master-card .panel-head{margin-bottom:8px!important}
body.page-order-view .panel-master-card .panel-head h4{font-size:14px!important}
body.page-order-view .panel-master-card .panel-head p{font-size:10.5px!important;line-height:1.5!important;max-width:820px}
body.page-order-view .master-layout-v1002{grid-template-columns:minmax(210px,285px) minmax(0,1fr)!important;gap:12px!important;align-items:start!important}
body.page-order-view .master-preview-v1002 img{max-height:270px!important}
body.page-order-view .master-control-area-v1002{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(260px,.9fr)!important;gap:8px 12px!important;align-items:start!important}
body.page-order-view .master-control-area-v1002>.text-block{grid-column:1/2!important;grid-row:1/span 3!important;margin:0!important;min-height:0!important}
body.page-order-view .master-control-area-v1002>p{grid-column:1/2!important;margin:0!important;font-size:10px!important;color:var(--muted)!important}
body.page-order-view .master-control-area-v1002>.row-actions:not(.master-final-actions-v1002){grid-column:2/3!important;margin:0!important;justify-content:stretch!important}
body.page-order-view .master-control-area-v1002>.row-actions:not(.master-final-actions-v1002) .btn{width:100%!important;justify-content:center!important}
body.page-order-view .master-control-area-v1002 .master-generate-form{grid-column:2/3!important;display:grid!important;grid-template-columns:1fr!important;gap:7px!important;margin:0!important;padding:9px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--surface-2)!important}
body.page-order-view .master-control-area-v1002 .master-generate-form label{margin:0!important;display:grid!important;gap:4px!important;min-width:0!important}
body.page-order-view .master-control-area-v1002 .master-generate-form label>span,
body.page-order-view .master-manual-upload-v1002 label>span{font-size:9px!important;color:var(--muted)!important;font-weight:850!important}
body.page-order-view .master-control-area-v1002 .master-generate-form textarea{min-height:48px!important;max-height:88px!important;font-size:11px!important;line-height:1.45!important;padding:8px!important}
body.page-order-view .master-control-area-v1002 .master-generate-form select,
body.page-order-view .master-control-area-v1002 .master-generate-form input[type="file"]{font-size:10px!important;min-height:34px!important;padding:6px 8px!important}
body.page-order-view .master-control-area-v1002 .master-generate-form>button{min-height:36px!important;width:100%!important;border-radius:10px!important;white-space:normal!important;line-height:1.35!important}
body.page-order-view .master-control-area-v1002 .master-generate-form .master-async-status{font-size:10px!important;line-height:1.45!important;margin:0!important}
body.page-order-view .master-manual-upload-v1002{grid-column:2/3!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important;margin:0!important;padding:8px!important;border:1px dashed var(--line)!important;border-radius:12px!important;background:color-mix(in srgb,var(--surface-2) 80%,transparent)!important;align-items:end!important}
body.page-order-view .master-manual-upload-v1002 input[type="file"]{font-size:10px!important;min-height:32px!important;padding:5px!important;width:100%!important;max-width:100%!important}
body.page-order-view .master-manual-upload-v1002 .btn{min-height:32px!important;padding:6px 10px!important;font-size:10px!important;white-space:nowrap!important}
body.page-order-view .master-final-actions-v1002{grid-column:2/3!important;margin:0!important;display:flex!important;flex-wrap:nowrap!important;gap:6px!important}
body.page-order-view .master-final-actions-v1002 .btn{min-height:32px!important;padding:6px 10px!important;font-size:10px!important;white-space:nowrap!important}

/* Production cards: visually darker action handle + lower vertical footprint. */
body.page-order-view .production-pages{gap:8px!important}
body.page-order-view .production-pages .page-card{border-radius:13px!important}
body.page-order-view .production-pages .page-thumb{aspect-ratio:4/2.75!important}
body.page-order-view .production-pages .page-card-body{padding:7px!important}
body.page-order-view .production-pages .page-card-top strong{font-size:9.5px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.page-order-view .production-pages .page-card-top .badge{font-size:8px!important;padding:3px 5px!important}
body.page-order-view .production-pages .production-ai-state,
body.page-order-view .production-pages .production-print-state{margin-top:4px!important;font-size:8px!important;line-height:1.35!important}
body.page-order-view .production-primary-action{margin-top:6px!important}
body.page-order-view .production-direct-generate{min-height:32px!important;border-radius:10px!important;font-size:9px!important;padding:6px!important}
body.page-order-view .production-action-accordion{margin-top:6px!important;border-radius:10px!important}
body.page-order-view .production-action-accordion>summary{min-height:34px!important;padding:6px 7px!important;grid-template-columns:24px minmax(0,auto) minmax(0,1fr) 8px!important}
body.page-order-view .production-action-accordion-icon{width:22px!important;height:22px!important;border-radius:7px!important;background:linear-gradient(135deg,#1d2737,#334155)!important;color:#f8fafc!important;border-color:rgba(255,255,255,.16)!important;box-shadow:0 4px 10px rgba(15,23,42,.18)!important;font-size:11px!important}
body.page-order-view .production-action-accordion>summary strong{font-size:10px!important;color:var(--text)!important}
body.page-order-view .production-action-accordion>summary small{font-size:7.5px!important;line-height:1.2!important}
body.page-order-view .production-action-accordion-body{padding:7px!important;gap:6px!important}
body.page-order-view .production-action-accordion-body .btn{min-height:30px!important;font-size:8.5px!important;border-radius:8px!important;padding:5px!important}

@media(max-width:1279px){
  body.page-order-view .master-control-area-v1002{grid-template-columns:1fr!important}
  body.page-order-view .master-control-area-v1002>.text-block,
  body.page-order-view .master-control-area-v1002>p,
  body.page-order-view .master-control-area-v1002>.row-actions,
  body.page-order-view .master-control-area-v1002 .master-generate-form,
  body.page-order-view .master-manual-upload-v1002,
  body.page-order-view .master-final-actions-v1002{grid-column:1/-1!important;grid-row:auto!important}
}
@media(max-width:900px){
  body.page-order-view .order-admin-strip-v100>.detail-side>form.form-stack{grid-template-columns:1fr 1fr!important}
  body.page-order-view .master-layout-v1002{grid-template-columns:1fr!important}
}

/* ================================================================
   HIKAYATI V10.0.4 — DATA GRID + MOBILE PRODUCTION UX POLISH
   Real scrollable tables · readable order actions · aligned masters
   compact mobile book/production controls · no page-action flash
   ================================================================ */

/* Universal tables are always true tables. Allow horizontal overflow when the
   data genuinely needs more room instead of hiding columns or turning rows into cards. */
.table-wrap,
.smart-table-scroll-v100{
  max-width:100%;
  overflow-x:auto!important;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}
.smart-table-scroll-v100{
  overflow-y:auto!important;
  scrollbar-gutter:stable both-edges;
}
.smart-table-nav-v1004{display:flex!important;align-items:center!important;gap:5px!important;flex-wrap:nowrap!important}
.smart-table-controls-v100.has-horizontal-scroll-v1004{color:var(--text)}
.smart-table-controls-v100 .smart-table-horizontal-v1004[hidden]{display:none!important}

/* Orders: give actions comfortable visual weight. Space is taken mainly from
   phone/creator and other low-priority columns; narrower canvases scroll. */
@media(min-width:821px){
  body.page-orders .orders-table.professional-fit-table{
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
  }
  body.page-orders .orders-table.professional-fit-table th:nth-child(1),body.page-orders .orders-table.professional-fit-table td:nth-child(1){width:2.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(2),body.page-orders .orders-table.professional-fit-table td:nth-child(2){width:6.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(3),body.page-orders .orders-table.professional-fit-table td:nth-child(3){width:8.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(4),body.page-orders .orders-table.professional-fit-table td:nth-child(4){width:6.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(5),body.page-orders .orders-table.professional-fit-table td:nth-child(5){width:5.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(6),body.page-orders .orders-table.professional-fit-table td:nth-child(6){width:9.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(7),body.page-orders .orders-table.professional-fit-table td:nth-child(7){width:10.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(8),body.page-orders .orders-table.professional-fit-table td:nth-child(8),
  body.page-orders .orders-table.professional-fit-table th:nth-child(9),body.page-orders .orders-table.professional-fit-table td:nth-child(9),
  body.page-orders .orders-table.professional-fit-table th:nth-child(10),body.page-orders .orders-table.professional-fit-table td:nth-child(10),
  body.page-orders .orders-table.professional-fit-table th:nth-child(11),body.page-orders .orders-table.professional-fit-table td:nth-child(11),
  body.page-orders .orders-table.professional-fit-table th:nth-child(12),body.page-orders .orders-table.professional-fit-table td:nth-child(12){width:6.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(13),body.page-orders .orders-table.professional-fit-table td:nth-child(13){width:18%!important;overflow:visible!important}
  body.page-orders .order-row-actions{gap:5px!important}
  body.page-orders .order-row-actions .btn{
    min-height:31px!important;
    padding:6px 7px!important;
    border-radius:8px!important;
    font-size:10.4px!important;
    line-height:1.2!important;
    font-weight:850!important;
  }
}
/* Once the viewport gets tighter, keep readable controls and let the table scroll. */
@media(min-width:821px) and (max-width:1390px){
  body.page-orders .orders-table.professional-fit-table{min-width:1320px!important}
  body.page-crm .crm-table.professional-fit-table{min-width:960px!important}
}

/* Master workspace: image is one anchor; every description/control belongs to one
   coherent aligned column beside it. No third visual column. */
body.page-order-view .master-layout-v1002{
  grid-template-columns:minmax(205px,270px) minmax(0,1fr)!important;
  gap:14px!important;
  align-items:start!important;
}
body.page-order-view .master-control-area-v1002{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:7px!important;
  align-content:start!important;
  min-width:0!important;
}
body.page-order-view .master-control-area-v1002>.text-block,
body.page-order-view .master-control-area-v1002>p,
body.page-order-view .master-control-area-v1002>.row-actions,
body.page-order-view .master-control-area-v1002 .master-generate-form,
body.page-order-view .master-manual-upload-v1002,
body.page-order-view .master-final-actions-v1002{
  grid-column:1/-1!important;
  grid-row:auto!important;
  min-width:0!important;
  margin-block:0!important;
}
body.page-order-view .master-control-area-v1002>.text-block{padding:8px 10px!important}
body.page-order-view .master-control-area-v1002>.row-actions:not(.master-final-actions-v1002){justify-content:flex-start!important}
body.page-order-view .master-control-area-v1002>.row-actions:not(.master-final-actions-v1002) .btn{width:auto!important;min-height:32px!important;padding:6px 10px!important}
body.page-order-view .master-control-area-v1002 .master-generate-form{
  display:grid!important;
  grid-template-columns:minmax(185px,1.25fr) minmax(145px,.72fr) minmax(175px,.9fr) minmax(122px,.62fr)!important;
  gap:7px!important;
  align-items:end!important;
  padding:8px!important;
}
body.page-order-view .master-control-area-v1002 .master-generate-form textarea{min-height:42px!important;max-height:72px!important}
body.page-order-view .master-control-area-v1002 .master-generate-form select,
body.page-order-view .master-control-area-v1002 .master-generate-form input[type="file"]{width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important}
body.page-order-view .master-control-area-v1002 .master-generate-form input[type="file"]::file-selector-button,
body.page-order-view .master-manual-upload-v1002 input[type="file"]::file-selector-button{
  padding:5px 7px;margin-inline-end:6px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--text);font:inherit;cursor:pointer
}
body.page-order-view .master-control-area-v1002 .master-generate-form .master-async-status{grid-column:1/-1!important}
body.page-order-view .master-manual-upload-v1002{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:7px!important;
  align-items:end!important;
  max-width:560px!important;
}
body.page-order-view .master-final-actions-v1002{justify-content:flex-start!important;width:100%!important}

/* Page action accordion: remove the apparent click flash/pulse while keeping a
   clear open state and keyboard accessibility. */
body.page-order-view .production-action-accordion,
body.page-order-view .production-action-accordion[open]{
  box-shadow:none!important;
  transition:none!important;
}
body.page-order-view .production-action-accordion>summary{
  -webkit-tap-highlight-color:transparent!important;
  transition:none!important;
  outline:none!important;
}
body.page-order-view .production-action-accordion>summary:active,
body.page-order-view .production-action-accordion>summary:hover,
body.page-order-view .production-action-accordion[open]>summary{
  box-shadow:none!important;
  filter:none!important;
}
body.page-order-view .production-action-accordion>summary:focus-visible{
  outline:2px solid color-mix(in srgb,var(--teal) 52%,transparent)!important;
  outline-offset:2px!important;
  box-shadow:none!important;
}
body.page-order-view .production-action-accordion>summary i{transition:none!important}

/* Mobile/tablet tables: DO NOT convert one database row into a giant card.
   Keep the desktop columns and allow deliberate horizontal + vertical scrolling. */
@media(max-width:820px){
  .smart-table-controls-v100{display:flex!important;margin:4px 0 6px!important;padding-inline:2px!important}
  .smart-table-scroll-v100,
  .table-wrap{
    width:100%!important;
    max-width:100%!important;
    max-height:min(70vh,620px)!important;
    overflow:auto!important;
    border:1px solid var(--line)!important;
    border-radius:12px!important;
    margin-inline:0!important;
    padding:0!important;
    background:var(--surface)!important;
  }
  .professional-fit-table{
    display:table!important;
    width:100%!important;
    min-width:920px!important;
    max-width:none!important;
    table-layout:fixed!important;
    border-collapse:separate!important;
    border-spacing:0!important;
  }
  .professional-fit-table thead{display:table-header-group!important}
  .professional-fit-table tbody{display:table-row-group!important;width:auto!important}
  .professional-fit-table tr,
  .professional-fit-table tbody tr{
    display:table-row!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:transparent!important;
  }
  .professional-fit-table th,
  .professional-fit-table td,
  .professional-fit-table tbody td{
    display:table-cell!important;
    width:auto!important;
    max-width:none!important;
    padding:8px 8px!important;
    border:0!important;
    border-bottom:1px solid color-mix(in srgb,var(--line) 88%,transparent)!important;
    text-align:start!important;
    vertical-align:middle!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    font-size:10.5px!important;
    line-height:1.35!important;
  }
  .professional-fit-table th{position:sticky;top:0;z-index:5;background:color-mix(in srgb,var(--surface) 94%,var(--surface-2))!important;font-size:9.5px!important}
  .professional-fit-table tbody td::before{display:none!important;content:none!important}
  .professional-fit-table tbody td.check-col{display:table-cell!important;background:inherit!important}
  .professional-fit-table .row-actions{display:flex!important;flex-wrap:nowrap!important;gap:4px!important;justify-content:flex-start!important}
  .professional-fit-table .row-actions .btn{flex:0 0 auto!important;min-width:auto!important;width:auto!important;white-space:nowrap!important}
  body.page-orders .orders-table.professional-fit-table{min-width:1320px!important}
  body.page-orders .order-row-actions .btn{min-height:30px!important;padding:6px 7px!important;font-size:10px!important}
  body.page-crm .crm-table.professional-fit-table{min-width:980px!important}
  body.page-ai-settings .professional-fit-table{min-width:1040px!important}

  /* Book facts use mobile width instead of one full row per tiny fact. */
  body.page-order-view .book-workspace-section-v100 .info-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  body.page-order-view .book-workspace-section-v100 .info-grid>div{
    min-width:0!important;
    padding:8px!important;
    border-radius:9px!important;
  }
  body.page-order-view .book-workspace-section-v100 .info-grid span{font-size:8.5px!important;margin-bottom:2px!important}
  body.page-order-view .book-workspace-section-v100 .info-grid strong{font-size:10.5px!important;line-height:1.35!important;overflow-wrap:anywhere!important}

  /* Production header controls become a compact two-column command grid. */
  body.page-order-view .production-book-head{gap:7px!important;margin-bottom:8px!important}
  body.page-order-view .production-book-head>div:first-child{width:100%!important}
  body.page-order-view .production-book-head-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    align-items:stretch!important;
  }
  body.page-order-view .production-book-head-actions>*{min-width:0!important;margin:0!important}
  body.page-order-view .production-book-head-actions form{grid-column:auto!important;width:100%!important}
  body.page-order-view .production-book-head-actions .btn{width:100%!important;min-height:34px!important;padding:6px 7px!important;font-size:9px!important;line-height:1.3!important;white-space:normal!important}
  body.page-order-view .production-book-head-actions .book-ai-cost-v100,
  body.page-order-view .production-book-head-actions .progress-number{
    width:100%!important;min-width:0!important;min-height:34px!important;padding:6px 8px!important;border:1px solid var(--line)!important;border-radius:9px!important;background:var(--surface-2)!important;display:grid!important;align-content:center!important
  }
  body.page-order-view .production-book-head-actions .book-ai-cost-v100 span{font-size:8px!important}
  body.page-order-view .production-book-head-actions .book-ai-cost-v100 strong,
  body.page-order-view .production-book-head-actions .progress-number{font-size:10px!important}

  /* Masters: image then one full-width control rail; file/select controls never shrink off canvas. */
  body.page-order-view .master-layout-v1002{grid-template-columns:1fr!important;gap:8px!important}
  body.page-order-view .master-preview-v1002{max-width:300px!important;width:100%!important;margin-inline:auto!important}
  body.page-order-view .master-preview-v1002 img{max-height:250px!important}
  body.page-order-view .master-control-area-v1002{width:100%!important;grid-template-columns:1fr!important;gap:6px!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form,
  body.page-order-view .master-manual-upload-v1002{
    grid-template-columns:1fr!important;
    width:100%!important;
    max-width:none!important;
    padding:8px!important;
  }
  body.page-order-view .master-control-area-v1002 input,
  body.page-order-view .master-control-area-v1002 select,
  body.page-order-view .master-control-area-v1002 textarea,
  body.page-order-view .master-manual-upload-v1002 input{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  body.page-order-view .master-final-actions-v1002{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
  body.page-order-view .master-final-actions-v1002 form,
  body.page-order-view .master-final-actions-v1002 .btn{width:100%!important}

  /* Compact-by-default explanatory text; expands with the explicit Learn More button. */
  .mobile-learn-more-v1004{position:relative!important}
  .mobile-learn-more-v1004 .mobile-learn-more-content-v1004{min-width:0}
  .mobile-learn-more-v1004.is-collapsed-v1004 .mobile-learn-more-content-v1004{
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    overflow:hidden!important;
    max-height:3.35em!important;
  }
  .mobile-learn-more-toggle-v1004{
    display:inline-flex!important;
    margin-top:5px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    color:var(--teal)!important;
    font-size:9.5px!important;
    font-weight:900!important;
    cursor:pointer!important;
  }

  /* Two production images per row on phone, as requested for this UX pass. */
  body.page-order-view .production-pages{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  body.page-order-view .production-pages .page-thumb{aspect-ratio:4/3!important}
  body.page-order-view .production-pages .page-card-body{padding:6px!important}
  body.page-order-view .production-pages .production-action-accordion>summary small{display:none!important}
}
@media(min-width:821px){.mobile-learn-more-toggle-v1004{display:none!important}.mobile-learn-more-content-v1004{display:block!important;max-height:none!important;overflow:visible!important}}

/* Very narrow phones still keep the two-up image workflow, but trim chrome. */
@media(max-width:390px){
  body.page-order-view .production-pages{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
  body.page-order-view .production-pages .page-card-top .badge{display:none!important}
  body.page-order-view .production-pages .production-print-state{font-size:7px!important}
  body.page-order-view .production-book-head-actions{gap:5px!important}
}
/* Keep the page-action summary visually stable while opening; the body itself is the only change. */
body.page-order-view .production-action-accordion>summary,
body.page-order-view .production-action-accordion>summary:hover,
body.page-order-view .production-action-accordion[open]>summary,
body.page-order-view .production-action-accordion>summary:active{
  background:transparent!important;
}

/* Home/dashboard is intentionally frozen in this release: keep its previous mobile table presentation. */
@media(max-width:820px){
  body.page-index .smart-table-scroll-v100,
  body.page-index .table-wrap{max-height:none!important;overflow:visible!important;border:0!important;background:transparent!important}
  body.page-index .professional-fit-table,
  body.page-index .professional-fit-table tbody{display:block!important;width:100%!important;min-width:0!important}
  body.page-index .professional-fit-table thead{display:none!important}
  body.page-index .professional-fit-table tbody tr{display:grid!important;grid-template-columns:1fr!important;gap:0!important;margin-bottom:9px!important;border:1px solid var(--line)!important;border-radius:13px!important;background:var(--surface)!important;overflow:hidden!important;box-shadow:0 4px 14px color-mix(in srgb,#000 5%,transparent)!important}
  body.page-index .professional-fit-table tbody td{display:grid!important;grid-template-columns:minmax(92px,34%) minmax(0,1fr)!important;gap:9px!important;width:100%!important;padding:8px 10px!important;border:0!important;border-bottom:1px solid color-mix(in srgb,var(--line) 74%,transparent)!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
  body.page-index .professional-fit-table tbody td::before{display:block!important;content:attr(data-label)!important;font-size:9px!important;font-weight:900!important;color:var(--muted)!important}
  body.page-index .professional-fit-table tbody td:last-child{border-bottom:0!important}
}

/* ================================================================
   HIKAYATI V10.0.5 — MOBILE OPERATIONS + MANUAL OUTPUT FOUNDATION
   Full-screen mobile navigation · true end-to-end data grids
   master readability · book accordion hierarchy · manual PDF override
   bulk invoice print
   ================================================================ */

/* Book workspaces: the child/book banner and the three primary sections must
   read as navigation controls, not as another flat information box. */
body.page-order-view .book-workspace-v100{
  border-color:color-mix(in srgb,var(--gold) 28%,var(--line))!important;
  box-shadow:0 9px 26px color-mix(in srgb,#000 7%,transparent)!important;
}
body.page-order-view .book-workspace-summary-v100{
  position:relative!important;
  grid-template-columns:42px minmax(0,1fr) auto!important;
  padding-inline-end:48px!important;
  background:linear-gradient(125deg,
    color-mix(in srgb,var(--gold) 15%,var(--surface)),
    color-mix(in srgb,var(--teal) 9%,var(--surface)))!important;
  border-bottom:1px solid transparent!important;
}
body.page-order-view .book-workspace-v100[open]>.book-workspace-summary-v100{
  border-bottom-color:color-mix(in srgb,var(--gold) 34%,var(--line))!important;
  background:linear-gradient(125deg,
    color-mix(in srgb,var(--gold) 20%,var(--surface)),
    color-mix(in srgb,var(--teal) 12%,var(--surface)))!important;
}
body.page-order-view .book-workspace-summary-v100::after,
body.page-order-view .book-workspace-section-v100>summary::after{
  content:"⌄";
  position:absolute;
  inset-inline-end:13px;
  top:50%;
  width:25px;height:25px;
  display:grid;place-items:center;
  transform:translateY(-50%) rotate(0deg);
  border:1px solid var(--line);
  border-radius:8px;
  background:color-mix(in srgb,var(--surface) 88%,transparent);
  color:var(--text);
  font-size:16px;font-weight:950;line-height:1;
  transition:transform .16s ease,background .16s ease;
}
body.page-order-view .book-workspace-v100[open]>.book-workspace-summary-v100::after,
body.page-order-view .book-workspace-section-v100[open]>summary::after{
  transform:translateY(-50%) rotate(180deg);
}
body.page-order-view .book-workspace-section-v100>summary{
  position:relative!important;
  padding-inline-end:48px!important;
  border-bottom:1px solid transparent;
  font-weight:900;
}
body.page-order-view .book-workspace-section-v100[open]>summary{border-bottom-color:var(--line)!important}
body.page-order-view .book-data-section-v1005>summary{
  background:color-mix(in srgb,var(--navy) 7%,var(--surface))!important;
}
body.page-order-view .book-assets-section-v1005>summary{
  background:color-mix(in srgb,var(--teal) 8%,var(--surface))!important;
}
body.page-order-view .book-production-section-v1005>summary{
  background:color-mix(in srgb,var(--gold) 10%,var(--surface))!important;
}
body.page-order-view .book-data-section-v1005[open]>summary{background:color-mix(in srgb,var(--navy) 11%,var(--surface))!important}
body.page-order-view .book-assets-section-v1005[open]>summary{background:color-mix(in srgb,var(--teal) 12%,var(--surface))!important}
body.page-order-view .book-production-section-v1005[open]>summary{background:color-mix(in srgb,var(--gold) 15%,var(--surface))!important}

/* Master cards: use the available desktop canvas and stop rendering control copy
   at micro-font sizes. The image remains the anchor; everything else is one rail. */
@media(min-width:821px){
  body.page-order-view .panel-master-card{padding:16px!important}
  body.page-order-view .panel-master-card .panel-head h4{font-size:17px!important;line-height:1.35!important}
  body.page-order-view .panel-master-card .panel-head p{font-size:13.25px!important;line-height:1.65!important;max-width:1050px!important}
  body.page-order-view .master-layout-v1002{grid-template-columns:minmax(260px,330px) minmax(0,1fr)!important;gap:18px!important}
  body.page-order-view .master-preview-v1002 img{max-height:345px!important}
  body.page-order-view .master-preview-v1002>div{min-height:225px!important;font-size:13px!important;line-height:1.6!important}
  body.page-order-view .master-control-area-v1002{gap:9px!important}
  body.page-order-view .master-control-area-v1002>.text-block{padding:11px 13px!important}
  body.page-order-view .master-control-area-v1002>.text-block>span{font-size:11px!important;font-weight:900!important}
  body.page-order-view .master-control-area-v1002>.text-block p{font-size:13.5px!important;line-height:1.65!important}
  body.page-order-view .master-control-area-v1002>p{font-size:12px!important}
  body.page-order-view .master-control-area-v1002>.row-actions:not(.master-final-actions-v1002) .btn{font-size:12px!important;min-height:38px!important;padding:7px 12px!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form{padding:10px!important;gap:9px!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form label>span,
  body.page-order-view .master-manual-upload-v1002 label>span{font-size:11.5px!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form textarea,
  body.page-order-view .master-control-area-v1002 .master-generate-form select,
  body.page-order-view .master-control-area-v1002 .master-generate-form input[type="file"]{font-size:12.5px!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form>button,
  body.page-order-view .master-manual-upload-v1002 .btn,
  body.page-order-view .master-final-actions-v1002 .btn{font-size:12.25px!important;min-height:38px!important}
  body.page-order-view .master-manual-upload-v1002{max-width:none!important;width:100%!important}
}

/* Manual final-PDF bypass: visually explicit because it changes the production
   completion path, but remains inside the normal final-output card. */
body.page-order-view .manual-pdf-override-v1005{
  border-color:color-mix(in srgb,var(--teal) 42%,var(--line))!important;
  background:color-mix(in srgb,var(--teal) 6%,var(--surface))!important;
}
body.page-order-view .manual-pdf-override-panel-v1005{width:min(560px,100%)!important}
body.page-order-view .manual-pdf-override-panel-v1005 form{display:grid;gap:8px;width:100%}
body.page-order-view .manual-pdf-override-panel-v1005 label{display:grid;gap:5px}
body.page-order-view .manual-pdf-override-panel-v1005 input[type="file"]{width:100%;max-width:100%}
body.page-order-view .manual-pdf-override-panel-v1005 small{font-size:10px;line-height:1.55;color:var(--muted)}

/* Multi-invoice print: one selected invoice per physical A4 page. */
.bulk-print-toolbar-v1005{
  position:sticky;top:0;z-index:20;
  width:min(900px,calc(100% - 24px));
  margin:12px auto 0;padding:10px 12px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  border:1px solid var(--line);border-radius:13px;
  background:color-mix(in srgb,var(--surface) 94%,transparent);
  box-shadow:var(--shadow);backdrop-filter:blur(10px)
}
.bulk-invoice-page-v1005{page-break-after:always;break-after:page}
.bulk-invoice-page-v1005:last-child{page-break-after:auto;break-after:auto}
@media print{
  .bulk-invoices-body-v1005{background:#fff!important}
  .bulk-invoice-page-v1005{page-break-after:always!important;break-after:page!important}
  .bulk-invoice-page-v1005:last-child{page-break-after:auto!important;break-after:auto!important}
}

/* Mobile is an operational data-grid UI: rows stay rows. Give action columns
   real width so content is part of the scrollable area instead of being clipped. */
@media(max-width:820px){
  body.mobile-nav-open-v1005{overflow:hidden!important;touch-action:none}

  /* Full-screen admin menu; it is a mobile navigation surface, not a popover. */
  .topbar-v85 .nav-v85{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    max-width:none!important;
    height:100dvh!important;
    max-height:none!important;
    margin:0!important;
    padding:max(14px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom))!important;
    border:0!important;
    border-radius:0!important;
    background:var(--surface)!important;
    color:var(--text)!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    z-index:5000!important;
    transform:none!important;
  }
  .topbar-v85 .nav-v85.open{display:grid!important;grid-template-rows:auto auto auto;align-content:start;gap:0!important}
  .topbar-v85 .nav-v85 .nav-v82-head{
    display:flex!important;
    position:sticky;top:0;z-index:2;
    padding:5px 2px 12px!important;margin-bottom:9px!important;
    background:var(--surface)!important;
  }
  .topbar-v85 .nav-v85-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .topbar-v85 .nav-v85 .nav-v82-grid>a{min-height:48px!important;font-size:11.5px!important}
  .topbar-v85 .mobile-account-block-v85{padding-bottom:max(4px,env(safe-area-inset-bottom))!important}
  .admin-nav-backdrop-v82{display:none!important}

  /* Do not let nested table rules mask the final columns. */
  .smart-table-scroll-v100,.table-wrap{
    overflow-x:auto!important;
    overflow-y:auto!important;
    scrollbar-gutter:auto!important;
    scroll-padding-inline:10px!important;
    overscroll-behavior:auto!important;
    touch-action:pan-x pan-y!important;
  }
  .professional-fit-table{
    width:max-content!important;
    min-width:1000px!important;
    max-width:none!important;
    table-layout:auto!important;
  }
  .professional-fit-table th,.professional-fit-table td{
    width:auto!important;
    min-width:86px!important;
    max-width:210px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .professional-fit-table .row-actions{overflow:visible!important}

  /* Orders: explicit physical widths ensure every action button is reachable. */
  body.page-orders .orders-table.professional-fit-table{
    width:1800px!important;
    min-width:1800px!important;
    max-width:1800px!important;
    table-layout:fixed!important;
  }
  body.page-orders .orders-table.professional-fit-table th:nth-child(1),body.page-orders .orders-table.professional-fit-table td:nth-child(1){width:48px!important;min-width:48px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(2),body.page-orders .orders-table.professional-fit-table td:nth-child(2){width:125px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(3),body.page-orders .orders-table.professional-fit-table td:nth-child(3){width:125px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(4),body.page-orders .orders-table.professional-fit-table td:nth-child(4){width:118px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(5),body.page-orders .orders-table.professional-fit-table td:nth-child(5){width:100px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(6),body.page-orders .orders-table.professional-fit-table td:nth-child(6){width:175px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(7),body.page-orders .orders-table.professional-fit-table td:nth-child(7){width:190px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(8),body.page-orders .orders-table.professional-fit-table td:nth-child(8){width:105px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(9),body.page-orders .orders-table.professional-fit-table td:nth-child(9){width:105px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(10),body.page-orders .orders-table.professional-fit-table td:nth-child(10){width:115px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(11),body.page-orders .orders-table.professional-fit-table td:nth-child(11){width:100px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(12),body.page-orders .orders-table.professional-fit-table td:nth-child(12){width:105px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(13),body.page-orders .orders-table.professional-fit-table td:nth-child(13){width:389px!important;min-width:389px!important;max-width:389px!important;overflow:visible!important;text-overflow:clip!important}
  body.page-orders .order-row-actions{width:100%!important;overflow:visible!important;flex-wrap:nowrap!important;gap:5px!important}
  body.page-orders .order-row-actions .btn{font-size:10px!important;padding:6px 8px!important;min-height:31px!important}

  /* CRM gets the same true-table behavior with enough room for its action group. */
  body.page-crm .crm-table.professional-fit-table{
    width:1120px!important;min-width:1120px!important;max-width:1120px!important;table-layout:fixed!important
  }
  body.page-crm .crm-table.professional-fit-table th:nth-child(1),body.page-crm .crm-table.professional-fit-table td:nth-child(1){width:145px!important}
  body.page-crm .crm-table.professional-fit-table th:nth-child(2),body.page-crm .crm-table.professional-fit-table td:nth-child(2){width:125px!important}
  body.page-crm .crm-table.professional-fit-table th:nth-child(3),body.page-crm .crm-table.professional-fit-table td:nth-child(3){width:115px!important}
  body.page-crm .crm-table.professional-fit-table th:nth-child(4),body.page-crm .crm-table.professional-fit-table td:nth-child(4){width:225px!important}
  body.page-crm .crm-table.professional-fit-table th:nth-child(5),body.page-crm .crm-table.professional-fit-table td:nth-child(5){width:85px!important}
  body.page-crm .crm-table.professional-fit-table th:nth-child(6),body.page-crm .crm-table.professional-fit-table td:nth-child(6){width:125px!important}
  body.page-crm .crm-table.professional-fit-table th:nth-child(7),body.page-crm .crm-table.professional-fit-table td:nth-child(7){width:115px!important}
  body.page-crm .crm-table.professional-fit-table th:nth-child(8),body.page-crm .crm-table.professional-fit-table td:nth-child(8){width:185px!important;max-width:185px!important;overflow:visible!important}

  /* Mobile master cards use the entire card width. This also neutralizes older
     half-column rules that can survive in browser cache. */
  body.page-order-view .panel-master-card{padding:9px!important;border-radius:14px!important}
  body.page-order-view .panel-master-card .panel-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:6px 8px!important;align-items:start!important}
  body.page-order-view .panel-master-card .panel-head h4{font-size:14.5px!important;line-height:1.35!important}
  body.page-order-view .panel-master-card .panel-head p{font-size:11.5px!important;line-height:1.55!important}
  body.page-order-view .master-layout-v1002{display:grid!important;grid-template-columns:1fr!important;width:100%!important;gap:8px!important}
  body.page-order-view .master-preview-v1002{max-width:none!important;width:100%!important;margin:0!important}
  body.page-order-view .master-preview-v1002 img{width:100%!important;max-height:300px!important}
  body.page-order-view .master-preview-v1002>div{width:100%!important;min-height:180px!important;padding:14px!important;font-size:12px!important}
  body.page-order-view .master-control-area-v1002{display:grid!important;grid-template-columns:1fr!important;width:100%!important;max-width:none!important;gap:7px!important;margin:0!important}
  body.page-order-view .master-control-area-v1002>.text-block,
  body.page-order-view .master-control-area-v1002>p,
  body.page-order-view .master-control-area-v1002>.row-actions,
  body.page-order-view .master-control-area-v1002 .master-generate-form,
  body.page-order-view .master-manual-upload-v1002,
  body.page-order-view .master-final-actions-v1002{width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;grid-column:1/-1!important}
  body.page-order-view .master-control-area-v1002>.text-block{padding:9px 10px!important}
  body.page-order-view .master-control-area-v1002>.text-block p{font-size:12px!important;line-height:1.55!important}
  body.page-order-view .master-control-area-v1002>.row-actions:not(.master-final-actions-v1002){display:grid!important;grid-template-columns:1fr!important}
  body.page-order-view .master-control-area-v1002>.row-actions:not(.master-final-actions-v1002) .btn{width:100%!important;min-height:36px!important;font-size:11px!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form,
  body.page-order-view .master-manual-upload-v1002{display:grid!important;grid-template-columns:1fr!important;padding:8px!important;gap:7px!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form label,
  body.page-order-view .master-manual-upload-v1002 label{width:100%!important;min-width:0!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form label>span,
  body.page-order-view .master-manual-upload-v1002 label>span{font-size:10.5px!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form textarea{min-height:66px!important;font-size:11.5px!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form select,
  body.page-order-view .master-control-area-v1002 .master-generate-form input[type="file"],
  body.page-order-view .master-manual-upload-v1002 input[type="file"]{width:100%!important;max-width:none!important;min-width:0!important;font-size:11px!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form>button,
  body.page-order-view .master-manual-upload-v1002>button{width:100%!important;min-height:40px!important;font-size:11.5px!important}

  /* The child banner stays obvious on phone even when inner sections are open. */
  body.page-order-view .book-workspace-summary-v100{grid-template-columns:34px minmax(0,1fr)!important;padding:11px 45px 11px 10px!important}
  html[dir="ltr"] body.page-order-view .book-workspace-summary-v100{padding:11px 10px 11px 45px!important}
  body.page-order-view .book-workspace-summary-v100::after{inset-inline-end:10px!important}
  body.page-order-view .book-workspace-title-v100 strong{font-size:14px!important}
  body.page-order-view .book-workspace-title-v100 small{font-size:9.5px!important}
  body.page-order-view .book-workspace-section-v100>summary strong{font-size:11px!important}
  body.page-order-view .book-workspace-section-v100>summary::after{inset-inline-end:9px!important;width:23px;height:23px}

  .bulk-print-toolbar-v1005{width:calc(100% - 14px);margin-top:7px;flex-wrap:wrap}
}

/* ================================================================
   HIKAYATI V10.0.6 — BOOK ACCORDION + MASTER RAIL + MANUAL PDF POLISH
   Cleaner accordion hierarchy · full-width master controls · one manual PDF gate
   ================================================================ */

/* Book banner: keep the premium gradient but make the book number a stronger anchor. */
body.page-order-view .book-workspace-summary-v100{
  background:linear-gradient(122deg,
    color-mix(in srgb,var(--gold) 18%,var(--surface)),
    color-mix(in srgb,var(--teal) 8%,var(--surface)))!important;
  border-bottom:1px solid color-mix(in srgb,var(--gold) 30%,var(--line))!important;
}
body.page-order-view .book-workspace-v100[open]>.book-workspace-summary-v100{
  background:linear-gradient(122deg,
    color-mix(in srgb,var(--gold) 23%,var(--surface)),
    color-mix(in srgb,var(--teal) 12%,var(--surface)))!important;
}
body.page-order-view .book-workspace-index-v100{
  background:linear-gradient(145deg,color-mix(in srgb,var(--gold) 82%,#fff),color-mix(in srgb,var(--teal) 28%,var(--gold)))!important;
  color:#18324d!important;
  border-color:color-mix(in srgb,var(--gold) 62%,var(--line))!important;
  box-shadow:0 5px 13px color-mix(in srgb,var(--gold) 22%,transparent)!important;
}

/* Inner book accordions are slim section bars, not nested gray cards. */
body.page-order-view .book-workspace-body-v100{gap:10px!important;background:var(--surface)!important}
body.page-order-view .book-workspace-section-v100{
  background:var(--surface)!important;
  border:1px solid var(--line)!important;
  border-radius:13px!important;
  box-shadow:none!important;
}
body.page-order-view .book-workspace-section-v100>summary{
  min-height:50px!important;
  padding:11px 42px 11px 14px!important;
  border:0!important;
  border-inline-start:4px solid transparent!important;
  background:var(--surface-2)!important;
}
html[dir="ltr"] body.page-order-view .book-workspace-section-v100>summary{padding:11px 14px 11px 42px!important}
body.page-order-view .book-workspace-section-v100>summary strong{font-size:13px!important;letter-spacing:0!important}
body.page-order-view .book-workspace-section-v100>summary small{font-size:10px!important;color:var(--muted)!important}
body.page-order-view .book-workspace-section-v100[open]>summary{border-bottom:1px solid var(--line)!important}
body.page-order-view .book-data-section-v1005>summary{
  border-inline-start-color:color-mix(in srgb,var(--navy) 68%,var(--line))!important;
  background:color-mix(in srgb,var(--navy) 4.5%,var(--surface))!important;
}
body.page-order-view .book-assets-section-v1005>summary{
  border-inline-start-color:color-mix(in srgb,var(--teal) 72%,var(--line))!important;
  background:color-mix(in srgb,var(--teal) 5%,var(--surface))!important;
}
body.page-order-view .book-production-section-v1005>summary{
  border-inline-start-color:color-mix(in srgb,var(--gold) 78%,var(--line))!important;
  background:color-mix(in srgb,var(--gold) 6%,var(--surface))!important;
}
body.page-order-view .book-data-section-v1005[open]>summary{background:color-mix(in srgb,var(--navy) 7%,var(--surface))!important}
body.page-order-view .book-assets-section-v1005[open]>summary{background:color-mix(in srgb,var(--teal) 8%,var(--surface))!important}
body.page-order-view .book-production-section-v1005[open]>summary{background:color-mix(in srgb,var(--gold) 10%,var(--surface))!important}

/* Modern chevrons: no square behind the arrow. */
body.page-order-view .book-workspace-summary-v100::after,
body.page-order-view .book-workspace-section-v100>summary::after{
  content:"⌄"!important;
  width:auto!important;height:auto!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
  color:color-mix(in srgb,var(--text) 72%,var(--muted))!important;
  font-size:22px!important;font-weight:800!important;
  line-height:1!important;
  transform:translateY(-53%) rotate(0deg)!important;
}
body.page-order-view .book-workspace-v100[open]>.book-workspace-summary-v100::after,
body.page-order-view .book-workspace-section-v100[open]>summary::after{
  transform:translateY(-47%) rotate(180deg)!important;
}

/* Master header: status + library live together, leaving the entire control rail for work. */
body.page-order-view .master-panel-head-v1006{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:14px!important}
body.page-order-view .master-panel-head-v1006>div:first-child{min-width:0;flex:1 1 auto}
body.page-order-view .master-head-actions-v1006{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;flex:0 0 auto!important;flex-wrap:wrap!important}
body.page-order-view .master-library-btn-v1006{min-height:34px!important;padding:6px 10px!important;font-weight:850!important}

@media(min-width:821px){
  body.page-order-view .panel-master-card{padding:18px!important}
  body.page-order-view .master-layout-v1002{
    grid-template-columns:minmax(280px,330px) minmax(0,1fr)!important;
    gap:18px!important;
    align-items:stretch!important;
  }
  body.page-order-view .master-preview-v1002{height:100%!important;align-self:stretch!important}
  body.page-order-view .master-preview-v1002>a{display:block;height:100%}
  body.page-order-view .master-preview-v1002 img{max-height:390px!important;min-height:245px!important}
  body.page-order-view .master-preview-v1002>div{min-height:245px!important;height:100%!important}
  body.page-order-view .master-control-area-v1002{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;max-width:none!important;
    gap:9px!important;align-content:start!important;
  }
  body.page-order-view .master-control-area-v1002>.text-block{width:100%!important;margin:0!important;padding:11px 13px!important}
  body.page-order-view .master-control-area-v1002>.text-block p{font-size:13.5px!important;line-height:1.65!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form{
    width:100%!important;max-width:none!important;
    grid-template-columns:minmax(250px,1.35fr) minmax(160px,.68fr) minmax(220px,.92fr) minmax(155px,.62fr)!important;
    gap:9px!important;padding:10px!important;
  }
  body.page-order-view .master-control-area-v1002 .master-generate-form textarea{min-height:56px!important;max-height:92px!important}
  body.page-order-view .master-manual-upload-v1002{
    width:100%!important;max-width:none!important;
    grid-template-columns:minmax(0,1fr) minmax(145px,190px)!important;
    padding:9px!important;
    border:1px dashed var(--line)!important;border-radius:11px!important;
    background:color-mix(in srgb,var(--surface-2) 70%,transparent)!important;
  }
  body.page-order-view .master-final-actions-v1002{width:100%!important;justify-content:flex-start!important}
}

/* Manual master upload is a different action from AI generation, so give it its own visual identity. */
body.page-order-view .btn-master-upload-v1006{
  background:linear-gradient(135deg,color-mix(in srgb,var(--gold) 88%,#fff),color-mix(in srgb,var(--gold) 72%,var(--teal)))!important;
  color:#172b45!important;
  border-color:color-mix(in srgb,var(--gold) 62%,var(--line))!important;
  font-weight:900!important;
  box-shadow:0 5px 13px color-mix(in srgb,var(--gold) 16%,transparent)!important;
}
body.page-order-view .btn-master-upload-v1006:hover{filter:brightness(.98)}

/* Manual PDF gate: one upload path only; replacement/delete remain clear. */
body.page-order-view .manual-pdf-delete-form-v1006{margin:0!important;display:inline-flex!important}
body.page-order-view .manual-pdf-override-panel-v1005{border:1px dashed var(--line);border-radius:12px;padding:10px;background:var(--surface-2)}

@media(max-width:820px){
  body.page-order-view .book-workspace-section-v100>summary{min-height:46px!important;padding-block:9px!important}
  body.page-order-view .book-workspace-section-v100>summary::after{font-size:20px!important}
  body.page-order-view .master-panel-head-v1006{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  body.page-order-view .master-head-actions-v1006{width:100%!important;justify-content:space-between!important}
  body.page-order-view .master-library-btn-v1006{width:auto!important;min-height:34px!important;font-size:10.5px!important}
  body.page-order-view .master-manual-upload-v1002{width:100%!important;max-width:none!important;padding:8px!important;border:1px dashed var(--line)!important;border-radius:10px!important;background:var(--surface-2)!important}
  body.page-order-view .output-actions{width:100%!important;max-width:none!important}
  body.page-order-view .output-actions>.btn,
  body.page-order-view .output-actions>form{max-width:100%!important}
}

html[data-theme="dark"] body.page-order-view .book-workspace-body-v100,
html[data-theme="dark"] body.page-order-view .book-workspace-section-v100,
html[data-theme="dark"] body.page-order-view .manual-pdf-override-panel-v1005{background:var(--surface)!important;color:var(--text)!important}
@media(min-width:821px) and (max-width:1279px){
  body.page-order-view .master-layout-v1002{grid-template-columns:minmax(220px,270px) minmax(0,1fr)!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form{grid-template-columns:1fr 1fr!important}
  body.page-order-view .master-control-area-v1002 .master-generate-form>button{width:100%!important}
}

/* ================================================================
   HIKAYATI V10.0.7 — BOOK BARS + CUSTOMER NOTES + QUICK STATUS
   Solid section fills · no accordion arrows · mobile master subtitle line
   ================================================================ */

/* Book workspace: keep the main banner, but use a clean solid number badge. */
body.page-order-view .book-workspace-index-v100{
  background:color-mix(in srgb,#e58a2b 12%,var(--surface))!important;
  color:#d97706!important;
  border:1.5px solid color-mix(in srgb,#e58a2b 82%,var(--line))!important;
  box-shadow:none!important;
}

/* No arrows/chevrons anywhere in the book workspace. */
body.page-order-view .book-workspace-summary-v100::after,
body.page-order-view .book-workspace-section-v100>summary::after{
  content:none!important;
  display:none!important;
}
body.page-order-view .book-workspace-summary-v100{padding-inline-end:15px!important}
body.page-order-view .book-workspace-section-v100>summary{
  padding:12px 15px!important;
  border-inline-start:0!important;
  border-radius:11px!important;
}
html[dir="ltr"] body.page-order-view .book-workspace-section-v100>summary{padding:12px 15px!important}

/* Full-fill section bars. The open state becomes the separator into its content. */
body.page-order-view .book-data-section-v1005>summary{
  background:color-mix(in srgb,var(--navy) 8%,var(--surface))!important;
  border:1px solid color-mix(in srgb,var(--navy) 16%,var(--line))!important;
}
body.page-order-view .book-assets-section-v1005>summary{
  background:color-mix(in srgb,var(--teal) 10%,var(--surface))!important;
  border:1px solid color-mix(in srgb,var(--teal) 22%,var(--line))!important;
}
body.page-order-view .book-production-section-v1005>summary{
  background:color-mix(in srgb,var(--gold) 15%,var(--surface))!important;
  border:1px solid color-mix(in srgb,var(--gold) 30%,var(--line))!important;
}
body.page-order-view .book-data-section-v1005[open]>summary{
  background:color-mix(in srgb,var(--navy) 11%,var(--surface))!important;
  border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;
  border-bottom-color:color-mix(in srgb,var(--navy) 28%,var(--line))!important;
}
body.page-order-view .book-assets-section-v1005[open]>summary{
  background:color-mix(in srgb,var(--teal) 14%,var(--surface))!important;
  border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;
  border-bottom-color:color-mix(in srgb,var(--teal) 34%,var(--line))!important;
}
body.page-order-view .book-production-section-v1005[open]>summary{
  background:color-mix(in srgb,var(--gold) 20%,var(--surface))!important;
  border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;
  border-bottom-color:color-mix(in srgb,var(--gold) 42%,var(--line))!important;
}
body.page-order-view .book-workspace-section-v100[open]>summary{border-bottom-width:1px!important}

/* Admin + customer notes live with the invoice instead of being hidden elsewhere. */
body.page-order-view .order-notes-grid-v1007{
  display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px
}
body.page-order-view .order-note-card-v1007{
  min-width:0;padding:11px 13px;border:1px solid var(--line);border-radius:12px;
  background:color-mix(in srgb,var(--navy) 3.5%,var(--surface-2));
}
body.page-order-view .order-note-card-v1007.customer-note-v1007{
  background:color-mix(in srgb,var(--teal) 5%,var(--surface-2));
}
body.page-order-view .order-note-card-v1007>span{display:block;color:var(--muted);font-size:10px;font-weight:850;margin-bottom:5px}
body.page-order-view .order-note-card-v1007>p{margin:0;color:var(--text);font-size:12px;line-height:1.65;overflow-wrap:anywhere}

/* Customer link: simple optional order note in step 3. */
.customer-order-note-v1007{display:grid!important;gap:6px!important;padding:12px!important;border:1px solid var(--line)!important;border-radius:13px!important;background:var(--surface-2)!important}
.customer-order-note-v1007>span{font-weight:850!important;color:var(--text)!important}
.customer-order-note-v1007>small{color:var(--muted)!important;line-height:1.5!important}
.customer-order-note-v1007 textarea{width:100%!important;min-height:78px!important;resize:vertical!important}

/* Orders: quick status button/select remains compact on desktop and mobile tables. */
.orders-status-cell-v1007{min-width:142px!important}
.order-status-inline-v1007{display:flex;align-items:center;gap:5px;white-space:nowrap;min-width:max-content}
.quick-status-toggle-v1007{
  appearance:none;width:28px;height:28px;display:inline-grid;place-items:center;flex:0 0 28px;
  padding:0;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);color:var(--text);
  font-size:14px;font-weight:900;line-height:1;cursor:pointer
}
.quick-status-toggle-v1007:hover{border-color:color-mix(in srgb,var(--teal) 55%,var(--line));background:color-mix(in srgb,var(--teal) 8%,var(--surface))}
.quick-status-select-v1007{width:126px!important;min-width:126px!important;max-width:126px!important;height:30px!important;padding:3px 7px!important;font-size:10.5px!important;border-radius:8px!important}
.quick-status-message-v1007{display:block;max-width:190px;margin-top:3px;color:var(--muted);font-size:8.5px;line-height:1.3;white-space:normal}
.quick-status-message-v1007.is-ok{color:var(--success)}
.quick-status-message-v1007.is-error{color:var(--danger)}

html[data-theme="dark"] .quick-status-toggle-v1007,
html[data-theme="dark"] .quick-status-select-v1007,
html[data-theme="dark"] .customer-order-note-v1007,
html[data-theme="dark"] body.page-order-view .order-note-card-v1007{background:var(--surface-2)!important;color:var(--text)!important}

@media(max-width:820px){
  body.page-order-view .book-workspace-summary-v100{padding:10px!important}
  body.page-order-view .book-workspace-section-v100>summary,
  html[dir="ltr"] body.page-order-view .book-workspace-section-v100>summary{padding:10px 11px!important;min-height:44px!important}
  body.page-order-view .order-notes-grid-v1007{grid-template-columns:1fr!important;gap:7px!important}

  /* Keep only the master explanatory subtitle to one readable line on mobile. */
  body.page-order-view .master-panel-head-v1006>div:first-child>p{
    display:block!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
    font-size:10.5px!important;line-height:1.45!important;margin-top:4px!important
  }
  body.page-order-view .master-panel-head-v1006{gap:6px!important}
  body.page-order-view .master-head-actions-v1006{gap:5px!important}
  .orders-status-cell-v1007{min-width:148px!important}
  .quick-status-select-v1007{width:120px!important;min-width:120px!important}
}

/* =========================================================
   V10.0.8 — Operational status decoupling + robust quick status UI
   ========================================================= */
.orders-status-cell-v1008{min-width:190px!important;overflow:visible!important}
.order-status-inline-v1008{display:flex;align-items:center;gap:8px;white-space:nowrap;min-width:max-content}
.order-status-badge-v1008{flex:0 0 auto}
.quick-status-toggle-v1008{
  appearance:none;display:inline-flex;align-items:center;justify-content:center;min-width:58px;height:30px;
  padding:0 10px;border:1px solid color-mix(in srgb,var(--teal) 34%,var(--line));border-radius:9px;
  background:color-mix(in srgb,var(--teal) 7%,var(--surface-2));color:var(--text);font-size:10.5px;
  font-weight:850;line-height:1;cursor:pointer;transition:.16s ease;position:relative;z-index:1
}
.quick-status-toggle-v1008:hover,.quick-status-toggle-v1008:focus-visible{
  border-color:color-mix(in srgb,var(--teal) 62%,var(--line));background:color-mix(in srgb,var(--teal) 13%,var(--surface));
  outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--teal) 12%,transparent)
}
.quick-status-message-v1008{display:block;min-height:11px;margin-top:3px;color:var(--muted);font-size:8.5px;line-height:1.25;white-space:normal}
.quick-status-message-v1008.is-ok{color:var(--success)}
.quick-status-message-v1008.is-error{color:var(--danger)}

.quick-status-popover-v1008{
  position:fixed;width:250px;max-width:calc(100vw - 20px);z-index:1000000;padding:12px;border:1px solid var(--line);
  border-radius:14px;background:var(--surface);color:var(--text);box-shadow:0 20px 55px rgba(15,38,66,.22);
  direction:inherit
}
.quick-status-popover-v1008[hidden]{display:none!important}
.quick-status-popover-head-v1008{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.quick-status-popover-head-v1008 strong{font-size:12px;line-height:1.35}
.quick-status-close-v1008{
  appearance:none;width:28px;height:28px;display:grid;place-items:center;padding:0;border:1px solid var(--line);border-radius:9px;
  background:var(--surface-2);color:var(--text);font-size:18px;line-height:1;cursor:pointer
}
.quick-status-field-v1008{display:grid;gap:5px}
.quick-status-field-v1008>span{font-size:9.5px;font-weight:850;color:var(--muted)}
.quick-status-field-v1008 select{width:100%!important;min-width:0!important;height:38px!important;font-size:12px!important;font-weight:750!important;border-radius:10px!important}
.quick-status-popover-note-v1008{display:block;margin-top:7px;color:var(--muted);font-size:8.8px;line-height:1.45}
.quick-status-popover-actions-v1008{display:grid;grid-template-columns:1fr auto;gap:7px;margin-top:10px}
.quick-status-popover-actions-v1008 .btn{margin:0!important;min-height:34px!important}
.quick-status-popover-message-v1008{display:block;min-height:13px;margin-top:7px;font-size:9px;line-height:1.35}
.quick-status-popover-message-v1008.is-ok{color:var(--success)}
.quick-status-popover-message-v1008.is-error{color:var(--danger)}

html[data-theme="dark"] .quick-status-toggle-v1008,
html[data-theme="dark"] .quick-status-popover-v1008,
html[data-theme="dark"] .quick-status-close-v1008,
html[data-theme="dark"] .quick-status-field-v1008 select{
  background:var(--surface-2)!important;color:var(--text)!important;border-color:var(--line)!important
}
html[data-theme="dark"] .quick-status-popover-v1008{box-shadow:0 20px 60px rgba(0,0,0,.48)}

@media(max-width:820px){
  .orders-status-cell-v1008{min-width:194px!important}
  .quick-status-toggle-v1008{min-width:62px;height:31px;font-size:10.5px!important}
  .quick-status-popover-v1008{
    left:10px!important;right:10px!important;top:auto!important;bottom:12px!important;width:auto!important;max-width:none!important;
    padding:13px!important;border-radius:16px!important;box-shadow:0 18px 60px rgba(15,38,66,.3)!important
  }
  .quick-status-field-v1008 select{height:42px!important;font-size:13px!important}
  .quick-status-popover-actions-v1008 .btn{min-height:38px!important;font-size:11px!important}
}


/* ================================================================
   HIKAYATI V10.0.9 — CLOSED BOOKS + UNIFIED SECTION BARS + STATUS SPACE
   Every book starts intentionally closed. Inner section headers follow one
   visual grammar, while preserving their navy / teal / gold identities.
   ================================================================ */

/* Main book accordions: no implicit first-open state and no decorative arrows. */
body.page-order-view .book-workspace-summary-v100::after,
body.page-order-view .book-workspace-section-v100>summary::after{
  content:none!important;display:none!important
}

/* One consistent section construction: coloured title bar + separated content body. */
body.page-order-view .book-workspace-section-v100{
  border:1px solid var(--line)!important;
  border-radius:13px!important;
  overflow:hidden!important;
  background:var(--surface)!important;
  box-shadow:none!important;
}
body.page-order-view .book-workspace-section-v100>summary,
html[dir="ltr"] body.page-order-view .book-workspace-section-v100>summary{
  min-height:48px!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  gap:12px!important;padding:11px 15px!important;
  border:0!important;border-radius:0!important;
  box-shadow:none!important;
}
body.page-order-view .book-workspace-section-v100>summary strong{
  font-size:13px!important;font-weight:900!important;line-height:1.35!important;color:var(--text)!important
}
body.page-order-view .book-workspace-section-v100>summary small{
  font-size:10px!important;font-weight:650!important;line-height:1.35!important;color:var(--muted)!important
}
body.page-order-view .book-data-section-v1005>summary{
  background:color-mix(in srgb,var(--navy) 8%,var(--surface))!important;
  border-bottom:1px solid transparent!important
}
body.page-order-view .book-assets-section-v1005>summary{
  background:color-mix(in srgb,var(--teal) 10%,var(--surface))!important;
  border-bottom:1px solid transparent!important
}
body.page-order-view .book-production-section-v1005>summary{
  background:color-mix(in srgb,var(--gold) 15%,var(--surface))!important;
  border-bottom:1px solid transparent!important
}
body.page-order-view .book-data-section-v1005[open]>summary{
  background:color-mix(in srgb,var(--navy) 11%,var(--surface))!important;
  border-bottom:3px solid color-mix(in srgb,var(--navy) 42%,var(--line))!important
}
body.page-order-view .book-assets-section-v1005[open]>summary{
  background:color-mix(in srgb,var(--teal) 14%,var(--surface))!important;
  border-bottom:3px solid color-mix(in srgb,var(--teal) 48%,var(--line))!important
}
body.page-order-view .book-production-section-v1005[open]>summary{
  background:color-mix(in srgb,var(--gold) 20%,var(--surface))!important;
  border-bottom:3px solid color-mix(in srgb,var(--gold) 58%,var(--line))!important
}

/* Orders quick status: reserve real column space and use a compact square
   trigger so long statuses such as shipping remain readable. */
body.page-orders .orders-table.professional-fit-table{
  width:1845px!important;min-width:1845px!important;max-width:1845px!important
}
body.page-orders .orders-table.professional-fit-table th:nth-child(10),
body.page-orders .orders-table.professional-fit-table td:nth-child(10){
  width:160px!important;min-width:160px!important;max-width:160px!important;
  overflow:visible!important;text-overflow:clip!important
}
body.page-orders .orders-table.professional-fit-table th:nth-child(13),
body.page-orders .orders-table.professional-fit-table td:nth-child(13){
  width:389px!important;min-width:389px!important;max-width:389px!important
}
body.page-orders .orders-status-cell-v1008{min-width:160px!important;overflow:visible!important}
body.page-orders .order-status-inline-v1008{
  width:100%!important;min-width:0!important;display:flex!important;align-items:center!important;
  gap:7px!important;overflow:visible!important;white-space:nowrap!important
}
body.page-orders .order-status-badge-v1008{min-width:0!important;max-width:115px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.page-orders .quick-status-toggle-v1008{
  flex:0 0 31px!important;width:31px!important;min-width:31px!important;max-width:31px!important;height:31px!important;
  padding:0!important;border-radius:9px!important;font-size:0!important
}
body.page-orders .quick-status-toggle-v1008>span{
  display:block!important;font-size:17px!important;line-height:1!important;font-weight:900!important;transform:translateY(-1px)
}

@media(max-width:820px){
  body.page-order-view .book-workspace-section-v100>summary,
  html[dir="ltr"] body.page-order-view .book-workspace-section-v100>summary{
    min-height:44px!important;padding:9px 11px!important
  }
  body.page-order-view .book-workspace-section-v100>summary strong{font-size:11.5px!important}
  body.page-order-view .book-workspace-section-v100>summary small{font-size:9px!important}
  body.page-orders .orders-status-cell-v1008{min-width:160px!important}
  body.page-orders .quick-status-toggle-v1008{width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important}
}

html[data-theme="dark"] body.page-order-view .book-workspace-section-v100{
  background:var(--surface)!important;border-color:var(--line)!important
}

/* ================================================================
   HIKAYATI V10.0.10 — PRODUCTION-FIRST BOOK OPEN + TRUE FULL BARS
   Closed book workspaces open with Production expanded only. Data/assets
   use edge-to-edge title bars (no inset summary card). Quick status returns
   to a small readable text action while preserving status column space.
   ================================================================ */

/* Original data/assets details had their own padding/margins. Reset those
   structural rules so all three sections use the same full-width bar grammar. */
body.page-order-view details.book-workspace-section-v100.order-item-detail,
body.page-order-view details.book-workspace-section-v100.item-assets-section{
  padding:0!important;
  margin:0!important;
  border-top:1px solid var(--line)!important;
}
body.page-order-view .book-workspace-section-v100>summary,
html[dir="ltr"] body.page-order-view .book-workspace-section-v100>summary{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  box-sizing:border-box!important;
  border-radius:0!important;
}
body.page-order-view .book-workspace-section-v100>.book-accordion-body{
  width:100%!important;
  box-sizing:border-box!important;
  margin:0!important;
}
/* Make the title bands feel like one continuous component, matching production. */
body.page-order-view .book-data-section-v1005>summary{
  background:color-mix(in srgb,var(--navy) 10%,var(--surface))!important;
}
body.page-order-view .book-assets-section-v1005>summary{
  background:color-mix(in srgb,var(--teal) 12%,var(--surface))!important;
}
body.page-order-view .book-production-section-v1005>summary{
  background:color-mix(in srgb,var(--gold) 16%,var(--surface))!important;
}
body.page-order-view .book-data-section-v1005[open]>summary{
  border-bottom:3px solid color-mix(in srgb,var(--navy) 46%,var(--line))!important;
}
body.page-order-view .book-assets-section-v1005[open]>summary{
  border-bottom:3px solid color-mix(in srgb,var(--teal) 52%,var(--line))!important;
}
body.page-order-view .book-production-section-v1005[open]>summary{
  border-bottom:3px solid color-mix(in srgb,var(--gold) 62%,var(--line))!important;
}

/* Status stays roomy; the trigger is now a small text detail rather than an icon box. */
body.page-orders .orders-table.professional-fit-table{
  width:1865px!important;min-width:1865px!important;max-width:1865px!important;
}
body.page-orders .orders-table.professional-fit-table th:nth-child(10),
body.page-orders .orders-table.professional-fit-table td:nth-child(10){
  width:180px!important;min-width:180px!important;max-width:180px!important;
}
body.page-orders .orders-status-cell-v1008{min-width:180px!important}
body.page-orders .order-status-inline-v1008{
  align-items:center!important;gap:6px!important;white-space:nowrap!important;
}
body.page-orders .order-status-badge-v1008{
  max-width:122px!important;flex:0 1 auto!important;
}
body.page-orders .quick-status-toggle-v1008{
  flex:0 0 auto!important;
  width:auto!important;min-width:44px!important;max-width:none!important;height:28px!important;
  padding:0 8px!important;border-radius:8px!important;
  font-size:9.5px!important;font-weight:800!important;line-height:1!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  white-space:nowrap!important;
}
body.page-orders .quick-status-toggle-v1008>span{display:none!important}

@media(max-width:820px){
  body.page-orders .orders-status-cell-v1008{min-width:180px!important}
  body.page-orders .quick-status-toggle-v1008{
    width:auto!important;min-width:44px!important;max-width:none!important;height:28px!important;
    padding-inline:7px!important;font-size:9.5px!important;
  }
}


/* ================================================================
   HIKAYATI V10.0.11 — STATUS PILL AS THE QUICK-CHANGE TRIGGER
   The separate “Change” control is removed. The existing colored status pill
   itself opens the proven quick-status popover, with a clean inline SVG
   chevron that follows RTL/LTR naturally.
   ================================================================ */
body.page-orders .orders-table.professional-fit-table{
  width:1865px!important;min-width:1865px!important;max-width:1865px!important;
}
body.page-orders .orders-table.professional-fit-table th:nth-child(10),
body.page-orders .orders-table.professional-fit-table td:nth-child(10){
  width:180px!important;min-width:180px!important;max-width:180px!important;
}
body.page-orders .orders-status-cell-v1008{
  min-width:180px!important;overflow:visible!important;
}
body.page-orders .order-status-inline-v1008{
  width:100%!important;min-width:0!important;display:flex!important;align-items:center!important;
  justify-content:flex-start!important;gap:0!important;overflow:visible!important;white-space:nowrap!important;
}
body.page-orders .order-status-badge-v1008{
  max-width:154px!important;min-width:0!important;overflow:hidden!important;white-space:nowrap!important;
}
body.page-orders button.order-status-trigger-v10011{
  appearance:none;-webkit-appearance:none;font-family:inherit!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
  width:auto!important;min-width:0!important;max-width:154px!important;height:30px!important;
  padding:5px 8px 5px 10px!important;margin:0!important;
  border:1px solid color-mix(in srgb,currentColor 18%,transparent)!important;border-radius:999px!important;
  line-height:1!important;cursor:pointer!important;box-shadow:none!important;transition:transform .14s ease,box-shadow .14s ease,filter .14s ease!important;
}
html[dir="rtl"] body.page-orders button.order-status-trigger-v10011{padding:5px 10px 5px 8px!important}
body.page-orders button.order-status-trigger-v10011:hover{
  filter:saturate(1.04) brightness(.985);transform:translateY(-1px);
  box-shadow:0 3px 10px color-mix(in srgb,currentColor 10%,transparent)!important;
}
body.page-orders button.order-status-trigger-v10011:focus-visible{
  outline:none!important;box-shadow:0 0 0 3px color-mix(in srgb,currentColor 18%,transparent)!important;
}
body.page-orders button.order-status-trigger-v10011:disabled{cursor:wait!important;opacity:.72!important;transform:none!important}
body.page-orders .order-status-label-v10011{
  display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font:inherit;line-height:1.15;
}
body.page-orders .order-status-chevron-v10011{
  flex:0 0 13px;width:13px;height:13px;display:grid;place-items:center;opacity:.78;
  transition:transform .16s ease,opacity .16s ease;
}
body.page-orders .order-status-chevron-v10011 svg{
  display:block;width:13px;height:13px;overflow:visible;fill:none;stroke:currentColor;stroke-width:1.75;
  stroke-linecap:round;stroke-linejoin:round;
}
body.page-orders button.order-status-trigger-v10011:hover .order-status-chevron-v10011{opacity:1;transform:translateY(1px)}
body.page-orders button.order-status-trigger-v10011[aria-expanded="true"] .order-status-chevron-v10011{transform:rotate(180deg)}
/* The old standalone trigger is intentionally retired in this release. */
body.page-orders .quick-status-toggle-v1008{display:none!important}

@media(max-width:820px){
  body.page-orders .orders-status-cell-v1008{min-width:180px!important}
  body.page-orders .order-status-badge-v1008,
  body.page-orders button.order-status-trigger-v10011{max-width:154px!important}
  body.page-orders button.order-status-trigger-v10011{height:31px!important;font-size:10.5px!important;gap:5px!important}
}

/* ================================================================
   HIKAYATI V10.0.12 — LAPTOP-FIT ORDERS TABLE
   Tighten low-value whitespace between Customer/Phone and Status/Total,
   while preserving readable row actions so Delete stays visible on a
   normal laptop viewport. Smaller screens keep true horizontal scrolling.
   ================================================================ */
@media (min-width:1180px){
  body.page-orders .orders-table-panel-v100 .table-wrap,
  body.page-orders .orders-table-panel-v100 .smart-table-scroll-v100{
    overflow-x:hidden!important;
  }
  body.page-orders .orders-table.professional-fit-table{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
  }
  body.page-orders .orders-table.professional-fit-table th,
  body.page-orders .orders-table.professional-fit-table td{
    min-width:0!important;
    max-width:none!important;
    padding-inline:5px!important;
  }
  body.page-orders .orders-table.professional-fit-table th:nth-child(1),body.page-orders .orders-table.professional-fit-table td:nth-child(1){width:2.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(2),body.page-orders .orders-table.professional-fit-table td:nth-child(2){width:6.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(3),body.page-orders .orders-table.professional-fit-table td:nth-child(3){width:7%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(4),body.page-orders .orders-table.professional-fit-table td:nth-child(4){width:7%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(5),body.page-orders .orders-table.professional-fit-table td:nth-child(5){width:5.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(6),body.page-orders .orders-table.professional-fit-table td:nth-child(6){width:8.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(7),body.page-orders .orders-table.professional-fit-table td:nth-child(7){width:10%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(8),body.page-orders .orders-table.professional-fit-table td:nth-child(8){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(9),body.page-orders .orders-table.professional-fit-table td:nth-child(9){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(10),body.page-orders .orders-table.professional-fit-table td:nth-child(10){width:9%!important;min-width:0!important;max-width:none!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(11),body.page-orders .orders-table.professional-fit-table td:nth-child(11){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(12),body.page-orders .orders-table.professional-fit-table td:nth-child(12){width:7.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(13),body.page-orders .orders-table.professional-fit-table td:nth-child(13){width:18.5%!important;min-width:0!important;max-width:none!important;overflow:visible!important;text-overflow:clip!important}

  body.page-orders .orders-status-cell-v1008{min-width:0!important;max-width:none!important;padding-inline:4px!important}
  body.page-orders .order-status-inline-v1008{width:100%!important;min-width:0!important}
  body.page-orders .order-status-badge-v1008,
  body.page-orders button.order-status-trigger-v10011{max-width:100%!important;min-width:0!important}

  body.page-orders .order-row-actions{
    width:100%!important;
    gap:4px!important;
    flex-wrap:nowrap!important;
    justify-content:flex-start!important;
    overflow:visible!important;
  }
  body.page-orders .order-row-actions .btn{
    min-width:0!important;
    min-height:30px!important;
    padding:5px 6px!important;
    font-size:10px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }
  body.page-orders .order-row-actions form{min-width:0!important;flex:0 0 auto!important}

  /* Keep compact neighbor columns visually close instead of wasting blank space. */
  body.page-orders .orders-table.professional-fit-table td:nth-child(3),
  body.page-orders .orders-table.professional-fit-table td:nth-child(4),
  body.page-orders .orders-table.professional-fit-table td:nth-child(10),
  body.page-orders .orders-table.professional-fit-table td:nth-child(11){
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}

@media (min-width:821px) and (max-width:1179px){
  body.page-orders .orders-table-panel-v100 .table-wrap,
  body.page-orders .orders-table-panel-v100 .smart-table-scroll-v100{
    overflow-x:auto!important;
    overscroll-behavior-inline:contain!important;
  }
  body.page-orders .orders-table.professional-fit-table{
    width:1500px!important;
    min-width:1500px!important;
    max-width:1500px!important;
    table-layout:fixed!important;
  }
}

/* V10.0.15 — production gallery + compact PDF reset + AI extra note */
.production-gallery-toolbar-v10015{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0 14px}.production-gallery-toolbar-v10015 small{color:var(--muted)}
.production-gallery-open-v10015 span{font-weight:800;opacity:.72}.generated-pdf-delete-form-v10015{display:inline-flex;margin:0}
.ai-extra-note-v10015{padding:12px 14px;border:1px dashed var(--line);border-radius:14px;background:var(--surface-2)}.ai-extra-note-v10015 small{display:block;color:var(--muted);margin-top:5px}.ai-extra-note-v10015 textarea{min-height:82px}
html.production-gallery-open-v10015,html.production-gallery-open-v10015 body{overflow:hidden}
.production-gallery-modal-v10015[hidden]{display:none!important}.production-gallery-modal-v10015{position:fixed;inset:0;z-index:10050;background:rgba(5,12,25,.88);backdrop-filter:blur(8px);padding:18px;display:grid;place-items:center}
.production-gallery-dialog-v10015{width:min(1120px,100%);height:min(94vh,980px);background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:22px;box-shadow:0 30px 90px rgba(0,0,0,.34);display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}
.production-gallery-head-v10015{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 16px;border-bottom:1px solid var(--line);background:var(--surface-2)}.production-gallery-head-v10015 strong{display:block;font-size:15px}.production-gallery-head-v10015 small{color:var(--muted);font-weight:800}.production-gallery-close-v10015{width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font-size:25px;line-height:1;cursor:pointer}
.production-gallery-stage-v10015{position:relative;min-height:0;display:grid;grid-template-columns:54px minmax(0,1fr) 54px;align-items:center;gap:10px;padding:14px;background:color-mix(in srgb,var(--bg) 82%,#000 18%);overflow:hidden}.production-gallery-stage-v10015 figure{margin:0;height:100%;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto;place-items:center;gap:8px}.production-gallery-stage-v10015 figure img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:14px;box-shadow:0 14px 44px rgba(0,0,0,.24);background:#111}.production-gallery-stage-v10015 figcaption{font-size:13px;font-weight:800;color:var(--text);text-align:center;min-height:22px}
.production-gallery-nav-v10015{width:46px;height:64px;border:1px solid var(--line);border-radius:15px;background:color-mix(in srgb,var(--surface) 88%,transparent);color:var(--text);display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.08)}.production-gallery-nav-v10015 svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}.production-gallery-nav-v10015:hover{transform:translateY(-1px);background:var(--surface)}.production-gallery-nav-v10015:disabled{opacity:.35;cursor:default;transform:none}
.production-gallery-thumbs-v10015{display:flex;gap:8px;overflow-x:auto;padding:10px 12px;border-top:1px solid var(--line);background:var(--surface-2);scrollbar-width:thin}.production-gallery-thumbs-v10015 button{position:relative;flex:0 0 58px;width:58px;height:78px;padding:2px;border:2px solid transparent;border-radius:10px;background:var(--surface);cursor:pointer;overflow:hidden}.production-gallery-thumbs-v10015 button.active{border-color:var(--brand);box-shadow:0 0 0 2px color-mix(in srgb,var(--brand) 18%,transparent)}.production-gallery-thumbs-v10015 img{width:100%;height:100%;object-fit:cover;border-radius:7px}.production-gallery-thumbs-v10015 span{position:absolute;inset-inline-end:4px;bottom:4px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:rgba(0,0,0,.72);color:#fff;font-size:10px;display:grid;place-items:center}
@media(max-width:700px){.production-gallery-modal-v10015{padding:0}.production-gallery-dialog-v10015{width:100%;height:100dvh;border-radius:0;border:0}.production-gallery-stage-v10015{grid-template-columns:40px minmax(0,1fr) 40px;padding:8px;gap:4px}.production-gallery-nav-v10015{width:36px;height:54px;border-radius:12px}.production-gallery-nav-v10015 svg{width:20px;height:20px}.production-gallery-thumbs-v10015 button{flex-basis:50px;width:50px;height:68px}.production-gallery-toolbar-v10015{align-items:stretch}.production-gallery-toolbar-v10015 .btn{width:100%}.production-gallery-toolbar-v10015 small{width:100%;font-size:11px}}

/* ============================================================
   V10.0.16 — Gallery direction + practical single-page invoice
   ============================================================ */
.production-gallery-stage-v10015{direction:ltr}
.production-gallery-stage-v10015 figure{direction:inherit}
html[dir="rtl"] .production-gallery-stage-v10015 figcaption{direction:rtl}
html[dir="ltr"] .production-gallery-stage-v10015 figcaption{direction:ltr}

.invoice-body-v10016{background:#edf1f6;color:#1e293b}
.invoice-toolbar-v10016{width:min(900px,calc(100% - 28px));margin:16px auto 0}
.invoice-v10016{
  width:min(900px,calc(100% - 28px));
  margin:16px auto 28px;
  padding:24px 28px 18px;
  border-radius:18px;
  border-top:6px solid #243a60;
  box-shadow:0 14px 42px rgba(31,45,67,.10);
  background:#fff;
  color:#1e293b;
  overflow:hidden;
}
.invoice-v10016 *{box-sizing:border-box}
.invoice-top-v10016{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:24px;padding-bottom:14px;border-bottom:2px solid #243a60}
.invoice-brand-v10016{display:flex;align-items:flex-start;min-width:0}
.invoice-brand-v10016 img{display:block;width:210px;max-width:100%;height:82px;object-fit:contain;object-position:inline-start top;filter:none!important}
.invoice-meta-v10016{text-align:end;min-width:250px}
.invoice-kicker-v10016{display:block;font-size:12px;font-weight:800;color:#6b778c;margin-bottom:1px}
.invoice-meta-v10016 h1{margin:0;font-size:30px;line-height:1.1;color:#182840;letter-spacing:.01em}
.invoice-meta-dates-v10016{display:flex;justify-content:flex-end;gap:8px;margin-top:8px;flex-wrap:wrap}
.invoice-meta-dates-v10016>div{display:flex;gap:7px;align-items:center;border:1px solid #dde4ed;background:#f8fafc;border-radius:10px;padding:6px 9px;white-space:nowrap}
.invoice-meta-dates-v10016 span{font-size:9.5px;color:#778399;font-weight:700}
.invoice-meta-dates-v10016 strong{font-size:11px;color:#26364e}

.invoice-primary-grid-v10016{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(250px,.8fr);gap:12px;margin:14px 0 12px}
.invoice-primary-grid-v10016.invoice-primary-no-notes-v10016{grid-template-columns:1fr}
.invoice-customer-card-v10016,.invoice-notes-card-v10016{border:1px solid #dbe3ed;border-radius:14px;background:#fbfcfe;padding:12px 14px;min-width:0}
.invoice-customer-card-v10016 h2,.invoice-notes-card-v10016 h2{margin:0 0 9px;font-size:12px;color:#51627c;font-weight:900}
.invoice-customer-name-v10016{display:flex;align-items:baseline;gap:12px;margin-bottom:8px;padding-bottom:8px;border-bottom:1px dashed #dfe5ec}
.invoice-customer-name-v10016 span{font-size:10px;color:#7a879a;min-width:58px}
.invoice-customer-name-v10016 strong{font-size:17px;color:#17263d;overflow-wrap:anywhere}
.invoice-customer-critical-v10016{display:grid;grid-template-columns:minmax(145px,.7fr) minmax(165px,.85fr) minmax(0,1.45fr);gap:8px}
.invoice-customer-critical-v10016>div{min-width:0;padding:8px 9px;border-radius:10px;background:#fff;border:1px solid #e4eaf1}
.invoice-customer-critical-v10016 span{display:block;font-size:9.5px;color:#77859a;margin-bottom:3px;font-weight:700}
.invoice-customer-critical-v10016 strong{display:block;font-size:14.5px;line-height:1.35;color:#17263d;font-weight:900;overflow-wrap:anywhere}
.invoice-customer-critical-v10016 .invoice-address-v10016 strong{font-size:13.5px}

.invoice-notes-card-v10016{background:#fffaf2;border-color:#f0dcc1}
.invoice-note-v10016+.invoice-note-v10016{margin-top:8px;padding-top:8px;border-top:1px dashed #ead7bc}
.invoice-note-v10016 span{display:block;font-size:9.5px;font-weight:900;color:#9a6527;margin-bottom:3px}
.invoice-note-v10016.customer-v10016 span{color:#345f8e}
.invoice-note-v10016 p{margin:0;font-size:11px;line-height:1.55;color:#3b4656;overflow-wrap:anywhere}

.invoice-table-v10016{width:100%;margin:0;border-collapse:collapse;table-layout:fixed;font-size:11.5px}
.invoice-table-v10016 thead th{background:#eaf0f7;color:#465a75;padding:7px 9px;border-bottom:1px solid #d8e0ea;text-align:start;font-size:10px}
.invoice-table-v10016 th:first-child,.invoice-table-v10016 td:first-child{width:29%}
.invoice-table-v10016 th:last-child,.invoice-table-v10016 td:last-child{width:18%;text-align:center;white-space:nowrap}
.invoice-table-v10016 tbody td{padding:7px 9px;border-bottom:1px solid #e7ebf0;vertical-align:top;overflow-wrap:anywhere}
.invoice-table-v10016 tbody tr:nth-child(even){background:#fbfcfe}
.invoice-table-v10016 .invoice-subrow-v10016 td{font-size:10.5px;color:#64748b;padding-top:5px;padding-bottom:5px}
.invoice-table-v10016 tfoot td{padding:9px;font-size:15px;font-weight:900;border-top:2px solid #243a60;color:#17263d}

.invoice-bottom-grid-v10016{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:stretch;margin-top:12px}
.invoice-bottom-grid-v10016.invoice-bottom-no-qr-v10016{grid-template-columns:1fr}
.invoice-order-summary-v10016{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.invoice-order-summary-v10016>div{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #dfe5ed;border-radius:11px;padding:8px 10px;background:#f8fafc;min-width:0}
.invoice-order-summary-v10016 span{font-size:9.5px;color:#75839a;font-weight:700}
.invoice-order-summary-v10016 strong{font-size:11.5px;color:#21324b;overflow-wrap:anywhere;text-align:end}
.invoice-contact-qr-v10016{display:flex;align-items:center;gap:10px;border:1px solid #d9e4ef;border-radius:12px;padding:8px 10px;background:#f7fafc;min-width:245px;max-width:310px}
.invoice-contact-qr-v10016>div{min-width:0;flex:1}
.invoice-contact-qr-v10016 strong{display:block;font-size:11.5px;color:#223654;margin-bottom:2px}
.invoice-contact-qr-v10016 span{display:block;font-size:9px;line-height:1.35;color:#738096}
.invoice-contact-qr-v10016 img{width:62px;height:62px;object-fit:contain;background:#fff;border:1px solid #e1e5ea;border-radius:7px;padding:3px;flex:none;filter:none!important}
.invoice-footer-v10016{margin-top:12px;padding-top:8px;border-top:1px solid #e1e6ec;display:flex;justify-content:center;align-items:center;gap:9px;color:#738096;font-size:9.5px}
.invoice-footer-v10016 img{width:64px;height:28px;object-fit:contain;filter:none!important}

.invoice-dense-v10016{padding-top:20px;padding-bottom:14px}
.invoice-dense-v10016 .invoice-primary-grid-v10016{margin-top:10px;margin-bottom:9px}
.invoice-dense-v10016 .invoice-customer-card-v10016,.invoice-dense-v10016 .invoice-notes-card-v10016{padding:9px 11px}
.invoice-dense-v10016 .invoice-table-v10016 tbody td{padding-top:5px;padding-bottom:5px;font-size:10.5px}
.invoice-dense-v10016 .invoice-note-v10016 p{font-size:10px;line-height:1.4}
.invoice-dense-v10016 .invoice-bottom-grid-v10016{margin-top:8px}
.invoice-dense-v10016 .invoice-footer-v10016{margin-top:8px}

body.bulk-invoices-body-v1005 .invoice-v10016{break-after:page;page-break-after:always}
body.bulk-invoices-body-v1005 .invoice-v10016:last-of-type{break-after:auto;page-break-after:auto}

@media(max-width:720px){
  .invoice-v10016{width:calc(100% - 16px);margin:8px auto 18px;padding:16px 14px;border-radius:14px}
  .invoice-toolbar-v10016{width:calc(100% - 16px);margin-top:8px}
  .invoice-top-v10016{grid-template-columns:1fr auto;gap:10px}
  .invoice-brand-v10016 img{width:130px;height:58px}
  .invoice-meta-v10016{min-width:150px}.invoice-meta-v10016 h1{font-size:21px}
  .invoice-meta-dates-v10016{display:grid;grid-template-columns:1fr;gap:4px}.invoice-meta-dates-v10016>div{padding:5px 7px}
  .invoice-primary-grid-v10016{grid-template-columns:1fr}.invoice-customer-critical-v10016{grid-template-columns:1fr 1fr}.invoice-address-v10016{grid-column:1/-1}
  .invoice-contact-qr-v10016{min-width:0;max-width:none}.invoice-bottom-grid-v10016{grid-template-columns:1fr}
  .invoice-table-v10016{font-size:10.5px}.invoice-table-v10016 th:first-child,.invoice-table-v10016 td:first-child{width:31%}.invoice-table-v10016 th:last-child,.invoice-table-v10016 td:last-child{width:22%}
}

@media print{
  @page{size:A4 portrait;margin:7mm}
  html,body.invoice-body-v10016{background:#fff!important}
  .invoice-body-v10016{margin:0!important;padding:0!important}
  .invoice-v10016{width:100%!important;max-width:none!important;margin:0!important;padding:6mm 7mm 4mm!important;border-radius:0!important;box-shadow:none!important;border-top-width:4px!important;min-height:0!important;page-break-inside:avoid!important;break-inside:avoid-page!important}
  .invoice-top-v10016{gap:6mm;padding-bottom:3mm}.invoice-brand-v10016 img{width:48mm;height:18mm}.invoice-meta-v10016{min-width:52mm}.invoice-meta-v10016 h1{font-size:22pt}.invoice-meta-dates-v10016{margin-top:2mm}
  .invoice-primary-grid-v10016{margin:3mm 0 2.5mm;gap:2.5mm}.invoice-customer-card-v10016,.invoice-notes-card-v10016{padding:2.5mm 3mm;border-radius:3mm}
  .invoice-customer-name-v10016{margin-bottom:1.5mm;padding-bottom:1.5mm}.invoice-customer-name-v10016 strong{font-size:13pt}
  .invoice-customer-critical-v10016{gap:1.5mm}.invoice-customer-critical-v10016>div{padding:1.7mm 2mm}.invoice-customer-critical-v10016 strong{font-size:10.5pt}.invoice-customer-critical-v10016 .invoice-address-v10016 strong{font-size:10pt}
  .invoice-note-v10016 p{font-size:8.5pt;line-height:1.35}
  .invoice-table-v10016{font-size:8.5pt}.invoice-table-v10016 thead th{padding:1.6mm 2mm;font-size:7.5pt}.invoice-table-v10016 tbody td{padding:1.55mm 2mm}.invoice-table-v10016 tfoot td{padding:1.8mm 2mm;font-size:11pt}
  .invoice-bottom-grid-v10016{margin-top:2.5mm;gap:2.5mm}.invoice-order-summary-v10016{gap:1.5mm}.invoice-order-summary-v10016>div{padding:1.8mm 2mm}.invoice-contact-qr-v10016{min-width:58mm;padding:1.8mm 2mm}.invoice-contact-qr-v10016 img{width:16mm;height:16mm}.invoice-footer-v10016{margin-top:2mm;padding-top:1.5mm}
  .invoice-dense-v10016 .invoice-table-v10016 tbody td{padding-top:1.1mm;padding-bottom:1.1mm;font-size:8pt}.invoice-dense-v10016 .invoice-note-v10016 p{font-size:7.8pt}.invoice-dense-v10016 .invoice-customer-critical-v10016 strong{font-size:9.5pt}
  body.bulk-invoices-body-v1005 .invoice-v10016{page-break-after:always!important;break-after:page!important}
  body.bulk-invoices-body-v1005 .invoice-v10016:last-of-type{page-break-after:auto!important;break-after:auto!important}
}

/* ============================================================
   V10.0.17 — Production command bar + progress meter + AI cost
   ============================================================ */
body.page-order-view .production-book-head{
  align-items:stretch;
}
body.page-order-view .production-book-metrics-v10017{
  display:grid!important;
  grid-template-columns:minmax(220px,1.35fr) minmax(150px,.85fr)!important;
  gap:10px!important;
  width:min(520px,48%)!important;
  align-items:stretch!important;
}
body.page-order-view .book-progress-card-v10017{
  min-width:0;
  padding:10px 12px;
  border:1px solid color-mix(in srgb,var(--brand) 20%,var(--line));
  border-radius:13px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--brand) 7%,var(--surface)),var(--surface));
  box-shadow:0 5px 16px color-mix(in srgb,var(--brand) 6%,transparent);
  display:grid;
  gap:8px;
  align-content:center;
}
body.page-order-view .book-progress-top-v10017{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
}
body.page-order-view .book-progress-top-v10017>span{
  font-size:11px;
  color:var(--muted);
  font-weight:850;
}
body.page-order-view .book-progress-top-v10017 .progress-number{
  font-size:12px!important;
  color:var(--text);
  font-weight:950;
  white-space:nowrap;
}
body.page-order-view .book-progress-track-v10017{
  position:relative;
  height:8px;
  overflow:hidden;
  border-radius:999px;
  background:color-mix(in srgb,var(--brand) 10%,var(--surface-2));
  border:1px solid color-mix(in srgb,var(--brand) 12%,var(--line));
}
body.page-order-view .book-progress-track-v10017>span{
  position:absolute;
  inset-block:0;
  inset-inline-start:0;
  width:0;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--brand),color-mix(in srgb,var(--brand) 58%,var(--gold)));
  box-shadow:0 0 12px color-mix(in srgb,var(--brand) 30%,transparent);
  transition:width .38s ease;
}
body.page-order-view .book-progress-card-v10017.is-working .book-progress-track-v10017>span::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.42) 50%,transparent 80%);
  transform:translateX(-100%);
  animation:hikayatiProgressSweep 1.5s linear infinite;
}
@keyframes hikayatiProgressSweep{to{transform:translateX(100%)}}

body.page-order-view .book-ai-cost-v10017{
  min-width:0!important;
  padding:9px 12px!important;
  border-radius:13px!important;
  border:1px solid color-mix(in srgb,var(--gold) 35%,var(--line))!important;
  background:linear-gradient(135deg,color-mix(in srgb,var(--gold) 14%,var(--surface)),color-mix(in srgb,var(--brand) 5%,var(--surface)))!important;
  box-shadow:0 5px 16px color-mix(in srgb,var(--gold) 8%,transparent);
  display:grid!important;
  grid-template-columns:1fr auto;
  grid-template-areas:"label value" "note note";
  gap:2px 10px!important;
  align-content:center;
}
body.page-order-view .book-ai-cost-v10017 span{
  grid-area:label;
  font-size:10px!important;
  color:color-mix(in srgb,var(--gold) 80%,var(--text))!important;
  font-weight:900!important;
  align-self:center;
}
body.page-order-view .book-ai-cost-v10017 strong{
  grid-area:value;
  font-size:16px!important;
  line-height:1!important;
  color:var(--text)!important;
  font-weight:950!important;
  white-space:nowrap;
}
body.page-order-view .book-ai-cost-v10017 small{
  grid-area:note;
  font-size:8.5px;
  color:var(--muted);
  font-weight:750;
}

body.page-order-view .production-page-operations-v10017{
  margin:12px 0 15px!important;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:color-mix(in srgb,var(--surface-2) 82%,var(--surface));
  display:grid!important;
  gap:7px!important;
  align-items:stretch!important;
}
body.page-order-view .production-page-operations-buttons-v10017{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}
body.page-order-view .production-page-operations-buttons-v10017 .btn{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1.2;
}
body.page-order-view .production-page-operations-buttons-v10017 form{
  margin:0;
  display:inline-flex;
}
body.page-order-view .production-page-operations-v10017>small{
  color:var(--muted);
  font-size:10.5px;
  font-weight:700;
}

body.page-order-view .blueprint-live-warning-v10017{
  position:relative;
  margin-top:10px!important;
  padding:13px 15px!important;
  border-width:1px!important;
  border-inline-start:4px solid var(--warning)!important;
  border-radius:13px!important;
  box-shadow:0 5px 18px color-mix(in srgb,var(--warning) 10%,transparent);
}
body.page-order-view .blueprint-live-warning-v10017 strong{
  font-size:13px;
  font-weight:950;
}
body.page-order-view .blueprint-live-warning-v10017 span{
  display:inline-block;
  margin-top:3px;
  line-height:1.65;
  font-size:11px;
}

@media(max-width:980px){
  body.page-order-view .production-book-head{display:grid!important;grid-template-columns:1fr!important}
  body.page-order-view .production-book-metrics-v10017{width:100%!important;grid-template-columns:minmax(0,1.3fr) minmax(0,.8fr)!important}
}
@media(max-width:700px){
  body.page-order-view .production-book-metrics-v10017{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
  }
  body.page-order-view .book-progress-card-v10017,
  body.page-order-view .book-ai-cost-v10017{
    width:100%!important;
    min-height:58px!important;
    padding:8px 9px!important;
  }
  body.page-order-view .book-progress-top-v10017{gap:6px}
  body.page-order-view .book-progress-top-v10017>span{font-size:9px}
  body.page-order-view .book-progress-top-v10017 .progress-number{font-size:10px!important}
  body.page-order-view .book-progress-track-v10017{height:7px}
  body.page-order-view .book-ai-cost-v10017{grid-template-columns:1fr!important;grid-template-areas:"label" "value"!important;gap:2px!important}
  body.page-order-view .book-ai-cost-v10017 span{font-size:8.5px!important}
  body.page-order-view .book-ai-cost-v10017 strong{font-size:13px!important}
  body.page-order-view .book-ai-cost-v10017 small{display:none}
  body.page-order-view .production-page-operations-v10017{padding:8px!important;gap:6px!important}
  body.page-order-view .production-page-operations-buttons-v10017{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    width:100%;
  }
  body.page-order-view .production-page-operations-buttons-v10017>*{min-width:0!important;width:100%!important}
  body.page-order-view .production-page-operations-buttons-v10017 form{display:block!important}
  body.page-order-view .production-page-operations-buttons-v10017 .btn{width:100%!important;min-height:36px!important;padding:6px 7px!important;font-size:9px!important;white-space:normal!important}
  body.page-order-view .production-page-operations-v10017>small{width:100%;font-size:9.5px}
}
body.page-order-view .production-book-metrics-v10017 .book-progress-top-v10017 .progress-number{
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  display:block!important;
  align-content:initial!important;
}


/* ============================================================
   V10.0.18 — A5 invoice print fit + space optimization
   ============================================================ */
.invoice-meta-dates-v10016{
  display:grid;
  grid-template-columns:1fr;
  gap:3px;
  margin-top:10px;
  justify-items:start;
}
.invoice-meta-dates-v10016>div{
  display:flex;
  align-items:baseline;
  justify-content:flex-start;
  gap:8px;
  padding:0;
  border:0;
  background:transparent;
  border-radius:0;
  white-space:normal;
}
.invoice-meta-dates-v10016 span{
  font-size:11px;
  color:#6b778c;
  font-weight:800;
}
.invoice-meta-dates-v10016 strong{
  font-size:13px;
  color:#1f314d;
  font-weight:900;
}
.invoice-customer-critical-v10016 .invoice-address-v10016 strong[dir="ltr"],
.invoice-customer-critical-v10016 [dir="ltr"]{
  unicode-bidi:isolate;
}
@media print{
  @page{size:A5 portrait;margin:5mm}
  .invoice-v10016{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:4.2mm 4.6mm 3.2mm!important;
    border-radius:0!important;
    box-shadow:none!important;
    border-top-width:1.3mm!important;
    min-height:0!important;
    page-break-inside:avoid!important;
    break-inside:avoid-page!important;
  }
  .invoice-top-v10016{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:4mm!important;
    padding-bottom:2.4mm!important;
    border-bottom:0.5mm solid #243a60!important;
    align-items:start!important;
  }
  .invoice-brand-v10016 img{
    width:38mm!important;
    height:15mm!important;
    object-position:top right!important;
  }
  .invoice-meta-v10016{
    min-width:0!important;
  }
  .invoice-kicker-v10016{
    font-size:8pt!important;
    margin-bottom:0.4mm!important;
  }
  .invoice-meta-v10016 h1{
    font-size:20pt!important;
    line-height:1.05!important;
    margin:0 0 .6mm!important;
  }
  .invoice-meta-dates-v10016{
    display:grid!important;
    grid-template-columns:1fr!important;
    justify-items:start!important;
    gap:.6mm!important;
    margin-top:0!important;
  }
  .invoice-meta-dates-v10016>div{
    display:flex!important;
    align-items:baseline!important;
    justify-content:flex-start!important;
    gap:1.4mm!important;
    border:0!important;
    background:transparent!important;
    padding:0!important;
    border-radius:0!important;
  }
  .invoice-meta-dates-v10016 span{
    font-size:7.6pt!important;
    color:#6f7d92!important;
    font-weight:800!important;
  }
  .invoice-meta-dates-v10016 strong{
    font-size:8.6pt!important;
    color:#1d2e49!important;
    font-weight:900!important;
  }
  .invoice-primary-grid-v10016{
    grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr)!important;
    gap:2mm!important;
    margin:2.6mm 0 2.2mm!important;
    align-items:stretch!important;
  }
  .invoice-customer-card-v10016,
  .invoice-notes-card-v10016{
    padding:2.2mm 2.6mm!important;
    border-radius:3mm!important;
    min-height:0!important;
  }
  .invoice-customer-card-v10016 h2,
  .invoice-notes-card-v10016 h2{
    font-size:8pt!important;
    margin:0 0 1.4mm!important;
  }
  .invoice-customer-name-v10016{
    margin-bottom:1.4mm!important;
    padding-bottom:1.4mm!important;
    gap:2.2mm!important;
  }
  .invoice-customer-name-v10016 span{
    font-size:7.6pt!important;
    min-width:14mm!important;
  }
  .invoice-customer-name-v10016 strong{
    font-size:12.8pt!important;
    line-height:1.15!important;
  }
  .invoice-customer-critical-v10016{
    grid-template-columns:1fr 1fr!important;
    gap:1.4mm!important;
  }
  .invoice-customer-critical-v10016>div{
    padding:1.8mm 2mm!important;
    border-radius:2.4mm!important;
  }
  .invoice-customer-critical-v10016 span{
    font-size:7.1pt!important;
    margin-bottom:.45mm!important;
  }
  .invoice-customer-critical-v10016 strong{
    font-size:10.2pt!important;
    line-height:1.22!important;
  }
  .invoice-customer-critical-v10016>div:first-child strong{
    font-size:11.3pt!important;
    letter-spacing:.01em!important;
  }
  .invoice-customer-critical-v10016 .invoice-address-v10016{
    grid-column:1 / -1!important;
  }
  .invoice-customer-critical-v10016 .invoice-address-v10016 strong{
    font-size:9.6pt!important;
  }
  .invoice-note-v10016 + .invoice-note-v10016{
    margin-top:1.3mm!important;
    padding-top:1.3mm!important;
  }
  .invoice-note-v10016 span{
    font-size:7.2pt!important;
    margin-bottom:.45mm!important;
  }
  .invoice-note-v10016 p{
    font-size:8.4pt!important;
    line-height:1.35!important;
  }
  .invoice-table-v10016{
    font-size:8.2pt!important;
  }
  .invoice-table-v10016 thead th{
    padding:1.45mm 1.7mm!important;
    font-size:7.2pt!important;
  }
  .invoice-table-v10016 tbody td{
    padding:1.4mm 1.7mm!important;
  }
  .invoice-table-v10016 th:first-child,
  .invoice-table-v10016 td:first-child{
    width:31%!important;
  }
  .invoice-table-v10016 th:last-child,
  .invoice-table-v10016 td:last-child{
    width:19%!important;
  }
  .invoice-table-v10016 tfoot td{
    padding:1.7mm 1.7mm!important;
    font-size:11pt!important;
  }
  .invoice-bottom-grid-v10016{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:2mm!important;
    margin-top:2.2mm!important;
    align-items:stretch!important;
  }
  .invoice-order-summary-v10016{
    gap:1.3mm!important;
  }
  .invoice-order-summary-v10016>div{
    padding:1.7mm 1.9mm!important;
    border-radius:2.6mm!important;
  }
  .invoice-order-summary-v10016 span{
    font-size:7.1pt!important;
  }
  .invoice-order-summary-v10016 strong{
    font-size:8.6pt!important;
  }
  .invoice-contact-qr-v10016{
    min-width:44mm!important;
    max-width:48mm!important;
    padding:1.7mm 1.9mm!important;
    gap:1.5mm!important;
    border-radius:2.8mm!important;
  }
  .invoice-contact-qr-v10016 strong{
    font-size:8.1pt!important;
    margin-bottom:.3mm!important;
  }
  .invoice-contact-qr-v10016 span{
    font-size:6.8pt!important;
    line-height:1.25!important;
  }
  .invoice-contact-qr-v10016 img{
    width:14.5mm!important;
    height:14.5mm!important;
    padding:1mm!important;
  }
  .invoice-footer-v10016{
    margin-top:1.8mm!important;
    padding-top:1.2mm!important;
    font-size:7.2pt!important;
  }
  .invoice-footer-v10016 img{
    width:18mm!important;
    height:8mm!important;
  }
  .invoice-dense-v10016 .invoice-table-v10016 tbody td{
    padding-top:1.05mm!important;
    padding-bottom:1.05mm!important;
    font-size:7.8pt!important;
  }
  .invoice-dense-v10016 .invoice-note-v10016 p{
    font-size:7.6pt!important;
  }
  .invoice-dense-v10016 .invoice-customer-critical-v10016>div:first-child strong{
    font-size:10.5pt!important;
  }
}


/* ============================================================
   V10.0.19 — Flexible customer / notes invoice layout
   ============================================================ */
.invoice-primary-grid-v10016{
  grid-template-columns:minmax(0,1fr) minmax(180px,28%)!important;
  align-items:stretch;
}
.invoice-primary-grid-v10016.invoice-primary-no-notes-v10016{
  grid-template-columns:minmax(0,1fr)!important;
}
.invoice-primary-grid-v10016.invoice-primary-address-long-v10019{
  grid-template-columns:minmax(0,1fr) minmax(155px,23%)!important;
}
.invoice-notes-card-v10016{
  padding:10px 11px!important;
  min-width:0!important;
  overflow:hidden;
}
.invoice-notes-card-v10016 h2{margin-bottom:6px!important}
.invoice-note-v10016 p{overflow-wrap:anywhere;word-break:break-word}

@media(max-width:720px){
  .invoice-primary-grid-v10016,
  .invoice-primary-grid-v10016.invoice-primary-address-long-v10019,
  .invoice-primary-grid-v10016.invoice-primary-no-notes-v10016{
    grid-template-columns:1fr!important;
  }
}

@media print{
  /* If there are no notes, customer information owns the entire printable width. */
  .invoice-primary-grid-v10016.invoice-primary-no-notes-v10016{
    grid-template-columns:minmax(0,1fr)!important;
  }
  /* Notes stay intentionally compact; customer info receives the remaining A5 width. */
  .invoice-primary-grid-v10016{
    grid-template-columns:minmax(0,1fr) 36mm!important;
    gap:1.8mm!important;
  }
  /* A long address is allowed to borrow more width from the notes column. */
  .invoice-primary-grid-v10016.invoice-primary-address-long-v10019{
    grid-template-columns:minmax(0,1fr) 29mm!important;
  }
  .invoice-notes-card-v10016{
    padding:1.8mm 2mm!important;
    border-radius:2.6mm!important;
  }
  .invoice-notes-card-v10016 h2{
    margin-bottom:1mm!important;
    font-size:7.5pt!important;
  }
  .invoice-note-v10016 span{font-size:6.9pt!important}
  .invoice-note-v10016 p{font-size:7.8pt!important;line-height:1.3!important}
}

/* V10.0.22 — AI cost breakdown visibility */
.book-ai-breakdown-mini-v10022{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}
.book-ai-breakdown-mini-v10022 span,
.page-ai-cost-breakdown-v10022 small,
.professional-fit-table-ai-cost-v10022 td small{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(57,115,196,.08);
  color:#34527a;
}
.page-ai-cost-breakdown-v10022{
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.page-ai-cost-breakdown-v10022 span{
  color:#213547;
}
.professional-fit-table-ai-cost-v10022 td strong,
.professional-fit-table-ai-cost-v10022 td small{
  display:block;
}
.professional-fit-table-ai-cost-v10022 td small{
  width:max-content;
  max-width:100%;
  margin-top:4px;
}
@media(max-width:720px){
  .book-ai-breakdown-mini-v10022{gap:5px}
  .book-ai-breakdown-mini-v10022 span,
  .page-ai-cost-breakdown-v10022 small,
  .professional-fit-table-ai-cost-v10022 td small{
    font-size:11px;
    padding:4px 7px;
  }
}

/* ============================================================
   V10.0.23 — hidden per-page AI cost accordion
   ============================================================ */
.page-ai-cost-details-v10023{
  margin-top:8px;
  border:1px solid rgba(56,88,130,.16);
  border-radius:12px;
  background:rgba(248,250,253,.72);
  overflow:hidden;
}
.page-ai-cost-details-v10023>summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:7px 10px;
  color:#53657d;
  font-size:12px;
  user-select:none;
}
.page-ai-cost-details-v10023>summary::-webkit-details-marker{display:none}
.page-ai-cost-details-v10023>summary strong{font-size:12px;font-weight:800}
.page-ai-cost-details-v10023>summary b{margin-inline-start:auto;color:#1d3557;font-size:12px}
.page-ai-cost-details-v10023>summary>span{transition:transform .2s ease}
.page-ai-cost-details-v10023[open]>summary>span{transform:rotate(-90deg)}
.page-ai-cost-details-body-v10023{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  padding:0 8px 8px;
}
.page-ai-cost-details-body-v10023>span{
  min-width:0;
  padding:7px 8px;
  border-radius:10px;
  background:rgba(57,115,196,.07);
  color:#50637e;
  font-size:11px;
}
.page-ai-cost-details-body-v10023 strong,
.page-ai-cost-details-body-v10023 small{display:block;margin-top:2px}
.page-ai-cost-details-body-v10023 strong{color:#1d3557;font-size:12px}
.page-ai-cost-details-body-v10023 small{color:#728096;font-size:10px;overflow-wrap:anywhere}
html[data-theme="dark"] .page-ai-cost-details-v10023{background:rgba(20,29,43,.68);border-color:rgba(146,174,214,.18)}
html[data-theme="dark"] .page-ai-cost-details-v10023>summary{color:#b8c4d6}
html[data-theme="dark"] .page-ai-cost-details-v10023>summary b,
html[data-theme="dark"] .page-ai-cost-details-body-v10023 strong{color:#eef4ff}
html[data-theme="dark"] .page-ai-cost-details-body-v10023>span{background:rgba(86,132,195,.11);color:#bdc9dc}
html[data-theme="dark"] .page-ai-cost-details-body-v10023 small{color:#91a1b9}
@media(max-width:720px){
  .page-ai-cost-details-body-v10023{grid-template-columns:1fr}
}

/* V10.0.62 — flexible blueprints + order assignment */
.blueprint-meta-accordion-v10062{border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden;color:var(--text)}
.blueprint-meta-accordion-v10062>summary{cursor:pointer;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;list-style:none}
.blueprint-meta-accordion-v10062>summary::-webkit-details-marker{display:none}
.blueprint-meta-accordion-v10062>summary:after{content:'⌄';font-size:18px;opacity:.65;transition:transform .2s ease}
.blueprint-meta-accordion-v10062[open]>summary:after{transform:rotate(180deg)}
.blueprint-meta-accordion-body-v10062{padding:0 12px 12px}
.blueprint-create-tools-v10062{display:grid;grid-template-columns:minmax(260px,1fr) minmax(260px,1fr);gap:12px;width:100%;margin-top:8px}
.blueprint-plan-config-v10062,.blueprint-upload-plan-v10062{display:grid;gap:10px;padding:13px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text)}
.blueprint-plan-choice-v10062{display:grid;grid-template-columns:auto 1fr minmax(78px,105px);align-items:center;gap:8px;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text)}
.blueprint-plan-choice-v10062:last-of-type{grid-template-columns:auto 1fr}
.blueprint-page-count-v10062{width:100%;min-width:78px}
.blueprint-upload-plan-v10062 label{display:grid;gap:5px}
.orders-assigned-head-v10062,.orders-assigned-cell-v10062{width:105px;max-width:120px;white-space:nowrap}
.orders-assigned-cell-v10062 .badge{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.production-orders-table th,.production-orders-table td{padding-inline:7px}
.orders-assignment-dialog-v10062{border:0;border-radius:16px;padding:0;width:min(440px,calc(100vw - 32px));box-shadow:0 24px 70px rgba(15,23,42,.24)}
.orders-assignment-dialog-v10062::backdrop{background:rgba(15,23,42,.42)}
.orders-assignment-dialog-card-v10062{display:grid;gap:14px;padding:18px;margin:0}
.orders-assignment-dialog-card-v10062 label{display:grid;gap:6px}
.team-delete-user-v10062{margin-top:10px;padding-top:10px;border-top:1px solid var(--border,#e3e7ef);display:flex;justify-content:flex-end}
.invoice-toolbar-v10016 form,.hero-actions form{display:inline-flex;margin:0}
@media(max-width:900px){.blueprint-create-tools-v10062{grid-template-columns:1fr}.orders-assigned-head-v10062,.orders-assigned-cell-v10062{width:auto;max-width:none}}
\n\n/* ================================================================
   HIKAYATI V10.0.63 — UI REGRESSION FIX
   Restore orders action column, order execution CTA and employee delete visibility.
   ================================================================ */
@media(min-width:821px){
  body.page-orders .orders-table.professional-fit-table{
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
  }
  body.page-orders .orders-table.professional-fit-table th:nth-child(1),body.page-orders .orders-table.professional-fit-table td:nth-child(1){width:2.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(2),body.page-orders .orders-table.professional-fit-table td:nth-child(2){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(3),body.page-orders .orders-table.professional-fit-table td:nth-child(3){width:7.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(4),body.page-orders .orders-table.professional-fit-table td:nth-child(4){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(5),body.page-orders .orders-table.professional-fit-table td:nth-child(5){width:5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(6),body.page-orders .orders-table.professional-fit-table td:nth-child(6){width:8%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(7),body.page-orders .orders-table.professional-fit-table td:nth-child(7){width:9%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(8),body.page-orders .orders-table.professional-fit-table td:nth-child(8){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(9),body.page-orders .orders-table.professional-fit-table td:nth-child(9){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(10),body.page-orders .orders-table.professional-fit-table td:nth-child(10){width:7%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(11),body.page-orders .orders-table.professional-fit-table td:nth-child(11){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(12),body.page-orders .orders-table.professional-fit-table td:nth-child(12){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(13),body.page-orders .orders-table.professional-fit-table td:nth-child(13){width:7%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(14),body.page-orders .orders-table.professional-fit-table td:nth-child(14){width:18%!important;overflow:visible!important;text-overflow:clip!important}
  body.page-orders .orders-actions-head-v10063,
  body.page-orders .orders-actions-cell-v10063{min-width:220px!important;overflow:visible!important}
  body.page-orders .order-row-actions{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:5px!important;overflow:visible!important}
  body.page-orders .order-row-actions form{display:inline-flex!important;margin:0!important}
}
@media(min-width:821px) and (max-width:1390px){
  body.page-orders .orders-table.professional-fit-table{min-width:1380px!important}
}
body.page-users .team-delete-user-v10062{display:flex!important;visibility:visible!important;opacity:1!important;justify-content:flex-end!important}
body.page-users .team-delete-user-v10062 .btn{display:inline-flex!important;visibility:visible!important;opacity:1!important}
body.page-users .team-delete-user-protected-v10063 .btn[disabled]{opacity:.55!important;cursor:not-allowed!important}
body.page-order-view .hero-actions .btn-ai{display:inline-flex!important;align-items:center!important;justify-content:center!important}


/* ================================================================
   HIKAYATI V10.0.64 — ORDERS ACTION COLUMN HARD FIX
   Keep Actions visible on laptop/desktop even when the 14-column table
   needs horizontal scrolling. The action column is sticky at inline-end
   (left in RTL, right in LTR) and the stylesheet cache is bumped in header.
   ================================================================ */
@media (min-width:821px){
  body.page-orders .orders-table-panel-v100 .table-wrap,
  body.page-orders .orders-table-panel-v100 .smart-table-scroll-v100{
    overflow-x:auto!important;
    overflow-y:auto!important;
    scrollbar-gutter:stable;
    overscroll-behavior-inline:contain!important;
  }
  body.page-orders .orders-table.professional-fit-table{
    width:100%!important;
    min-width:1450px!important;
    max-width:none!important;
    table-layout:fixed!important;
  }
  body.page-orders .orders-table.professional-fit-table .orders-actions-head-v10063,
  body.page-orders .orders-table.professional-fit-table .orders-actions-cell-v10063{
    position:sticky!important;
    inset-inline-end:0!important;
    width:220px!important;
    min-width:220px!important;
    max-width:220px!important;
    overflow:visible!important;
    background:var(--surface)!important;
    border-inline-start:1px solid var(--line)!important;
    box-shadow:-10px 0 18px -16px rgba(15,23,42,.55)!important;
  }
  html[dir="ltr"] body.page-orders .orders-table.professional-fit-table .orders-actions-head-v10063,
  html[dir="ltr"] body.page-orders .orders-table.professional-fit-table .orders-actions-cell-v10063{
    box-shadow:10px 0 18px -16px rgba(15,23,42,.55)!important;
  }
  body.page-orders .orders-table.professional-fit-table .orders-actions-head-v10063{
    z-index:12!important;
  }
  body.page-orders .orders-table.professional-fit-table .orders-actions-cell-v10063{
    z-index:7!important;
  }
  body.page-orders .orders-actions-cell-v10063 .order-row-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:4px!important;
    width:100%!important;
    min-width:0!important;
    overflow:visible!important;
    align-items:stretch!important;
  }
  body.page-orders .orders-actions-cell-v10063 .order-row-actions>a,
  body.page-orders .orders-actions-cell-v10063 .order-row-actions>form{
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  body.page-orders .orders-actions-cell-v10063 .order-row-actions .btn{
    width:100%!important;
    min-width:0!important;
    min-height:30px!important;
    padding:5px 5px!important;
    font-size:10px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    justify-content:center!important;
  }
}


/* ================================================================
   HIKAYATI V10.0.65 — ORDERS ASSIGNMENT/ACTIONS PAIR + BLUEPRINT DARK MODE
   - Keep Assigned + Actions physically adjacent in RTL/LTR scrolling tables.
   - Restore the compact original one-row actions layout.
   - Make blueprint create/edit surfaces use the active theme tokens.
   ================================================================ */
@media (min-width:821px){
  body.page-orders .orders-table.professional-fit-table{
    min-width:1580px!important;
    table-layout:fixed!important;
  }

  /* Actions is the outside sticky column. */
  body.page-orders .orders-table.professional-fit-table .orders-actions-head-v10063,
  body.page-orders .orders-table.professional-fit-table .orders-actions-cell-v10063{
    position:sticky!important;
    inset-inline-end:0!important;
    inset-inline-start:auto!important;
    width:330px!important;
    min-width:330px!important;
    max-width:330px!important;
    background:var(--surface)!important;
    border-inline-start:1px solid var(--line)!important;
    overflow:visible!important;
  }
  body.page-orders .orders-table.professional-fit-table .orders-actions-head-v10063{z-index:16!important}
  body.page-orders .orders-table.professional-fit-table .orders-actions-cell-v10063{z-index:10!important}

  /* Assigned sticks directly beside Actions: no scroll-created visual gap. */
  body.page-orders .orders-table.professional-fit-table .orders-assigned-head-v10062,
  body.page-orders .orders-table.professional-fit-table .orders-assigned-cell-v10062{
    position:sticky!important;
    inset-inline-end:330px!important;
    inset-inline-start:auto!important;
    width:118px!important;
    min-width:118px!important;
    max-width:118px!important;
    background:var(--surface)!important;
    border-inline-start:1px solid var(--line)!important;
    border-inline-end:1px solid var(--line)!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.page-orders .orders-table.professional-fit-table .orders-assigned-head-v10062{z-index:15!important}
  body.page-orders .orders-table.professional-fit-table .orders-assigned-cell-v10062{z-index:9!important}
  body.page-orders .orders-table.professional-fit-table .orders-assigned-cell-v10062 .badge{
    display:inline-flex!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  /* Shadow belongs to the OUTER edge of the sticky pair, not between both columns. */
  body.page-orders .orders-table.professional-fit-table .orders-actions-head-v10063,
  body.page-orders .orders-table.professional-fit-table .orders-actions-cell-v10063{box-shadow:none!important}
  body.page-orders .orders-table.professional-fit-table .orders-assigned-head-v10062,
  body.page-orders .orders-table.professional-fit-table .orders-assigned-cell-v10062{
    box-shadow:-10px 0 18px -16px rgba(15,23,42,.55)!important;
  }
  html[dir="ltr"] body.page-orders .orders-table.professional-fit-table .orders-assigned-head-v10062,
  html[dir="ltr"] body.page-orders .orders-table.professional-fit-table .orders-assigned-cell-v10062{
    box-shadow:10px 0 18px -16px rgba(15,23,42,.55)!important;
  }

  /* Restore pre-V10.0.64 action design: one compact horizontal row. */
  body.page-orders .orders-actions-cell-v10063 .order-row-actions{
    display:flex!important;
    grid-template-columns:none!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:4px!important;
    width:100%!important;
    min-width:0!important;
    overflow:visible!important;
    white-space:nowrap!important;
  }
  body.page-orders .orders-actions-cell-v10063 .order-row-actions>a,
  body.page-orders .orders-actions-cell-v10063 .order-row-actions>form{
    display:inline-flex!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
  }
  body.page-orders .orders-actions-cell-v10063 .order-row-actions .btn{
    display:inline-flex!important;
    width:auto!important;
    min-width:0!important;
    min-height:30px!important;
    padding:5px 7px!important;
    border-radius:8px!important;
    font-size:9.6px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    justify-content:center!important;
  }
}

/* Blueprint surfaces inside the order and the dedicated manual editor follow light/dark theme. */
body.page-order-view .blueprint-meta-accordion-v10062,
body.page-order-view .blueprint-plan-config-v10062,
body.page-order-view .blueprint-upload-plan-v10062,
body.page-ai-blueprint-edit .panel,
body.page-ai-blueprint-edit .blueprint-edit-page,
body.page-ai-blueprint-edit .blueprint-cover-editor,
body.page-ai-blueprint-edit .sticky-blueprint-save{
  background:var(--surface)!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
body.page-order-view .blueprint-plan-choice-v10062,
body.page-ai-blueprint-edit .blueprint-edit-page-body{
  background:var(--surface-2)!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
body.page-order-view .blueprint-meta-accordion-v10062>summary,
body.page-order-view .blueprint-plan-config-v10062,
body.page-order-view .blueprint-upload-plan-v10062,
body.page-order-view .blueprint-plan-choice-v10062,
body.page-ai-blueprint-edit .blueprint-edit-page>summary,
body.page-ai-blueprint-edit .blueprint-cover-editor h3,
body.page-ai-blueprint-edit label>span{
  color:var(--text)!important;
}
body.page-ai-blueprint-edit input,
body.page-ai-blueprint-edit select,
body.page-ai-blueprint-edit textarea,
body.page-order-view .blueprint-plan-config-v10062 input,
body.page-order-view .blueprint-plan-config-v10062 select,
body.page-order-view .blueprint-upload-plan-v10062 input{
  background:var(--surface-2)!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
html[data-theme="dark"] body.page-ai-blueprint-edit .book-number{
  background:color-mix(in srgb,var(--gold) 16%,var(--surface-2))!important;
  color:#ffe09a!important;
}
html[data-theme="dark"] body.page-ai-blueprint-edit .sticky-blueprint-save{
  background:color-mix(in srgb,var(--surface) 94%,transparent)!important;
  box-shadow:0 -10px 28px rgba(0,0,0,.16)!important;
}

/* ================================================================
   HIKAYATI V10.0.66 — ORDERS TABLE UNIFIED FLOW FIX
   Assigned + Actions return to the same normal table flow as every
   other column. No sticky positioning, artificial divider or shadow.
   Desktop fills the viewport; narrower laptop widths scroll the WHOLE
   connected table horizontally without column overlap/re-ordering.
   ================================================================ */
@media (min-width:821px){
  body.page-orders .orders-table-panel-v100 .table-wrap,
  body.page-orders .orders-table-panel-v100 .smart-table-scroll-v100{
    overflow-x:auto!important;
    overflow-y:auto!important;
    scrollbar-gutter:auto!important;
    overscroll-behavior-inline:contain!important;
  }

  body.page-orders .orders-table.professional-fit-table{
    width:100%!important;
    min-width:1500px!important;
    max-width:none!important;
    table-layout:fixed!important;
    border-collapse:separate!important;
    border-spacing:0!important;
  }

  /* All 14 columns participate in one unified table layout. */
  body.page-orders .orders-table.professional-fit-table th,
  body.page-orders .orders-table.professional-fit-table td{
    min-width:0!important;
    max-width:none!important;
    padding-inline:6px!important;
  }
  body.page-orders .orders-table.professional-fit-table th:nth-child(1),body.page-orders .orders-table.professional-fit-table td:nth-child(1){width:2.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(2),body.page-orders .orders-table.professional-fit-table td:nth-child(2){width:6.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(3),body.page-orders .orders-table.professional-fit-table td:nth-child(3){width:7%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(4),body.page-orders .orders-table.professional-fit-table td:nth-child(4){width:6.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(5),body.page-orders .orders-table.professional-fit-table td:nth-child(5){width:5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(6),body.page-orders .orders-table.professional-fit-table td:nth-child(6){width:8%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(7),body.page-orders .orders-table.professional-fit-table td:nth-child(7){width:10%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(8),body.page-orders .orders-table.professional-fit-table td:nth-child(8){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(9),body.page-orders .orders-table.professional-fit-table td:nth-child(9){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(10),body.page-orders .orders-table.professional-fit-table td:nth-child(10){width:8%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(11),body.page-orders .orders-table.professional-fit-table td:nth-child(11){width:5.5%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(12),body.page-orders .orders-table.professional-fit-table td:nth-child(12){width:6%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(13),body.page-orders .orders-table.professional-fit-table td:nth-child(13){width:7%!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(14),body.page-orders .orders-table.professional-fit-table td:nth-child(14){width:16%!important}

  /* IMPORTANT: Assigned and Actions are ordinary cells again. */
  body.page-orders .orders-table.professional-fit-table .orders-assigned-head-v10062,
  body.page-orders .orders-table.professional-fit-table .orders-assigned-cell-v10062,
  body.page-orders .orders-table.professional-fit-table .orders-actions-head-v10063,
  body.page-orders .orders-table.professional-fit-table .orders-actions-cell-v10063{
    position:static!important;
    inset:auto!important;
    z-index:auto!important;
    min-width:0!important;
    max-width:none!important;
    background:transparent!important;
    border-inline-start:0!important;
    border-inline-end:0!important;
    box-shadow:none!important;
  }
  body.page-orders .orders-table.professional-fit-table .orders-assigned-head-v10062,
  body.page-orders .orders-table.professional-fit-table .orders-assigned-cell-v10062{
    width:7%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.page-orders .orders-table.professional-fit-table .orders-actions-head-v10063,
  body.page-orders .orders-table.professional-fit-table .orders-actions-cell-v10063{
    width:16%!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }

  /* Keep the current compact buttons, but inside their normal cell. */
  body.page-orders .orders-actions-cell-v10063 .order-row-actions{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:4px!important;
    width:100%!important;
    min-width:0!important;
    overflow:visible!important;
    white-space:nowrap!important;
  }
  body.page-orders .orders-actions-cell-v10063 .order-row-actions>a,
  body.page-orders .orders-actions-cell-v10063 .order-row-actions>form{
    display:inline-flex!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
  }
  body.page-orders .orders-actions-cell-v10063 .order-row-actions .btn{
    width:auto!important;
    min-width:0!important;
    min-height:30px!important;
    padding:5px 7px!important;
    font-size:9.6px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    justify-content:center!important;
  }
}

/* Wide workspaces use the full available width without forced scrolling. */
@media (min-width:1500px){
  body.page-orders .orders-table.professional-fit-table{
    min-width:0!important;
    max-width:100%!important;
  }
}


/* ================================================================
   HIKAYATI V10.0.67 — ORDERS FILTERS SINGLE-LINE DESKTOP FIT
   Search + status + governorate + creator + assignment + dates + actions
   ================================================================ */
@media (min-width:1120px){
  body.page-orders .professional-filter-bar.has-assignment-filter{
    grid-template-columns:minmax(170px,1.05fr) minmax(100px,.58fr) minmax(106px,.62fr) minmax(108px,.62fr) minmax(108px,.62fr) minmax(110px,.64fr) minmax(112px,.62fr) minmax(112px,.62fr) max-content!important;
    gap:7px!important;
    align-items:end!important;
  }
  body.page-orders .professional-filter-bar.no-assignment-filter{
    grid-template-columns:minmax(185px,1.12fr) minmax(102px,.60fr) minmax(108px,.64fr) minmax(112px,.64fr) minmax(112px,.64fr) minmax(114px,.64fr) minmax(114px,.64fr) max-content!important;
    gap:7px!important;
    align-items:end!important;
  }
  body.page-orders .professional-filter-bar .filter-search{grid-column:auto!important}
  body.page-orders .professional-filter-bar .filter-actions{
    grid-column:auto!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:6px!important;
    min-width:max-content;
  }
  body.page-orders .professional-filter-bar .filter-actions .btn{
    width:auto!important;
    min-width:68px;
    padding-inline:11px!important;
    white-space:nowrap;
  }
}

/* ================================================================
   HIKAYATI V10.0.68 — ORDERS MOBILE TABLE / ACTIONS STABILITY
   Mobile orders use one vertical page flow (no nested vertical table
   scrolling) and keep all 15 columns in the same horizontal table flow.
   Assignment is column 13, delivery company is column 14, and actions are column 15.
   ================================================================ */
@media (max-width:820px){
  /* The bulk toolbar and the table travel with the document as one block.
     This prevents the orders grid from sliding underneath a sticky toolbar. */
  body.page-orders .orders-bulk-v100{
    position:static!important;
    inset:auto!important;
    top:auto!important;
    z-index:auto!important;
  }

  /* Mobile has horizontal table navigation only. Vertical movement belongs
     to the document/page so the whole orders section remains one piece. */
  body.page-orders .orders-table-panel-v100 .table-wrap,
  body.page-orders .orders-table-panel-v100 .smart-table-scroll-v100{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    max-height:none!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    scrollbar-gutter:auto!important;
    overscroll-behavior-x:contain!important;
    overscroll-behavior-y:auto!important;
    touch-action:pan-x pan-y!important;
  }

  /* 15-column mobile contract. Keep the exact normal table flow; no card,
     no special re-ordering and no sticky action/assignment divider. */
  body.page-orders .orders-table.professional-fit-table{
    display:table!important;
    width:1552px!important;
    min-width:1552px!important;
    max-width:1552px!important;
    table-layout:fixed!important;
    border-collapse:separate!important;
    border-spacing:0!important;
  }
  body.page-orders .orders-table.professional-fit-table thead{display:table-header-group!important}
  body.page-orders .orders-table.professional-fit-table tbody{display:table-row-group!important;width:auto!important}
  body.page-orders .orders-table.professional-fit-table tr,
  body.page-orders .orders-table.professional-fit-table tbody tr{display:table-row!important}
  body.page-orders .orders-table.professional-fit-table th,
  body.page-orders .orders-table.professional-fit-table td,
  body.page-orders .orders-table.professional-fit-table tbody td{
    display:table-cell!important;
    min-width:0!important;
    max-width:none!important;
    box-sizing:border-box!important;
  }

  body.page-orders .orders-table.professional-fit-table th:nth-child(1),body.page-orders .orders-table.professional-fit-table td:nth-child(1){width:48px!important;min-width:48px!important;max-width:48px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(2),body.page-orders .orders-table.professional-fit-table td:nth-child(2){width:112px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(3),body.page-orders .orders-table.professional-fit-table td:nth-child(3){width:118px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(4),body.page-orders .orders-table.professional-fit-table td:nth-child(4){width:112px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(5),body.page-orders .orders-table.professional-fit-table td:nth-child(5){width:88px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(6),body.page-orders .orders-table.professional-fit-table td:nth-child(6){width:145px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(7),body.page-orders .orders-table.professional-fit-table td:nth-child(7){width:165px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(8),body.page-orders .orders-table.professional-fit-table td:nth-child(8){width:98px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(9),body.page-orders .orders-table.professional-fit-table td:nth-child(9){width:98px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(10),body.page-orders .orders-table.professional-fit-table td:nth-child(10){width:138px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(11),body.page-orders .orders-table.professional-fit-table td:nth-child(11){width:88px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(12),body.page-orders .orders-table.professional-fit-table td:nth-child(12){width:102px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(13),body.page-orders .orders-table.professional-fit-table td:nth-child(13){width:118px!important;min-width:118px!important;max-width:118px!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(14),body.page-orders .orders-table.professional-fit-table td:nth-child(14){width:122px!important;min-width:122px!important;max-width:122px!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.page-orders .orders-table.professional-fit-table th:nth-child(15),body.page-orders .orders-table.professional-fit-table td:nth-child(15){width:285px!important;min-width:285px!important;max-width:285px!important;overflow:visible!important;text-overflow:clip!important}

  /* Assignment and Actions behave like ordinary neighboring columns. */
  body.page-orders .orders-table.professional-fit-table .orders-assigned-head-v10062,
  body.page-orders .orders-table.professional-fit-table .orders-assigned-cell-v10062,
  body.page-orders .orders-table.professional-fit-table .orders-actions-head-v10063,
  body.page-orders .orders-table.professional-fit-table .orders-actions-cell-v10063{
    position:static!important;
    inset:auto!important;
    z-index:auto!important;
    border-inline:0!important;
    box-shadow:none!important;
  }
  body.page-orders .orders-table.professional-fit-table .orders-assigned-head-v10062,
  body.page-orders .orders-table.professional-fit-table .orders-assigned-cell-v10062{
    width:118px!important;
    min-width:118px!important;
    max-width:118px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.page-orders .orders-table.professional-fit-table .orders-actions-head-v10063,
  body.page-orders .orders-table.professional-fit-table .orders-actions-cell-v10063{
    width:285px!important;
    min-width:285px!important;
    max-width:285px!important;
    overflow:visible!important;
  }

  body.page-orders .orders-actions-cell-v10063 .order-row-actions{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:4px!important;
    width:100%!important;
    overflow:visible!important;
    white-space:nowrap!important;
  }
  body.page-orders .orders-actions-cell-v10063 .order-row-actions>a,
  body.page-orders .orders-actions-cell-v10063 .order-row-actions>form{
    display:inline-flex!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
  }
  body.page-orders .orders-actions-cell-v10063 .order-row-actions .btn{
    width:auto!important;
    min-width:0!important;
    min-height:29px!important;
    padding:5px 6px!important;
    font-size:9.4px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }

  /* With vertical table scrolling disabled, the generated ↑/↓ controls are
     not part of the mobile orders UX. Horizontal controls remain available. */
  body.page-orders .smart-table-vertical-v1004{display:none!important}
}

/* Hikayati V10.0.71 — customer review inbox + self-service entry */
.orders-review-tabs-v10071{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px;padding:7px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.orders-review-tabs-v10071 a{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:8px 13px;border-radius:11px;color:var(--muted);font-weight:800;text-decoration:none;white-space:nowrap}
.orders-review-tabs-v10071 a:hover{background:var(--surface-2);color:var(--text)}
.orders-review-tabs-v10071 a.active{background:var(--navy);color:#fff;box-shadow:0 8px 18px rgba(21,42,74,.14)}
.orders-review-tabs-v10071 b{display:grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--gold);color:var(--navy);font-size:11px}

.customer-entry-gate-v10071{position:fixed;z-index:500;inset:0;display:grid;place-items:center;padding:18px;background:rgba(7,16,31,.68);backdrop-filter:blur(9px)}
.customer-entry-card-v10071{width:min(560px,100%);padding:28px;border:1px solid var(--line);border-radius:28px;background:var(--surface);box-shadow:0 28px 90px rgba(0,0,0,.28);text-align:center;color:var(--text)}
.customer-entry-card-v10071>img{width:74px;height:74px;object-fit:contain;border-radius:18px;background:var(--surface-2);padding:8px}
.customer-entry-card-v10071 h1{margin:5px 0 8px;font-size:clamp(25px,5vw,36px)}
.customer-entry-card-v10071>p:not(.eyebrow){margin:0 auto 20px;max-width:470px;color:var(--muted);line-height:1.7}
.customer-entry-options-v10071{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.customer-entry-option-v10071{display:grid;grid-template-columns:auto 1fr;grid-template-areas:'icon title' 'icon note';gap:2px 11px;align-items:center;text-align:start;padding:17px;border:1px solid var(--line);border-radius:18px;background:var(--surface-2);color:var(--text);text-decoration:none;transition:.18s ease}
.customer-entry-option-v10071:hover{transform:translateY(-2px);border-color:var(--gold);box-shadow:var(--shadow)}
.customer-entry-option-v10071>span{grid-area:icon;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:var(--surface);font-size:23px;font-weight:900}
.customer-entry-option-v10071>strong{grid-area:title;font-size:15px}.customer-entry-option-v10071>small{grid-area:note;color:var(--muted)}
.customer-entry-option-v10071.primary{background:var(--navy);color:#fff;border-color:transparent}.customer-entry-option-v10071.primary small{color:#dce6f4}.customer-entry-option-v10071.primary>span{background:rgba(255,255,255,.12)}

.customer-lookup-shell-v10071{max-width:920px;margin-inline:auto}.customer-lookup-card-v10071{margin-bottom:12px}.customer-phone-search-v10071 label{display:block}.customer-phone-search-v10071 label>span{display:block;margin-bottom:7px;font-weight:800}.customer-phone-search-v10071 .input-action{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.customer-phone-search-v10071 input{min-height:46px}
.customer-lookup-results-v10071{display:grid;gap:9px;margin-top:18px}.customer-order-lookup-row-v10071{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 15px;border:1px solid var(--line);border-radius:16px;background:var(--surface-2)}
.customer-order-lookup-row-v10071.is-editable{border-inline-start:4px solid #20a36a}.customer-order-lookup-row-v10071.is-locked{border-inline-start:4px solid #d8a431}.lookup-order-main-v10071{display:grid;gap:2px;min-width:0}.lookup-order-main-v10071 strong{font-size:15px}.lookup-order-main-v10071 small{color:var(--muted)}.lookup-order-number-v10071{font-weight:900;color:var(--gold-dark)}.lookup-order-actions-v10071{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.customer-lookup-bottom-actions-v10071{display:flex;gap:8px;justify-content:center;margin:12px 0}.customer-contact-options-v10071{padding:15px;border:1px solid var(--line);border-radius:18px;background:var(--surface);margin:12px 0}.customer-contact-options-v10071>strong{display:block;margin-bottom:10px}.customer-contact-links-v10071{display:flex;gap:8px;flex-wrap:wrap}.customer-contact-links-v10071 a{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);color:var(--text);text-decoration:none;font-weight:800}.customer-contact-links-v10071 svg{width:19px;height:19px}.customer-duplicate-warning-v10071{margin-bottom:12px}
@media(max-width:720px){.orders-review-tabs-v10071{display:grid;grid-template-columns:1fr;gap:5px}.orders-review-tabs-v10071 a{justify-content:space-between}.customer-entry-card-v10071{padding:20px 15px;border-radius:21px}.customer-entry-options-v10071{grid-template-columns:1fr}.customer-order-lookup-row-v10071{align-items:stretch;flex-direction:column}.lookup-order-actions-v10071{justify-content:flex-start}.customer-phone-search-v10071 .input-action{grid-template-columns:1fr}.customer-lookup-bottom-actions-v10071{display:grid;grid-template-columns:1fr}.customer-contact-links-v10071{display:grid;grid-template-columns:1fr 1fr}}

/* =========================================================
   Hikayati V10.0.72 — customer lifecycle + review polish
   ========================================================= */
.customer-review-heading-v10072{margin-bottom:14px}
.customer-review-summary-v10072{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.customer-review-summary-v10072 article{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:15px;box-shadow:var(--shadow-sm,0 6px 20px rgba(20,30,55,.05))}
.customer-review-summary-v10072 span{display:block;color:var(--muted);font-size:12px;font-weight:800;margin-bottom:5px}.customer-review-summary-v10072 strong{font-size:24px;line-height:1}
.customer-review-summary-v10072 article.modified{border-color:color-mix(in srgb,var(--gold) 48%,var(--line))}.customer-review-summary-v10072 article.added{border-color:color-mix(in srgb,var(--success) 45%,var(--line))}.customer-review-summary-v10072 article.removed{border-color:color-mix(in srgb,#d64b4b 40%,var(--line))}
.customer-review-panel-v10072{margin-bottom:16px}.review-section-head-v10072{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.review-section-head-v10072 h2{margin:2px 0 0}.review-section-head-v10072 .eyebrow{margin:0}.review-legend-v10072{display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:11px;font-weight:800}.review-legend-v10072 i{width:10px;height:10px;border-radius:999px;background:color-mix(in srgb,var(--gold) 48%,var(--surface))}
.review-diff-table-v10072{border:1px solid var(--line);border-radius:15px;overflow:hidden;background:var(--surface)}.review-diff-head-v10072,.review-diff-row-v10072{display:grid;grid-template-columns:minmax(150px,.72fr) minmax(0,1fr) minmax(0,1fr);align-items:stretch}.review-diff-head-v10072{background:var(--surface-2);font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:900}.review-diff-head-v10072>*{padding:10px 12px}.review-diff-row-v10072>*{padding:12px;border-top:1px solid var(--line);min-width:0;overflow-wrap:anywhere}.review-diff-row-v10072>strong{background:color-mix(in srgb,var(--surface-2) 75%,transparent);font-size:12px}.review-diff-row-v10072>div{position:relative;font-size:13px;line-height:1.65}.review-diff-row-v10072.is-changed{background:color-mix(in srgb,var(--gold) 9%,var(--surface))}.review-diff-row-v10072.is-changed>div:last-child{background:color-mix(in srgb,var(--gold) 15%,var(--surface))}.review-diff-row-v10072.is-same{opacity:.64}.review-change-chip-v10072{display:inline-flex;margin-inline-start:7px;padding:2px 7px;border-radius:999px;background:color-mix(in srgb,var(--gold) 32%,var(--surface));color:var(--text);font-size:9px;font-weight:900;vertical-align:middle}.review-diff-table-v10072.compact .review-diff-row-v10072>*{padding:9px 11px}
.review-books-v10072{display:grid;gap:12px}.review-book-card-v10072{border:1px solid var(--line);border-radius:16px;background:var(--surface);overflow:hidden}.review-book-card-v10072>summary{list-style:none;cursor:pointer;padding:14px 15px;display:flex;align-items:center;justify-content:space-between;gap:14px;background:var(--surface-2)}.review-book-card-v10072>summary::-webkit-details-marker{display:none}.review-book-card-v10072>summary>div{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap}.review-book-card-v10072>summary strong{font-size:15px}.review-book-card-v10072>summary small{color:var(--muted)}.review-book-card-v10072.is-modified{border-color:color-mix(in srgb,var(--gold) 55%,var(--line))}.review-book-card-v10072.is-new{border-color:color-mix(in srgb,var(--success) 55%,var(--line))}.review-book-card-v10072.is-unchanged{opacity:.72}.review-book-state-v10072{flex:0 0 auto;padding:5px 9px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:10px;font-weight:900}.is-modified .review-book-state-v10072{background:color-mix(in srgb,var(--gold) 20%,var(--surface))}.is-new .review-book-state-v10072{background:color-mix(in srgb,var(--success) 16%,var(--surface))}.review-book-body-v10072{padding:14px}.review-character-box-v10072{margin-top:12px;border:1px solid var(--line);border-radius:13px;padding:12px;background:var(--surface-2)}.review-character-columns-v10072{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:8px}.review-character-columns-v10072>div{background:var(--surface);border:1px solid var(--line);border-radius:11px;padding:10px}.review-character-columns-v10072 span{display:block;color:var(--muted);font-size:10px;font-weight:900;margin-bottom:6px}.review-character-columns-v10072 p{margin:5px 0;font-size:12px}.review-upload-note-v10072{margin-top:11px;padding:10px 12px;border-radius:12px;background:color-mix(in srgb,var(--teal) 12%,var(--surface));border:1px solid color-mix(in srgb,var(--teal) 28%,var(--line));font-size:12px}.review-removed-book-v10072{border:1px solid color-mix(in srgb,#d64b4b 45%,var(--line));background:color-mix(in srgb,#d64b4b 7%,var(--surface));border-radius:15px;padding:14px;display:flex;justify-content:space-between;gap:15px;align-items:center}.review-removed-book-v10072 span{display:block;color:#c44545;font-size:10px;font-weight:900}.review-removed-book-v10072 strong{display:block;margin:3px 0}.review-removed-book-v10072 small{color:var(--muted)}.review-removed-book-v10072 p{margin:0;max-width:460px;color:var(--muted);font-size:12px}
.review-price-grid-v10072{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:center}.review-price-grid-v10072>div:not(.arrow){border:1px solid var(--line);border-radius:14px;padding:14px;background:var(--surface-2)}.review-price-grid-v10072 span{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}.review-price-grid-v10072 strong{font-size:20px}.review-price-grid-v10072 .arrow{font-size:22px;color:var(--muted)}html[dir="rtl"] .review-price-grid-v10072 .arrow{transform:scaleX(-1)}.customer-review-actions-v10072{display:flex;align-items:center;justify-content:space-between;gap:18px}.customer-review-actions-v10072 h2{margin:0 0 4px}.customer-review-actions-v10072 p{margin:0;color:var(--muted);font-size:12px}

.customer-v10072 .customer-wrap,.customer-v10072 .customer-order-shell{max-width:1040px}.customer-success-v10072{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;background:linear-gradient(135deg,color-mix(in srgb,var(--success) 12%,var(--surface)),var(--surface));border:1px solid color-mix(in srgb,var(--success) 35%,var(--line));border-radius:22px;padding:20px;margin-bottom:16px;box-shadow:0 10px 32px rgba(20,30,55,.07)}.customer-success-v10072 .success-icon{width:52px;height:52px;border-radius:17px;display:grid;place-items:center;background:var(--success);color:#fff;font-size:26px;font-weight:950}.customer-success-v10072 h1{margin:3px 0 5px;font-size:23px}.customer-success-v10072 p{margin:0;color:var(--muted);line-height:1.7}.customer-success-number-v10072{min-width:190px;background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:12px;text-align:center}.customer-success-number-v10072>span:first-child{display:block;color:var(--muted);font-size:10px;font-weight:900}.customer-success-number-v10072>strong{display:block;font-size:20px;margin:4px 0 8px;direction:ltr}
.customer-summary-section-v10072,.customer-books-summary-v10072,.customer-pricing-summary-v10072,.customer-order-actions-v10072{margin-bottom:15px}.customer-summary-title-v10072{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:13px}.customer-summary-title-v10072 h2{margin:2px 0 0;font-size:18px}.customer-summary-title-v10072 .eyebrow{margin:0}.customer-info-grid-v10072{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.customer-info-grid-v10072>div,.customer-book-detail-grid-v10072>div{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:11px}.customer-info-grid-v10072 span,.customer-book-detail-grid-v10072 span{display:block;color:var(--muted);font-size:10px;font-weight:800;margin-bottom:4px}.customer-info-grid-v10072 strong,.customer-book-detail-grid-v10072 strong{font-size:12px;line-height:1.65;overflow-wrap:anywhere}.customer-info-grid-v10072 .wide{grid-column:span 2}.customer-info-grid-v10072 .full{grid-column:1/-1}.customer-count-chip-v10072{padding:5px 9px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line);font-size:10px;font-weight:900;color:var(--muted)}.customer-summary-book-v10072{border:1px solid var(--line);border-radius:15px;overflow:hidden;background:var(--surface);margin:10px 0;padding:0}.customer-summary-book-v10072>summary{padding:12px 13px}.customer-summary-book-v10072 .book-accordion-body{padding:13px;border-top:1px solid var(--line)}.customer-book-detail-grid-v10072{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.customer-book-detail-grid-v10072 .wide{grid-column:span 2}.customer-book-detail-grid-v10072 .full{grid-column:1/-1}.customer-book-total-v10072{margin-top:10px;padding:10px 12px;border-radius:11px;background:color-mix(in srgb,var(--gold) 12%,var(--surface));display:flex;align-items:center;justify-content:space-between;gap:12px}.customer-book-total-v10072 span{color:var(--muted);font-size:11px}.customer-book-total-v10072 strong{font-size:16px}.customer-pricing-summary-v10072 .price-breakdown{margin:0}.customer-order-actions-v10072{display:grid;gap:10px}

@media(max-width:900px){.customer-review-summary-v10072{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-review-actions-v10072{align-items:flex-start;flex-direction:column}.customer-success-v10072{grid-template-columns:auto minmax(0,1fr)}.customer-success-number-v10072{grid-column:1/-1;width:100%;min-width:0}.customer-info-grid-v10072{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-book-detail-grid-v10072{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.customer-review-summary-v10072{grid-template-columns:1fr 1fr;gap:8px}.customer-review-summary-v10072 article{padding:11px}.customer-review-summary-v10072 strong{font-size:20px}.review-section-head-v10072{flex-direction:column;gap:7px}.review-diff-table-v10072{overflow-x:auto}.review-diff-head-v10072,.review-diff-row-v10072{grid-template-columns:120px minmax(160px,1fr) minmax(160px,1fr);min-width:500px}.review-character-columns-v10072{grid-template-columns:1fr}.review-removed-book-v10072{align-items:flex-start;flex-direction:column}.review-price-grid-v10072{grid-template-columns:1fr}.review-price-grid-v10072 .arrow{transform:rotate(90deg)!important;text-align:center}.customer-success-v10072{grid-template-columns:1fr;text-align:center;padding:16px}.customer-success-v10072 .success-icon{margin:auto}.customer-info-grid-v10072,.customer-book-detail-grid-v10072{grid-template-columns:1fr}.customer-info-grid-v10072 .wide,.customer-book-detail-grid-v10072 .wide{grid-column:auto}.customer-summary-title-v10072{align-items:center}.customer-summary-book-v10072>summary{gap:7px}.customer-summary-book-v10072 .book-summary-product{max-width:105px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

/* =========================================================
   Hikayati V10.0.74 — full customer submission review + media confirmation
   ========================================================= */
.customer-submission-heading-v10074{margin-bottom:14px}.customer-submission-heading-v10074 .row-actions{align-items:center}
.customer-submission-stats-v10074{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 16px}.customer-submission-stats-v10074 article{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:15px;box-shadow:var(--shadow-sm,0 6px 20px rgba(20,30,55,.05))}.customer-submission-stats-v10074 article.total{border-color:color-mix(in srgb,var(--gold) 45%,var(--line));background:color-mix(in srgb,var(--gold) 7%,var(--surface))}.customer-submission-stats-v10074 span{display:block;color:var(--muted);font-size:11px;font-weight:850;margin-bottom:5px}.customer-submission-stats-v10074 strong{display:block;font-size:18px;line-height:1.35;overflow-wrap:anywhere}.customer-submission-panel-v10074{margin-bottom:16px}.customer-review-helper-v10074{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.7}
.customer-submission-info-v10074{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.customer-submission-info-v10074>div{background:var(--surface-2);border:1px solid var(--line);border-radius:13px;padding:12px;min-width:0}.customer-submission-info-v10074>div.wide{grid-column:span 2}.customer-submission-info-v10074>div.full{grid-column:1/-1}.customer-submission-info-v10074>div.accent{border-color:color-mix(in srgb,var(--gold) 42%,var(--line));background:color-mix(in srgb,var(--gold) 8%,var(--surface))}.customer-submission-info-v10074 span{display:block;color:var(--muted);font-size:10px;font-weight:900;margin-bottom:5px}.customer-submission-info-v10074 strong{display:block;font-size:13px;line-height:1.75;overflow-wrap:anywhere;word-break:normal;white-space:normal}
.customer-submission-books-v10074{display:grid;gap:16px}.customer-submission-book-v10074{border:1px solid var(--line);border-radius:20px;background:var(--surface);overflow:hidden;box-shadow:var(--shadow-sm,0 7px 24px rgba(20,30,55,.05))}.customer-submission-book-head-v10074{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:17px 18px;background:linear-gradient(135deg,var(--surface-2),var(--surface));border-bottom:1px solid var(--line)}.customer-submission-book-head-v10074 h3{margin:7px 0 3px;font-size:20px}.customer-submission-book-head-v10074 p{margin:0;color:var(--muted);font-size:12px}.customer-submission-book-meta-v10074{display:flex;align-items:flex-end;flex-direction:column;gap:7px;flex:0 0 auto}.customer-submission-book-meta-v10074 span{font-size:11px;color:var(--muted);font-weight:800}.customer-submission-book-meta-v10074 strong{font-size:18px}.customer-submission-subsection-v10074{padding:16px 18px;border-bottom:1px solid var(--line)}.customer-submission-subsection-v10074:last-of-type{border-bottom:0}.customer-submission-subsection-v10074 h4{margin:0 0 11px;font-size:14px}.customer-submission-subhead-v10074{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:11px}.customer-submission-subhead-v10074 h4{margin:0}.customer-submission-subhead-v10074>span{padding:4px 8px;border:1px solid var(--line);border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:10px;font-weight:900}
.customer-submission-fields-v10074{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.customer-submission-fields-v10074>div{border:1px solid var(--line);border-radius:12px;background:var(--surface-2);padding:11px;min-width:0}.customer-submission-fields-v10074>div.wide{grid-column:span 2}.customer-submission-fields-v10074>div.full{grid-column:1/-1}.customer-submission-fields-v10074 span{display:block;color:var(--muted);font-size:10px;font-weight:850;margin-bottom:5px}.customer-submission-fields-v10074 strong{display:block;font-size:12px;line-height:1.8;white-space:normal;overflow-wrap:anywhere;word-break:normal}.customer-submission-fields-v10074.text-heavy>div{min-height:72px}
.customer-submission-characters-v10074{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.customer-submission-characters-v10074 article{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;align-items:start;border:1px solid var(--line);border-radius:14px;padding:10px;background:var(--surface-2);min-width:0}.character-preview-v10074{width:76px;height:76px;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface);display:grid;place-items:center}.character-preview-v10074 a{display:block;width:100%;height:100%}.character-preview-v10074 img{width:100%;height:100%;object-fit:cover;display:block}.character-preview-v10074>span{font-size:26px}.customer-submission-characters-v10074 article>div:last-child{min-width:0}.customer-submission-characters-v10074 strong{display:block;font-size:13px;overflow-wrap:anywhere}.customer-submission-characters-v10074 small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.customer-submission-characters-v10074 p{margin:6px 0 0;font-size:11px;line-height:1.7;white-space:normal;overflow-wrap:anywhere}.customer-submission-empty-v10074{padding:12px;border:1px dashed var(--line);border-radius:12px;background:var(--surface-2);color:var(--muted);font-size:11px;line-height:1.7}
.customer-submission-media-groups-v10074{display:grid;gap:11px}.customer-submission-media-group-v10074{border:1px solid var(--line);border-radius:14px;background:var(--surface-2);padding:12px}.customer-submission-media-group-v10074>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.customer-submission-media-group-v10074>header strong{display:block;font-size:12px}.customer-submission-media-group-v10074>header small{display:block;color:var(--muted);font-size:10px;line-height:1.5;margin-top:3px}.customer-submission-media-group-v10074>header>span{min-width:28px;text-align:center;padding:4px 7px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:10px;font-weight:900}.customer-review-media-grid-v10074{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.customer-review-media-v10074{display:block;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface);text-decoration:none;color:var(--text);min-width:0}.customer-review-media-v10074 img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;background:var(--surface-2)}.customer-review-media-v10074 span{display:block;padding:7px 8px;font-size:9px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;color:var(--muted)}
.customer-submission-book-price-v10074{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;background:var(--surface-2);border-top:1px solid var(--line)}.customer-submission-book-price-v10074>div{padding:13px 17px;border-inline-end:1px solid var(--line)}.customer-submission-book-price-v10074>div:last-child{border-inline-end:0}.customer-submission-book-price-v10074 span{display:block;color:var(--muted);font-size:10px;margin-bottom:4px}.customer-submission-book-price-v10074 strong{font-size:14px}.customer-submission-book-price-v10074 .total{background:color-mix(in srgb,var(--gold) 10%,var(--surface-2))}.customer-submission-book-price-v10074 .total strong{font-size:17px}.customer-submission-pricing-v10074 .price-breakdown{margin:0}.customer-submission-decision-v10074{position:relative}.customer-submission-decision-v10074 .row-actions{flex-wrap:wrap}

.customer-media-confirm-note-v10074{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.65}.customer-book-media-count-v10074{flex:0 0 auto;padding:4px 7px;border:1px solid var(--line);border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:9px;font-weight:900}.customer-public-characters-v10074,.customer-public-media-v10074{margin-top:12px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2);padding:12px}.customer-public-characters-v10074 h4,.customer-public-media-v10074 h4{margin:0;font-size:12px}.customer-public-character-grid-v10074{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:9px}.customer-public-character-grid-v10074 article{display:grid;grid-template-columns:60px minmax(0,1fr);gap:9px;align-items:start;background:var(--surface);border:1px solid var(--line);border-radius:11px;padding:8px;min-width:0}.customer-public-character-grid-v10074 article>a,.customer-character-placeholder-v10074{width:60px;height:60px;border-radius:9px;overflow:hidden;border:1px solid var(--line);background:var(--surface-2);display:grid;place-items:center}.customer-public-character-grid-v10074 img{width:100%;height:100%;object-fit:cover;display:block}.customer-public-character-grid-v10074 strong{display:block;font-size:11px;overflow-wrap:anywhere}.customer-public-character-grid-v10074 small{display:block;color:var(--muted);font-size:9px;margin-top:2px}.customer-public-character-grid-v10074 p{margin:5px 0 0;color:var(--text);font-size:10px;line-height:1.55;overflow-wrap:anywhere}.customer-public-media-head-v10074{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.customer-public-media-head-v10074 p{margin:3px 0 0;color:var(--muted);font-size:9px}.customer-public-media-head-v10074>span{padding:4px 7px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-size:9px;font-weight:900;color:var(--muted)}.customer-public-media-groups-v10074{display:grid;gap:9px;margin-top:10px}.customer-public-media-groups-v10074>section{background:var(--surface);border:1px solid var(--line);border-radius:11px;padding:9px}.customer-public-media-groups-v10074>section>header{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;margin-bottom:8px}.customer-public-media-groups-v10074 header strong{display:block;font-size:10px}.customer-public-media-groups-v10074 header small{display:block;color:var(--muted);font-size:8px;margin-top:2px;line-height:1.45}.customer-public-media-groups-v10074 header>span{font-size:9px;font-weight:900;color:var(--muted)}.customer-public-media-grid-v10074{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.customer-public-media-grid-v10074 a{border:1px solid var(--line);border-radius:9px;overflow:hidden;text-decoration:none;background:var(--surface-2);color:var(--text);min-width:0}.customer-public-media-grid-v10074 img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block}.customer-public-media-grid-v10074 small{display:block;padding:5px 6px;color:var(--muted);font-size:8px;line-height:1.35;overflow-wrap:anywhere}.customer-public-media-empty-v10074{margin-top:9px;padding:10px;border:1px dashed var(--line);border-radius:10px;color:var(--muted);font-size:10px;line-height:1.6}

@media(max-width:1000px){.customer-submission-info-v10074{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-submission-fields-v10074{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-review-media-grid-v10074{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.customer-submission-stats-v10074{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-submission-book-head-v10074{align-items:flex-start}.customer-submission-characters-v10074{grid-template-columns:1fr}.customer-review-media-grid-v10074{grid-template-columns:repeat(3,minmax(0,1fr))}.customer-public-media-grid-v10074{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.customer-submission-heading-v10074 .row-actions{width:100%}.customer-submission-heading-v10074 .row-actions .btn{flex:1}.customer-submission-stats-v10074{gap:8px}.customer-submission-stats-v10074 article{padding:11px}.customer-submission-stats-v10074 strong{font-size:15px}.customer-submission-info-v10074,.customer-submission-fields-v10074{grid-template-columns:1fr}.customer-submission-info-v10074>div.wide,.customer-submission-fields-v10074>div.wide{grid-column:auto}.customer-submission-book-head-v10074{flex-direction:column}.customer-submission-book-meta-v10074{width:100%;flex-direction:row;align-items:center;justify-content:space-between}.customer-submission-subsection-v10074{padding:13px}.customer-review-media-grid-v10074{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-submission-book-price-v10074{grid-template-columns:1fr}.customer-submission-book-price-v10074>div{border-inline-end:0;border-bottom:1px solid var(--line)}.customer-submission-book-price-v10074>div:last-child{border-bottom:0}.customer-public-character-grid-v10074{grid-template-columns:1fr}.customer-public-media-grid-v10074{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-public-media-head-v10074{flex-direction:column}}

/* =========================================================
   Hikayati V10.0.88 — compact supporting-master workspace
   ========================================================= */
body.page-order-view .supporting-master-section-v10088{margin-top:12px!important;padding:12px!important;border-radius:15px!important}
body.page-order-view .supporting-master-head-v10088{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important;margin-bottom:10px!important}
body.page-order-view .supporting-master-head-v10088 h4{margin:0!important;font-size:14px!important}
body.page-order-view .supporting-master-head-v10088 p{margin:4px 0 0!important;font-size:10.5px!important;line-height:1.5!important;max-width:760px!important}
body.page-order-view .supporting-master-grid-v10088{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:10px;align-items:start}
body.page-order-view .supporting-master-card-v10088{min-width:0;padding:11px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2);box-shadow:0 5px 16px rgba(15,23,42,.04)}
body.page-order-view .supporting-master-card-head-v10088{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
body.page-order-view .supporting-master-title-v10088{display:flex;align-items:center;gap:6px;min-width:0;flex-wrap:wrap}
body.page-order-view .supporting-master-title-v10088 strong{font-size:13px;overflow-wrap:anywhere}
body.page-order-view .supporting-master-note-v10088{margin:5px 0 0;color:var(--muted);font-size:10.5px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.page-order-view .supporting-master-previews-v10088{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}
body.page-order-view .supporting-master-preview-v10088{min-width:0}
body.page-order-view .supporting-master-preview-v10088>span{display:block;margin-bottom:4px;color:var(--muted);font-size:9px;font-weight:850}
body.page-order-view .supporting-master-preview-v10088 a{display:block;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface)}
body.page-order-view .supporting-master-preview-v10088 img{display:block;width:100%;height:155px;object-fit:contain;background:var(--surface)}
body.page-order-view .supporting-master-empty-v10088{height:155px;display:grid;place-items:center;text-align:center;padding:9px;border:1px dashed var(--line);border-radius:10px;background:var(--surface);color:var(--muted);font-size:10px}
body.page-order-view .supporting-master-alert-v10088{margin-top:8px!important;padding:8px!important;font-size:10px!important}
body.page-order-view .supporting-master-tools-v10088{margin-top:9px;border:1px solid var(--line);border-radius:10px;background:var(--surface);overflow:hidden}
body.page-order-view .supporting-master-tools-v10088>summary{cursor:pointer;list-style:none;padding:8px 10px;font-size:10.5px;font-weight:900;color:var(--text);display:flex;align-items:center;justify-content:space-between;gap:8px}
body.page-order-view .supporting-master-tools-v10088>summary::-webkit-details-marker{display:none}
body.page-order-view .supporting-master-tools-v10088>summary::after{content:'＋';color:var(--muted);font-size:14px;line-height:1}
body.page-order-view .supporting-master-tools-v10088[open]>summary::after{content:'−'}
body.page-order-view .supporting-master-tools-body-v10088{padding:9px;border-top:1px solid var(--line);display:grid;gap:8px}
body.page-order-view .supporting-master-form-v10088{display:grid;gap:7px}
body.page-order-view .supporting-master-form-v10088 label>span,body.page-order-view .supporting-master-upload-form-v10088 label>span{display:block;margin-bottom:4px;font-size:9.5px;font-weight:850;color:var(--muted)}
body.page-order-view .supporting-master-form-v10088 textarea{width:100%;min-height:82px;resize:vertical;font-size:11px}
body.page-order-view .supporting-master-form-v10088 input[type=file],body.page-order-view .supporting-master-upload-form-v10088 input[type=file]{font-size:10px}
body.page-order-view .supporting-master-form-v10088 small{display:block;margin-top:3px;font-size:9px}
body.page-order-view .supporting-master-divider-v10088{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:8.5px;font-weight:900}
body.page-order-view .supporting-master-divider-v10088::before,body.page-order-view .supporting-master-divider-v10088::after{content:'';height:1px;background:var(--line);flex:1}
body.page-order-view .supporting-master-upload-form-v10088{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:end}
body.page-order-view .supporting-master-actions-v10088{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:9px}
body.page-order-view .supporting-master-actions-v10088 form{margin:0}
body.page-order-view .supporting-master-lock-note-v10088{color:var(--muted);font-size:9px;line-height:1.4;margin-inline-start:auto;max-width:220px}

@media(max-width:900px){body.page-order-view .supporting-master-grid-v10088{grid-template-columns:1fr 1fr}}
@media(max-width:720px){
  body.page-order-view .supporting-master-grid-v10088{grid-template-columns:1fr}
  body.page-order-view .supporting-master-preview-v10088 img,body.page-order-view .supporting-master-empty-v10088{height:145px}
}
@media(max-width:480px){
  body.page-order-view .supporting-master-section-v10088{padding:8px!important}
  body.page-order-view .supporting-master-card-v10088{padding:9px}
  body.page-order-view .supporting-master-head-v10088{display:grid!important;grid-template-columns:1fr auto!important}
  body.page-order-view .supporting-master-previews-v10088{grid-template-columns:1fr 1fr}
  body.page-order-view .supporting-master-preview-v10088 img,body.page-order-view .supporting-master-empty-v10088{height:125px}
  body.page-order-view .supporting-master-upload-form-v10088{grid-template-columns:1fr}
  body.page-order-view .supporting-master-upload-form-v10088 .btn,body.page-order-view .supporting-master-form-v10088 .btn{width:100%}
  body.page-order-view .supporting-master-lock-note-v10088{width:100%;max-width:none;margin-inline-start:0}
}

/* V10.0.92 — Accordion-only production cleanup. Keep all existing inner layouts unchanged. */
body.page-order-view .production-section-accordion-v10092{
  margin:12px 0;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--surface);
  overflow:hidden;
}
body.page-order-view .production-section-summary-v10092{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:48px;
  padding:11px 14px;
  font-weight:900;
  color:var(--text);
  background:color-mix(in srgb,var(--surface-2) 82%,var(--surface));
  border-bottom:1px solid transparent;
}
body.page-order-view .production-section-summary-v10092::-webkit-details-marker{display:none}
body.page-order-view .production-section-summary-v10092::after{
  content:'⌄';
  margin-inline-start:6px;
  font-size:18px;
  line-height:1;
  color:var(--muted);
  transition:transform .18s ease;
}
body.page-order-view .production-section-accordion-v10092[open]>.production-section-summary-v10092{
  border-bottom-color:var(--line);
}
body.page-order-view .production-section-accordion-v10092[open]>.production-section-summary-v10092::after{transform:rotate(180deg)}
body.page-order-view .production-section-body-v10092{padding:0 12px 12px}
body.page-order-view .production-section-body-v10092>.panel-master-card,
body.page-order-view .production-section-body-v10092>.ai-blueprint-head{margin-top:12px!important}
@media(max-width:640px){
  body.page-order-view .production-section-summary-v10092{padding:10px 11px;min-height:44px;font-size:13px}
  body.page-order-view .production-section-body-v10092{padding:0 8px 8px}
}

/* ============================================================
   V10.0.93 — Production header compaction + visual accordion cues
   Keeps all V10.0.92 inner production layouts and behavior intact.
   ============================================================ */
body.page-order-view .production-book-topline-v10093{
  display:grid;
  grid-template-columns:minmax(250px,1fr) minmax(330px,520px) minmax(330px,.95fr);
  gap:10px;
  align-items:stretch;
  margin:0 0 8px;
}
body.page-order-view .production-book-topline-v10093>.production-book-head{
  display:contents!important;
}
body.page-order-view .production-book-topline-v10093>.production-book-head>div:first-child{
  min-width:0;
  align-self:center;
  padding:5px 2px;
}
body.page-order-view .production-book-topline-v10093>.production-book-head>div:first-child h3{
  margin:4px 0 2px!important;
  line-height:1.25;
}
body.page-order-view .production-book-topline-v10093 .production-test-state{
  display:block;
  margin-top:2px;
  font-size:9px;
  line-height:1.3;
}
body.page-order-view .production-book-topline-v10093 .production-book-metrics-v10017{
  width:100%!important;
  grid-template-columns:minmax(180px,1.25fr) minmax(125px,.8fr)!important;
  gap:7px!important;
  align-self:stretch;
}
body.page-order-view .production-book-topline-v10093 .book-progress-card-v10017,
body.page-order-view .production-book-topline-v10093 .book-ai-cost-v10017{
  min-height:64px!important;
  padding:8px 10px!important;
  box-shadow:none!important;
}
body.page-order-view .production-book-topline-v10093 .book-progress-track-v10017{height:6px}
body.page-order-view .production-book-topline-v10093 .book-ai-breakdown-mini-v10022{
  gap:3px!important;
  margin-top:1px!important;
}
body.page-order-view .production-book-topline-v10093>.production-book-qr-card{
  margin:0!important;
  min-width:0;
  padding:8px 10px!important;
  gap:7px!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  border-style:solid!important;
}
body.page-order-view .production-book-topline-v10093>.production-book-qr-card>div:first-child{
  min-width:0!important;
  flex:1 1 125px!important;
}
body.page-order-view .production-book-topline-v10093>.production-book-qr-card>div:first-child strong{
  font-size:11px;
  line-height:1.2;
  white-space:nowrap;
}
body.page-order-view .production-book-topline-v10093>.production-book-qr-card>div:first-child small{
  display:block;
  margin-top:2px;
  max-width:170px;
  font-size:8px;
  line-height:1.25;
}
body.page-order-view .production-book-topline-v10093 .qr-mini-preview{
  width:38px;
  height:38px;
  flex:0 0 38px;
}
body.page-order-view .production-book-topline-v10093>.production-book-qr-card>.row-actions{
  gap:5px;
  flex:0 1 auto;
  flex-wrap:nowrap;
}
body.page-order-view .production-book-topline-v10093>.production-book-qr-card>.row-actions .btn{
  min-height:30px;
  padding:5px 8px;
  font-size:9px;
  white-space:nowrap;
}

/* Distinct but calm section colors: easier to scan without redesigning contents. */
body.page-order-view .blueprint-section-accordion-v10092{--prod-acc:#4f6fd8}
body.page-order-view .character-section-accordion-v10092{--prod-acc:#c17b18}
body.page-order-view .supporting-section-accordion-v10092{--prod-acc:#168b7b}
body.page-order-view .panel-section-accordion-v10092{--prod-acc:#7a58bf}
body.page-order-view .production-section-accordion-v10092{
  border-color:color-mix(in srgb,var(--prod-acc,var(--brand)) 26%,var(--line))!important;
}
body.page-order-view .production-section-summary-v10092{
  position:relative;
  justify-content:flex-start!important;
  padding-inline-start:36px!important;
  background:linear-gradient(90deg,
    color-mix(in srgb,var(--prod-acc,var(--brand)) 10%,var(--surface)),
    color-mix(in srgb,var(--prod-acc,var(--brand)) 4%,var(--surface-2)))!important;
  box-shadow:inset 3px 0 0 color-mix(in srgb,var(--prod-acc,var(--brand)) 68%,transparent);
}
html[dir="rtl"] body.page-order-view .production-section-summary-v10092{
  box-shadow:inset -3px 0 0 color-mix(in srgb,var(--prod-acc,var(--brand)) 68%,transparent);
}
body.page-order-view .production-section-summary-v10092>span:first-child{
  min-width:0;
  font-weight:950;
  color:color-mix(in srgb,var(--prod-acc,var(--brand)) 72%,var(--text));
}
body.page-order-view .production-section-summary-v10092>.badge,
body.page-order-view .production-section-summary-v10092>.soft-pill{
  margin-inline-start:auto!important;
  flex:0 0 auto;
}
body.page-order-view .production-section-summary-v10092::after{
  content:""!important;
  position:absolute;
  inset-inline-start:14px;
  top:50%;
  width:7px;
  height:7px;
  margin:0!important;
  border-right:1.25px solid color-mix(in srgb,var(--prod-acc,var(--brand)) 72%,var(--text));
  border-bottom:1.25px solid color-mix(in srgb,var(--prod-acc,var(--brand)) 72%,var(--text));
  transform:translateY(-65%) rotate(45deg)!important;
  transform-origin:center;
  transition:transform .18s ease;
}
body.page-order-view .production-section-accordion-v10092[open]>.production-section-summary-v10092{
  background:linear-gradient(90deg,
    color-mix(in srgb,var(--prod-acc,var(--brand)) 14%,var(--surface)),
    color-mix(in srgb,var(--prod-acc,var(--brand)) 6%,var(--surface-2)))!important;
  border-bottom-color:color-mix(in srgb,var(--prod-acc,var(--brand)) 22%,var(--line))!important;
}
body.page-order-view .production-section-accordion-v10092[open]>.production-section-summary-v10092::after{
  transform:translateY(-35%) rotate(225deg)!important;
}

@media(max-width:1180px){
  body.page-order-view .production-book-topline-v10093{
    grid-template-columns:minmax(220px,.85fr) minmax(330px,1.15fr);
  }
  body.page-order-view .production-book-topline-v10093>.production-book-qr-card{
    grid-column:1/-1;
  }
  body.page-order-view .production-book-topline-v10093>.production-book-qr-card>div:first-child small{max-width:none}
}
@media(max-width:760px){
  body.page-order-view .production-book-topline-v10093{
    grid-template-columns:1fr;
    gap:7px;
  }
  body.page-order-view .production-book-topline-v10093 .production-book-metrics-v10017{
    grid-template-columns:1fr 1fr!important;
  }
  body.page-order-view .production-book-topline-v10093>.production-book-qr-card{
    grid-column:auto;
    flex-wrap:wrap!important;
  }
  body.page-order-view .production-book-topline-v10093>.production-book-qr-card>.row-actions{
    flex-wrap:wrap;
  }
}
@media(max-width:520px){
  body.page-order-view .production-book-topline-v10093 .production-book-metrics-v10017{
    grid-template-columns:1fr!important;
  }
  body.page-order-view .production-book-topline-v10093>.production-book-qr-card>div:first-child{
    flex-basis:calc(100% - 50px)!important;
  }
  body.page-order-view .production-book-topline-v10093>.production-book-qr-card>.row-actions{
    width:100%;
  }
  body.page-order-view .production-book-topline-v10093>.production-book-qr-card>.row-actions>*{
    flex:1 1 130px;
  }
  body.page-order-view .production-book-topline-v10093>.production-book-qr-card>.row-actions .btn{width:100%}
  body.page-order-view .production-section-summary-v10092{padding-inline-start:32px!important}
  body.page-order-view .production-section-summary-v10092::after{inset-inline-start:12px}
}

/* V10.0.94 — rights-safe style catalog */
.style-group-admin{margin-top:18px}.style-group-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}.style-group-title strong{font-weight:950}.style-group-title span{min-width:28px;text-align:center;padding:3px 8px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:12px}.style-admin-form textarea{min-height:74px;resize:vertical}.style-image-placeholder,.style-thumb-placeholder{display:grid;place-items:center;min-height:130px;border-radius:12px;background:var(--surface-2);border:1px dashed var(--line);color:var(--muted);font-size:12px;font-weight:800}.style-admin-card>img{aspect-ratio:10/7;object-fit:cover}.style-picker-group-title{display:flex;align-items:center;gap:8px;margin:8px 0 6px;font-size:11px;font-weight:900;color:var(--muted)}.style-picker-group-title:after{content:"";height:1px;background:var(--line);flex:1}

/* V10.0.95 — style admin tabs + compact no-vertical-scroll style preview */
.style-admin-tabs{display:flex;align-items:center;gap:8px;margin:16px 0 10px;padding:5px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);overflow-x:auto;scrollbar-width:none}
.style-admin-tabs::-webkit-scrollbar{display:none}.style-admin-tab{appearance:none;border:1px solid transparent;background:transparent;color:var(--muted);font:inherit;font-weight:900;padding:9px 16px;border-radius:10px;cursor:pointer;white-space:nowrap;transition:.16s ease}.style-admin-tab span{display:inline-grid;place-items:center;min-width:23px;height:23px;margin-inline-start:5px;padding:0 6px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:11px}.style-admin-tab.active{background:var(--surface);color:var(--text);border-color:color-mix(in srgb,var(--teal) 42%,var(--line));box-shadow:0 5px 14px rgba(20,61,82,.08)}.style-admin-tab.active span{background:color-mix(in srgb,var(--teal) 12%,var(--surface));border-color:color-mix(in srgb,var(--teal) 32%,var(--line));color:var(--teal)}
.style-admin-tab-panel{display:none!important;margin-top:10px}.style-admin-tab-panel.active{display:block!important}.style-card-meta{align-items:center!important;gap:10px!important}.sort-order-field{display:flex!important;align-items:center!important;gap:7px!important;margin-inline-start:auto!important}.sort-order-field>span{font-size:10px!important;font-weight:900!important;color:var(--muted)!important;white-space:nowrap}.sort-order-field .sort-mini{width:74px!important;min-width:74px!important}

/* Keep the complete style choice experience inside one popup viewport. */
.style-preview-modal .style-preview-v74{width:min(430px,100%)!important;max-height:calc(100dvh - 24px)!important;overflow:hidden!important;padding:10px!important;display:grid!important;grid-template-rows:minmax(0,1fr) auto auto!important;gap:7px!important}
.style-preview-modal .style-preview-stage{min-height:0!important;height:min(52dvh,520px)!important;max-height:52dvh!important;border-radius:14px!important}
.style-preview-modal .style-preview-stage>img{width:100%!important;height:100%!important;max-height:none!important;aspect-ratio:auto!important;object-fit:contain!important}
.style-preview-modal .style-preview-copy,.style-preview-modal .style-preview-info{max-height:none!important;overflow:visible!important;padding:2px 2px 0!important;margin:0!important}
.style-preview-modal .style-preview-copy>.eyebrow,.style-preview-modal .style-preview-copy>p:not(.eyebrow){display:none!important}
.style-preview-modal .style-preview-copy h3,.style-preview-modal .style-preview-info h3{font-size:18px!important;line-height:1.2!important;margin:1px 0 5px!important;text-align:center!important;font-weight:950!important}
.style-preview-modal .style-preview-info>div:first-child{display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;flex-wrap:wrap!important}.style-preview-modal .style-preview-info small{font-size:10px!important;color:var(--muted)!important;direction:ltr!important}
.style-preview-modal .style-preview-thumbs{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:5px!important;overflow:visible!important;padding:0!important;margin:0!important;scroll-snap-type:none!important}
.style-preview-modal .style-preview-thumb{min-width:0!important;width:100%!important;flex:none!important;padding:2px!important;border-radius:9px!important}.style-preview-modal .style-preview-thumb img{aspect-ratio:3/4!important;border-radius:6px!important}.style-preview-modal .style-preview-thumb span{font-size:8px!important;margin-top:2px!important}
.style-preview-modal .style-preview-actionbar{padding:0 2px 1px!important;margin:0!important}.style-preview-modal .style-preview-copy>.btn{margin-top:6px!important;min-height:40px!important}.style-preview-modal .style-preview-actionbar .btn{min-height:40px!important}
.style-preview-modal .modal-close{top:14px!important;inset-inline-end:14px!important;width:34px!important;height:34px!important;border-radius:10px!important;font-size:21px!important}.style-preview-modal .style-preview-arrow{width:38px!important;height:48px!important;font-size:29px!important}

@media(max-width:720px){
 .style-preview-modal{padding:6px!important}.style-preview-modal .style-preview-v74{max-height:calc(100dvh - 12px)!important;border-radius:16px!important;padding:7px!important;gap:5px!important}
 .style-preview-modal .style-preview-stage{height:min(47dvh,410px)!important;max-height:47dvh!important}
 .style-preview-modal .style-preview-copy h3,.style-preview-modal .style-preview-info h3{font-size:16px!important;margin-bottom:4px!important}
 .style-preview-modal .style-preview-thumbs{gap:3px!important}.style-preview-modal .style-preview-thumb{padding:2px!important}.style-preview-modal .style-preview-thumb span{font-size:7.5px!important}
 .style-preview-modal .style-preview-copy>.btn,.style-preview-modal .style-preview-actionbar .btn{min-height:38px!important;padding-block:8px!important}
 .style-preview-modal .style-preview-arrow{width:34px!important;height:44px!important;font-size:27px!important}
 .style-preview-modal .modal-close{top:10px!important;inset-inline-end:10px!important;width:32px!important;height:32px!important}
 .sort-order-field{width:100%;justify-content:space-between;margin-inline-start:0!important}.sort-order-field .sort-mini{width:92px!important}
}
@media(max-height:700px){
 .style-preview-modal .style-preview-stage{height:43dvh!important;max-height:43dvh!important}.style-preview-modal .style-preview-thumb span{display:none!important}.style-preview-modal .style-preview-copy h3,.style-preview-modal .style-preview-info h3{font-size:15px!important}
}

/* V10.0.97 — customer popup spacing fix + true A4 portrait style preview */
/* Use an A4 portrait stage for style/cover previews in both admin order creation and customer order link. */
.style-preview-modal .style-preview-v74{
  width:min(390px,100%)!important;
  grid-template-rows:auto auto auto!important;
  align-content:start!important;
}
.style-preview-modal .style-preview-stage{
  width:min(100%,310px)!important;
  height:auto!important;
  max-height:none!important;
  aspect-ratio:210/297!important;
  justify-self:center!important;
  border-radius:14px!important;
}
.style-preview-modal .style-preview-stage>img{
  width:100%!important;
  height:100%!important;
  aspect-ratio:210/297!important;
  object-fit:contain!important;
  object-position:center!important;
}

/* Customer link only: cancel the old floating CTA that overlapped the title/thumbs. */
.customer-v81 .style-preview-v74{
  position:relative!important;
  overflow:hidden!important;
  padding-bottom:7px!important;
}
.customer-v81 .style-preview-v74 #choosePreviewStyle{
  position:static!important;
  inset:auto!important;
  bottom:auto!important;
  width:100%!important;
  min-height:40px!important;
  margin:0!important;
  box-shadow:none!important;
}
.customer-v81 .style-preview-actionbar{
  position:static!important;
  display:block!important;
  padding:0 2px 1px!important;
  margin:0!important;
  z-index:auto!important;
}
.customer-v81 .style-preview-info{
  position:relative!important;
  z-index:1!important;
  overflow:visible!important;
}
.customer-v81 .style-preview-thumbs{
  margin-bottom:0!important;
}

@media(max-width:720px){
  .style-preview-modal .style-preview-v74{
    width:min(360px,100%)!important;
    max-height:calc(100dvh - 12px)!important;
  }
  .style-preview-modal .style-preview-stage{
    width:min(100%,260px)!important;
    height:auto!important;
    max-height:none!important;
    aspect-ratio:210/297!important;
  }
  .style-preview-modal .style-preview-stage>img{
    height:100%!important;
    max-height:none!important;
    aspect-ratio:210/297!important;
  }
  .customer-v81 .style-preview-v74{
    padding-bottom:7px!important;
  }
  .customer-v81 .style-preview-v74 #choosePreviewStyle{
    position:static!important;
    inset:auto!important;
    bottom:auto!important;
    min-height:38px!important;
  }
}

@media(max-height:760px){
  .style-preview-modal .style-preview-stage{
    width:min(100%,225px)!important;
  }
}


/* V10.0.100 — style catalog filters + physical arrow direction */
/* Arrow meaning is physical, not language-dependent: left button points/moves left, right points/moves right. */
html[dir="rtl"] .style-preview-arrow{transform:translateY(-50%)!important}
.style-preview-arrow.prev{left:9px!important;right:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important}
.style-preview-arrow.next{right:9px!important;left:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important}

.style-catalog-filter{display:grid;grid-template-columns:minmax(135px,.8fr) minmax(150px,1fr) minmax(190px,1.25fr) auto;gap:10px;align-items:end;margin:14px 0 12px;padding:10px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.style-catalog-filter label{margin:0!important}.style-catalog-filter label>span{display:block;margin-bottom:5px;font-size:11px;font-weight:900;color:var(--muted)}.style-catalog-filter select,.style-catalog-filter input{min-height:40px!important}.style-catalog-filter .row-actions{align-items:end;flex-wrap:nowrap}.style-catalog-filter .btn{min-height:40px;white-space:nowrap}
.style-catalog-filter-picker{margin:8px 0!important;padding:8px!important;grid-template-columns:minmax(110px,.75fr) minmax(130px,.9fr) minmax(160px,1.2fr) auto;background:color-mix(in srgb,var(--surface-2) 78%,transparent)}
.style-catalog-filter-picker label>span{font-size:10px}.style-catalog-filter-picker select,.style-catalog-filter-picker input,.style-catalog-filter-picker .btn{min-height:36px!important;font-size:12px!important}
.style-picker-empty{margin:8px 0 0!important;padding:10px!important}
.style-admin-card[hidden],.style-example-card[hidden]{display:none!important}

@media(max-width:900px){
 .style-catalog-filter{grid-template-columns:1fr 1fr}.style-catalog-filter label:has(input[type="search"]){grid-column:1/-1}.style-catalog-filter .row-actions{grid-column:1/-1;justify-content:flex-start}
}
@media(max-width:620px){
 .style-catalog-filter,.style-catalog-filter-picker{grid-template-columns:1fr 1fr!important;gap:7px!important;padding:7px!important}.style-catalog-filter label:has(input[type="search"]){grid-column:1/-1}.style-catalog-filter .row-actions{grid-column:1/-1;display:grid!important;grid-template-columns:1fr 1fr!important;width:100%}.style-catalog-filter .row-actions .btn{width:100%}
}

/* V10.0.101 — root-level physical style arrows + compact style add form */
/* Use explicit physical left/right classes and IDs so RTL/LTR can never collapse or swap the controls. */
.style-preview-modal .style-preview-stage{position:relative!important;}
.style-preview-modal #adminStylePrev,
.style-preview-modal #stylePreviewPrev,
.style-preview-modal .style-preview-arrow-left{
  position:absolute!important;
  top:50%!important;
  left:9px!important;
  right:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:auto!important;
  transform:translateY(-50%)!important;
  display:grid!important;
  place-items:center!important;
  z-index:8!important;
  direction:ltr!important;
}
.style-preview-modal #adminStyleNext,
.style-preview-modal #stylePreviewNext,
.style-preview-modal .style-preview-arrow-right{
  position:absolute!important;
  top:50%!important;
  right:9px!important;
  left:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:auto!important;
  transform:translateY(-50%)!important;
  display:grid!important;
  place-items:center!important;
  z-index:8!important;
  direction:ltr!important;
}
html[dir="rtl"] .style-preview-modal #adminStylePrev,
html[dir="rtl"] .style-preview-modal #adminStyleNext,
html[dir="rtl"] .style-preview-modal #stylePreviewPrev,
html[dir="rtl"] .style-preview-modal #stylePreviewNext,
html[dir="ltr"] .style-preview-modal #adminStylePrev,
html[dir="ltr"] .style-preview-modal #adminStyleNext,
html[dir="ltr"] .style-preview-modal #stylePreviewPrev,
html[dir="ltr"] .style-preview-modal #stylePreviewNext{
  transform:translateY(-50%)!important;
}

/* Compact add-style form: titles/group/category first row, image + both AI descriptors + compact CTA second row. */
.style-upload-compact-v101{
  display:grid!important;
  grid-template-columns:minmax(180px,1.15fr) minmax(180px,1.15fr) minmax(120px,.72fr) minmax(150px,.85fr);
  grid-template-areas:
    "title-ar title-en group category"
    "image ai-ar ai-en submit";
  gap:9px 12px!important;
  align-items:end!important;
  margin-top:10px!important;
}
.style-upload-compact-v101>label{margin:0!important;min-width:0}
.style-upload-compact-v101>label>span{display:block;margin-bottom:5px;font-size:11px;font-weight:900;color:var(--muted)}
.style-upload-compact-v101 input,.style-upload-compact-v101 select{min-height:40px!important}
.style-upload-compact-v101 textarea{min-height:62px!important;height:62px!important;resize:vertical!important}
.style-upload-compact-v101 .style-add-title-ar{grid-area:title-ar}
.style-upload-compact-v101 .style-add-title-en{grid-area:title-en}
.style-upload-compact-v101 .style-add-group{grid-area:group}
.style-upload-compact-v101 .style-add-category{grid-area:category}
.style-upload-compact-v101 .style-add-image{grid-area:image}
.style-upload-compact-v101 .style-add-ai-ar{grid-area:ai-ar}
.style-upload-compact-v101 .style-add-ai-en{grid-area:ai-en}
.style-upload-compact-v101 .style-add-submit{grid-area:submit;display:flex;align-items:flex-end;justify-content:flex-start;padding-bottom:1px}
.style-upload-compact-v101 .style-add-submit .btn{width:auto!important;min-width:112px!important;min-height:40px!important;padding:8px 14px!important;white-space:nowrap!important}
.style-upload-compact-v101 .style-add-image input[type="file"]{font-size:11px!important;padding:6px!important}

@media(max-width:1050px){
  .style-upload-compact-v101{
    grid-template-columns:1fr 1fr;
    grid-template-areas:
      "title-ar title-en"
      "group category"
      "ai-ar ai-en"
      "image submit";
  }
}
@media(max-width:620px){
  .style-upload-compact-v101{
    grid-template-columns:1fr!important;
    grid-template-areas:"title-ar" "title-en" "group" "category" "ai-ar" "ai-en" "image" "submit"!important;
    gap:8px!important;
  }
  .style-upload-compact-v101 textarea{min-height:56px!important;height:56px!important}
  .style-upload-compact-v101 .style-add-submit{justify-content:stretch}
  .style-upload-compact-v101 .style-add-submit .btn{width:100%!important}
}

/* V10.0.102 — definitive popup arrow shell + collapsed style cards */
/* The two navigation controls now live in a full-width shell outside the A4 stage.
   This removes any dependency on RTL/LTR or on the image-stage positioning context. */
.style-preview-modal .style-preview-stage-shell{
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  display:grid!important;
  place-items:center!important;
  overflow:visible!important;
}
.style-preview-modal .style-preview-stage-shell>.style-preview-stage{
  position:relative!important;
  margin-inline:auto!important;
}
.style-preview-modal .style-preview-stage-shell>#adminStylePrev,
.style-preview-modal .style-preview-stage-shell>#stylePreviewPrev{
  position:absolute!important;
  top:50%!important;
  left:0!important;
  right:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:auto!important;
  transform:translateY(-50%)!important;
  z-index:20!important;
  display:grid!important;
  place-items:center!important;
  direction:ltr!important;
}
.style-preview-modal .style-preview-stage-shell>#adminStyleNext,
.style-preview-modal .style-preview-stage-shell>#stylePreviewNext{
  position:absolute!important;
  top:50%!important;
  right:0!important;
  left:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:auto!important;
  transform:translateY(-50%)!important;
  z-index:20!important;
  display:grid!important;
  place-items:center!important;
  direction:ltr!important;
}
html[dir="rtl"] .style-preview-modal .style-preview-stage-shell>.style-preview-arrow,
html[dir="ltr"] .style-preview-modal .style-preview-stage-shell>.style-preview-arrow{
  transform:translateY(-50%)!important;
}

/* Style library cards stay collapsed by default: only the localized visible title is shown. */
.style-admin-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px!important;align-items:start!important}
.style-admin-card-accordion-v102{padding:0!important;overflow:hidden!important;background:var(--surface-2)!important}
.style-admin-details-v102{width:100%!important}
.style-admin-details-v102>summary{
  list-style:none!important;
  cursor:pointer!important;
  min-height:46px!important;
  padding:9px 11px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  user-select:none!important;
}
.style-admin-details-v102>summary::-webkit-details-marker{display:none!important}
.style-admin-details-v102>summary strong{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:13px!important;
  font-weight:950!important;
  color:var(--text)!important;
}
.style-admin-details-v102>summary span{
  flex:0 0 auto!important;
  color:var(--muted)!important;
  font-size:10px!important;
  font-weight:850!important;
}
.style-admin-details-v102>summary span:after{content:"⌄";display:inline-block;margin-inline-start:5px;font-size:12px;transition:transform .15s ease}
.style-admin-details-v102[open]>summary{border-bottom:1px solid var(--line)!important;background:color-mix(in srgb,var(--surface) 45%,transparent)!important}
.style-admin-details-v102[open]>summary span:after{transform:rotate(180deg)}
.style-admin-details-body-v102{padding:9px!important;display:grid!important;gap:8px!important}
.style-admin-detail-image-v102{width:100%!important;aspect-ratio:10/7!important;object-fit:cover!important;border-radius:9px!important;margin:0!important;min-height:0!important}
.style-admin-details-body-v102 .style-admin-form{gap:6px!important}
.style-admin-details-body-v102 .style-admin-form textarea{min-height:64px!important}

@media(max-width:1450px){.style-admin-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}}
@media(max-width:1180px){.style-admin-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:900px){.style-admin-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:620px){
  .style-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .style-admin-details-v102>summary{min-height:43px!important;padding:8px 9px!important}
  .style-admin-details-v102>summary strong{font-size:12px!important}
  .style-admin-details-v102>summary span{font-size:9px!important}
}
@media(max-width:390px){.style-admin-grid{grid-template-columns:1fr 1fr!important}}


/* V10.0.103 — structural arrow fix + visible style thumbnails in collapsed catalog cards */
/* Definitive arrow layout: no absolute positioning. The shell itself is a 3-column row:
   physical left control | A4 stage | physical right control. This neutralizes every older RTL/LTR arrow rule. */
.style-preview-modal .style-preview-stage-shell{
  position:relative!important;
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) 42px!important;
  align-items:center!important;
  justify-items:stretch!important;
  gap:6px!important;
  width:100%!important;
  overflow:visible!important;
}
.style-preview-modal .style-preview-stage-shell>.style-preview-stage{
  grid-column:2!important;
  width:100%!important;
  min-width:0!important;
  margin:0 auto!important;
  position:relative!important;
}
.style-preview-modal .style-preview-stage-shell>#adminStylePrev,
.style-preview-modal .style-preview-stage-shell>#stylePreviewPrev,
.style-preview-modal .style-preview-stage-shell>.style-preview-arrow-left{
  grid-column:1!important;
  grid-row:1!important;
  position:static!important;
  inset:auto!important;
  top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  transform:none!important;
  translate:none!important;
  justify-self:center!important;
  align-self:center!important;
  z-index:2!important;
  margin:0!important;
  display:grid!important;
  place-items:center!important;
  direction:ltr!important;
}
.style-preview-modal .style-preview-stage-shell>#adminStyleNext,
.style-preview-modal .style-preview-stage-shell>#stylePreviewNext,
.style-preview-modal .style-preview-stage-shell>.style-preview-arrow-right{
  grid-column:3!important;
  grid-row:1!important;
  position:static!important;
  inset:auto!important;
  top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  transform:none!important;
  translate:none!important;
  justify-self:center!important;
  align-self:center!important;
  z-index:2!important;
  margin:0!important;
  display:grid!important;
  place-items:center!important;
  direction:ltr!important;
}
html[dir="rtl"] .style-preview-modal .style-preview-stage-shell>.style-preview-arrow,
html[dir="ltr"] .style-preview-modal .style-preview-stage-shell>.style-preview-arrow{
  position:static!important;
  transform:none!important;
  inset:auto!important;
}
@media(max-width:620px){
  .style-preview-modal .style-preview-stage-shell{grid-template-columns:36px minmax(0,1fr) 36px!important;gap:4px!important}
}

/* Collapsed style cards show the uploaded preview image plus localized visible title. */
.style-admin-details-v102>summary{min-height:62px!important;padding:6px 8px!important}
.style-admin-summary-main-v103{min-width:0!important;display:flex!important;align-items:center!important;gap:7px!important;flex:1 1 auto!important}
.style-admin-summary-image-v103,.style-admin-summary-placeholder-v103{
  flex:0 0 46px!important;
  width:46px!important;
  height:46px!important;
  border-radius:8px!important;
  object-fit:cover!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
}
.style-admin-summary-placeholder-v103{background:var(--surface)!important;border:1px solid var(--line)!important;color:var(--muted)!important}
.style-admin-summary-main-v103>strong{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:12px!important;font-weight:950!important;color:var(--text)!important}
.style-admin-summary-details-v103{flex:0 0 auto!important;color:var(--muted)!important;font-size:9px!important;font-weight:850!important;white-space:nowrap!important}
.style-admin-summary-details-v103:after{content:"⌄";display:inline-block;margin-inline-start:4px;font-size:11px;transition:transform .15s ease}
.style-admin-details-v102[open]>summary .style-admin-summary-details-v103:after{transform:rotate(180deg)}
.style-admin-details-v102>summary>span:not(.style-admin-summary-details-v103):after{content:none!important}
@media(max-width:620px){
  .style-admin-details-v102>summary{min-height:56px!important;padding:5px 6px!important;gap:5px!important}
  .style-admin-summary-image-v103,.style-admin-summary-placeholder-v103{flex-basis:40px!important;width:40px!important;height:40px!important}
  .style-admin-summary-main-v103>strong{font-size:11px!important}
  .style-admin-summary-details-v103{font-size:8px!important}
}
/* V10.0.103 specificity guard against older accordion summary span rules. */
.style-admin-details-v102>summary>.style-admin-summary-main-v103{min-width:0!important;display:flex!important;align-items:center!important;gap:7px!important;flex:1 1 auto!important;color:inherit!important;font-size:inherit!important;font-weight:inherit!important}
.style-admin-details-v102>summary>.style-admin-summary-main-v103>strong{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:12px!important;font-weight:950!important;color:var(--text)!important}
.style-admin-details-v102>summary>.style-admin-summary-details-v103{flex:0 0 auto!important;color:var(--muted)!important;font-size:9px!important;font-weight:850!important;white-space:nowrap!important}
.style-admin-details-v102>summary>.style-admin-summary-main-v103:after{content:none!important;display:none!important}
@media(max-width:620px){.style-admin-details-v102>summary>.style-admin-summary-main-v103>strong{font-size:11px!important}.style-admin-details-v102>summary>.style-admin-summary-details-v103{font-size:8px!important}}
/* Keep grid columns physical (left-to-right) even when the page language is RTL. */
.style-preview-modal .style-preview-stage-shell{direction:ltr!important}
.style-preview-modal .style-preview-stage-shell>.style-preview-stage{direction:inherit!important}

/* V10.0.104 — style image viewer + mobile accordion layout repair */
.style-admin-summary-image-btn-v104{
  flex:0 0 46px!important;width:46px!important;height:46px!important;padding:0!important;margin:0!important;
  border:0!important;border-radius:8px!important;background:transparent!important;overflow:hidden!important;cursor:zoom-in!important;
  display:block!important;box-shadow:none!important;
}
.style-admin-summary-image-btn-v104 .style-admin-summary-image-v103{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important;border-radius:8px!important}
.style-admin-summary-image-btn-v104:focus-visible{outline:2px solid var(--teal)!important;outline-offset:2px!important}
.style-admin-image-modal-v104[hidden]{display:none!important}
.style-admin-image-modal-v104{position:fixed!important;inset:0!important;z-index:10080!important;display:grid!important;place-items:center!important;padding:18px!important}
.style-admin-image-backdrop-v104{position:absolute!important;inset:0!important;background:rgba(10,20,35,.78)!important;backdrop-filter:blur(3px)!important}
.style-admin-image-dialog-v104{position:relative!important;z-index:1!important;max-width:min(92vw,860px)!important;max-height:92vh!important;display:grid!important;place-items:center!important}
.style-admin-image-dialog-v104>img{display:block!important;max-width:100%!important;max-height:88vh!important;width:auto!important;height:auto!important;object-fit:contain!important;border-radius:14px!important;box-shadow:0 18px 55px rgba(0,0,0,.38)!important;background:#fff!important}
.style-admin-image-close-v104{position:absolute!important;top:-12px!important;inset-inline-end:-12px!important;width:38px!important;height:38px!important;border:0!important;border-radius:12px!important;background:#213552!important;color:#fff!important;font-size:25px!important;line-height:1!important;display:grid!important;place-items:center!important;cursor:pointer!important;z-index:2!important}
html.style-image-modal-open-v104{overflow:hidden!important}

@media(max-width:620px){
  /* Keep two compact cards per row while collapsed, but an opened card owns the full row. */
  .style-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;align-items:start!important}
  .style-admin-card-accordion-v102.is-open-v104{grid-column:1/-1!important}
  .style-admin-card-accordion-v102.is-open-v104 .style-admin-details-body-v102{padding:8px!important}
  .style-admin-card-accordion-v102.is-open-v104 .style-admin-form{grid-template-columns:1fr 1fr!important;gap:7px!important}
  .style-admin-card-accordion-v102.is-open-v104 .style-admin-form>label{min-width:0!important}
  .style-admin-card-accordion-v102.is-open-v104 .style-admin-form textarea{min-height:66px!important}
  .style-admin-card-accordion-v102.is-open-v104 .style-admin-form input,
  .style-admin-card-accordion-v102.is-open-v104 .style-admin-form select,
  .style-admin-card-accordion-v102.is-open-v104 .style-admin-form textarea{width:100%!important;min-width:0!important;box-sizing:border-box!important}
  .style-admin-card-accordion-v102.is-open-v104 .style-card-meta,
  .style-admin-card-accordion-v102.is-open-v104 .style-admin-form>.row-actions{grid-column:1/-1!important}
  .style-admin-card-accordion-v102.is-open-v104 .style-card-meta{flex-wrap:wrap!important}
  .style-admin-summary-image-btn-v104{flex-basis:40px!important;width:40px!important;height:40px!important}
  .style-admin-image-modal-v104{padding:12px!important}
  .style-admin-image-dialog-v104{max-width:96vw!important;max-height:94vh!important}
  .style-admin-image-dialog-v104>img{max-height:90vh!important;border-radius:11px!important}
  .style-admin-image-close-v104{top:6px!important;inset-inline-end:6px!important;width:34px!important;height:34px!important;border-radius:10px!important}
}
@media(max-width:390px){
  /* Very narrow phones: opened editor becomes one clean column; collapsed cards remain two-up. */
  .style-admin-card-accordion-v102.is-open-v104 .style-admin-form{grid-template-columns:1fr!important}
  .style-admin-card-accordion-v102.is-open-v104 .style-card-meta,
  .style-admin-card-accordion-v102.is-open-v104 .style-admin-form>.row-actions{grid-column:1!important}
}

/* V10.0.105 — compact local Pango positioning controls */
.production-text-nudge-v105{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 8px;border:1px solid #e4e7ec;border-radius:10px;background:#fafbff}.production-text-nudge-v105>small{font-size:11px;color:#667085}.production-text-nudge-v105>div{display:flex;gap:4px;align-items:center}.production-text-nudge-v105 .btn-xs{min-width:28px;min-height:28px;padding:3px 7px;font-size:12px;line-height:1}.page-thumb:fullscreen{background:#0b1320;display:flex;align-items:center;justify-content:center;padding:12px}.page-thumb:fullscreen img{width:auto!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}.production-page-operations-buttons-v10017>a[aria-disabled="true"]{pointer-events:none;opacity:.5}@media(max-width:640px){.production-text-nudge-v105{width:100%;justify-content:space-between}.production-text-nudge-v105>div{width:100%;justify-content:center}}

/* V10.0.106 — gallery fullscreen + live local text positioning */
.production-gallery-head-actions-v106{display:flex;align-items:center;gap:8px}
.production-gallery-dialog-v10015:fullscreen{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;border-radius:0!important;border:0!important;background:var(--surface)!important}
.production-gallery-dialog-v10015:fullscreen .production-gallery-stage-v10015{min-height:0}
.production-gallery-dialog-v10015:fullscreen .production-gallery-stage-v10015 figure img{height:100%!important;width:auto!important;max-height:100%!important;max-width:100%!important;aspect-ratio:210/297;object-fit:contain!important}
.production-text-position-modal-v106[hidden]{display:none!important}
.production-text-position-modal-v106{position:fixed;inset:0;z-index:10070;background:rgba(5,12,25,.88);backdrop-filter:blur(8px);padding:18px;display:grid;place-items:center}
html.production-text-position-open-v106,html.production-text-position-open-v106 body{overflow:hidden}
.production-text-position-dialog-v106{width:min(760px,100%);height:min(94vh,940px);display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 30px 90px rgba(0,0,0,.35)}
.production-text-position-head-v106{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid var(--line);background:var(--surface-2)}
.production-text-position-head-v106 strong{display:block}.production-text-position-head-v106 small{display:block;color:var(--muted);margin-top:3px}
.production-text-position-close-v106{width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font-size:24px;cursor:pointer;line-height:1}
.production-text-position-stage-v106{min-height:0;display:grid;place-items:center;padding:12px;background:color-mix(in srgb,var(--bg) 82%,#000 18%);overflow:hidden}
.production-text-position-stage-v106 img{display:block;height:100%;width:auto;max-width:100%;max-height:100%;aspect-ratio:210/297;object-fit:contain;border-radius:10px;box-shadow:0 14px 44px rgba(0,0,0,.24);background:#111}
.production-text-position-controls-v106{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:12px 14px;border-top:1px solid var(--line);background:var(--surface-2)}
.production-text-position-controls-v106>div:first-child{font-size:12px;color:var(--muted);white-space:nowrap}.production-text-position-controls-v106>div:first-child strong{color:var(--text)}
.production-text-position-pad-v106{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}.production-text-position-pad-v106 .btn{min-width:42px;padding-inline:10px}
.production-text-position-save-v106{white-space:nowrap}
@media(max-width:700px){.production-gallery-head-actions-v106 .production-gallery-fullscreen-v106{padding-inline:9px}.production-text-position-modal-v106{padding:0}.production-text-position-dialog-v106{width:100%;height:100dvh;border-radius:0;border:0}.production-text-position-controls-v106{grid-template-columns:1fr;gap:8px;text-align:center}.production-text-position-save-v106{width:100%}.production-text-position-stage-v106{padding:8px}.production-text-position-pad-v106{order:2}.production-text-position-controls-v106>div:first-child{order:1}.production-text-position-save-v106{order:3}}

/* V10.0.108 — working gallery viewport expansion + exact A4 local text preview */
.production-gallery-dialog-v10015.is-expanded-v108{
  width:100vw!important;
  height:100dvh!important;
  max-width:none!important;
  max-height:none!important;
  border-radius:0!important;
  border:0!important;
}
.production-gallery-modal-v10015.is-expanded-v108{
  padding:0!important;
  place-items:stretch!important;
}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-stage-v10015{
  min-height:0!important;
}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-stage-v10015 figure img{
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:100%!important;
  aspect-ratio:2480/3508;
  object-fit:contain!important;
}
.production-gallery-nav-v10015{
  position:relative;
  z-index:4;
  user-select:none;
  -webkit-user-select:none;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.production-gallery-nav-v10015 svg,.production-gallery-nav-v10015 svg *{pointer-events:none;user-select:none;-webkit-user-select:none}
.production-gallery-stage-v10015,.production-gallery-stage-v10015 figure,.production-gallery-stage-v10015 img{user-select:none;-webkit-user-select:none}
.production-gallery-thumbs-v10015{scroll-behavior:auto}
.production-gallery-thumbs-v10015 button,.production-gallery-thumbs-v10015 img{user-select:none;-webkit-user-select:none;-webkit-user-drag:none}
.production-text-position-open-v106{touch-action:manipulation}

/* Local text editor: the preview canvas itself is exact production A4 (2480×3508 ratio).
   The complete page is always visible; no crop, stretch, or cover-fit is permitted. */
.production-text-position-dialog-v106{
  width:min(980px,calc(100vw - 24px))!important;
  height:min(98dvh,1080px)!important;
}
.production-text-position-stage-v106{
  min-height:0!important;
  overflow:hidden!important;
  padding:10px!important;
}
.production-text-position-a4-v108{
  height:min(100%,calc((100vw - 64px) * 3508 / 2480));
  width:auto;
  max-width:100%;
  max-height:100%;
  aspect-ratio:2480/3508;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#111;
  border-radius:10px;
  box-shadow:0 14px 44px rgba(0,0,0,.24);
}
.production-text-position-a4-v108 > img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  aspect-ratio:2480/3508!important;
  object-fit:contain!important;
  object-position:center center!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#111!important;
}
@media(max-width:700px){
  .production-gallery-dialog-v10015.is-expanded-v108{width:100%!important;height:100dvh!important;border-radius:0!important}
  .production-gallery-modal-v10015.is-expanded-v108{padding:0!important}
  .production-text-position-dialog-v106{width:100%!important;height:100dvh!important}
  .production-text-position-stage-v106{padding:6px!important}
  .production-text-position-a4-v108{height:auto;width:min(100%,calc((100dvh - 205px) * 2480 / 3508));max-height:calc(100dvh - 205px)}
}

/* V10.0.109 — immersive book gallery + direct-manipulation Pango text box editor */
.production-gallery-dialog-v10015.is-expanded-v108{
  position:relative!important;
  overflow:hidden!important;
  display:block!important;
  background:#070b12!important;
}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-head-v10015{
  position:absolute!important;
  inset:0 0 auto 0!important;
  height:0!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  z-index:30!important;
  pointer-events:none!important;
}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-head-v10015>div:first-child,
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-fullscreen-v106,
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-thumbs-v10015,
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-stage-v10015 figcaption{
  display:none!important;
}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-head-actions-v106{
  position:absolute!important;
  top:14px!important;
  right:14px!important;
  z-index:34!important;
  pointer-events:auto!important;
}
[dir="rtl"] .production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-head-actions-v106{right:auto!important;left:14px!important}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-close-v10015{
  width:46px!important;height:46px!important;border-radius:50%!important;
  border:1px solid rgba(255,255,255,.35)!important;background:rgba(0,0,0,.52)!important;color:#fff!important;
  backdrop-filter:blur(8px);box-shadow:0 10px 30px rgba(0,0,0,.30);font-size:28px!important;
}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-stage-v10015{
  position:relative!important;
  width:100%!important;height:100dvh!important;min-height:100dvh!important;
  padding:10px 64px!important;margin:0!important;
  display:grid!important;place-items:center!important;
  grid-template-columns:1fr!important;
  background:#070b12!important;
}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-stage-v10015 figure{
  width:100%!important;height:100%!important;min-height:0!important;
  display:grid!important;place-items:center!important;margin:0!important;
}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-stage-v10015 figure img{
  display:block!important;
  width:auto!important;height:auto!important;
  max-width:calc(100vw - 128px)!important;
  max-height:calc(100dvh - 20px)!important;
  aspect-ratio:210/297!important;object-fit:contain!important;
  border-radius:8px!important;box-shadow:0 18px 60px rgba(0,0,0,.45)!important;
}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-nav-v10015{
  position:absolute!important;top:50%!important;transform:translateY(-50%)!important;
  z-index:31!important;width:48px!important;height:64px!important;
  background:rgba(0,0,0,.48)!important;border:1px solid rgba(255,255,255,.24)!important;color:#fff!important;
  border-radius:16px!important;display:grid!important;place-items:center!important;
}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-prev-v10015{left:12px!important;right:auto!important}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-next-v10015{right:12px!important;left:auto!important}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-nav-v10015 svg{width:27px!important;height:27px!important;stroke:currentColor!important;stroke-width:2.2!important;fill:none!important}

.production-text-box-dialog-v109{width:min(1050px,calc(100vw - 18px))!important;height:min(98dvh,1120px)!important}
.production-text-box-stage-v109{padding:8px!important;overflow:hidden!important}
.production-text-a4-canvas-v109{position:relative!important;overflow:hidden!important;touch-action:none!important;user-select:none!important;-webkit-user-select:none!important}
.production-text-a4-canvas-v109>img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important;pointer-events:none!important}
.production-text-drag-box-v109{
  position:absolute;z-index:4;box-sizing:border-box;
  border:2px solid #16a3ff;border-radius:8px;
  background:rgba(22,163,255,.055);
  box-shadow:0 0 0 1px rgba(255,255,255,.72) inset,0 0 0 2px rgba(0,0,0,.20);
  cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;
  min-width:10px;min-height:10px;
}
.production-text-drag-box-v109:active{cursor:grabbing}
.production-text-drag-box-v109:focus-visible{outline:3px solid rgba(22,163,255,.35);outline-offset:2px}
.production-text-live-copy-v109{
  position:absolute;inset:6%;display:flex;align-items:center;justify-content:center;
  text-align:center;white-space:pre-wrap;overflow:hidden;
  font-family:"DejaVu Sans",Arial,sans-serif;font-weight:700;
  font-size:clamp(8px,1.2vw,18px);line-height:1.15;color:#171717;
  text-shadow:0 1px 0 rgba(255,255,255,.7);pointer-events:none;
}
.production-text-box-tag-v109{
  position:absolute;top:-25px;left:0;padding:3px 7px;border-radius:6px 6px 0 0;
  background:#16a3ff;color:#fff;font-size:10px;font-weight:800;line-height:18px;pointer-events:none
}
.production-text-resize-handle-v109{
  position:absolute;width:16px;height:16px;border-radius:50%;background:#fff;border:3px solid #16a3ff;
  box-shadow:0 2px 8px rgba(0,0,0,.30);z-index:6;touch-action:none
}
.production-text-resize-handle-v109.nw{left:-9px;top:-9px;cursor:nwse-resize}
.production-text-resize-handle-v109.ne{right:-9px;top:-9px;cursor:nesw-resize}
.production-text-resize-handle-v109.sw{left:-9px;bottom:-9px;cursor:nesw-resize}
.production-text-resize-handle-v109.se{right:-9px;bottom:-9px;cursor:nwse-resize}
.production-text-box-controls-v109{grid-template-columns:1fr auto!important}
.production-text-box-metrics-v109{display:flex!important;gap:18px!important;flex-wrap:wrap!important;align-items:center!important;color:var(--muted)!important;font-size:12px!important}
.production-text-box-metrics-v109 strong{color:var(--text)!important;margin-inline-start:5px}
.production-text-box-actions-v109{display:flex;gap:8px;align-items:center;justify-content:flex-end}
@media(max-width:700px){
  .production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-stage-v10015{padding:8px 46px!important}
  .production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-stage-v10015 figure img{max-width:calc(100vw - 92px)!important;max-height:calc(100dvh - 16px)!important}
  .production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-nav-v10015{width:38px!important;height:54px!important;border-radius:12px!important}
  .production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-prev-v10015{left:5px!important}.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-next-v10015{right:5px!important}
  .production-text-box-controls-v109{grid-template-columns:1fr!important}.production-text-box-metrics-v109{justify-content:center!important}.production-text-box-actions-v109{justify-content:stretch}.production-text-box-actions-v109 .btn{flex:1}
  .production-text-live-copy-v109{font-size:clamp(6px,2.3vw,12px)}
}

/* V10.0.110 — reliable gallery exit + unified Auto Pango local editor */
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-head-v10015>div:first-child{display:none!important}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-head-actions-v106{
  display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;
}
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-close-v10015{
  display:grid!important;place-items:center!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;
}
.production-text-panel-guide-v110{
  position:absolute;z-index:2;box-sizing:border-box;border:2px solid #22c55e;border-radius:10px;
  box-shadow:0 0 0 1px rgba(255,255,255,.72) inset;background:rgba(34,197,94,.025);pointer-events:none;
}
.production-text-editor-meta-v110{grid-column:1/-1!important}
.production-text-live-controls-v110{
  display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:8px;align-items:end;width:100%;
}
.production-text-live-controls-v110 label{display:grid;gap:5px;min-width:0}
.production-text-live-controls-v110 label>span{font-size:11px;font-weight:800;color:var(--muted)}
.production-text-live-controls-v110 input,.production-text-live-controls-v110 select{width:100%;min-width:0;box-sizing:border-box}
.production-text-live-controls-v110 label small{font-size:10px;color:var(--muted)}
.production-text-box-controls-v109{grid-template-columns:1fr!important;gap:10px!important}
.production-text-box-actions-v109{grid-column:1/-1!important}
@media(max-width:850px){.production-text-live-controls-v110{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.production-text-live-controls-v110{grid-template-columns:1fr}.production-text-box-dialog-v109{height:100dvh!important;width:100%!important;border-radius:0!important}}
.production-text-exact-wrap-v110{inset:0!important;display:grid!important;place-items:center!important;padding:0!important;overflow:hidden!important;transform:none!important}
.production-text-exact-wrap-v110 img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;transition:opacity .12s ease}
.production-text-exact-wrap-v110 img.is-syncing{opacity:.42}


/* V10.0.111 — root fixes: MariaDB-safe local Pango save, independent expanded-gallery exit, exact transparent Pango preview, aligned editor fields */
.production-gallery-expanded-exit-v111{display:none}
.production-gallery-dialog-v10015.is-expanded-v108>.production-gallery-expanded-exit-v111{
  display:grid!important;place-items:center!important;position:absolute!important;top:14px!important;right:14px!important;z-index:80!important;
  width:48px!important;height:48px!important;padding:0!important;border-radius:50%!important;
  border:1px solid rgba(255,255,255,.45)!important;background:rgba(0,0,0,.70)!important;color:#fff!important;
  font:700 30px/1 Arial,sans-serif!important;cursor:pointer!important;pointer-events:auto!important;
  box-shadow:0 10px 34px rgba(0,0,0,.38)!important;backdrop-filter:blur(9px)!important;
}
[dir="rtl"] .production-gallery-dialog-v10015.is-expanded-v108>.production-gallery-expanded-exit-v111{right:auto!important;left:14px!important}
.production-gallery-dialog-v10015.is-expanded-v108>.production-gallery-expanded-exit-v111:hover{background:rgba(0,0,0,.88)!important;transform:scale(1.04)}
/* Keep the legacy header close as a fallback, but the independent button above is the primary expanded-mode exit. */
.production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-head-actions-v106{z-index:70!important}

/* The full A4 artwork rule must apply ONLY to the page background image. Nested Pango preview PNG stays transparent. */
.production-text-position-a4-v108 .production-text-exact-wrap-v110 img{
  width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;
  aspect-ratio:auto!important;object-fit:contain!important;background:transparent!important;border-radius:0!important;box-shadow:none!important;
}
.production-text-exact-wrap-v110{background:transparent!important}

/* One professional baseline for all local text editor controls. */
.production-text-live-controls-v110{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important;align-items:stretch!important;
}
.production-text-live-controls-v110 label{
  display:grid!important;grid-template-rows:18px 44px 14px!important;gap:5px!important;align-items:center!important;
  min-width:0!important;margin:0!important;padding:0!important;
}
.production-text-live-controls-v110 label>span{
  display:flex!important;align-items:center!important;min-height:18px!important;font-size:11px!important;font-weight:800!important;line-height:1.2!important;
}
.production-text-live-controls-v110 input:not([type="range"]),.production-text-live-controls-v110 select{
  height:44px!important;min-height:44px!important;padding-block:0!important;margin:0!important;align-self:center!important;
}
.production-text-live-controls-v110 input[type="range"]{height:44px!important;min-height:44px!important;margin:0!important;align-self:center!important}
.production-text-live-controls-v110 label small{display:flex!important;align-items:center!important;min-height:14px!important;line-height:1!important;margin:0!important}
@media(max-width:850px){.production-text-live-controls-v110{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:520px){.production-text-live-controls-v110{grid-template-columns:1fr!important}.production-gallery-dialog-v10015.is-expanded-v108>.production-gallery-expanded-exit-v111{top:9px!important;right:9px!important;width:44px!important;height:44px!important}[dir="rtl"] .production-gallery-dialog-v10015.is-expanded-v108>.production-gallery-expanded-exit-v111{right:auto!important;left:9px!important}}

/* V10.0.112 — MOBILE ONLY: full A4 local-text preview + single expanded-gallery exit */
@media (max-width:520px){
  /* Local text editor: keep the whole production page visible in its true A4 portrait ratio.
     The modal scrolls vertically so controls never force the A4 preview into a short rectangle. */
  .production-text-box-dialog-v109{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    height:100dvh!important;
    max-height:100dvh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    border-radius:0!important;
  }
  .production-text-box-dialog-v109 .production-text-position-head-v106{
    flex:0 0 auto!important;
  }
  .production-text-box-stage-v109{
    flex:0 0 auto!important;
    min-height:0!important;
    height:auto!important;
    overflow:visible!important;
    padding:8px!important;
    display:block!important;
  }
  .production-text-position-a4-v108.production-text-a4-canvas-v109{
    width:min(calc(100vw - 16px),420px)!important;
    height:auto!important;
    max-width:none!important;
    max-height:none!important;
    aspect-ratio:2480/3508!important;
    margin:0 auto!important;
    flex:none!important;
  }
  .production-text-box-controls-v109{
    flex:0 0 auto!important;
    min-height:max-content!important;
  }

  /* Expanded gallery: on phones keep exactly one exit control.
     Hide the legacy header action group and keep the independent V111 X only. */
  .production-gallery-dialog-v10015.is-expanded-v108 .production-gallery-head-actions-v106{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  .production-gallery-dialog-v10015.is-expanded-v108>.production-gallery-expanded-exit-v111{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
}

/* ================================================================
   HIKAYATI V10.0.113 — workflow completion fixes
   ================================================================ */
.admin-order-draft-actions-v113{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.admin-order-draft-actions-v113 small{color:var(--muted)}
.book-navigator .book-nav-entry-v113{display:inline-flex;align-items:stretch;gap:4px;flex:0 0 auto}
.book-nav-entry-v113 .book-nav-chip{flex:1 1 auto}
.book-nav-duplicate-v113{width:30px;min-width:30px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);font-size:17px;cursor:pointer;display:grid;place-items:center;padding:0}
.book-nav-duplicate-v113:hover{border-color:var(--primary);color:var(--primary)}
.manual-adjust-control-v113{display:grid;grid-template-columns:1fr;gap:6px}
.manual-adjust-control-v113 input{width:100%}
.manual-adjust-step-v113{display:none}
.product-catalog-table-v113{min-width:980px;table-layout:auto}
.product-catalog-table-v113 .product-order-col-v113,.product-catalog-table-v113 .product-order-cell-v113{width:84px;min-width:84px;text-align:center}
.product-catalog-table-v113 .product-code-col-v113,.product-catalog-table-v113 .product-code-cell-v113{width:150px;min-width:150px}
.product-catalog-table-v113 .product-name-col-v113,.product-catalog-table-v113 .product-name-cell-v113{width:220px;min-width:220px}
.product-catalog-table-v113 .product-code-cell-v113,.product-catalog-table-v113 .product-name-cell-v113{border-inline-end:1px solid var(--line)}
.product-move-actions-v113{display:flex;gap:5px;justify-content:center}
.product-move-actions-v113 form{margin:0}
.product-move-actions-v113 .btn{min-width:32px;padding:5px 8px}
html[data-theme="light"] .orders-assignment-dialog-v10062{background:#fff;color:#172033;border:1px solid #dbe3ef;box-shadow:0 24px 70px rgba(15,23,42,.18)}
html[data-theme="light"] .orders-assignment-dialog-v10062::backdrop{background:rgba(15,23,42,.28)}
html[data-theme="light"] .orders-assignment-dialog-card-v10062{background:#fff;color:#172033}
html[data-theme="light"] .orders-assignment-dialog-card-v10062 .panel-head{border-color:#e5eaf1}
html[data-theme="light"] .orders-assignment-dialog-card-v10062 select{background:#fff;color:#172033;border-color:#cfd8e6}
html[data-theme="light"] .orders-assignment-dialog-card-v10062 .btn-ghost{background:#f7f9fc;color:#172033;border-color:#d7dfeb}
@media(max-width:620px){
  .manual-adjust-control-v113{grid-template-columns:42px minmax(0,1fr) 42px;align-items:center}
  .manual-adjust-step-v113{display:grid;place-items:center;height:42px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);font-size:22px;font-weight:800;cursor:pointer}
  .manual-adjust-control-v113 input{height:42px;text-align:center}
  .book-nav-duplicate-v113{width:28px;min-width:28px}
}

/* =========================================================
   HIKAYATI V10.0.114 — DESKTOP MANUAL ADJUSTMENT STEPPER
   Desktop/laptop gets a compact native-like vertical stepper.
   Mobile keeps the V10.0.113 horizontal +/- controls unchanged.
   ========================================================= */

/* V10.0.115 — manual adjustment control rebuilt from one responsive structure. */
.manual-adjust-field-v115{display:grid;gap:6px;min-width:0}
.manual-adjust-label-v115{display:block;margin:0;color:var(--muted);font-weight:700;line-height:1.35;cursor:default;user-select:none;-webkit-user-select:none}
.manual-adjust-control-v115{display:block;min-width:0}
.manual-adjust-input-shell-v115{position:relative;min-width:0;width:100%}
.manual-adjust-input-shell-v115 input{display:block;width:100%;height:42px!important;min-width:0;padding-inline-end:32px!important;text-align:center;box-sizing:border-box}
.manual-adjust-desktop-stepper-v115{position:absolute;inset-inline-end:1px;top:1px;bottom:1px;width:28px;display:grid;grid-template-rows:1fr 1fr;border-inline-start:1px solid var(--line);border-radius:0 9px 9px 0;overflow:hidden;z-index:2}
[dir="rtl"] .manual-adjust-desktop-stepper-v115{border-radius:9px 0 0 9px}
.manual-adjust-desktop-stepper-v115 button{appearance:none;-webkit-appearance:none;display:grid;place-items:center;width:100%;min-width:0;padding:0;margin:0;border:0;background:var(--surface-2);color:var(--text);font-size:9px;line-height:1;cursor:pointer;user-select:none;-webkit-user-select:none}
.manual-adjust-desktop-stepper-v115 button+button{border-top:1px solid var(--line)}
.manual-adjust-desktop-stepper-v115 button:hover{background:var(--surface)}
.manual-adjust-mobile-btn-v115{display:none!important}
@media (max-width:760px){
  .manual-adjust-control-v115{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:6px;align-items:center}
  .manual-adjust-mobile-btn-v115{display:grid!important;place-items:center;height:42px;width:42px;padding:0;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);font-size:22px;font-weight:800;line-height:1;cursor:pointer}
  .manual-adjust-desktop-stepper-v115{display:none!important}
  .manual-adjust-input-shell-v115 input{padding-inline:10px!important;height:42px!important;text-align:center}
}

/* V10.0.118 — delivery-date bulk filter + unrestricted manual Pango guides */
.orders-delivery-filter-v118{display:flex;align-items:end;gap:8px;flex-wrap:wrap;margin-inline:auto}
.orders-delivery-filter-v118 label{min-width:170px;margin:0}.orders-delivery-filter-v118 label span{display:block;font-size:11px;font-weight:800;color:var(--muted);margin-bottom:4px}
.orders-delivery-filter-v118 input[type="date"]{min-height:36px}
/* Manual text editing is page-bounded only; old orange/green helper frames are intentionally hidden. */
#productionTextPanelGuideV110,.uw-panel-guide,.uw-field-guide{display:none!important}
@media(max-width:760px){.orders-delivery-filter-v118{width:100%;margin-inline:0}.orders-delivery-filter-v118 label{flex:1;min-width:150px}.orders-delivery-filter-v118 .btn{min-height:36px}}


/* V10.0.119 — compact delivery-date filter aligned with bulk actions */
.orders-delivery-filter-v119{display:flex;align-items:center;gap:7px;min-height:36px;margin-inline:0;white-space:nowrap}
.orders-delivery-filter-v119>span{font-size:11px!important;font-weight:800;color:var(--muted);flex:0 0 auto!important}
.orders-delivery-filter-v119 input[type="date"]{height:36px;min-height:36px;max-width:160px;padding:6px 9px}
.orders-delivery-filter-v119 .btn{height:36px;min-height:36px;padding:6px 12px;display:inline-flex;align-items:center}
@media(max-width:760px){.orders-delivery-filter-v119{width:100%;margin-inline:0;white-space:normal;flex-wrap:wrap}.orders-delivery-filter-v119 input[type="date"]{flex:1;max-width:none}.orders-delivery-filter-v119>span{width:auto}}

/* V10.0.121 — compact bulk toolbar: delivery-date filter stays last, beside bulk buttons */
@media(min-width:761px){
  body.page-orders .orders-bulk-v100 .row-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:nowrap;min-width:0;overflow-x:auto;padding-bottom:1px}
  body.page-orders .orders-bulk-v100 .row-actions>.btn{flex:0 0 auto;width:auto}
  body.page-orders .orders-delivery-filter-v119{flex:0 0 auto;display:flex;align-items:center;gap:6px;white-space:nowrap;margin:0}
  body.page-orders .orders-delivery-filter-v119 input[type="date"]{width:150px;max-width:150px}
}

/* V10.0.129 — Ready-page upload: inline authoritative status instead of silent reload failures. */
.ready-page-upload-status-v100129{min-height:20px;margin:7px 0 2px;font-size:12px;font-weight:700;line-height:1.5}
.ready-page-upload-status-v100129[data-state="working"]{opacity:.78}
.ready-page-upload-status-v100129[data-state="success"]{color:#16724a}
.ready-page-upload-status-v100129[data-state="error"]{color:#c9352b}

/* HIKAYATI V10.0.138 — one-off page generation override */
.production-exception-modal-v138[hidden]{display:none!important}
.production-exception-modal-v138{position:fixed;inset:0;z-index:10085;display:grid;place-items:center;padding:18px;background:rgba(6,13,27,.76);backdrop-filter:blur(8px)}
.production-exception-dialog-v138{width:min(720px,100%);max-height:calc(100dvh - 36px);overflow:auto;border:1px solid color-mix(in srgb,var(--teal) 28%,var(--line));border-radius:22px;background:var(--surface);color:var(--text);box-shadow:0 24px 70px rgba(0,0,0,.28)}
.production-exception-head-v138{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 19px 16px;border-bottom:1px solid var(--line);background:linear-gradient(135deg,color-mix(in srgb,var(--teal) 9%,var(--surface-2)),color-mix(in srgb,var(--gold) 7%,var(--surface-2)))}
.production-exception-head-v138>div{display:grid;gap:3px}.production-exception-kicker-v138{font-size:9px;font-weight:950;letter-spacing:.9px;color:var(--teal)}.production-exception-head-v138 strong{font-size:17px}.production-exception-head-v138 small{max-width:560px;color:var(--muted);line-height:1.55}
.production-exception-close-v138{flex:0 0 36px;width:36px;height:36px;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--text);font:inherit;font-size:22px;line-height:1;cursor:pointer}
.production-exception-body-v138{display:grid;gap:14px;padding:17px 19px}.production-exception-current-v138{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px dashed color-mix(in srgb,var(--teal) 34%,var(--line));border-radius:13px;background:color-mix(in srgb,var(--teal) 5%,var(--surface));font-size:10.5px}.production-exception-current-v138 span{color:var(--muted)}.production-exception-current-v138 strong{direction:ltr;text-align:left;overflow-wrap:anywhere}
.production-exception-grid-v138{display:grid;grid-template-columns:1fr 1.45fr .7fr;gap:12px}.production-exception-grid-v138 label{display:grid;gap:6px}.production-exception-grid-v138 label>span{font-size:10.5px;font-weight:850;color:var(--muted)}.production-exception-grid-v138 select,.production-exception-grid-v138 input{width:100%;min-width:0;min-height:44px}
.production-exception-note-v138{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:start;padding:11px 12px;border-radius:13px;border:1px solid color-mix(in srgb,var(--gold) 35%,var(--line));background:color-mix(in srgb,var(--gold) 8%,var(--surface));font-size:10.5px;line-height:1.6}.production-exception-note-v138 strong{color:color-mix(in srgb,var(--gold) 72%,var(--text))}.production-exception-note-v138 span{color:var(--muted)}
.production-exception-actions-v138{display:flex;justify-content:flex-end;gap:9px;padding:14px 19px 18px;border-top:1px solid var(--line);background:color-mix(in srgb,var(--surface-2) 72%,var(--surface))}.production-exception-actions-v138 .btn{min-width:150px}.production-exception-generate-v138{border-color:color-mix(in srgb,var(--gold) 44%,var(--line))!important;background:color-mix(in srgb,var(--gold) 11%,var(--surface))!important;color:var(--text)!important}.production-exception-generate-v138:hover{background:color-mix(in srgb,var(--gold) 18%,var(--surface))!important}
html[data-theme="dark"] .production-exception-dialog-v138{border-color:color-mix(in srgb,var(--teal) 32%,var(--line));box-shadow:0 26px 80px rgba(0,0,0,.42)}html[data-theme="dark"] .production-exception-head-v138{background:linear-gradient(135deg,color-mix(in srgb,var(--teal) 10%,var(--surface-2)),color-mix(in srgb,var(--gold) 7%,var(--surface-2)))}html[data-theme="dark"] .production-exception-generate-v138{background:color-mix(in srgb,var(--gold) 12%,var(--surface-2))!important;color:#f5ead0!important}
html.production-exception-open-v138{overflow:hidden}
@media(max-width:720px){.production-exception-modal-v138{padding:0}.production-exception-dialog-v138{width:100%;max-height:100dvh;height:100dvh;border-radius:0;border:0}.production-exception-grid-v138{grid-template-columns:1fr}.production-exception-current-v138{align-items:flex-start;flex-direction:column}.production-exception-actions-v138{display:grid;grid-template-columns:1fr}.production-exception-actions-v138 .btn{width:100%}}

/* HIKAYATI V10.0.139 — one-off generation popup note/reference polish */
.production-exception-extra-v139{display:grid;grid-template-columns:1.35fr 1fr;gap:12px;padding:13px;border:1px solid color-mix(in srgb,var(--teal) 18%,var(--line));border-radius:15px;background:linear-gradient(135deg,color-mix(in srgb,var(--teal) 4%,var(--surface-2)),color-mix(in srgb,var(--gold) 3%,var(--surface)))}
.production-exception-extra-v139 label{display:grid;gap:7px;align-content:start}.production-exception-extra-v139 label>span{font-size:10.5px;font-weight:900;color:var(--text)}.production-exception-extra-v139 small{color:var(--muted);line-height:1.55}
.production-exception-note-field-v139 textarea{width:100%;min-height:92px;resize:vertical;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);padding:10px 12px;font:inherit;line-height:1.55}
.production-exception-reference-v139 input[type="file"]{width:100%;min-height:44px;border:1px dashed color-mix(in srgb,var(--teal) 38%,var(--line));border-radius:12px;background:var(--surface);color:var(--text);padding:8px 10px}
.production-exception-file-state-v139{min-height:34px;display:flex;align-items:center;padding:7px 9px;border-radius:10px;background:color-mix(in srgb,var(--teal) 6%,var(--surface-2));border:1px solid color-mix(in srgb,var(--teal) 14%,var(--line));color:var(--muted);font-size:10px;overflow-wrap:anywhere}
html[data-theme="dark"] .production-exception-extra-v139{border-color:color-mix(in srgb,var(--teal) 26%,var(--line));background:linear-gradient(135deg,color-mix(in srgb,var(--teal) 7%,var(--surface-2)),color-mix(in srgb,var(--gold) 4%,var(--surface-2)))}
html[data-theme="dark"] .production-exception-note-field-v139 textarea,html[data-theme="dark"] .production-exception-reference-v139 input[type="file"]{background:color-mix(in srgb,var(--surface) 82%,#000);border-color:color-mix(in srgb,var(--teal) 18%,var(--line))}
@media(max-width:720px){.production-exception-extra-v139{grid-template-columns:1fr;padding:11px}.production-exception-note-field-v139 textarea{min-height:82px}}

/* Hikayati V10.0.140 */
.production-notes-panel-v100140{border:1px solid var(--line);position:relative}.production-notes-panel-v100140.has-open-notes{box-shadow:0 0 0 2px color-mix(in srgb,#f5a623 24%,transparent)}.production-note-form-v100140{display:flex;gap:8px;align-items:flex-end}.production-note-form-v100140 textarea{flex:1;min-height:58px}.production-note-list-v100140{display:grid;gap:8px;margin-top:10px}.production-note-item-v100140{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}.production-note-item-v100140>div{display:flex;justify-content:space-between;gap:8px}.production-note-item-v100140 p{margin:6px 0;white-space:pre-wrap}.production-page-note-v100140{margin-top:7px}.production-page-note-toggle-v100140{border:0;background:transparent;color:var(--muted);font-weight:800;cursor:pointer;padding:4px 0}.production-page-note-v100140.has-note .production-page-note-toggle-v100140{color:#b86d00}.production-page-note-body-v100140{margin-top:6px;padding:9px;border:1px dashed var(--line);border-radius:10px;background:var(--surface-2)}
.customer-lookup-v100140{margin:0 0 14px;position:relative}.customer-lookup-results-v100140{position:absolute;z-index:20;inset-inline:0;top:100%;max-height:320px;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 18px 38px rgba(0,0,0,.16);padding:6px}.customer-lookup-item-v100140{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;text-align:start;border:0;background:transparent;color:inherit;padding:10px;border-radius:9px;cursor:pointer}.customer-lookup-item-v100140:hover{background:var(--surface-2)}.customer-lookup-item-v100140 small{grid-column:1/-1;color:var(--muted)}.customer-lookup-empty-v100140{padding:14px;color:var(--muted)}
.provider-form-accordion-v100140{overflow:hidden}.provider-form-summary-v100140{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;list-style:none}.provider-form-summary-v100140::-webkit-details-marker{display:none}.provider-form-summary-v100140>div{display:grid;gap:3px}.provider-form-summary-v100140 small{color:var(--muted)}.provider-form-accordion-v100140[open] .provider-form-summary-v100140>span{transform:rotate(180deg)}.provider-form-body-v100140{border-top:1px solid var(--line);padding-top:4px}
.production-exception-extra-v100140{border:1px solid var(--line);border-radius:12px;background:var(--surface-2);overflow:hidden}.production-exception-extra-v100140>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px}.production-exception-extra-v100140>summary::-webkit-details-marker{display:none}.production-exception-extra-v100140>summary small{color:var(--muted);margin-inline-start:auto}.production-exception-extra-v100140[open]>summary>span{transform:rotate(180deg)}.production-exception-extra-body-v100140{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:0 12px 12px}.production-exception-dialog-v138{max-width:720px}.production-exception-grid-v138{grid-template-columns:1fr 1fr 140px}.production-exception-current-v138{border-radius:10px}.production-exception-note-v138{font-size:.88rem}
.order-created-v100140{max-width:760px;margin:30px auto;text-align:center;padding:34px}.order-created-icon-v100140{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;margin:0 auto 12px;font-size:32px;background:color-mix(in srgb,#22a06b 18%,var(--surface));color:#158052}.order-created-summary-v100140{display:flex;justify-content:center;gap:18px;margin:16px 0}.order-created-actions-v100140{justify-content:center}.customer-success-actions-v100140{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
@media(max-width:700px){.production-note-form-v100140{display:grid}.production-exception-extra-body-v100140,.production-exception-grid-v138{grid-template-columns:1fr}.order-created-v100140{margin:12px}.customer-lookup-results-v100140{position:static;margin-top:5px}}

/* Hikayati V10.0.146 — live directed production-note hub + popup history */
.production-notes-hub-v146{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid var(--line);padding:16px 18px}.production-notes-hub-v146.has-open-notes{border-color:color-mix(in srgb,#ef4444 25%,var(--line))}.production-notes-hub-v146.has-unread-notes{box-shadow:0 0 0 2px color-mix(in srgb,#ef4444 18%,transparent)}.production-notes-hub-copy-v146{display:flex;align-items:center;gap:12px;min-width:0}.production-notes-hub-copy-v146 h2{margin:0 0 3px;font-size:17px}.production-notes-hub-copy-v146 p{margin:0;color:var(--muted);font-size:12.5px}.production-note-attention-v146{display:inline-grid;place-items:center;flex:0 0 auto;width:25px;height:25px;border-radius:50%;font:900 15px/1 Arial;background:color-mix(in srgb,#64748b 11%,var(--surface));border:1px solid color-mix(in srgb,#64748b 28%,var(--line));color:#64748b}.has-unread-notes .production-note-attention-v146,.production-note-chip-v146.has-unread .production-note-attention-v146{background:#dc2626;border-color:#dc2626;color:#fff;box-shadow:0 0 0 4px rgba(220,38,38,.10)}.production-notes-hub-button-v146{display:flex!important;align-items:center;gap:8px}.production-notes-hub-button-v146>b,.production-note-chip-v146>b{display:inline-grid;place-items:center;min-width:21px;height:21px;padding:0 5px;border-radius:999px;background:#dc2626;color:#fff;font-size:10px}.production-notes-hub-button-v146>em{font-style:normal;font-size:10px;font-weight:900;color:#b91c1c;background:#fee2e2;border-radius:999px;padding:4px 7px}.production-print-state-v146{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.production-note-chip-v146{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line);background:var(--surface-2);color:var(--muted);padding:3px 7px;border-radius:999px;font:800 10.5px/1.2 inherit;cursor:pointer}.production-note-chip-v146 .production-note-attention-v146{width:18px;height:18px;font-size:11px}.production-note-chip-v146.has-open{border-color:color-mix(in srgb,#ef4444 38%,var(--line));color:#b91c1c;background:color-mix(in srgb,#fee2e2 45%,var(--surface))}.production-notes-dialog-v146{border:0;padding:0;background:transparent;width:min(680px,calc(100vw - 24px));max-width:none}.production-notes-dialog-v146::backdrop{background:rgba(15,23,42,.62);backdrop-filter:blur(3px)}.production-notes-dialog-shell-v146{background:var(--surface);border:1px solid var(--line);border-radius:20px;overflow:hidden;box-shadow:0 30px 80px rgba(15,23,42,.28);max-height:min(82vh,780px);display:grid;grid-template-rows:auto auto minmax(0,1fr)}.production-notes-dialog-shell-v146>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line);background:var(--surface-2)}.production-notes-dialog-shell-v146>header>div{display:flex;align-items:center;gap:10px}.production-notes-dialog-shell-v146>header strong{display:block}.production-notes-dialog-shell-v146>header small{display:block;color:var(--muted);margin-top:2px}.production-notes-dialog-close-v146{border:0;background:transparent;color:var(--muted);font-size:25px;cursor:pointer}.production-notes-compose-v146{display:grid;grid-template-columns:150px 1fr auto;gap:10px;padding:14px 18px;border-bottom:1px solid var(--line);align-items:end}.production-notes-compose-v146 label{display:grid;gap:5px}.production-notes-compose-v146 textarea{min-height:70px;resize:vertical}.production-notes-target-chip-v146{display:flex;align-items:center;min-height:42px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}.production-notes-history-v146{overflow:auto;padding:14px 18px;display:grid;gap:10px}.production-note-item-v146{border:1px solid var(--line);border-radius:14px;padding:12px 13px;background:var(--surface)}.production-note-item-v146.is-unread{border-color:#ef4444;box-shadow:inset 3px 0 0 #ef4444}.production-note-item-v146.is-resolved{opacity:.72;background:var(--surface-2)}.production-note-item-head-v146{display:flex;justify-content:space-between;gap:10px}.production-note-item-head-v146>div{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.production-note-item-head-v146 span{font-size:10px;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:2px 6px}.production-note-item-head-v146 small{color:var(--muted);font-size:10px}.production-note-item-v146 p{margin:8px 0 10px;line-height:1.7;white-space:normal}.production-note-item-v146 footer{display:flex;justify-content:flex-end}.production-note-resolved-v146{font-size:10px;color:#15803d;font-weight:800}.production-note-open-v146{font-size:10px;color:#b45309;font-weight:800}.production-notes-empty-v146{text-align:center;padding:28px;color:var(--muted)}@media(max-width:700px){.production-notes-hub-v146{align-items:flex-start;flex-direction:column}.production-notes-compose-v146{grid-template-columns:1fr}.production-notes-hub-button-v146{width:100%;justify-content:center}.production-note-chip-label-v146{display:none}}
.page-card-top-actions-v146{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.page-card-top-actions-v146 .production-note-chip-v146{margin:0}.page-card-top-actions-v146 .production-note-chip-v146.has-unread{animation:hikayati-note-pulse-v146 1.9s ease-in-out infinite}@keyframes hikayati-note-pulse-v146{0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.05)}50%{box-shadow:0 0 0 5px rgba(220,38,38,.10)}}

/* Hikayati V10.0.147 — production notes popup polish + compact page note badge */
.production-notes-dialog-v147{color:var(--text);font-family:inherit;}
.production-notes-dialog-v147::backdrop{background:rgba(22,34,52,.56);backdrop-filter:blur(4px) saturate(.9)}
.production-notes-dialog-shell-v147{color:var(--text);background:var(--surface);border:1px solid color-mix(in srgb,var(--line) 88%,var(--text) 12%);border-radius:22px;box-shadow:0 28px 80px rgba(20,35,60,.24);max-height:min(86vh,820px);grid-template-rows:auto auto auto minmax(0,1fr)}
.production-notes-dialog-shell-v147>header{padding:16px 18px;background:linear-gradient(135deg,color-mix(in srgb,var(--navy) 7%,var(--surface)),color-mix(in srgb,var(--teal) 5%,var(--surface)));border-bottom:1px solid var(--line);color:var(--text)}
.production-notes-dialog-heading-v147{display:flex;align-items:center;gap:11px;min-width:0}.production-notes-dialog-heading-v147>div{min-width:0}.production-notes-dialog-heading-v147 strong{display:block;color:var(--text);font-size:15px;line-height:1.35}.production-notes-dialog-heading-v147 small{display:block;color:var(--muted);font-size:10.5px;line-height:1.55;margin-top:3px}.production-note-attention-dialog-v147{width:30px;height:30px;font-size:15px;background:color-mix(in srgb,var(--gold) 23%,var(--surface));border-color:color-mix(in srgb,var(--gold) 55%,var(--line));color:color-mix(in srgb,var(--warning) 88%,var(--text))}
.production-notes-dialog-close-v147{width:34px;height:34px;display:grid;place-items:center;padding:0;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);font-size:21px;line-height:1;transition:.15s ease}.production-notes-dialog-close-v147:hover{color:var(--text);background:var(--surface-3);border-color:color-mix(in srgb,var(--navy) 18%,var(--line));transform:none}
.production-notes-compose-v147{display:grid;grid-template-columns:1fr;gap:12px;padding:15px 18px 16px;background:var(--surface);border-bottom:1px solid var(--line);color:var(--text)}
.production-notes-compose-head-v147{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.production-notes-compose-head-v147 strong{display:block;color:var(--text);font-size:12.5px}.production-notes-compose-head-v147 small{display:block;color:var(--muted);font-size:10px;margin-top:2px;line-height:1.5}
.production-notes-compose-grid-v147{display:grid;grid-template-columns:minmax(155px,.42fr) minmax(0,1.58fr);gap:10px;align-items:start}.production-notes-compose-grid-v147 label{display:grid;gap:5px}.production-notes-compose-grid-v147 label>span{margin:0;color:var(--text);opacity:.82;font-size:10.5px}.production-notes-compose-grid-v147 select,.production-notes-compose-grid-v147 textarea{background:var(--surface-2);border:1px solid var(--line);color:var(--text);box-shadow:none}.production-notes-compose-grid-v147 select:focus,.production-notes-compose-grid-v147 textarea:focus{background:var(--surface);border-color:var(--teal);box-shadow:0 0 0 3px color-mix(in srgb,var(--teal) 14%,transparent)}.production-notes-compose-grid-v147 textarea{min-height:78px;resize:vertical;line-height:1.65}.production-notes-target-chip-v146{color:var(--text);background:var(--surface-2);border-color:var(--line)}
.production-notes-compose-actions-v147{display:flex;justify-content:flex-end;align-items:center}.production-notes-compose-actions-v147 .btn{min-height:34px;padding:7px 14px;border-radius:10px;font-size:11px}
.production-notes-history-title-v147{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px 8px;background:var(--surface-2);border-bottom:1px solid color-mix(in srgb,var(--line) 78%,transparent)}.production-notes-history-title-v147 strong{display:block;color:var(--text);font-size:12.5px}.production-notes-history-title-v147 small{display:block;color:var(--muted);font-size:9.8px;margin-top:2px}
.production-notes-history-v147{padding:12px 18px 17px;background:var(--surface-2);gap:9px;scrollbar-color:color-mix(in srgb,var(--muted) 35%,transparent) transparent}
.production-note-item-v147{position:relative;padding:12px 13px 11px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text);box-shadow:0 3px 12px rgba(24,42,72,.035);opacity:1!important;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.production-note-item-v147:hover{border-color:color-mix(in srgb,var(--navy) 16%,var(--line));box-shadow:0 7px 18px rgba(24,42,72,.055)}.production-note-item-v147.is-unread{border-color:color-mix(in srgb,var(--danger) 62%,var(--line));box-shadow:inset 3px 0 0 var(--danger),0 6px 18px color-mix(in srgb,var(--danger) 8%,transparent);background:color-mix(in srgb,var(--danger-bg) 36%,var(--surface))}.production-note-item-v147.is-resolved{background:color-mix(in srgb,var(--success-bg) 25%,var(--surface));border-color:color-mix(in srgb,var(--success) 18%,var(--line))}
.production-note-item-head-v147{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}.production-note-author-v147{display:flex;align-items:center;gap:8px;min-width:0}.production-note-author-icon-v147{display:grid;place-items:center;flex:0 0 25px;width:25px;height:25px;border-radius:9px;background:color-mix(in srgb,var(--navy) 8%,var(--surface-2));border:1px solid color-mix(in srgb,var(--navy) 15%,var(--line));color:var(--navy);font:900 12px/1 Arial}.production-note-author-v147>div{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}.production-note-author-v147 strong{color:var(--text);font-size:11.5px;line-height:1.35}.production-note-author-v147 span:not(.production-note-author-icon-v147){display:inline-flex;align-items:center;max-width:100%;padding:2px 7px;border:1px solid var(--line);border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:9px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.production-note-item-meta-v147{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;flex:0 0 auto}.production-note-item-meta-v147 small{color:var(--muted);font-size:9px;white-space:nowrap}.production-note-item-meta-v147 em{font-style:normal;padding:2px 6px;border-radius:999px;background:var(--danger-bg);color:var(--danger);border:1px solid color-mix(in srgb,var(--danger) 22%,var(--line));font-size:8.5px;font-weight:900}
.production-note-copy-v147{padding:9px 10px;border-radius:10px;background:var(--surface-2);border:1px solid color-mix(in srgb,var(--line) 82%,transparent);color:var(--text);font-size:11.5px;line-height:1.78;overflow-wrap:anywhere}
.production-note-item-footer-v147{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap;margin-top:9px}.production-note-open-v147{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;border-radius:999px;background:var(--warning-bg);border:1px solid color-mix(in srgb,var(--warning) 19%,var(--line));color:var(--warning);font-size:9px;font-weight:900}.production-note-resolved-v147{display:flex;align-items:center;gap:6px;flex-wrap:wrap;color:var(--success);font-size:9px;font-weight:800}.production-note-resolved-v147 b{padding:3px 7px;border-radius:999px;background:var(--success-bg);border:1px solid color-mix(in srgb,var(--success) 18%,var(--line));color:var(--success)}.production-note-resolved-v147 small{color:var(--muted);font-size:8.8px}.production-note-resolve-btn-v147{min-height:30px!important;padding:5px 9px!important;border-radius:9px!important;font-size:9.5px!important}
.production-notes-empty-v147{min-height:150px;display:grid;place-items:center;align-content:center;gap:4px;border:1px dashed var(--line);border-radius:14px;background:var(--surface);color:var(--muted)}.production-notes-empty-v147>span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--success-bg);color:var(--success);font-weight:900}.production-notes-empty-v147>strong{color:var(--text);font-size:11.5px}.production-notes-empty-v147>small{font-size:9.5px;color:var(--muted)}
/* Page-note control: deliberately the same visual scale as the adjacent status badge. */
.page-card-top-actions-v146{gap:5px}.page-card-top-actions-v146>.badge{min-height:25px;padding:4px 8px;font-size:10px;line-height:1}.production-note-chip-v146{min-height:25px;height:25px;padding:3px 7px;gap:4px;border-radius:999px;font-size:9.5px;line-height:1;background:var(--surface-2);color:var(--muted);vertical-align:middle}.production-note-chip-v146 .production-note-attention-v146{width:14px;height:14px;font-size:9px;border-width:1px;box-shadow:none}.production-note-chip-v146>b{min-width:16px;height:16px;padding:0 4px;font-size:8px}.production-note-chip-label-v146{line-height:1;font-size:9px}.production-note-chip-v146.has-open{background:color-mix(in srgb,var(--danger-bg) 48%,var(--surface));border-color:color-mix(in srgb,var(--danger) 34%,var(--line));color:var(--danger)}
/* General notes hub: explicit theme-safe colors. */
.production-notes-hub-v146{background:var(--surface);color:var(--text)}.production-notes-hub-button-v146{color:var(--text)}.production-notes-hub-button-v146>em{color:var(--danger);background:var(--danger-bg);border:1px solid color-mix(in srgb,var(--danger) 18%,var(--line))}
html[data-theme="dark"] .production-notes-dialog-v147::backdrop{background:rgba(4,10,18,.72)}html[data-theme="dark"] .production-notes-dialog-shell-v147{box-shadow:0 30px 90px rgba(0,0,0,.48);border-color:color-mix(in srgb,var(--line) 90%,#fff 10%)}html[data-theme="dark"] .production-note-author-icon-v147{color:#dbe8fa;background:color-mix(in srgb,var(--navy) 35%,var(--surface-2))}html[data-theme="dark"] .production-note-item-v147{box-shadow:0 5px 18px rgba(0,0,0,.12)}html[data-theme="dark"] .production-note-item-v147.is-unread{background:color-mix(in srgb,var(--danger-bg) 48%,var(--surface))}html[data-theme="dark"] .production-note-copy-v147{background:color-mix(in srgb,var(--surface-2) 88%,#000 12%)}html[data-theme="dark"] .production-notes-dialog-close-v147{background:var(--surface-2)}
@media(max-width:700px){.production-notes-dialog-v146{width:min(96vw,680px)}.production-notes-dialog-shell-v147{max-height:90vh;border-radius:17px}.production-notes-dialog-shell-v147>header{padding:13px 14px}.production-notes-compose-v147{padding:13px 14px}.production-notes-compose-grid-v147{grid-template-columns:1fr}.production-notes-history-title-v147{padding:11px 14px 7px}.production-notes-history-v147{padding:10px 14px 14px}.production-note-item-head-v147{align-items:flex-start;flex-direction:column}.production-note-item-meta-v147{width:100%;justify-content:flex-start}.production-notes-compose-actions-v147 .btn{width:100%}.production-note-chip-label-v146{display:inline}.page-card-top-actions-v146{flex-wrap:nowrap}.production-note-chip-v146{padding-inline:6px}}


/* Hikayati V10.0.148 — portrait production-note popup, persistent note count state, delete actions */
.production-notes-dialog-v146{width:min(570px,calc(100vw - 24px))}
.production-notes-compose-grid-v147{grid-template-columns:1fr;gap:10px}.production-notes-recipient-field-v147{max-width:none}.production-notes-message-field-v147{width:100%}.production-notes-compose-grid-v147 textarea{min-height:92px}
.production-notes-history-v147{gap:11px}.production-note-item-footer-v147{align-items:center;justify-content:space-between!important;gap:10px;flex-wrap:wrap}.production-note-state-v148{display:flex;align-items:center;min-width:0}.production-note-item-actions-v148{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-inline-start:auto}.production-note-delete-btn-v148{min-height:30px;padding:5px 9px;font-size:9.5px;border-radius:9px}
.production-note-chip-v146>b{background:color-mix(in srgb,var(--muted) 12%,var(--surface));color:var(--muted);border:1px solid color-mix(in srgb,var(--muted) 25%,var(--line));box-shadow:none}.production-note-chip-v146.has-open>b{background:var(--danger);color:#fff;border-color:var(--danger);box-shadow:0 0 0 3px color-mix(in srgb,var(--danger) 10%,transparent)}.production-note-chip-v146.is-empty>b,.production-note-chip-v146.has-notes:not(.has-open)>b{background:color-mix(in srgb,var(--muted) 9%,var(--surface-2));color:color-mix(in srgb,var(--muted) 82%,var(--text));border-color:color-mix(in srgb,var(--muted) 18%,var(--line))}
.production-note-chip-v146.has-open{animation:hikayati-note-pulse-v148 1.55s ease-in-out infinite}.production-note-chip-v146.has-open .production-note-attention-v146{background:var(--danger);border-color:var(--danger);color:#fff;box-shadow:0 0 0 3px color-mix(in srgb,var(--danger) 11%,transparent)}.production-note-chip-v146:not(.has-open) .production-note-attention-v146{background:color-mix(in srgb,var(--muted) 8%,var(--surface-2));border-color:color-mix(in srgb,var(--muted) 20%,var(--line));color:var(--muted);box-shadow:none}.page-card-top-actions-v146 .production-note-chip-v146.has-unread{animation:hikayati-note-pulse-v148 1.55s ease-in-out infinite}
@keyframes hikayati-note-pulse-v148{0%,100%{box-shadow:0 0 0 0 color-mix(in srgb,var(--danger) 4%,transparent)}50%{box-shadow:0 0 0 5px color-mix(in srgb,var(--danger) 13%,transparent)}}
html[data-theme="dark"] .production-note-chip-v146>b{background:color-mix(in srgb,var(--muted) 14%,var(--surface-2));border-color:color-mix(in srgb,var(--muted) 26%,var(--line));color:color-mix(in srgb,var(--muted) 90%,#fff)}html[data-theme="dark"] .production-note-chip-v146.has-open>b{background:var(--danger);border-color:var(--danger);color:#fff}
@media(max-width:700px){.production-notes-dialog-v146{width:min(94vw,570px)}.production-note-item-actions-v148{width:100%;justify-content:flex-end}}

/* Hikayati V10.0.149 — open-note countdown, partial-resolution tone, image overlay chip, modal scroll lock, book final-output state */
html.production-notes-modal-open-v149,
body.production-notes-modal-open-v149{overflow:hidden!important;overscroll-behavior:none!important}
.production-notes-dialog-shell-v147,.production-notes-history-v147{overscroll-behavior:contain}

/* Page Note now lives on the image, leaving the workflow status in its natural header position. */
body.page-order-view .production-pages .page-thumb{position:relative}
body.page-order-view .production-note-image-chip-v149{position:absolute;top:7px;z-index:8;margin:0!important;min-height:24px;height:24px;padding:3px 6px;background:color-mix(in srgb,var(--surface) 90%,transparent);border-color:color-mix(in srgb,var(--line) 85%,transparent);box-shadow:0 3px 10px rgba(15,23,42,.12);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
body.page-order-view .production-note-image-chip-v149.note-side-right{right:7px;left:auto}
body.page-order-view .production-note-image-chip-v149.note-side-left{left:7px;right:auto}
body.page-order-view .page-thumb .production-note-image-chip-v149 span,
body.page-order-view .page-thumb .production-note-image-chip-v149 b{letter-spacing:0}
body.page-order-view .page-thumb .production-note-image-chip-v149 .production-note-chip-label-v146{font-size:8.5px!important;font-weight:900!important;color:inherit!important}
body.page-order-view .page-thumb .production-note-image-chip-v149 .production-note-attention-v146{font-size:9px!important;font-weight:950!important}
body.page-order-view .page-thumb .production-note-image-chip-v149>b{font-size:8px!important;font-weight:950!important}
body.page-order-view .page-card-top-actions-v146{margin-inline-start:auto}

/* Bright active red while every historic note is still open. Once some are resolved, switch to progress-orange. */
.production-note-chip-v146.has-open:not(.is-partial){--note-live:#ff3b4f;--note-live-soft:rgba(255,59,79,.14);color:#e51f38!important;border-color:color-mix(in srgb,#ff3b4f 48%,var(--line))!important;background:color-mix(in srgb,#ff3b4f 11%,var(--surface))!important;animation:hikayati-note-pulse-red-v149 1.45s ease-in-out infinite!important}
.production-note-chip-v146.has-open:not(.is-partial)>b,.production-note-chip-v146.has-open:not(.is-partial) .production-note-attention-v146{background:#ff3b4f!important;border-color:#ff3b4f!important;color:#fff!important}
.production-note-chip-v146.has-open.is-partial{--note-live:#ff9f1c;--note-live-soft:rgba(255,159,28,.15);color:#c86c00!important;border-color:color-mix(in srgb,#ff9f1c 54%,var(--line))!important;background:color-mix(in srgb,#ff9f1c 12%,var(--surface))!important;animation:hikayati-note-pulse-orange-v149 1.55s ease-in-out infinite!important}
.production-note-chip-v146.has-open.is-partial>b,.production-note-chip-v146.has-open.is-partial .production-note-attention-v146{background:#ff9f1c!important;border-color:#ff9f1c!important;color:#fff!important;box-shadow:0 0 0 3px rgba(255,159,28,.13)!important}
.production-note-chip-v146:not(.has-open)>b{background:color-mix(in srgb,var(--muted) 10%,var(--surface-2))!important;color:color-mix(in srgb,var(--muted) 84%,var(--text))!important;border-color:color-mix(in srgb,var(--muted) 20%,var(--line))!important;box-shadow:none!important}
.production-note-chip-v146:not(.has-open){animation:none!important;color:var(--muted)!important;border-color:color-mix(in srgb,var(--muted) 18%,var(--line))!important;background:color-mix(in srgb,var(--muted) 6%,var(--surface))!important}
@keyframes hikayati-note-pulse-red-v149{0%,100%{box-shadow:0 3px 10px rgba(15,23,42,.10),0 0 0 0 rgba(255,59,79,.08)}50%{box-shadow:0 3px 10px rgba(15,23,42,.10),0 0 0 6px rgba(255,59,79,.21)}}
@keyframes hikayati-note-pulse-orange-v149{0%,100%{box-shadow:0 3px 10px rgba(15,23,42,.10),0 0 0 0 rgba(255,159,28,.07)}50%{box-shadow:0 3px 10px rgba(15,23,42,.10),0 0 0 6px rgba(255,159,28,.20)}}
html[data-theme="dark"] .production-note-image-chip-v149{background:color-mix(in srgb,var(--surface) 83%,#000 17%);box-shadow:0 4px 14px rgba(0,0,0,.28)}

/* Final book state in the compact Books in Order summary. */
body.page-order-view .book-workspace-meta-v100{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.book-workspace-status-v149{display:inline-flex;align-items:center;justify-content:center;min-height:22px;padding:3px 8px;border-radius:999px;border:1px solid var(--line);font-size:8.8px;font-weight:950;line-height:1;white-space:nowrap}
.book-workspace-status-v149.is-production{color:#9a6300;background:color-mix(in srgb,var(--warning-bg) 72%,var(--surface));border-color:color-mix(in srgb,var(--warning) 24%,var(--line))}
.book-workspace-status-v149.is-prepared{color:var(--success);background:color-mix(in srgb,var(--success-bg) 72%,var(--surface));border-color:color-mix(in srgb,var(--success) 24%,var(--line))}
@media(max-width:700px){body.page-order-view .production-note-image-chip-v149{top:5px}.book-workspace-status-v149{min-height:20px;padding:3px 7px;font-size:8px}}

/* Hikayati V10.0.151 — targeted-reference UX + attention cues */
.special-request-range-v151{align-items:end}.special-requests-builder-v150{grid-column:1/-1;min-width:0}
body.page-order-view .order-note-card-v1007.has-note-attention-v151{position:relative;border-color:color-mix(in srgb,#ff9f1a 55%,var(--line));box-shadow:0 0 0 2px color-mix(in srgb,#ff9f1a 10%,transparent)}
body.page-order-view .order-note-card-v1007.has-note-attention-v151:before{content:'!';position:absolute;inset-inline-end:9px;top:8px;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#ff9f1a;color:#fff;font:900 11px/1 Arial;box-shadow:0 0 0 4px color-mix(in srgb,#ff9f1a 15%,transparent);animation:hikayatiAttention151 1.7s ease-in-out infinite}
.book-workspace-status-v149.is-production{position:relative;box-shadow:0 0 0 3px color-mix(in srgb,#ff9f1a 11%,transparent);animation:hikayatiAttention151 1.75s ease-in-out infinite}
.book-workspace-status-v149.is-production:before{content:'!';display:inline-grid;place-items:center;width:13px;height:13px;margin-inline-end:4px;border-radius:50%;background:#ff9f1a;color:#fff;font:900 8px/1 Arial}
@keyframes hikayatiAttention151{0%,100%{filter:brightness(1);box-shadow:0 0 0 2px color-mix(in srgb,#ff9f1a 10%,transparent)}50%{filter:brightness(1.08);box-shadow:0 0 0 6px color-mix(in srgb,#ff9f1a 4%,transparent)}}
/* V10.0.151 — reusable Blueprint Library control */
.blueprint-library-pick-v100151{display:inline-flex;align-items:center;gap:7px;min-width:min(100%,360px)}
.blueprint-library-pick-v100151 select{min-width:190px;max-width:280px;height:38px;padding-block:6px;background:var(--surface);color:var(--text);border-color:var(--line)}
.blueprint-actions>form{margin:0}.blueprint-actions{align-items:center;gap:8px;flex-wrap:wrap}
@media(max-width:720px){.blueprint-library-pick-v100151{width:100%;display:grid;grid-template-columns:1fr auto}.blueprint-library-pick-v100151 select{min-width:0;max-width:none;width:100%}}


/* =========================================================
   Hikayati V10.0.152 — unified structured-request / cast targeting layout
   Same component geometry on customer create, admin create and admin edit.
   ========================================================= */
.special-requests-builder-v150{
  width:100%;min-width:0;grid-column:1/-1;box-sizing:border-box;
  border:1px solid var(--line);border-radius:16px;padding:14px;
  background:var(--surface-2);display:grid;gap:12px;margin-top:10px;
}
.special-requests-head-v150,.special-request-row-head-v150{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.special-requests-head-v150>div{min-width:0}.special-requests-head-v150 strong{display:block}.special-requests-head-v150 small{display:block;color:var(--muted);margin-top:3px;line-height:1.45}
.special-requests-list-v150{display:grid;gap:10px;min-width:0}
.special-request-row-v150{width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--line);border-radius:14px;padding:12px;background:var(--surface);display:grid;gap:11px}
.special-request-row-v150>label,.special-request-target-grid-v150>label,.special-request-page-v150>label,.character-target-grid-v151>label,.character-page-range-v151>label{min-width:0}
.special-request-row-v150 textarea,.special-request-row-v150 input,.special-request-row-v150 select,.character-target-grid-v151 input,.character-target-grid-v151 select{width:100%;min-width:0;box-sizing:border-box}
.special-request-remove-v150{border:0;background:transparent;color:var(--muted);font-size:20px;line-height:1;cursor:pointer;flex:0 0 auto}
.special-request-target-grid-v150{display:grid;grid-template-columns:minmax(180px,.85fr) minmax(220px,.9fr) minmax(240px,1.15fr);gap:10px;align-items:end;min-width:0}
.special-request-page-v150,.special-request-range-v151,.character-page-range-v151{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px;align-items:end;min-width:0}
.special-request-page-v150[hidden],.special-request-range-v151[hidden],.character-page-range-v151[hidden]{display:none!important}
.character-target-grid-v151{display:grid;grid-template-columns:minmax(180px,.85fr) minmax(220px,1.15fr);gap:10px;align-items:end;grid-column:1/-1;margin-top:8px;padding-top:9px;border-top:1px dashed var(--line);min-width:0}
.clothing-field-v152{display:grid;margin-top:9px;min-width:0}

/* Public customer page should use the same full working width as the admin builder. */
.customer-v72 .optional-customizations-body>.special-requests-builder-v150{grid-column:1/-1;width:100%;justify-self:stretch}
.customer-v72 .optional-customizations-body>.clothing-field-v152{width:100%;box-sizing:border-box}
.customer-v72 .optional-customizations-body{min-width:0}
.customer-v72 .book-accordion-body{min-width:0}

@media(max-width:900px){
  .special-request-target-grid-v150{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .special-request-target-grid-v150>label:last-child{grid-column:1/-1}
  .character-target-grid-v151{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}
}
@media(max-width:640px){
  .special-requests-builder-v150{padding:11px;border-radius:14px;margin-top:8px}
  .special-requests-head-v150{align-items:stretch;flex-direction:column}
  .special-requests-head-v150 .btn{width:100%}
  .special-request-row-v150{padding:10px}
  .special-request-target-grid-v150,.character-target-grid-v151{grid-template-columns:1fr}
  .special-request-target-grid-v150>label:last-child{grid-column:auto}
  /* Keep From / To horizontal even on narrow phones. */
  .special-request-page-v150,.special-request-range-v151,.character-page-range-v151{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px}
  .special-request-page-v150 input,.character-page-range-v151 input{padding-inline:8px}
}
@media(max-width:380px){
  .special-request-page-v150,.special-request-range-v151,.character-page-range-v151{gap:5px}
  .special-request-page-v150 label>span,.character-page-range-v151 label>span{font-size:10px}
}

/* V10.0.157 — production actions refresh the current book fragment in place. */
.live-fragment-refreshing-v157{opacity:.62;pointer-events:none;transition:opacity .16s ease}
.production-live-notice{position:sticky;top:10px;z-index:40}

/* V10.0.194 — unified customer submission review */
.customer-submission-book-v10074{border-radius:22px;box-shadow:0 14px 34px rgba(20,30,55,.07)}
.customer-submission-book-head-v10194{align-items:center;padding:16px 18px}
.customer-review-child-summary-v10194{display:flex;align-items:center;gap:14px;min-width:0}
.customer-review-child-photo-v10194{width:74px;height:74px;min-width:74px;border:1px solid var(--line);border-radius:18px;padding:0;overflow:hidden;background:var(--surface);display:grid;place-items:center;cursor:pointer;box-shadow:0 8px 22px rgba(23,45,87,.08)}
.customer-review-child-photo-v10194 img{width:100%;height:100%;display:block;object-fit:cover}
.customer-review-child-photo-v10194.is-empty{font-size:28px;cursor:default}
.customer-submission-book-head-v10194 h3{font-size:19px;margin:5px 0 2px}
.customer-submission-book-head-v10194 .book-number{font-size:10px;font-weight:900;color:var(--muted)}
.customer-submission-subsection-v10074{padding:15px 18px}
.customer-submission-fields-v10074{gap:9px}
.customer-submission-fields-v10074>div{border-radius:13px}
.customer-review-characters-section-v10194{background:linear-gradient(180deg,var(--surface),var(--surface-2))}
.customer-submission-characters-v10194{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.customer-submission-characters-v10194 article{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:15px;background:var(--surface);min-width:0}
.character-preview-v10194{width:62px!important;height:62px!important;min-width:62px;border-radius:14px!important;padding:0;border:1px solid var(--line);overflow:hidden;display:grid;place-items:center;background:var(--surface-2);cursor:pointer}
.character-preview-v10194 img{width:100%;height:100%;object-fit:cover;display:block}
.character-preview-v10194.is-empty{cursor:default}
.customer-review-character-copy-v10194{min-width:0;flex:1}
.customer-review-character-copy-v10194 small{margin:0 0 2px!important;font-size:9px!important;font-weight:900;color:var(--muted)}
.customer-review-character-copy-v10194 strong{font-size:13px!important}
.customer-review-character-copy-v10194 p{font-size:10px!important;line-height:1.6!important;margin-top:4px!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.customer-review-references-v10194{padding-top:13px;padding-bottom:13px}
.customer-review-media-grid-v10194{grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px}
.customer-review-media-v10194{border:1px solid var(--line);background:var(--surface);padding:6px;border-radius:12px;cursor:pointer;color:inherit;text-align:start;font:inherit}
.customer-review-media-v10194 img{aspect-ratio:1/1;object-fit:cover;border-radius:9px}
.customer-review-media-v10194 span{display:block;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:5px}
.admin-image-lightbox-v10194[hidden]{display:none!important}
.admin-image-lightbox-v10194{position:fixed;inset:0;z-index:99999;background:rgba(5,10,20,.88);display:flex;align-items:center;justify-content:center;padding:28px}
.admin-image-lightbox-v10194 img{display:block;max-width:min(92vw,760px);max-height:88vh;width:auto;height:auto;object-fit:contain;border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.5);background:#111}
.admin-image-lightbox-close-v10194{position:fixed;top:18px;right:18px;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.15);color:#fff;font-size:30px;line-height:1;cursor:pointer;backdrop-filter:blur(8px)}
html[dir="rtl"] .admin-image-lightbox-close-v10194{right:auto;left:18px}
html.admin-lightbox-open-v10194{overflow:hidden}
@media(max-width:760px){
 .customer-submission-book-head-v10194{padding:13px 14px;gap:10px}
 .customer-review-child-summary-v10194{gap:10px}
 .customer-review-child-photo-v10194{width:60px;height:60px;min-width:60px;border-radius:15px}
 .customer-submission-book-head-v10194 h3{font-size:16px}
 .customer-submission-book-meta-v10074{gap:3px}.customer-submission-book-meta-v10074 span{font-size:9px}.customer-submission-book-meta-v10074 strong{font-size:14px}
 .customer-submission-subsection-v10074{padding:13px 14px}
 .customer-submission-characters-v10194{grid-template-columns:1fr}
 .character-preview-v10194{width:56px!important;height:56px!important;min-width:56px}
 .customer-review-media-grid-v10194{grid-template-columns:repeat(3,minmax(0,1fr))}
 .admin-image-lightbox-v10194{padding:16px}.admin-image-lightbox-v10194 img{max-width:94vw;max-height:84vh;border-radius:12px}
}


/* V10.0.195 - customer submission child gallery beside child identity */
.customer-review-child-summary-v10194{align-items:flex-start!important;gap:16px!important;flex-wrap:wrap!important}
.customer-review-child-head-copy-v10195{min-width:180px;flex:0 1 auto}
.customer-review-child-gallery-v10195{display:flex;flex-wrap:wrap;gap:10px;align-items:center;max-width:min(100%,520px)}
.customer-review-child-photo-v10195{width:84px!important;height:84px!important;min-width:84px!important;flex:0 0 84px!important;border-radius:16px!important;overflow:hidden!important;padding:0!important;background:var(--surface,#fff)!important;border:1px solid var(--line,#dfe5ee)!important;box-shadow:0 7px 18px rgba(25,43,70,.08)!important;cursor:zoom-in}
.customer-review-child-photo-v10195.is-primary{width:104px!important;height:104px!important;min-width:104px!important;flex-basis:104px!important}
.customer-review-child-photo-v10195 img{display:block;width:100%!important;height:100%!important;object-fit:cover!important}
.customer-review-child-photo-v10195.is-empty{display:grid!important;place-items:center!important;font-size:28px}
@media(max-width:760px){
 .customer-review-child-summary-v10194{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}
 .customer-review-child-gallery-v10195{max-width:100%;gap:8px}
 .customer-review-child-photo-v10195{width:72px!important;height:72px!important;min-width:72px!important;flex-basis:72px!important;border-radius:14px!important}
 .customer-review-child-photo-v10195.is-primary{width:88px!important;height:88px!important;min-width:88px!important;flex-basis:88px!important}
}

/* V10.0.202 — configurable platform favicon */
.platform-favicon-setting-v202{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--surface-2)}
.platform-favicon-copy-v202{display:grid;gap:8px;min-width:0;flex:1}.platform-favicon-copy-v202>span{font-weight:800}.platform-favicon-copy-v202 small{color:var(--muted);line-height:1.7}.platform-favicon-copy-v202 input{max-width:100%}
.platform-favicon-preview-v202{display:grid;gap:7px;justify-items:center;flex:0 0 auto}.platform-favicon-preview-v202 small{color:var(--muted);font-size:12px}.platform-favicon-preview-v202 span{width:74px;height:74px;display:grid;place-items:center;padding:9px;border-radius:18px;background:var(--surface);border:1px solid var(--line);box-shadow:0 8px 24px rgba(0,0,0,.08)}.platform-favicon-preview-v202 img{width:100%;height:100%;object-fit:contain;filter:none!important}
@media(max-width:640px){.platform-favicon-setting-v202{align-items:stretch;flex-direction:column}.platform-favicon-preview-v202{justify-items:start}.platform-favicon-preview-v202 span{width:64px;height:64px}}

/* V10.0.224 Multi-Branch */
.branch-switcher-v224,.branch-chip-v224{display:flex;align-items:center;gap:7px;border:1px solid var(--line,#d9e1ee);background:var(--card,#fff);border-radius:12px;padding:6px 9px;min-height:40px;box-shadow:0 5px 18px rgba(17,35,68,.08)}
.branch-switcher-v224 select{border:0!important;background:transparent!important;color:var(--text,#172033)!important;font-weight:800;min-width:135px;max-width:210px;padding:2px 24px 2px 4px!important;box-shadow:none!important;cursor:pointer}
.branch-chip-v224 span{font-weight:800;white-space:nowrap}
html[data-theme="dark"] .branch-switcher-v224,html[data-theme="dark"] .branch-chip-v224{background:#111c31;border-color:#2a3a58;color:#edf4ff}
html[data-theme="dark"] .branch-switcher-v224 select{color:#edf4ff!important}
@media(max-width:760px){.branch-switcher-v224,.branch-chip-v224{max-width:155px;padding:5px 7px;min-height:36px}.branch-switcher-v224 select{min-width:0;max-width:115px;font-size:12px}.branch-chip-v224 span{overflow:hidden;text-overflow:ellipsis;font-size:12px}}


/* V10.0.225 — professional branch control */
.branch-switcher-v225{position:relative;min-width:0}
.branch-switcher-v225>summary{list-style:none;display:flex;align-items:center;gap:8px;min-height:36px;max-width:190px;padding:5px 8px;border:1px solid var(--line);border-radius:11px;background:var(--surface-1,var(--card,#fff));box-shadow:0 4px 14px rgba(17,35,68,.07);cursor:pointer;transition:.18s ease;color:var(--text)}
.branch-switcher-v225>summary::-webkit-details-marker{display:none}.branch-switcher-v225>summary:hover{border-color:color-mix(in srgb,var(--primary,#2563eb) 35%,var(--line));transform:translateY(-1px)}
.branch-switcher-icon-v225{width:27px;height:27px;border-radius:8px;display:grid;place-items:center;background:color-mix(in srgb,var(--primary,#2563eb) 10%,transparent);color:var(--primary,#2563eb);flex:0 0 auto}.branch-switcher-icon-v225 svg{width:17px;height:17px}
.branch-switcher-copy-v225{display:flex;flex-direction:column;min-width:0;line-height:1.08}.branch-switcher-copy-v225 small{font-size:9px;color:var(--muted);font-weight:700}.branch-switcher-copy-v225 strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}.branch-switcher-chevron-v225{width:14px;height:14px;margin-inline-start:auto;flex:0 0 auto;transition:.18s}.branch-switcher-v225[open] .branch-switcher-chevron-v225{transform:rotate(180deg)}
.branch-switcher-menu-v225{position:absolute;top:calc(100% + 7px);inset-inline-end:0;z-index:1200;width:230px;padding:6px;border:1px solid var(--line);border-radius:13px;background:var(--surface-1,var(--card,#fff));box-shadow:0 18px 50px rgba(17,35,68,.18)}.branch-switcher-menu-v225 form{margin:0}.branch-switcher-menu-v225 button{width:100%;border:0;background:transparent;color:var(--text);padding:9px 10px;border-radius:9px;display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;text-align:start;cursor:pointer}.branch-switcher-menu-v225 button:hover,.branch-switcher-menu-v225 button.active{background:color-mix(in srgb,var(--primary,#2563eb) 9%,var(--surface-2,#f4f7fb))}.branch-switcher-menu-v225 button span{font-weight:800}.branch-switcher-menu-v225 button small{color:var(--muted);font-size:10px}.branch-switcher-menu-v225 button b{color:var(--primary,#2563eb)}
html[data-theme="dark"] .branch-switcher-v225>summary,html[data-theme="dark"] .branch-switcher-menu-v225{background:var(--surface-1,#111c31);border-color:var(--line,#2a3a58);box-shadow:0 15px 44px rgba(0,0,0,.3)}
@media(max-width:760px){.branch-switcher-v225>summary{max-width:145px;min-height:34px}.branch-switcher-copy-v225 small{display:none}.branch-switcher-copy-v225 strong{max-width:82px;font-size:11px}.branch-switcher-menu-v225{width:min(230px,calc(100vw - 28px))}}

.branch-cards-v225{display:grid;grid-template-columns:repeat(auto-fit,minmax(285px,1fr));gap:14px}.branch-card-v225{border:1px solid var(--line);border-radius:16px;background:var(--surface-2);padding:15px;display:flex;flex-direction:column;gap:12px}.branch-card-head-v225{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.branch-card-head-v225>div{display:flex;flex-direction:column}.branch-card-head-v225 strong{font-size:16px}.branch-card-head-v225 small{color:var(--muted);margin-top:3px}.branch-card-stats-v225{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.branch-card-stats-v225 span{display:flex;flex-direction:column;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--surface-1);font-size:10px;color:var(--muted)}.branch-card-stats-v225 b{color:var(--text);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.branch-edit-v225{border-top:1px solid var(--line);padding-top:9px}.branch-edit-v225>summary{cursor:pointer;font-weight:800;color:var(--primary);list-style:none}.branch-edit-v225>summary::before{content:'✎';margin-inline-end:6px}.branch-edit-v225 .form-grid{margin-top:12px}.branch-toggle-v225{margin:0}.branch-create-details-v225>summary{display:inline-flex;list-style:none;cursor:pointer}.branch-create-details-v225>summary::-webkit-details-marker{display:none}.branch-create-form-v225{margin-top:16px}
.employee-branch-list-v225{display:flex;flex-direction:column;gap:10px}.employee-branch-row-v225{display:grid;grid-template-columns:minmax(170px,.8fr) minmax(260px,2fr) auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.employee-branch-person-v225{display:flex;flex-direction:column}.employee-branch-person-v225 small{color:var(--muted)}.employee-branch-chips-v225{display:flex;flex-wrap:wrap;gap:7px}.branch-access-chip-v225{display:inline-grid;grid-template-columns:auto auto auto;align-items:center;gap:6px;padding:5px 7px;border:1px solid var(--line);border-radius:999px;background:var(--surface-1)}.branch-access-chip-v225 b{font-size:11px}.branch-access-chip-v225 small{font-size:9px;color:var(--muted)}.branch-access-chip-v225 form{margin:0}.branch-access-chip-v225 button{width:19px;height:19px;border:0;border-radius:50%;background:color-mix(in srgb,#ef4444 10%,transparent);color:#dc2626;cursor:pointer;line-height:1}.employee-branch-add-v225{display:flex;gap:6px;align-items:center;margin:0}.employee-branch-add-v225 select{min-width:92px;max-width:130px;padding:7px!important;font-size:11px}
@media(max-width:850px){.employee-branch-row-v225{grid-template-columns:1fr}.employee-branch-add-v225{flex-wrap:wrap}.branch-card-stats-v225{grid-template-columns:1fr}.branch-card-stats-v225 span{flex-direction:row;justify-content:space-between;gap:10px}}


/* V10.0.226 — responsive animated branch switcher + flexible branch access + public country gate */
@keyframes branchGlow226{0%,100%{box-shadow:0 4px 14px rgba(17,35,68,.08);border-color:var(--line)}50%{box-shadow:0 6px 20px rgba(17,35,68,.12),0 0 0 3px color-mix(in srgb,var(--primary,#2563eb) 10%,transparent);border-color:color-mix(in srgb,var(--primary,#2563eb) 34%,var(--line))}}
@keyframes branchIconHue226{0%,100%{background:color-mix(in srgb,#2f6fdf 12%,transparent);color:#2f6fdf}50%{background:color-mix(in srgb,#16a6a1 15%,transparent);color:#11938f}}
.branch-switcher-v225>summary{animation:branchGlow226 4.8s ease-in-out infinite;will-change:box-shadow,border-color}.branch-switcher-icon-v225{animation:branchIconHue226 4.8s ease-in-out infinite}.branch-switcher-v225[open]>summary{animation-play-state:paused;border-color:color-mix(in srgb,var(--primary,#2563eb) 48%,var(--line));box-shadow:0 7px 24px rgba(17,35,68,.14)}
@media (prefers-reduced-motion:reduce){.branch-switcher-v225>summary,.branch-switcher-icon-v225{animation:none!important;transition:none!important}}
@media(min-width:1100px){.topbar-v85 .container.topbar-inner-v85{width:calc(100% - 28px)!important;max-width:1440px!important;justify-content:flex-start!important}.topbar-v85 .admin-brand-v85{flex:0 0 auto!important}.topbar-v85 .nav-v85{flex:1 1 auto!important;min-width:0!important}.topbar-v85 .nav-v85-grid{justify-content:flex-start!important;min-width:0!important}.topbar-v85 .topbar-tools-v85{flex:0 1 auto!important;min-width:0!important;margin-inline-start:auto!important}.branch-switcher-v225{flex:0 1 174px;max-width:174px}.branch-switcher-v225>summary{width:100%;max-width:100%;box-sizing:border-box}.branch-switcher-copy-v225{flex:1 1 auto}.branch-switcher-copy-v225 strong{max-width:none}}
@media(min-width:1100px) and (max-width:1450px){.topbar-v85 .nav-v85-grid>a{padding-inline:5px!important;font-size:9.5px!important}.branch-switcher-v225{flex-basis:136px;max-width:136px}.branch-switcher-copy-v225 strong{font-size:10.6px}.branch-switcher-copy-v225 small{font-size:8px}}
@media(min-width:1100px) and (max-width:1300px){.branch-switcher-v225{flex-basis:44px;max-width:44px}.branch-switcher-v225>summary{justify-content:center;padding-inline:6px}.branch-switcher-copy-v225,.branch-switcher-chevron-v225{display:none}.branch-switcher-icon-v225{width:27px;height:27px}.branch-switcher-menu-v225{width:230px}}
html[data-theme="dark"] .branch-switcher-v225>summary{background:linear-gradient(135deg,#14213a,#101a2d);color:#edf4ff}html[data-theme="dark"] .branch-switcher-icon-v225{filter:saturate(1.08) brightness(1.08)}
.employee-branch-row-v226{grid-template-columns:minmax(220px,.9fr) minmax(300px,2fr) auto}.employee-global-role-form-v226{display:flex;align-items:end;gap:6px;margin-top:8px}.employee-global-role-form-v226 label{display:flex;flex-direction:column;gap:3px;min-width:145px}.employee-global-role-form-v226 label>span{font-size:9px;color:var(--muted)}.employee-global-role-form-v226 select{padding:6px 28px 6px 8px!important;font-size:11px}.employee-global-role-v226.owner{display:inline-flex;margin-top:7px;width:max-content;padding:4px 8px;border-radius:999px;background:color-mix(in srgb,#16a34a 12%,transparent);color:#15803d;font-size:10px;font-weight:800}.branch-access-chip-v226{display:flex!important;align-items:center!important;gap:6px!important;padding:4px 6px 4px 9px!important}.branch-access-role-form-v226{margin:0}.branch-access-role-form-v226 select{border:0!important;background:color-mix(in srgb,var(--primary,#2563eb) 8%,transparent)!important;color:var(--text)!important;box-shadow:none!important;border-radius:999px!important;padding:4px 22px 4px 7px!important;min-height:26px!important;font-size:9px!important;font-weight:800!important;cursor:pointer}.branch-access-remove-v226{margin:0!important}.branch-access-remove-v226 button{display:grid;place-items:center}
@media(max-width:850px){.employee-branch-row-v226{grid-template-columns:1fr}.employee-global-role-form-v226{align-items:center;flex-wrap:wrap}.employee-branch-chips-v226{margin-block:4px}.employee-branch-add-v225{width:100%}}
.customer-country-gate-v226{position:fixed;inset:0;z-index:2600;display:grid;place-items:center;padding:20px;background:var(--cw-overlay,rgba(5,8,18,.72));backdrop-filter:blur(14px)}.customer-country-card-v226{width:min(620px,100%);max-height:min(88vh,760px);overflow:auto;border:1px solid var(--cw-line,#dfe6ef);border-radius:28px;background:var(--cw-surface,#fff);box-shadow:0 28px 90px rgba(0,0,0,.28);padding:clamp(24px,5vw,42px);text-align:center;position:relative}.customer-country-card-v226:before{content:"";position:absolute;inset:0 0 auto;height:5px;background:linear-gradient(90deg,#2f5ea8,#4ecdc4,#f7a600,#ff6b6b)}.customer-country-card-v226 img{width:min(150px,42vw);max-height:78px;object-fit:contain;margin-bottom:12px}.customer-country-card-v226 h1{font-size:clamp(27px,5vw,38px);margin:8px 0 10px}.customer-country-card-v226>p{color:var(--cw-muted,#71809a);line-height:1.8;max-width:520px;margin:0 auto 22px}.customer-country-options-v226{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.customer-country-option-v226{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:11px;text-align:start;text-decoration:none;color:var(--cw-text,#1c2940);padding:15px;border:1px solid var(--cw-line,#dfe6ef);border-radius:17px;background:var(--cw-surface-2,#f7f9fc);transition:.18s ease}.customer-country-option-v226:hover{transform:translateY(-2px);border-color:var(--cw-accent,#ff6e5c);box-shadow:0 10px 28px rgba(31,58,96,.12)}.customer-country-option-v226.main{background:color-mix(in srgb,var(--cw-accent-2,#4ecdc4) 8%,var(--cw-surface-2,#f7f9fc))}.customer-country-option-v226 strong{display:block;font-size:16px}.customer-country-option-v226 small{display:block;color:var(--cw-muted,#71809a);margin-top:3px}.customer-country-option-v226>b{font-size:24px;color:var(--cw-muted,#71809a)}.customer-country-pin-v226{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:color-mix(in srgb,var(--cw-accent,#ff6e5c) 11%,transparent);color:var(--cw-accent,#ff6e5c)}.customer-country-pin-v226 svg{width:21px;height:21px}html[data-theme="dark"] .customer-country-card-v226{background:var(--cw-surface,#111827);border-color:var(--cw-line,#303a4e)}html[data-theme="dark"] .customer-country-option-v226{background:var(--cw-surface-2,#182235);border-color:var(--cw-line,#303a4e);color:var(--cw-text,#edf4ff)}@media(max-width:640px){.customer-country-gate-v226{padding:12px;align-items:end}.customer-country-card-v226{border-radius:24px 24px 0 0;max-height:92vh;padding:24px 18px}.customer-country-options-v226{grid-template-columns:1fr}}


/* V10.0.229 — branch switcher integrated into nav row */
.branch-switcher-v227{
  position:relative;
  display:flex;
  align-items:center;
  flex:0 0 auto;
  margin-inline-start:8px;
  z-index:1350;
}
.branch-switcher-trigger-v227{
  width:auto;
  min-width:132px;
  max-width:164px;
  height:36px;
  min-height:36px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:10px;
  background:rgba(255,255,255,.075);
  color:#f8fbff;
  box-shadow:none;
  cursor:pointer;
  overflow:hidden;
  transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.branch-switcher-trigger-v227:hover{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.42);
  transform:translateY(-1px);
}
.branch-switcher-v227.open .branch-switcher-trigger-v227{
  background:rgba(255,255,255,.14);
  border-color:rgba(103,232,249,.5);
  box-shadow:0 5px 16px rgba(0,0,0,.12);
}
.branch-switcher-icon-v227{
  width:24px;
  height:24px;
  flex:0 0 24px;
  display:grid;
  place-items:center;
  border-radius:7px;
  background:rgba(103,232,249,.12);
  color:#9be7ee;
}
.branch-switcher-icon-v227 svg{display:block;width:14px!important;height:14px!important}
.branch-switcher-copy-v227{display:flex;flex-direction:column;min-width:0;line-height:1.05;text-align:start;overflow:hidden}
.branch-switcher-copy-v227 small{font-size:7.5px;color:rgba(255,255,255,.68);font-weight:700;white-space:nowrap}
.branch-switcher-copy-v227 strong{font-size:10.5px;color:#fff;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:92px}
.branch-switcher-chevron-v227{width:11px!important;height:11px!important;flex:0 0 11px;margin-inline-start:auto;color:rgba(255,255,255,.8);transition:transform .18s ease}
.branch-switcher-v227.open .branch-switcher-chevron-v227{transform:rotate(180deg)}
.branch-switcher-menu-v227{
  position:absolute;
  top:calc(100% + 8px);
  inset-inline-end:0;
  width:196px;
  max-width:calc(100vw - 24px);
  padding:6px;
  border:1px solid #d9e2ef;
  border-radius:12px;
  background:#fff;
  box-shadow:0 16px 38px rgba(16,35,64,.16);
  overflow:hidden;
  transform-origin:top center;
  animation:branchMenuIn229 .16s ease both;
}
.branch-switcher-menu-v227[hidden]{display:none!important}
@keyframes branchMenuIn229{from{opacity:0;transform:translateY(-4px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}
.branch-switcher-menu-v227 form{margin:0}
.branch-switcher-menu-v227 form+form{margin-top:5px}
.branch-switcher-menu-v227 button{
  width:100%;
  min-height:38px;
  display:grid;
  grid-template-columns:24px minmax(0,1fr) auto;
  gap:7px;
  align-items:center;
  padding:6px 7px;
  border:0;
  border-radius:9px;
  background:#fff;
  color:#172033;
  text-align:start;
  cursor:pointer;
  transition:background .15s ease,transform .15s ease;
}
.branch-switcher-menu-v227 button:hover{background:#f5f8fc;transform:translateY(-1px)}
.branch-switcher-menu-v227 button.active{background:#edf4ff}
.branch-switcher-option-icon-v227{width:24px;height:24px;display:grid;place-items:center;border-radius:7px;background:#eef5ff;color:#2f6fdf}
.branch-switcher-option-icon-v227 svg{display:block;width:13px!important;height:13px!important}
.branch-switcher-option-copy-v227{display:flex;flex-direction:column;min-width:0;overflow:hidden;line-height:1.08}
.branch-switcher-option-copy-v227 strong{font-size:11px;color:#172033;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.branch-switcher-option-copy-v227 small{font-size:8px;color:#7b8799;margin-top:2px}
.branch-switcher-menu-v227 button>b{color:#2563eb;font-size:13px}
html[data-theme="dark"] .branch-switcher-menu-v227{background:#111c31;border-color:#2a3a58;box-shadow:0 18px 44px rgba(0,0,0,.35)}
html[data-theme="dark"] .branch-switcher-menu-v227 button{background:#111c31;color:#edf4ff}
html[data-theme="dark"] .branch-switcher-menu-v227 button:hover{background:#182640}
html[data-theme="dark"] .branch-switcher-menu-v227 button.active{background:#1b2d4c}
html[data-theme="dark"] .branch-switcher-option-icon-v227{background:#1b3152;color:#8dc8ff}
html[data-theme="dark"] .branch-switcher-option-copy-v227 strong{color:#edf4ff}
html[data-theme="dark"] .branch-switcher-option-copy-v227 small{color:#9dadc5}
@media(min-width:1100px) and (max-width:1380px){
  .branch-switcher-trigger-v227{min-width:112px;max-width:128px}
  .branch-switcher-copy-v227 small{display:none}
  .branch-switcher-copy-v227 strong{max-width:68px;font-size:9.7px}
}
@media(min-width:1100px) and (max-width:1220px){
  .branch-switcher-trigger-v227{min-width:36px;width:36px;max-width:36px;padding:5px;justify-content:center}
  .branch-switcher-copy-v227,.branch-switcher-chevron-v227{display:none!important}
  .branch-switcher-menu-v227{width:188px}
}
@media(max-width:1099px){
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227{
    display:block!important;
    position:relative!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    box-sizing:border-box!important;
    justify-self:stretch!important;
    align-self:stretch!important;
  }
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-trigger-v227{
    display:flex!important;
    width:100%!important;
    box-sizing:border-box!important;
    margin:0!important;
    min-width:0!important;
    max-width:none!important;
    min-height:48px!important;
    height:100%!important;
    padding:8px 10px!important;
    gap:8px!important;
    border:1px solid var(--line)!important;
    border-radius:11px!important;
    background:var(--surface)!important;
    color:var(--text)!important;
    box-shadow:none!important;
    transform:none!important;
  }
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-trigger-v227:hover,
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227.open .branch-switcher-trigger-v227{
    background:var(--surface-2)!important;
    border-color:color-mix(in srgb,var(--primary,#2563eb) 30%,var(--line))!important;
    box-shadow:none!important;
    transform:none!important;
  }
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-icon-v227{
    width:30px!important;height:30px!important;flex:0 0 30px!important;
    border-radius:9px!important;
    background:color-mix(in srgb,var(--primary,#2563eb) 8%,var(--surface-2))!important;
    color:var(--navy,#17345a)!important;
  }
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-icon-v227 svg{width:16px!important;height:16px!important}
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-copy-v227{
    flex:1 1 auto!important;
    flex-direction:row!important;
    align-items:center!important;
    gap:5px!important;
    line-height:1.2!important;
    text-align:start!important;
  }
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-copy-v227 small{
    display:inline!important;
    font-size:9px!important;
    color:var(--muted)!important;
    font-weight:700!important;
  }
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-copy-v227 strong{
    max-width:none!important;
    font-size:11px!important;
    color:var(--text)!important;
    font-weight:850!important;
  }
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-chevron-v227{
    display:block!important;
    width:12px!important;height:12px!important;flex:0 0 12px!important;
    color:var(--muted)!important;
  }
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-menu-v227{
    top:calc(100% + 7px)!important;
    bottom:auto!important;
    inset-inline-end:0!important;
    width:min(188px,calc(100vw - 42px))!important;
    padding:6px!important;
    z-index:1020!important;
  }
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-menu-v227 form+form{margin-top:7px!important}
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-menu-v227 button{min-height:40px!important}
  html[data-theme="dark"] .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-trigger-v227{
    background:color-mix(in srgb,#fff 4%,#111c31)!important;
    border-color:#2a3a58!important;
    color:#edf4ff!important;
  }
  html[data-theme="dark"] .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-copy-v227 strong{color:#edf4ff!important}
  html[data-theme="dark"] .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-copy-v227 small,
  html[data-theme="dark"] .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-chevron-v227{color:#9dadc5!important}
  html[data-theme="dark"] .topbar-v85 .nav-v85-grid>.branch-switcher-v227 .branch-switcher-icon-v227{background:#1b3152!important;color:#8dc8ff!important}
}
@media(prefers-reduced-motion:reduce){.branch-switcher-trigger-v227,.branch-switcher-chevron-v227,.branch-switcher-menu-v227{animation:none!important;transition:none!important}}
.employee-branch-row-v227{display:grid!important;grid-template-columns:minmax(180px,.7fr) minmax(0,2.3fr)!important;gap:14px!important;align-items:center}
.employee-branch-chips-v227{justify-content:flex-start}
.branch-access-chip-v227{display:inline-flex!important;align-items:center!important;gap:6px!important;padding:5px 7px 5px 10px!important}
.branch-access-chip-v227.owner{padding-inline:10px!important}
.branch-access-role-form-v227,.branch-access-remove-v227{margin:0!important}
.branch-access-role-form-v227 select{border:0!important;background:color-mix(in srgb,var(--primary,#2563eb) 8%,transparent)!important;color:var(--text)!important;box-shadow:none!important;border-radius:999px!important;padding:4px 22px 4px 8px!important;min-height:26px!important;font-size:9px!important;font-weight:800!important;cursor:pointer}
.branch-access-remove-v227 button{width:20px;height:20px;display:grid;place-items:center;border:0;border-radius:50%;background:color-mix(in srgb,#ef4444 10%,transparent);color:#dc2626;cursor:pointer;font-size:13px;line-height:1}
.branch-access-remove-v227 button:hover{background:color-mix(in srgb,#ef4444 18%,transparent)}
@media(max-width:850px){.employee-branch-row-v227{grid-template-columns:1fr!important}.employee-branch-chips-v227{margin-top:3px}}

/* V10.0.231 — balanced desktop header: keep account tools close to branch control */
@media (min-width:1100px){
  .topbar-v85 .container.topbar-inner-v85{
    width:calc(100% - 32px)!important;
    max-width:1600px!important;
    min-width:0!important;
    justify-content:center!important;
    gap:8px!important;
  }
  .topbar-v85 .admin-brand-v85{
    flex:0 0 auto!important;
  }
  .topbar-v85 .nav-v85{
    flex:0 1 auto!important;
    min-width:0!important;
    overflow:visible!important;
  }
  .topbar-v85 .nav-v85-grid{
    width:auto!important;
    min-width:0!important;
    justify-content:flex-start!important;
    gap:4px!important;
  }
  .topbar-v85 .nav-v85-grid>a{
    flex:0 1 auto!important;
  }
  .topbar-v85 .topbar-tools-v85{
    flex:0 0 auto!important;
    margin-inline-start:0!important;
    padding-inline-start:2px!important;
    gap:6px!important;
    white-space:nowrap!important;
  }
}
@media (min-width:1550px){
  .topbar-v85 .nav-v85-grid>a{font-size:11px!important;padding-inline:7px!important;gap:5px!important}
}
@media (min-width:1100px) and (max-width:1450px){
  .topbar-v85 .container.topbar-inner-v85{gap:6px!important;width:calc(100% - 20px)!important}
  .topbar-v85 .nav-v85-grid{gap:3px!important}
  .topbar-v85 .nav-v85-grid>a{padding-inline:5px!important;font-size:9.4px!important}
  .topbar-v85 .user-chip-v84{max-width:128px!important}
  .topbar-v85 .user-chip-copy-v84 strong{max-width:72px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .topbar-v85 .topbar-tools-v85{padding-inline-start:1px!important;gap:5px!important}
}
@media (min-width:1100px) and (max-width:1250px){
  .topbar-v85 .header-logo-shell{width:118px!important;min-width:118px!important;max-width:118px!important}
  .topbar-v85 .nav-v85-grid>a{padding-inline:4px!important;font-size:9px!important}
  .topbar-v85 .nav-v82-icon{width:19px!important;height:19px!important;min-width:19px!important}
  .topbar-v85 .user-chip-v84{max-width:105px!important;padding-inline:6px!important}
  .topbar-v85 .user-chip-copy-v84 small{display:none!important}
}

/* V10.0.245 delivery companies */
.branch-delivery-companies-v245{display:grid;gap:10px}.branch-delivery-list-v245{display:grid;gap:8px;padding-top:10px}.branch-delivery-row-v245,.branch-delivery-add-v245{display:grid;grid-template-columns:1.5fr .8fr 1fr 1.5fr .55fr auto auto;gap:8px;align-items:end;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2)}.branch-delivery-row-v245 label,.branch-delivery-add-v245 label{min-width:0}.branch-delivery-row-v245 input,.branch-delivery-add-v245 input{width:100%}.branch-delivery-add-v245{grid-template-columns:1.5fr .8fr 1fr 1.5fr auto;background:transparent;border-style:dashed}@media(max-width:1000px){.branch-delivery-row-v245,.branch-delivery-add-v245{grid-template-columns:repeat(2,minmax(0,1fr))}.branch-delivery-row-v245 .btn,.branch-delivery-add-v245 .btn{width:100%}}@media(max-width:600px){.branch-delivery-row-v245,.branch-delivery-add-v245{grid-template-columns:1fr}}
.orders-delivery-company-cell-v245,.orders-delivery-company-head-v245{min-width:118px}.orders-delivery-company-cell-v245 .badge{max-width:150px;white-space:normal;line-height:1.25;text-align:center}.orders-table.production-orders-table{min-width:1440px}

/* V10.0.246 — delivery-company table fit + current-branch delivery management */
@media (min-width:901px){
  body.page-orders .orders-table.production-orders-table.professional-fit-table{
    min-width:1540px!important;
    table-layout:fixed!important;
  }
  body.page-orders .orders-table.professional-fit-table th:nth-child(13),
  body.page-orders .orders-table.professional-fit-table td:nth-child(13){
    width:118px!important;min-width:118px!important;max-width:118px!important;
  }
  body.page-orders .orders-table.professional-fit-table th:nth-child(14),
  body.page-orders .orders-table.professional-fit-table td:nth-child(14),
  body.page-orders .orders-table.professional-fit-table .orders-delivery-company-head-v245,
  body.page-orders .orders-table.professional-fit-table .orders-delivery-company-cell-v245{
    width:122px!important;min-width:122px!important;max-width:122px!important;
    overflow:hidden!important;text-overflow:ellipsis!important;
  }
  body.page-orders .orders-table.professional-fit-table th:nth-child(15),
  body.page-orders .orders-table.professional-fit-table td:nth-child(15),
  body.page-orders .orders-table.professional-fit-table .orders-actions-head-v10063,
  body.page-orders .orders-table.professional-fit-table .orders-actions-cell-v10063{
    width:285px!important;min-width:285px!important;max-width:285px!important;
    overflow:visible!important;text-overflow:clip!important;
  }
}
.branch-delivery-current-v246{display:grid;gap:10px}
.branch-delivery-current-head-v246{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2)}
.branch-delivery-current-head-v246 strong{font-size:14px}
.branch-delivery-current-head-v246 span{font-size:11px;color:var(--muted)}
.branch-delivery-row-wrap-v246{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:stretch}
.branch-delivery-row-wrap-v246 .branch-delivery-row-v245{min-width:0}
.branch-delivery-delete-v246{display:flex;align-items:stretch;margin:0}
.branch-delivery-delete-v246 .btn{height:100%;min-width:66px}
@media(max-width:1000px){
  .branch-delivery-row-wrap-v246{grid-template-columns:1fr}
  .branch-delivery-delete-v246 .btn{width:100%;height:auto}
}

/* V10.0.251 — Special-request references use native upload-card layout */
.special-request-upload-card-v250{min-width:0}
.special-request-upload-card-v250 .upload-group-head p{max-width:100%;white-space:normal;overflow-wrap:anywhere}

/* V10.0.262: employee branch-scoped delivery ledgers */
.delivery-account-access-v262 .delivery-account-scope-v262 {display:flex;flex-direction:column;gap:7px;max-width:340px;margin:12px 0}
.delivery-company-choices-v262 {display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin-top:10px}
.delivery-company-branch-v262 {border:1px solid var(--line,#d9e1eb);border-radius:12px;padding:12px;min-width:0}
.delivery-company-branch-v262>strong {display:block;margin-bottom:10px}
.delivery-company-choices-v262[hidden] {display:none}

/* V10.0.263: movement-type filters for finance and delivery account statements. */
.finance-ledger-filters-v263 {grid-template-columns:repeat(3,minmax(0,1fr)) auto;align-items:end}
.delivery-ledger-filters-v263 {grid-template-columns:minmax(170px,1.35fr) repeat(3,minmax(130px,1fr)) auto;align-items:end}
.finance-ledger-filters-v263 label,.delivery-ledger-filters-v263 label {min-width:0}
@media(max-width:1000px){.finance-ledger-filters-v263,.delivery-ledger-filters-v263{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.finance-ledger-filters-v263,.delivery-ledger-filters-v263{grid-template-columns:1fr}}

/* V10.0.264 - Scoped delivery invoice register and courier dashboard */
.delivery-orders-filters-v264{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.delivery-orders-filters-v264 label{min-width:145px;flex:1 1 155px;max-width:290px}
.delivery-orders-filters-v264 label:last-of-type{flex:2 1 210px;max-width:360px}
.delivery-orders-filters-v264 .btn{flex:0 0 auto}
.delivery-orders-table-v264 th,.delivery-orders-table-v264 td{white-space:nowrap}
.delivery-dashboard-v264 .table-wrap{max-width:100%;overflow-x:auto}
@media(max-width:750px){.delivery-orders-filters-v264 label,.delivery-orders-filters-v264 label:last-of-type{flex:1 1 150px;max-width:none}.delivery-orders-filters-v264 .btn{flex:1 1 auto}.delivery-orders-table-v264{min-width:790px}}

/* V10.0.272 — centered, compact, single-row navigation.
   The settings and AI library links remain available in the account menu,
   so the top bar has room for full module names and the branch selector. */
@media (min-width:1100px){
  .topbar-v85 .container.topbar-inner-v85{
    width:calc(100% - 16px)!important;max-width:none!important;
    display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
    justify-content:center!important;gap:8px!important;
    margin-inline:auto!important;padding-inline:0!important;min-height:74px!important;
  }
  .topbar-v85 .admin-brand-v85{flex:0 0 auto!important;min-width:0!important;}
  .topbar-v85 .nav-v85{display:block!important;flex:0 1 auto!important;width:auto!important;min-width:0!important;overflow:visible!important;}
  .topbar-v85 .nav-v85-grid{
    display:flex!important;flex-flow:row nowrap!important;
    width:max-content!important;min-width:0!important;max-width:100%!important;
    justify-content:center!important;align-items:center!important;
    gap:4px!important;overflow:visible!important;
  }
  .topbar-v85 .nav-v85-grid>a{
    flex:0 0 auto!important;width:auto!important;min-width:max-content!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    box-sizing:border-box!important;white-space:nowrap!important;
    overflow:visible!important;text-overflow:clip!important;
    padding:6px!important;gap:4px!important;font-size:10.1px!important;
  }
  .topbar-v85 .nav-v85-grid>a>.nav-v82-icon{flex:0 0 auto!important;}
  .topbar-v85 .nav-v85-grid>a>span:last-child{
    flex:0 0 auto!important;min-width:0!important;max-width:none!important;
    overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important;
    line-height:1.35!important;
  }
  .topbar-v85 .nav-v85-grid>.branch-switcher-v227{flex:0 0 auto!important;align-self:center!important;}
  .topbar-v85 .topbar-tools-v85{flex:0 0 auto!important;min-width:0!important;margin:0!important;}
}
@media (min-width:1100px) and (max-width:1599px){
  .topbar-v85 .nav-v85-grid{gap:3px!important;}
  .topbar-v85 .nav-v85-grid>a{padding-inline:5px!important;font-size:10px!important;gap:3px!important;}
}
@media (min-width:1100px) and (max-width:1299px){
  .topbar-v85 .container.topbar-inner-v85{gap:4px!important;}
  .topbar-v85 .header-logo-shell{width:112px!important;min-width:112px!important;max-width:112px!important;}
  .topbar-v85 .nav-v85-grid{gap:2px!important;}
  .topbar-v85 .nav-v85-grid>a{padding-inline:4px!important;font-size:9.5px!important;gap:2px!important;}
  .topbar-v85 .nav-v82-icon{width:19px!important;height:19px!important;min-width:19px!important;}
  .topbar-v85 .topbar-tools-v85{gap:3px!important;}
}
@media (max-width:1099px){
  .topbar-v85 .nav-v85-grid{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;width:100%!important;min-width:0!important;
    justify-content:stretch!important;
  }
  .topbar-v85 .nav-v85-grid>a{width:100%!important;min-width:0!important;box-sizing:border-box!important;}
  .topbar-v85 .nav-v85-grid>a>span:last-child{display:inline!important;min-width:0!important;overflow-wrap:break-word;}
}

/* V10.0.280 — collapsed per-request routing details in AI usage table. */
.ai-usage-execution-details-v100280{max-width:220px;min-width:118px;font-size:11px;line-height:1.5;color:var(--text)}
.ai-usage-execution-details-v100280>summary{cursor:pointer;padding:4px 2px;white-space:nowrap;font-weight:750;color:var(--muted);font-size:11px;user-select:none}
.ai-usage-execution-details-v100280>summary:hover{color:var(--text)}
.ai-usage-execution-details-v100280>summary:focus-visible{outline:2px solid var(--primary,#3678d4);outline-offset:2px;border-radius:4px}
.ai-usage-execution-body-v100280{display:grid;gap:6px;margin-top:6px;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);white-space:normal;overflow-wrap:anywhere;text-align:start}
.ai-usage-execution-body-v100280>div{min-width:0}
.ai-usage-execution-body-v100280 strong{display:block;font-size:10px;font-weight:700;margin-bottom:2px}
.ai-usage-execution-body-v100280 span{display:block;unicode-bidi:plaintext;text-align:start;font-size:11px}
.ai-usage-execution-warning-v100280{color:var(--warning,#b45309);font-weight:700}
.ai-usage-execution-legacy-v100280{font-size:11px;color:var(--muted)}
