@font-face { font-family:"Noto Sans Myanmar Local"; src:url("vendor/NotoSansMyanmar-Regular.woff2") format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"Noto Sans Myanmar Local"; src:url("vendor/NotoSansMyanmar-Bold.woff2") format("woff2"); font-weight:700; font-style:normal; font-display:swap; }
/* Last screen layer: device appearance, accessible type and report reflow. */
@media screen {
  :root {
    color-scheme: light;
    --surface:#ffffff; --surface-raised:#f7f9f7; --canvas:#f3f5f4;
    --ui-font:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans Myanmar Local","PingFang SC","Microsoft YaHei",sans-serif;
    --text-strong:#172b22; --text-secondary:#5b6f63; --control-bg:#fff;
  }
  :root:lang(my) { --ui-font:"Noto Sans Myanmar Local",-apple-system,BlinkMacSystemFont,"Myanmar Text",sans-serif; }
  :root:lang(zh) { --ui-font:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Noto Sans Myanmar Local",sans-serif; }
  body,dialog,button,input,select,textarea { font-family:var(--ui-font); }
  body { background:var(--canvas); color:var(--text-strong); font-size:1rem; line-height:1.65; }
  input,select,textarea { font-size:1rem; }
  h1,h2,h3,h4,strong { font-synthesis:none; }
  :is(h1,h2,h3,h4) { text-wrap:pretty; }
  .office-icon { display:block; width:24px; height:24px; flex:0 0 auto; fill:none; stroke:currentColor; }
  [data-office-icon] { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; line-height:1; }
  .nav-icon,.quick-icon,.hero-action-icon,.mobile-dock i { font-style:normal; }
  .mobile-dock .office-icon { width:23px; height:23px; }
  .account-chip .office-icon { width:16px; height:16px; }
  .account-icon svg.office-icon { fill:none; stroke:currentColor; }
  .item-photo-mark .office-icon { width:28px; height:28px; }
  #menuBtn { color:var(--text-strong); }
  #appShell > main > header { background:var(--canvas); }
  #appShell > main > header h1 { line-height:1.5; font-weight:700; }
  #appShell > main > header p { line-height:1.65; }
  .report-demo-dialog { width:min(72rem,calc(100vw - 24px)); max-width:calc(100vw - 24px); padding:0; overflow-y:auto; overflow-x:hidden; }
  .report-demo-sheet { min-width:0; padding:clamp(16px,3vw,28px); }
  /* A report heading is content, never the app's fixed-height sticky toolbar. */
  #reportDemoDialog .report-demo-header {
    position:static; top:auto; z-index:auto; height:auto; min-height:0; margin:0;
    display:grid; grid-template-columns:minmax(0,1fr) minmax(10rem,14rem);
    gap:20px; align-items:start; padding:0 0 20px; background:transparent;
    backdrop-filter:none; -webkit-backdrop-filter:none;
  }
  #reportDemoDialog .report-demo-header > * { min-width:0; }
  #reportDemoDialog .report-demo-header h2 { margin:12px 0 8px; font-size:clamp(1.15rem,2.3vw,1.5rem); line-height:1.8; white-space:normal; overflow:visible; text-overflow:clip; }
  #reportDemoDialog .report-demo-header p { font-size:.875rem; line-height:1.8; white-space:normal; overflow:visible; }
  #reportDemoDialog .report-demo-badge { max-width:100%; font-size:.8125rem; line-height:1.8; white-space:normal; padding:6px 12px; }
  #reportDemoDialog .report-demo-header label { display:grid; gap:8px; margin:0; font-size:.875rem; line-height:1.8; }
  #reportDemoDialog .report-demo-header select { display:block; width:100%; margin:0; min-height:48px; }
  #reportDemoDialog .report-demo-cards { grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:12px; margin:20px 0; }
  #reportDemoDialog .report-demo-cards article { min-width:0; padding:16px; }
  #reportDemoDialog .report-demo-cards span { font-size:.9375rem; line-height:1.85; }
  #reportDemoDialog .report-demo-cards strong { font-size:clamp(1.05rem,2vw,1.25rem); line-height:1.65; margin-top:8px; overflow-wrap:normal; font-variant-numeric:tabular-nums; }
  #reportDemoDialog :is(.report-demo-grid,.report-demo-grid>article,.report-demo-detail) { min-width:0; max-width:100%; }
  #reportDemoDialog :is(.report-demo-grid h3,.report-demo-detail h3) { font-size:1.05rem; line-height:1.85; margin:0 0 14px; }
  #reportDemoDialog .table-wrap { display:block; width:100%; max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch; }
  #reportDemoDialog .report-table { min-width:36rem; table-layout:auto; width:100%; font-size:.9375rem; }
  #reportDemoCategoryBody { white-space:normal; }
  #reportDemoDialog .report-table :is(th,td):first-child { min-width:10rem; overflow-wrap:normal; word-break:normal; }
  #reportDemoDialog .report-table :is(th,td):not(:first-child) { text-align:right; }
  #reportDemoDialog .report-table :is(th,td) { line-height:1.8; padding:12px; vertical-align:top; }
  #reportDemoDialog .report-table :is(th,td):not(:first-child) { white-space:nowrap; overflow-wrap:normal; word-break:normal; }
  #reportDemoDialog .report-demo-sheet footer { display:flex; flex-wrap:wrap; height:auto; position:static; gap:16px; margin-top:20px; padding-top:16px; }
  #reportDemoDialog .report-demo-sheet footer p { flex:1 1 20rem; font-size:.9375rem; line-height:1.9; }
  #reportDemoDialog .report-demo-sheet footer button { min-width:8rem; min-height:48px; }
  @media(max-width:760px) {
    #reportDemoDialog .report-demo-header { grid-template-columns:minmax(0,1fr); gap:16px; }
    #reportDemoDialog .report-demo-cards,#reportDemoDialog .report-demo-grid { grid-template-columns:minmax(0,1fr); }
    #reportDemoDialog .report-demo-grid { gap:16px; }
    #reportDemoDialog .report-demo-sheet footer button { width:100%; }
    #backupReminder { padding:14px 16px; }
    #backupReminder strong { font-size:.9375rem; }
    #backupReminder p { font-size:.875rem; line-height:1.75; margin:8px 0 12px; }
    #backupReminder button { font-size:.875rem; min-height:44px; }
  }
  :root[data-theme="dark"] {
    color-scheme:dark;
    --canvas:#0e1916; --surface:#162620; --surface-raised:#1d3128; --control-bg:#102119;
    --text-strong:#e6eee8; --text-secondary:#a5b8ad;
    --ink:#e6eee8; --muted:#a5b8ad; --line:#354d40;
    --green:#9bd9b5; --green2:#9bd9b5; --gold:#e5c16f; --red:#ffaaa8;
    --shadow:0 8px 28px #0003;
  }
  :root[data-theme="dark"] body { background:var(--canvas); color:var(--text-strong); }
  :root[data-theme="dark"] :is(.panel,.owner-live-panel,.stat,.overdue-card,.ledger-card,.fund-account-card,.owner-control-center,.quick-grid button,.form-section,.gold-item-row,.auth-card,.auth-panel,.account-menu,.account-chip,dialog,.transfer-gate,.backup-summary,.user-row,.user-card,.package-choice,.upgrade-contact-panel,.printer-setup,.printer-guide-steps>section,.retention-voucher,.managed-panel,.record,main>section,main>details) {
    background:var(--surface); color:var(--text-strong); border-color:var(--line);
  }
  :root[data-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { background:var(--control-bg); color:var(--text-strong); border-color:var(--line); }
  :root[data-theme="dark"] :is(input,textarea)::placeholder { color:#95aa9d; opacity:1; }
  :root[data-theme="dark"] :is(.secondary,.owner-settings-tabs,.owner-settings-tabs button,.quick-icon,.account-menu-head,.account-level,.package-settings-summary,.settings-security-summary,.printer-method-help,.report-table th,.cashbook-table th,.storage-meter,.account-preview,.nrc-picker .nrc-part select,.nrc-selected-code,.role-guide,.chat-members) {
    background:var(--surface-raised); color:var(--text-strong); border-color:var(--line);
  }
  :root[data-theme="dark"] :is(.primary,button[type=submit]:not(.secondary)) { background:#d8b45f; color:#15271c; border-color:#d8b45f; }
  :root[data-theme="dark"] :is(.muted,.eyebrow,.field-label,.title-note,.auth-card>p,.auth-security-note,small,label,.account-chip small,footer) { color:var(--text-secondary); }
  :root[data-theme="dark"] :is(h1,h2,h3,h4,.panel h3,.stat strong,.stat-value,.account-chip strong,.settings-panel-head h3,.report-title,.fund-account-card strong,.package-choice strong,.package-dialog-head h2) { color:var(--text-strong); }
  :root[data-theme="dark"] :is(a,.money-in,.cashbook-in,.nrc-selected-code,.package-choice-price,.package-choice-title,.package-price,.owner-live-grid strong) { color:#a5e4bf; }
  :root[data-theme="dark"] :is(.money-out,.danger,.auth-error,#loginError) { color:#ffb1ab; }
  :root[data-theme="dark"] :is(.gold-value-preview,.gold-value-result,.gold-value-total,.interest-box,.notice,.last-login-hint,.receipt-summary,.package-notice) { background:var(--surface-raised); color:var(--text-strong); border-color:var(--line); }
  :root[data-theme="dark"] :is(#appShell>main>header,.mobile-dock,.settings-tab-panel,.auth-gate) { background:var(--canvas); color:var(--text-strong); border-color:var(--line); }
  :root[data-theme="dark"] .mobile-dock button { color:#b2c7ba; }
  :root[data-theme="dark"] .mobile-dock .active { background:#264b39; color:#e5f7eb; }
  :root[data-theme="dark"] :is(#menuBtn,#quickScan) { background:#203d2e; color:#d3efdf; border-color:var(--line); }
  :root[data-theme="dark"] .sidebar { background:#10291e; border-color:var(--line); }
  :root[data-theme="dark"] .sidebar nav button { color:#d7e8dd; }
  :root[data-theme="dark"] .sidebar nav button.active { background:#2a503a; }
  :root[data-theme="dark"] .backup-notice { background:#302b19; border-color:#8e743b; color:#f1dfac; }
  :root[data-theme="dark"] .backup-notice :is(strong,p) { color:#f1dfac; }
  :root[data-theme="dark"] .backup-notice button { background:#453c22; color:#f6eacb; border-color:#8e743b; }
  :root[data-theme="dark"] :is(.report-content,.report-card,.report-grid>article,.report-cards>article,.report-demo-sheet,.report-demo-cards article,.report-demo-grid>article,.report-demo-detail) { background:var(--surface); color:var(--text-strong); border-color:var(--line); }
  :root[data-theme="dark"] .report-demo-sheet { background:#10202c; }
  :root[data-theme="dark"] #reportDemoDialog :is(h2,h3,.report-demo-cards strong) { color:#b8d9ff; }
  :root[data-theme="dark"] .report-demo-badge { background:#183d60; color:#d2e8ff; }
  :root[data-theme="dark"] #reportDemoDialog .report-demo-header { background:transparent; border-color:#426b91; }
  :root[data-theme="dark"] .report-demo-cards article { border-top-color:#75a7db; }
  :root[data-theme="dark"] :is(th,td,.report-table td,.report-table th) { border-color:var(--line); }
  :root[data-theme="dark"] :is(thead,th,.report-table th) { background:#233a30; color:#d6e5da; }
  :root[data-theme="dark"] :is(.item-photo-card,.photo-empty,.photo-preview,.printer-dialog-head,.signout-icon,.auth-card .secondary,.auth-form .secondary,.sensitive-settings-head,.owner-settings-header,.owner-settings-tabs,.report-controls,.fund-account-card,.ledger-controls) { background:var(--surface-raised); color:var(--text-strong); border-color:var(--line); }
  :root[data-theme="dark"] :is(.chat-bubble,.chat-composer,.chat-toolbar,.chat-panel,.customer-match,.customer-suggestions,.fund-form,.cashbook-card,.report-summary-card,.settings-tab-panel article) { background:var(--surface); color:var(--text-strong); border-color:var(--line); }
  :root[data-theme="dark"] .chat-message.is-mine .chat-bubble { background:#254f3a; color:#e2f3e8; }
  :root[data-theme="dark"] :is(.nrc-picker select option,.nrc-picker .nrc-selected-code) { background:var(--control-bg); color:var(--text-strong); }
  :root[data-theme="dark"] #pawnForm #myanmarWeightFields { border-color:var(--line); background:var(--control-bg); }
  :root[data-theme="dark"] #pawnForm #myanmarWeightFields input { background:var(--control-bg); color:var(--text-strong); }
  :root[data-theme="dark"] #pawnForm #myanmarWeightFields .weight-column-title { background:var(--surface-raised); color:var(--text-strong); border-color:var(--line); }
  :root[data-theme="dark"] .sensitive-settings-body { background:transparent; }
  :root[data-theme="dark"] .sensitive-settings-lock { background:linear-gradient(#162620ee,#162620); color:var(--text-strong); }
  :root[data-theme="dark"] :is(.sensitive-settings-lock strong,.sensitive-settings-lock small,.package-choice-body,.first-language-content p) { color:var(--text-strong); }
  :root[data-theme="dark"] .package-dialog-mark { background:#244d38; color:#efcf82; }
  :root[data-theme="dark"] .package-choice:has(input:checked) { background:#244232; border-color:#ddbd6c; }
  :root[data-theme="dark"] .account-icon { background:#fff; }
  :root[data-theme="dark"] .account-icon.cash { color:#226a49; }
  :root[data-theme="dark"] .account-icon.banking { color:#87600f; }
  :root[data-theme="dark"] #dashboardView .hero { background:#16382a; border-color:#365c45; border-top-color:#c7a153; color:#eff8f1; }
  :root[data-theme="dark"] #dashboardView .hero :is(h2,strong) { color:#eff8f1; }
  :root[data-theme="dark"] #dashboardView .hero .fund-account-copy small { color:#c4dacb; }
  :root[data-theme="dark"] dialog::backdrop { background:#020a07bd; }
  :root[data-theme="dark"] :is(.auth-visual,.auth-logo-panel) { background:#10291e; }
  /* A voucher preview represents paper even when the surrounding app is dark. */
  :root[data-theme="dark"] :is(.receipt-v2,.office-voucher) { background:#fff; color:#18221c; color-scheme:light; --ink:#18221c; --muted:#536058; --line:#cad4ce; }
  :root[data-theme="dark"] :is(.receipt-v2,.office-voucher) :is(h1,h2,h3,h4,label,small) { color:#18221c; }
  :root[data-theme="dark"] #notice:not(:empty) { background:#302b19; color:#f1dfac; }
}
/* Screen appearance must not change voucher paper/PDF colours. */
@media print { :root { color-scheme:light; } .office-icon { fill:none; stroke:currentColor; } }
