: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;
}
