/* Exec Entry Banner (v1) */
.lrq-exec-entry{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 14px;
  margin: 0 0 12px;
  border: 1px solid rgba(184,137,43,.28);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.66), rgba(255,250,241,.72));
  backdrop-filter: saturate(120%) blur(8px);
}
.lrq-exec-entry__t{font-weight:950; color: rgba(17,24,39,.92); font-size:13px; letter-spacing:.2px;}
.lrq-exec-entry__s{margin-top:2px; font-size:12px; color: rgba(17,24,39,.60);}
.lrq-exec-entry__actions{display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end;}
.lrq-exec-entry__actions .btn{white-space:nowrap;}
@media (max-width: 980px){
  .lrq-exec-entry{border-radius:14px;}
}

:root{
  /* Global Finance (SSOT base) */
  --lrq-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --lrq-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --bg:#f6f8fb;
  --bg2:#eef2f7;
  --panel:#ffffff;
  --panel2:#f8fafc;
  --line:#e6ebf2;
  --line2:#d6dde8;

  --text:#0b1220;
  --muted:#5b677a;
  --muted2:#7a879b;

  --primary:#0b5cff;
  --primary2:#2c7dff;

  --good:#0f9d58;
  --bad:#e11d48;
  --warn:#f59e0b;

  --shadow:0 18px 55px rgba(11,18,32,.10);
  --shadow2:0 10px 28px rgba(11,18,32,.08);

  /* radius system */
  --r-lg:18px;
  --r-md:14px;
  --r-sm:12px;

  /* stroke system */
  --stroke: rgba(12,22,40,.10);
  --stroke2: rgba(12,22,40,.08);

  --grad-primary:linear-gradient(135deg, #0b5cff 0%, #2c7dff 55%, #00a3ff 110%);
  --grad-glass:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.72));
  --glow:0 0 0 1px rgba(11,92,255,.16), 0 12px 28px rgba(11,92,255,.10);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--lrq-font-sans);
  color:var(--text);
  background:
    radial-gradient(900px 520px at 12% 6%, rgba(11,92,255,.10), rgba(246,248,251,0) 60%),
    radial-gradient(760px 460px at 85% 10%, rgba(0,163,255,.09), rgba(246,248,251,0) 62%),
    radial-gradient(900px 540px at 55% 92%, rgba(15,157,88,.06), rgba(246,248,251,0) 62%),
    linear-gradient(180deg, var(--bg2), var(--bg));
}

code{
  font-family:var(--lrq-font-mono);
  background:rgba(11,92,255,.08);
  padding:2px 6px;
  border-radius:10px;
  border:1px solid rgba(11,92,255,.10);
}

.app{display:flex;min-height:100vh}

/* Sidebar */
.sidebar{
  width:276px;
  padding:16px;
  position:sticky;
  top:0;
  align-self:flex-start;
  min-height:100vh;
  background:rgba(255,255,255,.72);
  border-right:1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand{
  font-weight:800;
  letter-spacing:.6px;
  line-height:1.15;
  margin-bottom:14px;
}
.brand small{color:var(--muted);font-weight:600}

nav{display:flex;flex-direction:column;gap:8px;margin:10px 0 16px}
nav a{
  color:var(--text);
  text-decoration:none;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(11,18,32,.02);
  border:1px solid var(--line);
}
nav a:hover{background:rgba(11,92,255,.06)}
nav a.active{
  border-color: rgba(11,92,255,.20);
  background: rgba(11,92,255,.10);
  box-shadow: var(--glow);
}

.content{flex:1; padding:18px 18px 50px}
.container{max-width:1180px; margin:0 auto}

/* LRQ admin shell (for pages using _nav_lrq_framework directly) */
.lrq-admin{display:flex; min-height:100vh;}
.lrq-side{width:260px; flex:0 0 260px;}
.lrq-main{flex:1; padding: 12px 18px 50px; min-width:0;}

@media (max-width:980px){
  /* prevent framework topbar from being pushed out of viewport by legacy layout */
  .lrq-topbar{
    position:fixed !important;
    left:0; right:0; top:0;
    min-height:64px;
  }

  /* mobile topbar: make icon actions look like icon buttons */
  .lrq-topActions .lrq-navToggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:40px;
    height:40px;
    padding:0;
    border-radius:14px;
    border:1px solid rgba(12,22,40,.12);
    background: rgba(255,255,255,.55);
    box-shadow:none;
    font-weight:950;
    font-size:18px;
    line-height:1;
    color: rgba(12,22,40,.92);
  }
  .lrq-topActions .lrq-navToggle:active{ transform: translateY(.5px); }
  .lrq-topActions .lrq-navToggle .ic{ display:block; transform: translateY(-1px); }
  .lrq-topActions a.btn[data-mini="1"] .lbl{ display:none; }
  .lrq-topActions a.btn[data-mini="1"]{ padding:10px 12px; }
  .lrq-topActions a.btn[data-mini="1"] .ic{ font-size:18px; }

  /* only affect pages using lrq-admin shell */
  body:has(.lrq-admin){
    padding-top: calc(64px + env(safe-area-inset-top, 0px));
  }
  body:has(.lrq-admin) .lrq-admin{display:block;}
  body:has(.lrq-admin) .lrq-side{display:none;}
  body:has(.lrq-admin) .lrq-main{display:block; padding:12px 12px 40px;}
}


.card{
  border:1px solid var(--stroke2);
  border-radius:var(--r-lg);
  background:rgba(255,255,255,.72);
  box-shadow: 0 14px 34px rgba(12,22,40,.07);
  padding:18px;
  backdrop-filter: blur(10px) saturate(120%);
}

.muted{color:var(--muted)}

/* Card headings: consistent hierarchy (premium console feel) */
.card h3{
  margin: 0;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: .2px;
}
.card h4{
  margin: 0;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .2px;
  color: rgba(12,22,40,.72);
}
.card h3 + .muted, .card h3 + .pageSubTitle{margin-top: 4px;}
.card .muted{line-height:1.5;}
.card > h3{margin-bottom: 10px;}
.card > h4{margin-bottom: 8px;}

.btn{
  display:inline-flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:var(--r-md);
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.64);
  color: rgba(12,22,40,.92);
  cursor:pointer;
  font-weight:900;
  letter-spacing:.2px;
  box-shadow: 0 10px 22px rgba(12,22,40,.05);
}
.btn:hover{background:rgba(255,255,255,.76)}
.btn:active{transform: translateY(0.5px)}
.btn[disabled]{opacity:.55; cursor:not-allowed; box-shadow:none}

.btnPrimary, .btn.primary{
  border-color: rgba(90,140,255,.34);
  background: linear-gradient(180deg, rgba(90,140,255,.18), rgba(90,140,255,.10));
}

/* legacy semantic aliases */
.btn.good{ border-color: rgba(15,118,110,.24); background: rgba(15,118,110,.10); }
.btn.bad{ border-color: rgba(180,35,24,.24); background: rgba(180,35,24,.10); color:#b42318; }
.btn.warn{ border-color: rgba(181,71,8,.24); background: rgba(181,71,8,.10); }

.btnGhost{
  border: 1px solid rgba(12,22,40,.12);
  background: rgba(255,255,255,.55);
  color: rgba(12,22,40,.88);
  box-shadow:none;
}
.btnDanger{
  border: 1px solid rgba(180,35,24,.28);
  background: rgba(180,35,24,.10);
  color: #b42318;
  box-shadow:none;
}

.input{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(12,22,40,.14);
  background:rgba(255,255,255,.66);
  color: rgba(12,22,40,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.input::placeholder{color: rgba(12,22,40,.45)}
.input:focus{outline:none; border-color: rgba(184,137,43,.38); box-shadow: 0 0 0 4px rgba(184,137,43,.12)}

.table{width:100%; border-collapse:collapse}
.table thead th{
  background: rgba(90,140,255,.08);
  border-bottom: 1px solid rgba(12,22,40,.08);
}
.table th,.table td{padding:10px 10px; border-bottom:1px solid rgba(12,22,40,.08); text-align:left; vertical-align:top}
.table th{color:rgba(12,22,40,.72); font-weight:900}
.table tbody tr:hover td{background: rgba(90,140,255,.06);}

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
}

/* v491: highlight current HQ context row (soft focus, no alert) */
tr.lrq-row-focus td{
  background: rgba(202,166,255,0.10);
}

/* Stage 2: mobile nav drawer */
.navToggle{display:none; position:fixed; left:12px; top:12px; z-index:1000}
.navDrawer{display:none; position:fixed; left:0; top:0; bottom:0; width:82vw; max-width:320px; background:rgba(10,10,18,.92); border-right:1px solid rgba(255,255,255,.10); transform:translateX(-100%); transition:transform .2s ease; padding:16px; z-index:999}
.navDrawer.open{transform:translateX(0)}
.navOverlay{display:none; position:fixed; inset:0; background:rgba(17,24,39,.38); z-index:998; backdrop-filter: saturate(120%) blur(2px)}
.navOverlay.open{display:block}

/* v353: compact partner ctx hint chip */
.lrq-partner-ctx{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(15,23,42,.55);
  color:var(--muted);
  font-size:12px;
  line-height:1;
  max-width:520px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.lrq-partner-ctx code{ color:var(--text); }

@media (max-width:980px){
  .sidebar{display:none}
  .navToggle{display:flex}
  .navDrawer{display:block}
  .grid{grid-template-columns:1fr}
  .content{padding:14px}
  .card{padding:16px}
  .actions{gap:8px}
}

/* LRQ culture + logo elements (minimal, non-invasive) */
.lrq-brand-inline{display:flex;gap:10px;align-items:center}
.lrq-brand-mark{width:28px;height:28px;border-radius:999px;border:1px solid var(--line);background:radial-gradient(closest-side, rgba(255,79,168,0.26), rgba(255,79,168,0.10) 62%, rgba(0,0,0,0) 100%)}
/* If image exists, use it as the mark; keep gradient as fallback */
.lrq-brand-mark.has-img{background-image:url('/assets/lrq/lrq_logo_mark_128.png');background-size:cover;background-position:center;}
.lrq-brand-title{font-weight:900;letter-spacing:.4px}
.lrq-brand-sub{color:var(--muted);font-size:12px;margin-top:2px}
.lrq-culture-card{border:1px solid rgba(255,255,255,0.10);background:rgba(255,255,255,0.03);border-radius:14px;padding:12px}
.lrq-culture-pill{display:inline-flex;gap:6px;align-items:center;border:1px solid rgba(255,79,168,0.30);background:rgba(255,79,168,0.10);color:var(--text);border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900}


/* card + table polish v2 (refine) */
.card{
  border-radius: 18px;
  border: 1px solid rgba(12,22,40,.10);
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 24px rgba(12,22,40,.06);
}
.cardTitle{
  font-weight: 950;
  letter-spacing: .2px;
}
.cardBody{
  line-height: 1.65;
}

.table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow:hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.72);
}

.tableWrap{
  position:relative;
  overflow:auto;
  border-radius: var(--r-md);
}
.tableWrap::before,
.tableWrap::after{
  content:"";
  position:absolute;
  top:0; bottom:0;
  width:18px;
  pointer-events:none;
  opacity:0;
  transition: opacity .12s ease;
}
.tableWrap::before{left:0; background: linear-gradient(90deg, rgba(12,22,40,.08), rgba(12,22,40,0));}
.tableWrap::after{right:0; background: linear-gradient(270deg, rgba(12,22,40,.08), rgba(12,22,40,0));}
.tableWrap.has-scroll-left::before{opacity:1;}
.tableWrap.has-scroll-right::after{opacity:1;}
.table th, .table td{
  border-bottom: 1px solid rgba(12,22,40,.08);
}
.table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255,250,241,.92);
  color: rgba(12,22,40,.76);
  font-weight: 900;
}
.table tbody tr:nth-child(2n) td{
  background: rgba(255,255,255,.50);
}
.table tbody tr:hover td{
  background: rgba(184,137,43,.06);
}

/* layout polish v1 */
:root{
  --lrq-layout-gap: 12px;
}
.container{
  padding-left: 18px;
  padding-right: 18px;
}
.card{
  margin-bottom: 12px;
}
.pageHeader{
  margin-bottom: 12px;
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
}
.pageHeader > div:first-child{min-width:0; flex:1;}
.pageHeaderActions{flex:0 0 auto; justify-content:flex-end; gap:10px; align-items:center;}
.pageHeaderActions > *{margin:0;}
.pageHeaderActions .btnGroup{display:inline-flex;}
.pageTitle{font-weight:950; letter-spacing:.2px; line-height:1.15;}
.pageSubTitle{
  line-height: 1.45;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(12,22,40,.56);
}
.pageHeaderActions{max-width: 52%;}
@media (max-width:980px){
  .pageHeaderActions{max-width:none;}

  .pageHeader{flex-direction:column; align-items:stretch;}
  .pageHeaderActions{justify-content:flex-start; gap:8px;}
  .pageHeaderActions .btnGroup{width:100%;}
  .pageHeaderActions .btnGroup .btn{flex:1;}
}
.table th, .table td{
  padding-top: 10px;
  padding-bottom: 10px;
}


/* toolbars (unify) */
.lrq-toolbar, .list-toolbar, .lrq-list-toolbar, .pageHeaderActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.lrq-toolbar, .list-toolbar, .lrq-list-toolbar{
  padding: 10px 12px;
  border: 1px solid rgba(12,22,40,.10);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,250,241,.86));
  box-shadow: 0 10px 24px rgba(12,22,40,.06);
}
.pageHeaderActions .btn{box-shadow:none;}
.lrq-toolbar .btn, .list-toolbar .btn, .lrq-list-toolbar .btn{box-shadow:none;}

/* toolbar inputs: compact on desktop, full-width on mobile */
.lrq-toolbar .input, .lrq-toolbar .select, .lrq-toolbar .textarea,
.list-toolbar .input, .list-toolbar .select, .list-toolbar .textarea,
.lrq-list-toolbar .input, .lrq-list-toolbar .select, .lrq-list-toolbar .textarea,
.pageHeaderActions .input, .pageHeaderActions .select, .pageHeaderActions .textarea{
  min-width: 180px;
}
@media (max-width: 980px){
  .lrq-toolbar .input, .lrq-toolbar .select, .lrq-toolbar .textarea,
  .list-toolbar .input, .list-toolbar .select, .list-toolbar .textarea,
  .lrq-list-toolbar .input, .lrq-list-toolbar .select, .lrq-list-toolbar .textarea,
  .pageHeaderActions .input, .pageHeaderActions .select, .pageHeaderActions .textarea{
    min-width: 0;
    width: 100%;
  }

  /* Buttons: make the first primary action full-width for mobile ergonomics */
  .lrq-toolbar .btn, .list-toolbar .btn, .lrq-list-toolbar .btn,
  .pageHeaderActions .btn{width:auto;}
  .lrq-toolbar .btnPrimary:first-child, .lrq-toolbar .btn.primary:first-child,
  .list-toolbar .btnPrimary:first-child, .list-toolbar .btn.primary:first-child,
  .lrq-list-toolbar .btnPrimary:first-child, .lrq-list-toolbar .btn.primary:first-child,
  .pageHeaderActions .btnPrimary:first-child, .pageHeaderActions .btn.primary:first-child{
    width: 100%;
    justify-content:center;
  }
}

/* button groups */
.btnGroup{
  display:inline-flex;
  border:1px solid rgba(12,22,40,.12);
  background: rgba(255,255,255,.65);
  border-radius: 14px;
  overflow:hidden;
}
.btnGroup .btn{
  border:0;
  border-right:1px solid rgba(12,22,40,.10);
  border-radius:0;
  box-shadow:none;
  padding:10px 12px;
}
.btnGroup .btn.bad{
  background: rgba(180,35,24,.10);
  color:#b42318;
}
.btnGroup .btn.bad:hover{ background: rgba(180,35,24,.14); }
.btnGroup .btn.bad::before{
  content:"⚠";
  margin-right:6px;
  font-weight:950;
}
.btnGroup .btn.warn{
  background: rgba(181,71,8,.10);
}
.btnGroup .btn.warn:hover{ background: rgba(181,71,8,.14); }
.btnGroup .btn.warn::before{
  content:"!";
  margin-right:6px;
  font-weight:950;
  color: rgba(181,71,8,.85);
}
.btnGroup .btn.good{
  background: rgba(15,118,110,.10);
}
.btnGroup .btn.good:hover{ background: rgba(15,118,110,.14); }

.btnGroup .btn:last-child{border-right:0;}
.btnGroup .btn:hover{background: rgba(90,140,255,.10)}

/* single-button group: look like a primary action bar */
.btnGroup .btn:only-child{
  border-right:0;
  min-width: 220px;
}

/* allow inputs inside btnGroup */
.btnGroup .input, .btnGroup .select{
  border-radius:0;
  box-shadow:none;
  border:0;
  min-width: 160px;
}
.btnGroup .input + .input, .btnGroup .select + .input, .btnGroup .input + .select{
  border-left: 1px solid rgba(12,22,40,.10);
}

@media (max-width:980px){
  .btnGroup{width:100%; display:flex; flex-wrap:wrap;}
  .btnGroup .btn:only-child{width:100%; min-width:0;}
  .btnGroup .input, .btnGroup .select{width:100%; min-width:0;}
  .btnGroup .btn{padding:12px 12px; flex:1 1 auto;}

  /* when a group has many buttons, make them wrap into 2 columns */
  .btnGroup .btn:nth-child(n+3){flex: 1 1 50%;}
}

/* table row action buttons (best-effort) */
.table .btn, .tableWrap .btn{
  padding:8px 10px;
  border-radius:12px;
  font-weight:950;
  box-shadow:none;
}
.table a.btn{ text-decoration:none; }

/* compact text links in table */
.table a{ color: rgba(31,78,121,.92); }

/* badges (semantic, unified) */
.badge, .lrq-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(12,22,40,.12);
  background: rgba(255,255,255,.60);
  color: rgba(12,22,40,.78);
  font-weight: 950;
  font-size: 12px;
}
.badge.good, .lrq-badge.good{ border-color: rgba(15,118,110,.22); background: rgba(15,118,110,.10); }
.badge.warn, .lrq-badge.warn{ border-color: rgba(181,71,8,.22); background: rgba(181,71,8,.10); }
.badge.bad, .lrq-badge.bad{ border-color: rgba(180,35,24,.22); background: rgba(180,35,24,.10); color:#b42318; }
.badge.info, .lrq-badge.info{ border-color: rgba(31,78,121,.20); background: rgba(31,78,121,.08); }

/* number + code alignment */
.mono, code, .num, .amount, .ts{
  font-family: var(--lrq-font-num, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
}

/* table fixed widths (best-effort) */
.table th, .table td{font-variant-numeric: tabular-nums;}
.table th:nth-last-child(1), .table td:nth-last-child(1){min-width:120px;} /* 操作列 */
.table th:nth-child(1), .table td:nth-child(1){min-width:68px;} /* id */

/* alignment helpers */
.table .amount, .table .num, .table td.amount, .table td.num{ text-align:right; }
.table .ts, .table td.ts{ white-space:nowrap; }
.table td.status, .table th.status{ white-space:nowrap; }

/* iPhone: compact proof buttons in tables */
@media (max-width:430px){
  .table a.btn.btnGhost.mono{max-width:140px !important;}
}

/* recon table best-effort (known columns) */
#tbl th:nth-child(6), #tbl td:nth-child(6),
#tbl th:nth-child(7), #tbl td:nth-child(7),
#tbl th:nth-child(8), #tbl td:nth-child(8){
  text-align:right;
  font-variant-numeric: tabular-nums;
}
#tbl th:nth-child(4), #tbl td:nth-child(4),
#tbl th:nth-child(11), #tbl td:nth-child(11){
  white-space:nowrap;
}
#tbl th:nth-child(9), #tbl td:nth-child(9),
#tbl th:nth-child(12), #tbl td:nth-child(12),
#tbl th:nth-child(14), #tbl td:nth-child(14){
  white-space:nowrap;
}

/* recon key columns width (mobile readability) */
@media (max-width:430px){
  #tbl th:nth-child(2), #tbl td:nth-child(2){min-width:64px;} /* id */
  #tbl th:nth-child(3), #tbl td:nth-child(3){min-width:160px;} /* period */
  #tbl th:nth-child(4), #tbl td:nth-child(4){min-width:96px;} /* status */
  #tbl th:nth-child(6), #tbl td:nth-child(6),
  #tbl th:nth-child(7), #tbl td:nth-child(7),
  #tbl th:nth-child(8), #tbl td:nth-child(8){min-width:120px;} /* due/paid/remain */
  #tbl th:last-child, #tbl td:last-child{min-width:180px;} /* ops */
}

/* best-effort: common time columns */
.table th:nth-child(1), .table td:nth-child(1){min-width:68px;} /* id */
.table th:nth-last-child(2), .table td:nth-last-child(2){min-width:140px;} /* often ts/paid_at */

@media (max-width:980px){
  /* stack action buttons vertically to avoid horizontal squeeze */
  .table td:last-child, .tableWrap td:last-child{white-space:normal;}
  .table td:last-child{min-width:140px;}
  .table td:last-child .btn, .tableWrap td:last-child .btn{display:block; width:100%;}
  .table td:last-child .btn + .btn, .tableWrap td:last-child .btn + .btn{margin-top:6px;}
}

/* iPhone / small screens polish (baseline) */
@media (max-width:430px){
  /* table-heavy pages: reduce ocean whitespace */
  .container{padding-left:8px; padding-right:8px;}
  .card{margin-bottom:10px; padding:16px;}
  .tableWrap{border-radius:14px;}
  .table th, .table td{padding:8px 8px;}

  .pageHeader{gap:8px; padding:10px 10px;}
  .pageHeader .pageTitle, .pageHeader h1{font-size:18px; line-height:1.15;}
  .pageSubTitle{display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden;}
  .pageHeader .muted{display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden;}
  .pageHeaderActions{width:100%;}
  .pageHeaderActions .btnGroup{width:100%; flex-wrap:wrap;}
  .pageHeaderActions .btn{flex:1 1 auto; min-width:44%; padding:10px 12px;}

  .lrq-toolbar{padding:10px; gap:8px;}
  .lrq-toolbar label.muted{display:none;}
  .lrq-toolbar{display:grid; grid-template-columns:1fr 1fr; align-items:center;}
  .lrq-toolbar .input, .lrq-toolbar .select{width:100%; min-width:0 !important; grid-column:1 / -1;}
  .lrq-toolbar .btn{padding:10px 12px; grid-column:auto;}
  .lrq-toolbar .btn.btnPrimary{width:100%; grid-column:1 / -1;}
  .lrq-toolbar #btnLoad{grid-column:1 / 2;}
  .lrq-toolbar #hint{grid-column:2 / 3; justify-self:end;}

  /* iPhone form controls: lighter glass feel */
  .input, .select{
    background: rgba(255,255,255,.70);
    border: 1px solid rgba(12,22,40,.10);
    box-shadow: 0 10px 22px rgba(12,22,40,.05);
    border-radius: 14px;
  }
  .input:focus, .select:focus{
    outline: none;
    border-color: rgba(184,137,43,.34);
    box-shadow: 0 0 0 4px rgba(184,137,43,.12), 0 12px 26px rgba(12,22,40,.09);
  }

  .card{border-radius:16px;}
  .cardTitle{font-size:14px;}

  /* form spacing system */
  .lrq-form{display:flex; flex-direction:column; gap:10px;}
  .lrq-field{display:flex; flex-direction:column; gap:6px;}
  .lrq-field .muted{font-size:12px;}
  .lrq-row{display:grid; grid-template-columns:1fr; gap:10px;}
  .lrq-actions{display:flex; gap:10px; flex-wrap:wrap;}
  .lrq-actions .btn{flex:1 1 auto;}
  .lrq-actionsHint{font-size:12px;color:var(--muted);flex:1 1 100%;margin-top:2px;}

  /* On narrow screens, primary buttons in action rows become full-width for easier tapping */
  @media (max-width:520px){
    .lrq-actions .btn.btnPrimary{width:100%;}
  }
}

/* pills + tags */
.pill, .tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(12,22,40,.12);
  background: rgba(255,255,255,.60);
  color: rgba(12,22,40,.78);
  font-size:12px;
  font-weight:900;
}

/* empty state (polish) */
.lrq-empty{
  border: 1px dashed rgba(12,22,40,.18);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255,255,255,.72);
  color: rgba(12,22,40,.60);
}

/* component coverage v1 */
.btnGhost{
  border: 1px solid rgba(12,22,40,.12);
  background: rgba(255,255,255,.6);
  color: #0b1220;
}
.lrq-empty{
  border: 1px dashed rgba(12,22,40,.18);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255,255,255,.70);
  color: #546277;
}

.btnDanger{
  border: 1px solid rgba(180,35,24,.28);
  background: rgba(180,35,24,.10);
  color: #b42318;
}
.btnLink{
  border: 0;
  background: transparent;
  padding: 0;
  color: #1f4e79;
  text-decoration: none;
  box-shadow: none;
}
.btnLink:hover{ text-decoration: underline; }

/* index-like link list (productized) */
.lrq-linkList{margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:10px;}
.lrq-linkGroupTitle{color: rgba(17,24,39,.56); font-weight:950; letter-spacing:.2px; padding:6px 2px 2px;}
.lrq-linkItem{display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:12px 12px; border:1px solid rgba(12,22,40,.10); border-radius:14px;
  background: rgba(255,255,255,.62); box-shadow: 0 10px 22px rgba(12,22,40,.06);
}
.lrq-linkItem a{color: rgba(17,24,39,.92); text-decoration:none; font-weight:900; flex:1;}
.lrq-linkItem .meta{font-size:12px; color: rgba(17,24,39,.56); font-weight:800;}
.lrq-linkItem .chev{opacity:.55; font-weight:950;}
@media (max-width:430px){
  .lrq-linkItem{padding:10px 10px; border-radius:14px;}
  .lrq-linkItem a{font-weight:950;}
}
.alert{
  border-radius: 14px;
  border: 1px solid rgba(12,22,40,.10);
  padding: 11px 12px;
  background: rgba(255,255,255,.62);
  color: #0b1220;
}
.alert.info{ border-color: rgba(31,78,121,.20); }
.alert.good{ border-color: rgba(15,118,110,.20); }
.alert.warn{ border-color: rgba(181,71,8,.20); }
.alert.bad{ border-color: rgba(180,35,24,.20); }


.btnCopy{ display:inline-flex; align-items:center; gap:8px; }


/* Collapsible card (details.card) */
.lrq-cardDetails > summary{list-style:none;}
.lrq-cardDetails > summary::-webkit-details-marker{display:none;}
.lrq-cardDetails > summary{
  border-radius:16px;
  padding:2px;
  margin:-2px;
}
.lrq-cardDetails > summary:hover{
  background: rgba(90,140,255,.08);
}
.lrq-cardDetails[open] > summary{
  background: linear-gradient(180deg, rgba(90,140,255,.10), rgba(90,140,255,.06));
}

/* Mobile pageHeaderActions: compact two-col grid + fold-out drawer */
@media (max-width:430px){
  .pageHeader{padding:10px 10px; gap:8px;}
  .pageHeaderActions{width:100%;}
  .pageHeaderActions .btnGroup{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    align-items:stretch;
  }
  .pageHeaderActions .btn{
    min-width:0;
    width:100%;
    padding:9px 10px;
    border-radius:14px;
  }

  /* toolbars: prevent narrow vertical "pill" details that squeeze content */
  .lrq-toolbar{align-items:stretch;}
  details.lrq-moreActions{flex:1 1 100%;}
  details.lrq-moreActions > summary.btn{
    width:100%;
    user-select:none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
  }
  details.lrq-moreActions > summary.btn:focus-visible{
    outline:2px solid rgba(90,140,255,.25);
    outline-offset:2px;
  }

  details.lrq-moreActions{grid-column:1 / -1;}
  details.lrq-moreActions > summary{list-style:none;}
  details.lrq-moreActions > summary::-webkit-details-marker{display:none;}

  /* "More" actions: premium drawer */
  details.lrq-moreActions > summary::after{
    content: '▾';
    margin-left: 8px;
    opacity: .65;
    font-weight: 950;
  }
  details.lrq-moreActions[open] > summary::after{content:'▴';}
  details.lrq-moreActions[open] > summary{
    border-color: rgba(90,140,255,.30);
    background: linear-gradient(180deg, rgba(90,140,255,.14), rgba(90,140,255,.08));
  }

  .lrq-moreActionsBox{
    margin-top:8px;
    padding:10px;
    border:1px solid rgba(12,22,40,.08);
    border-radius:14px;
    background: rgba(255,255,255,.68);
    box-shadow: 0 14px 34px rgba(12,22,40,.07);
    backdrop-filter: blur(10px) saturate(120%);
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .lrq-moreActionsBox .btn{width:100%;}

  /* Forms in toolbars: on mobile, stack TOP-LEVEL selects/inputs to avoid squeezing tables */
  .lrq-toolbar > .select,
  .lrq-toolbar > .input,
  .lrq-toolbar > input,
  .lrq-toolbar > select{
    width:100%;
    min-width:0 !important;
  }

  /* Fallback: if a page uses plain .btnGroup inside details, still render as 2-col drawer */
  details.lrq-moreActions[open] .btnGroup{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  details.lrq-moreActions[open] .btnGroup .btn{width:100%;}
}

/* spacing utils */
.lrq-mt10{ margin-top:10px !important; }
.lrq-mt12{ margin-top:12px !important; }

/* vertical gaps */
.lrq-gap8{height:8px;}

/* mobile overflow hardening (non-h5 admin) */
@media (max-width: 980px){
  html, body{overflow-x:hidden;}
  body .container{max-width:100%; overflow-x:hidden;}
  pre, code, .mono{overflow-wrap:anywhere; word-break:break-word;}
}

/* nav hardening (in case inline nav styles fail to load, prevent bullets/underline list look) */
nav.lrq-nav-v2 ul, nav.lrq-nav-v2 ol{list-style:none !important; margin:0 !important; padding:0 !important;}
nav.lrq-nav-v2 li{list-style:none !important; margin:0 !important; padding:0 !important;}
nav.lrq-nav-v2 li::marker{content:"";}
nav.lrq-nav-v2 a{text-decoration:none !important;}

/* grid layout utils */
.lrq-grid-2{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
@media (max-width: 720px){
  .lrq-grid-2{grid-template-columns:1fr;}
}

.lrq-grid-3{display:grid; grid-template-columns:repeat(3, 1fr); gap:12px;}
@media (max-width: 980px){
  .lrq-grid-3{grid-template-columns:repeat(2, 1fr);}
}
@media (max-width: 560px){
  .lrq-grid-3{grid-template-columns:1fr;}
}


