/* ELIZNA ADMIN R13 — UNIFIED EXPERIENCE & OPERATIONS — BUILD 1 R4
 * 28 AUGUST 2026
 * Final compact presentation layer for R13 custom surfaces.
 * No commerce-authority or data-authority change.
 */

:root {
  --r13-ivory:#f7f4ec;
  --r13-paper:#fffdf8;
  --r13-ink:#27221d;
  --r13-muted:#7b746b;
  --r13-line:rgba(61,50,39,.12);
  --r13-gold:#b39258;
  --r13-gold-soft:#efe4cf;
  --r13-emerald:#2e6b59;
  --r13-emerald-soft:#e4f0eb;
  --r13-coral:#a85348;
  --r13-coral-soft:#f5e4e0;
  --r13-sapphire:#3c6185;
  --r13-sapphire-soft:#e5edf4;
  --r13-plum:#684660;
  --r13-plum-soft:#eee4eb;
  --r13-shadow:0 10px 32px rgba(55,45,34,.075);
  --r13-shadow-soft:0 5px 18px rgba(55,45,34,.055);
  --r13-radius:14px;
  --r13-radius-sm:10px;
}

html[data-elz-r13="true"], body[data-elz-r13="true"] { background:var(--r13-ivory); }

/* --------------------------------------------------------------------------
   GLOBAL TOP BAR
   -------------------------------------------------------------------------- */
#elizna-r13-topbar {
  position:sticky;
  top:0;
  z-index:80;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:56px;
  padding:8px 16px;
  margin:0 0 10px;
  border:1px solid rgba(179,146,88,.18);
  border-radius:16px;
  background:rgba(255,253,248,.88);
  box-shadow:0 8px 22px rgba(61,50,39,.07);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
#elizna-r13-topbar button,
#elizna-r13-topbar a { font:inherit; }
.r13-search { flex:1 1 360px; max-width:620px; }
.r13-search > button {
  width:100%;
  height:36px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 11px;
  color:var(--r13-muted);
  border:1px solid var(--r13-line);
  border-radius:11px;
  background:rgba(255,255,255,.78);
  cursor:pointer;
}
.r13-search > button span { flex:1; text-align:left; font-size:12px; }
.r13-search kbd { font-size:9px; padding:2px 6px; border:1px solid var(--r13-line); border-radius:6px; background:#fff; }
.r13-top-actions { display:flex; align-items:center; gap:7px; }
.r13-top-actions > button,
.r13-icon-btn {
  height:34px;
  padding:0 10px;
  border:1px solid var(--r13-line);
  border-radius:10px;
  color:var(--r13-ink);
  background:linear-gradient(180deg,#fffefb,#f6f0e6);
  box-shadow:0 2px 7px rgba(61,50,39,.05);
  cursor:pointer;
  font-size:11px;
  font-weight:650;
}
.r13-lang { min-width:46px; }
.r13-icon-btn { width:36px; padding:0; position:relative; font-size:16px; }
.r13-icon-btn b {
  position:absolute; right:-5px; top:-6px;
  min-width:17px; height:17px; padding:0 4px;
  display:flex; align-items:center; justify-content:center;
  border:2px solid var(--r13-paper); border-radius:10px;
  background:var(--r13-coral); color:white;
  font-size:8px; line-height:1;
}
.r13-profile-wrap,.r13-bell-wrap { position:relative; }
.r13-profile-btn {
  min-width:172px;
  height:40px;
  display:grid;
  grid-template-columns:30px minmax(0,1fr) 12px;
  align-items:center;
  gap:8px;
  padding:4px 8px;
  border:1px solid var(--r13-line);
  border-radius:12px;
  background:linear-gradient(180deg,#fffefb,#f8f2e8);
  cursor:pointer;
  color:var(--r13-ink);
}
.r13-profile-btn > span:nth-child(2) { min-width:0; text-align:left; }
.r13-profile-btn strong,.r13-profile-btn small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.r13-profile-btn strong { font-size:10.5px; }
.r13-profile-btn small { margin-top:1px; font-size:8.5px; letter-spacing:.05em; color:var(--r13-muted); text-transform:uppercase; }
.r13-profile-btn i { color:var(--r13-muted); font-style:normal; }
.r13-avatar {
  width:30px; height:30px; display:grid; place-items:center; overflow:hidden;
  border-radius:50%;
  background:linear-gradient(145deg,var(--r13-gold-soft),#fff);
  border:1px solid rgba(179,146,88,.32);
  color:#6e5737; font-size:10px; font-weight:750;
}
.r13-avatar img { width:100%; height:100%; object-fit:cover; }
.r13-popover {
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  z-index:120;
  width:min(360px,calc(100vw - 30px));
  padding:8px;
  border:1px solid var(--r13-line);
  border-radius:14px;
  background:rgba(255,253,248,.98);
  box-shadow:0 20px 48px rgba(54,43,31,.18);
}
.r13-popover[hidden] { display:none!important; }
.r13-profile-summary { padding:8px 9px 10px; border-bottom:1px solid var(--r13-line); margin-bottom:6px; }
.r13-profile-summary strong,.r13-profile-summary span,.r13-profile-summary small { display:block; }
.r13-profile-summary strong { font-size:12px; }
.r13-profile-summary span { margin-top:2px; font-size:9px; color:var(--r13-muted); }
.r13-profile-summary small { margin-top:8px; font-size:9px; line-height:1.55; color:var(--r13-muted); }
.r13-profile-pop > a,.r13-profile-pop > button {
  width:100%; min-height:32px; display:flex; align-items:center;
  padding:6px 8px; border:0; border-radius:8px; background:transparent;
  color:var(--r13-ink); text-decoration:none; cursor:pointer; font-size:10px;
}
.r13-profile-pop > a:hover,.r13-profile-pop > button:hover { background:var(--r13-gold-soft); }
.r13-notification-pop { width:min(390px,calc(100vw - 30px)); }
.r13-notification-pop header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 7px 9px; border-bottom:1px solid var(--r13-line); }
.r13-notification-pop header strong { font-size:11px; }
.r13-notification-pop header a { font-size:9px; color:var(--r13-plum); }
.r13-notification-pop > button {
  width:100%; display:grid; grid-template-columns:7px 1fr; gap:8px; text-align:left;
  padding:8px 7px; border:0; border-bottom:1px solid rgba(61,50,39,.07); background:transparent; cursor:pointer;
}
.r13-notification-pop > button:last-child { border-bottom:0; }
.r13-notification-pop > button::before { content:""; width:7px; height:7px; margin-top:4px; border-radius:50%; background:#b7afa4; }
.r13-notification-pop > button.sev.CRITICAL::before,.r13-notification-pop > button.sev.ERROR::before { background:var(--r13-coral); }
.r13-notification-pop > button.sev.WARNING::before,.r13-notification-pop > button.sev.ATTENTION::before { background:var(--r13-gold); }
.r13-notification-pop > button.sev.INFO::before { background:var(--r13-sapphire); }
.r13-notification-pop > button strong,.r13-notification-pop > button span,.r13-notification-pop > button small { display:block; }
.r13-notification-pop > button strong { font-size:10px; }
.r13-notification-pop > button span { margin-top:2px; font-size:9px; line-height:1.45; color:var(--r13-muted); }
.r13-notification-pop > button small { margin-top:4px; font-size:8px; color:#9b938a; }

/* --------------------------------------------------------------------------
   R13 PAGE SYSTEM
   -------------------------------------------------------------------------- */
.r13-page { color:var(--r13-ink); padding:0 0 20px; }
.r13-page * { box-sizing:border-box; }
.r13-hero {
  min-height:0!important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:11px 14px!important;
  margin:0 0 8px!important;
  border:1px solid rgba(179,146,88,.16);
  border-radius:14px!important;
  background:linear-gradient(120deg,rgba(255,253,248,.98),rgba(249,245,236,.9));
  box-shadow:var(--r13-shadow-soft);
}
.r13-hero > div { min-width:0; }
.r13-hero span { display:block; margin:0 0 3px; color:var(--r13-gold); font-size:8px!important; line-height:1.2; letter-spacing:.15em; text-transform:uppercase; font-weight:760; }
.r13-hero h1 { margin:0!important; font-size:clamp(24px,2.05vw,31px)!important; line-height:1.05!important; letter-spacing:-.035em!important; font-weight:560!important; }
.r13-hero aside { flex:0 0 auto; }
.r13-card {
  margin:0 0 8px;
  padding:10px 12px;
  border:1px solid var(--r13-line);
  border-radius:var(--r13-radius);
  background:rgba(255,253,248,.94);
  box-shadow:var(--r13-shadow-soft);
}
.r13-card > header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 8px; }
.r13-card > header h2,.r13-card h2 { margin:0!important; font-size:17px!important; line-height:1.2!important; font-weight:650!important; letter-spacing:-.02em!important; }
.r13-card h3 { margin:6px 0!important; font-size:11px!important; line-height:1.25!important; font-weight:720!important; }
.r13-card p,.r13-card label,.r13-card td,.r13-card th,.r13-card small,.r13-card span,.r13-card button,.r13-card input,.r13-card select,.r13-card textarea { font-size:10px; }
.r13-card small { color:var(--r13-muted); line-height:1.45; }
.r13-grid { display:grid; gap:8px; }
.r13-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.r13-stack { display:grid; gap:7px; }
.r13-toolbar { min-height:34px; display:flex; align-items:center; justify-content:flex-start; gap:7px; margin:0 0 8px; }
.r13-toolbar.wrap { flex-wrap:wrap; }
.r13-toolbar > span { color:var(--r13-muted); font-size:9px; }
.r13-button,.r13-toolbar button,.r13-form button,.r13-card button:not(.r13-project-tile):not([data-r13-rd-document]) {
  min-height:31px;
  padding:5px 10px;
  border:1px solid rgba(61,50,39,.13);
  border-radius:9px;
  color:#fff;
  background:linear-gradient(180deg,#77556f,#604157);
  box-shadow:0 3px 9px rgba(89,57,78,.16);
  cursor:pointer;
  font-weight:650;
}
.r13-button.primary,.r13-form button.primary { background:linear-gradient(180deg,#3e7865,#2b6452); }
.r13-card button:hover,.r13-toolbar button:hover { filter:brightness(1.03); transform:translateY(-.5px); }
.r13-form { display:grid; gap:7px; }
.r13-form.compact { gap:6px; }
.r13-form-row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.r13-form label { display:grid; gap:3px; color:#665f57; font-weight:630; }
.r13-form input,.r13-form select,.r13-form textarea,.r13-table-wrap select,.r13-table-wrap input {
  width:100%;
  min-height:32px;
  padding:5px 8px;
  border:1px solid rgba(61,50,39,.15);
  border-radius:8px;
  outline:0;
  background:#fff;
  color:var(--r13-ink);
}
.r13-form textarea { min-height:68px; resize:vertical; }
.r13-form input:focus,.r13-form select:focus,.r13-form textarea:focus { border-color:rgba(104,70,96,.45); box-shadow:0 0 0 3px rgba(104,70,96,.08); }
.r13-chip {
  display:inline-flex!important;
  align-items:center;
  width:max-content;
  min-height:20px;
  padding:2px 7px;
  border:1px solid rgba(60,97,133,.15);
  border-radius:999px;
  background:var(--r13-sapphire-soft);
  color:#3b5e7c!important;
  font-size:8px!important;
  line-height:1.1!important;
  font-weight:760;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.r13-chip.good { background:var(--r13-emerald-soft); color:var(--r13-emerald)!important; border-color:rgba(46,107,89,.16); }
.r13-chip.attention,.r13-chip.gold { background:var(--r13-gold-soft); color:#765d36!important; border-color:rgba(179,146,88,.18); }
.r13-chip.bad { background:var(--r13-coral-soft); color:var(--r13-coral)!important; border-color:rgba(168,83,72,.15); }
.r13-chip.plum { background:var(--r13-plum-soft); color:var(--r13-plum)!important; border-color:rgba(104,70,96,.15); }
.r13-line,.r13-statline {
  min-height:33px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:5px 0;
  border-bottom:1px solid rgba(61,50,39,.075);
}
.r13-line:last-child,.r13-statline:last-child { border-bottom:0; }
.r13-line > span,.r13-line > span > strong,.r13-line > span > small { display:block; }
.r13-line > span > small { margin-top:2px; }
.r13-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin:0 0 8px; }
.r13-kpis.mini { margin:0; }
.r13-kpis > div {
  min-height:68px;
  padding:9px 10px;
  border:1px solid var(--r13-line);
  border-radius:12px;
  background:linear-gradient(145deg,#fffefa,#f9f5ed);
}
.r13-kpis > div span,.r13-kpis > div strong { display:block; }
.r13-kpis > div span { color:var(--r13-muted); font-size:8.5px; text-transform:uppercase; letter-spacing:.06em; }
.r13-kpis > div strong { margin-top:4px; font-size:19px; line-height:1.05; letter-spacing:-.03em; }
.r13-table-wrap { width:100%; overflow:auto; border:1px solid rgba(61,50,39,.08); border-radius:10px; }
.r13-table-wrap table { width:100%; border-collapse:collapse; min-width:680px; background:#fffdf9; }
.r13-table-wrap th,.r13-table-wrap td { padding:6px 8px; border-bottom:1px solid rgba(61,50,39,.07); text-align:left; vertical-align:middle; white-space:nowrap; }
.r13-table-wrap th { position:sticky; top:0; z-index:1; background:#f7f1e7; color:#6f675e; font-size:8px; letter-spacing:.055em; text-transform:uppercase; }
.r13-table-wrap td { font-size:9.5px; }
.r13-empty,.r13-empty-mini {
  display:flex; align-items:center; justify-content:center; text-align:center;
  color:var(--r13-muted); border:1px dashed rgba(61,50,39,.15); border-radius:11px; background:rgba(249,246,239,.58);
}
.r13-empty { min-height:140px; max-height:190px; padding:18px; }
.r13-empty-mini { min-height:58px; padding:10px; font-size:9px; }
.r13-loading { min-height:180px; display:flex; align-items:center; justify-content:center; gap:8px; color:var(--r13-muted); font-size:10px; }
.r13-loading span { width:13px; height:13px; border:2px solid var(--r13-gold-soft); border-top-color:var(--r13-gold); border-radius:50%; animation:r13spin .8s linear infinite; }
@keyframes r13spin { to { transform:rotate(360deg); } }
.r13-error { padding:9px 10px; border:1px solid rgba(168,83,72,.18); border-radius:10px; background:var(--r13-coral-soft); color:#83443c; font-size:10px; }
.r13-boundary { margin:8px 0 0; padding:8px 10px; border-left:3px solid var(--r13-gold); border-radius:8px; background:rgba(239,228,207,.42); color:#675d50; font-size:9px; line-height:1.5; }
.r13-meta-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.r13-meta-grid > div,.r13-summary-box { padding:7px 8px; border:1px solid rgba(61,50,39,.08); border-radius:9px; background:#fcfaf5; }
.r13-meta-grid span,.r13-meta-grid strong { display:block; }
.r13-meta-grid span,.r13-summary-box span { color:var(--r13-muted); font-size:8px; text-transform:uppercase; letter-spacing:.05em; }
.r13-meta-grid strong { margin-top:2px; font-size:10px; }
.r13-summary-box p { margin:4px 0 0; font-size:10px; line-height:1.45; }
.r13-integration-list,.r13-session-list,.r13-policy-list,.r13-metric-list,.r13-role-list,.r13-audit-list,.r13-campaign-list,.r13-task-list,.r13-doc-list,.r13-usage-mini { display:grid; gap:4px; }
.r13-policy-list > div,.r13-metric-list > div,.r13-role-list > div,.r13-audit-list > div,.r13-campaign-list > div,.r13-task-list > div {
  min-height:34px; padding:6px 7px; border:1px solid rgba(61,50,39,.075); border-radius:8px; background:#fcfaf6;
}
.r13-policy-list > div,.r13-metric-list > div,.r13-task-list > div { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.r13-metric-list span,.r13-metric-list strong,.r13-metric-list small { display:block; }
.r13-metric-list strong { font-size:12px; }
.r13-metric-list small { font-size:8px; }

/* Finance */
.r13-pnl-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin-bottom:6px; }
.r13-pnl { padding:8px; border:1px solid var(--r13-line); border-radius:11px; background:#fcfaf6; }
.r13-pnl > span { font-size:8px; font-weight:800; color:var(--r13-muted); }
.r13-pnl > div { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:4px; }
.r13-pnl small { font-size:8px; }
.r13-pnl strong { font-size:10px; }
.r13-pnl.positive { box-shadow:inset 3px 0 0 var(--r13-emerald); }
.r13-pnl.negative { box-shadow:inset 3px 0 0 var(--r13-coral); }

/* Product R&D */
.r13-rd-layout { display:grid; grid-template-columns:240px minmax(0,1fr); gap:8px; align-items:start; }
.r13-project-list { display:grid; gap:5px; position:sticky; top:68px; max-height:calc(100vh - 90px); overflow:auto; }
.r13-project-tile {
  width:100%; display:grid; gap:4px; padding:8px; text-align:left; border:1px solid var(--r13-line); border-radius:11px; background:#fffdf9; cursor:pointer; color:var(--r13-ink);
}
.r13-project-tile.active { border-color:rgba(104,70,96,.32); box-shadow:0 0 0 2px rgba(104,70,96,.07); background:linear-gradient(145deg,#fffdf9,#f7eef4); }
.r13-project-tile strong { font-size:10px; line-height:1.25; }
.r13-project-tile small,.r13-project-tile em { font-size:8px; color:var(--r13-muted); font-style:normal; }
.r13-progress { height:5px; overflow:hidden; border-radius:999px; background:#ece7de; }
.r13-progress i { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,var(--r13-gold),var(--r13-plum)); }
.r13-rd-detail { min-width:0; }
.r13-pipeline { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:4px; }
.r13-pipeline span { min-height:30px; display:flex; align-items:center; justify-content:center; padding:4px; border:1px solid var(--r13-line); border-radius:8px; background:#faf7f1; color:#786f65; font-size:7.5px; text-align:center; }
.r13-pipeline span.current { border-color:rgba(104,70,96,.34); background:var(--r13-plum-soft); color:var(--r13-plum); font-weight:800; }
.r13-doc-list > button { width:100%; min-height:38px; display:flex; align-items:center; justify-content:space-between; gap:8px; text-align:left; padding:6px 7px; border:1px solid rgba(61,50,39,.08); border-radius:8px; background:#fcfaf6; color:var(--r13-ink); cursor:pointer; }
.r13-doc-list > button span strong,.r13-doc-list > button span small { display:block; }
.r13-doc-list > button span small { margin-top:2px; }
.r13-timeline { position:relative; display:grid; gap:5px; padding-left:12px; }
.r13-timeline::before { content:""; position:absolute; left:4px; top:4px; bottom:4px; width:1px; background:var(--r13-line); }
.r13-timeline > div { position:relative; padding:6px 7px; border:1px solid rgba(61,50,39,.07); border-radius:8px; background:#fcfaf6; }
.r13-timeline > div::before { content:""; position:absolute; left:-12px; top:10px; width:7px; height:7px; border-radius:50%; background:var(--r13-gold); }

/* Modal / search */
.r13-modal { position:fixed; inset:0; z-index:300; display:flex; justify-content:center; align-items:flex-start; padding:11vh 14px 20px; background:rgba(35,31,27,.35); backdrop-filter:blur(5px); }
.r13-search-box { width:min(650px,100%); padding:10px; border:1px solid rgba(255,255,255,.36); border-radius:16px; background:#fffdf9; box-shadow:0 28px 70px rgba(35,31,27,.28); }
.r13-search-box > input { width:100%; height:40px; padding:0 12px; border:1px solid var(--r13-line); border-radius:10px; outline:0; font-size:12px; }
.r13-search-box [data-r13-search-results] { max-height:52vh; overflow:auto; margin-top:7px; display:grid; gap:4px; }
.r13-search-box [data-r13-search-results] a { display:grid; grid-template-columns:90px minmax(0,1fr); gap:2px 8px; padding:7px 8px; border:1px solid rgba(61,50,39,.07); border-radius:8px; color:var(--r13-ink); text-decoration:none; }
.r13-search-box [data-r13-search-results] a span { grid-row:1/3; align-self:center; color:var(--r13-gold); font-size:8px; text-transform:uppercase; }
.r13-search-box [data-r13-search-results] a strong { font-size:10px; }
.r13-search-box [data-r13-search-results] a small { font-size:8px; color:var(--r13-muted); }
.r13-search-box > small { display:block; margin:7px 2px 1px; color:var(--r13-muted); font-size:8px; }

/* Route active-state override: one primary sidebar item only. */
a[data-r13-force-inactive="true"] { background:transparent!important; box-shadow:none!important; color:inherit!important; }
a[data-r13-force-inactive="true"]::before,a[data-r13-force-inactive="true"]::after { opacity:0!important; }

/* Native page compact harmonization; no giant panels. */
body :is(main,[role="main"]) > :not(#elizna-r13-page) h1 { max-font-size:32px; }
body :is(main,[role="main"]) > :not(#elizna-r13-page) :is(.empty-state,[class*="empty-state"],[class*="emptyState"]) { min-height:130px!important; }
body :is(main,[role="main"]) > :not(#elizna-r13-page) textarea { min-height:72px; }

@media (max-width:1100px) {
  .r13-form-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .r13-pipeline { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .r13-pnl-grid { grid-template-columns:1fr; }
}
@media (max-width:900px) {
  #elizna-r13-topbar { position:relative; flex-wrap:wrap; padding:7px 9px; }
  .r13-search { flex-basis:100%; max-width:none; order:2; }
  .r13-top-actions { margin-left:auto; flex-wrap:wrap; justify-content:flex-end; }
  .r13-profile-btn { min-width:145px; }
  .r13-grid.two,.r13-rd-layout { grid-template-columns:1fr; }
  .r13-project-list { position:relative; top:auto; max-height:none; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .r13-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .r13-hero h1 { font-size:26px!important; }
}
@media (max-width:600px) {
  .r13-top-actions > [data-r13-quick] { display:none; }
  .r13-profile-btn { min-width:44px; width:44px; grid-template-columns:30px; }
  .r13-profile-btn > span:nth-child(2),.r13-profile-btn > i { display:none; }
  .r13-form-row,.r13-meta-grid,.r13-project-list,.r13-kpis { grid-template-columns:1fr; }
  .r13-pipeline { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .r13-card { padding:9px; }
  .r13-hero { padding:9px 10px!important; }
  .r13-hero h1 { font-size:23px!important; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation-duration:.001ms!important; animation-iteration-count:1!important; }
}

/* Quick actions */
.r13-quick-box header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.r13-quick-box header strong{font-size:13px}.r13-quick-box header button{width:30px;height:30px;border:1px solid var(--r13-line);border-radius:9px;background:#fff;cursor:pointer}.r13-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.r13-quick-grid a{min-height:38px;display:flex;align-items:center;padding:8px 9px;border:1px solid var(--r13-line);border-radius:9px;background:linear-gradient(145deg,#fffefa,#f8f2e8);color:var(--r13-ink);text-decoration:none;font-size:10px;font-weight:650}.r13-quick-grid a:hover{border-color:rgba(104,70,96,.25);background:var(--r13-plum-soft)}
.r13-profile-pop dl{margin:0 0 6px}.r13-profile-pop dl>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 8px}.r13-profile-pop dt{font-size:8px;color:var(--r13-muted);text-transform:uppercase;letter-spacing:.05em}.r13-profile-pop dd{margin:0;font-size:9px;font-weight:650;text-align:right}.r13-notification-pop button>i.sev{width:7px;height:7px;border-radius:50%;margin-top:4px;background:#98a0a7}.r13-notification-pop button>i.sev.critical,.r13-notification-pop button>i.sev.error{background:var(--r13-coral)}.r13-notification-pop button>i.sev.warning,.r13-notification-pop button>i.sev.attention{background:var(--r13-gold)}.r13-notification-pop button>i.sev.info{background:var(--r13-sapphire)}.r13-notification-pop button>span strong,.r13-notification-pop button>span small,.r13-notification-pop button>span em{display:block}.r13-notification-pop button>span em{margin-top:3px;color:#9b938a;font-size:8px;font-style:normal}
@media(max-width:600px){.r13-quick-grid{grid-template-columns:1fr}}


/* --------------------------------------------------------------------------
   R13 BUILD 1 R2 — ROUTE/L10N STABILITY REPAIR
   - R13 custom content must stay visible if React rerenders its native route.
   - Locale switching no longer rewrites React-owned text nodes.
   -------------------------------------------------------------------------- */
#elizna-r13-page[data-r13-managed="true"]{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  min-height:320px;
  position:relative;
  z-index:2;
}
body[data-elz-r13-custom-route] #elizna-r13-page{
  animation:r13RouteIn .12s ease-out both;
}
@keyframes r13RouteIn{
  from{opacity:.55;transform:translateY(2px)}
  to{opacity:1;transform:none}
}
.r13-notification-center-list{display:grid;gap:6px}
.r13-notification-row{
  display:grid;
  grid-template-columns:8px minmax(0,1fr) auto;
  align-items:start;
  gap:9px;
  padding:9px 10px;
  border:1px solid var(--r13-line);
  border-radius:11px;
  background:#fffdf9;
}
.r13-notification-row.unread{
  border-color:rgba(179,146,88,.28);
  background:linear-gradient(145deg,#fffdf9,#faf4e8);
  box-shadow:inset 3px 0 0 var(--r13-gold);
}
.r13-notification-row>i.sev{
  width:8px;height:8px;margin-top:4px;border-radius:50%;background:#98a0a7
}
.r13-notification-row>i.sev.critical,.r13-notification-row>i.sev.error{background:var(--r13-coral)}
.r13-notification-row>i.sev.warning,.r13-notification-row>i.sev.attention{background:var(--r13-gold)}
.r13-notification-row>i.sev.info{background:var(--r13-sapphire)}
.r13-notification-row>div strong,.r13-notification-row>div small{display:block}
.r13-notification-row>div p{margin:3px 0;font-size:9.5px;line-height:1.45;color:#575049}
.r13-notification-row>aside{
  min-width:126px;
  display:flex;
  align-items:flex-end;
  flex-direction:column;
  gap:4px
}
.r13-notification-row>aside button{
  width:100%;
  min-height:26px!important;
  padding:3px 7px!important;
  font-size:8px!important
}
.r13-inline-link{
  margin-left:6px;
  color:var(--r13-plum);
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:2px
}
@media(max-width:700px){
  .r13-notification-row{grid-template-columns:8px minmax(0,1fr)}
  .r13-notification-row>aside{grid-column:2;min-width:0;align-items:stretch}
}


/* R13 BUILD 1 R3 — safe-host routing + stable React shell */
body[data-elz-r13-custom-route] #elizna-r13-page{
  background:var(--r13-ivory)!important;
  border-radius:14px;
}
body[data-elz-r13-custom-route] #elizna-r13-page .r13-card{
  background:var(--r13-paper);
}
body[data-elz-r13-custom-route] #elizna-r13-page .r13-hero{
  background:linear-gradient(120deg,var(--r13-paper),#f9f5ec);
}
body[data-elz-r13-custom-route] #elizna-r13-topbar{
  position:sticky;
  top:8px;
  z-index:90;
  margin:0 0 8px;
}


/* ==========================================================================
   R13 BUILD 1 R4 — ISOLATED PORTAL / VISUAL REGRESSION REPAIR
   ========================================================================== */
#elizna-r13-portal{
  position:fixed;
  z-index:65;
  overflow:auto;
  overscroll-behavior:contain;
  padding:12px 14px 22px;
  background:var(--r13-ivory);
  color:var(--r13-ink);
  box-shadow:inset 1px 0 0 rgba(61,50,39,.06);
  isolation:isolate;
}
#elizna-r13-portal::before{
  content:"";
  position:fixed;
  inset:inherit;
  pointer-events:none;
  background:
    radial-gradient(circle at 94% 5%,rgba(230,238,222,.34),transparent 24%),
    radial-gradient(circle at 68% 100%,rgba(239,224,226,.22),transparent 26%);
  z-index:-1;
}
#elizna-r13-portal #elizna-r13-topbar{
  position:sticky;
  top:0;
  z-index:100;
  margin:0 0 10px;
}
#elizna-r13-portal #elizna-r13-page{
  display:block!important;
  min-height:calc(100% - 64px);
  background:transparent!important;
}
#elizna-r13-portal .r13-card{
  background:rgba(255,253,248,.98)!important;
}
#elizna-r13-portal .r13-hero{
  background:linear-gradient(120deg,#fffdf8,#f9f5ec)!important;
}

/* Custom module nav owns its own active state while the React shell stays on
   the safe Settings host route. */
a[data-r13-active="true"],
li[data-r13-active-item="true"] > a{
  background:linear-gradient(90deg,#fffaf0,#f7e9bc)!important;
  box-shadow:0 6px 18px rgba(179,146,88,.12)!important;
  color:#4e4438!important;
  border-color:rgba(179,146,88,.24)!important;
}
a[data-r13-active="true"]::before{
  opacity:1!important;
}
a[data-r13-force-inactive="true"]{
  background:transparent!important;
  box-shadow:none!important;
}

/* R4 command bar deliberately does not duplicate the native header's
   language/account controls. */
#elizna-r13-portal .r13-top-actions{
  margin-left:auto;
}

/* Audit and empty-state surfaces must remain opaque; no underlying command
   center artwork is allowed to bleed through. */
#elizna-r13-portal .r13-audit-list > div,
#elizna-r13-portal .r13-empty,
#elizna-r13-portal .r13-empty-mini,
#elizna-r13-portal .r13-table-wrap,
#elizna-r13-portal .r13-summary-box{
  background:#fffdf9!important;
}

/* Prevent the prior R3 main-mounted page/topbar from affecting layout if a
   browser restores a stale DOM snapshot before the R4 module initializes. */
body > #elizna-r13-page,
body > #elizna-r13-topbar{
  display:none!important;
}

@media(max-width:900px){
  #elizna-r13-portal{
    padding:9px 9px 18px;
  }
}


/* ==========================================================================
   R13 BUILD 1 R5 — AUDIT TABLE SIMPLIFICATION / OPAQUE SURFACES
   ========================================================================== */
#elizna-r13-portal[data-route-owner="audit"]::before{
  display:none;
}
#elizna-r13-portal[data-route-owner="audit"] #elizna-r13-page,
#elizna-r13-portal[data-route-owner="audit"] .r13-card,
#elizna-r13-portal[data-route-owner="audit"] .r13-hero,
#elizna-r13-portal[data-route-owner="audit"] .r13-table-wrap,
#elizna-r13-portal[data-route-owner="audit"] .r13-audit-table,
#elizna-r13-portal[data-route-owner="audit"] .r13-audit-table th,
#elizna-r13-portal[data-route-owner="audit"] .r13-audit-table td{
  background:#fffdf9!important;
}
#elizna-r13-portal[data-route-owner="audit"] .r13-card{
  border-color:rgba(61,50,39,.09)!important;
}
.r13-audit-grid{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);
  gap:8px;
  align-items:start;
}
.r13-audit-table-wrap{
  overflow:auto;
  border:1px solid rgba(61,50,39,.08);
  border-radius:12px;
}
.r13-audit-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
}
.r13-audit-table thead th{
  position:sticky;
  top:0;
  z-index:1;
  padding:9px 8px;
  border-bottom:1px solid rgba(61,50,39,.08);
  background:#f8f4eb!important;
  color:#73685b;
  font-size:8px;
  font-weight:780;
  letter-spacing:.06em;
  text-transform:uppercase;
  text-align:left;
}
.r13-audit-table tbody td{
  padding:8px;
  vertical-align:top;
  border-bottom:1px solid rgba(61,50,39,.06);
  color:var(--r13-ink);
  font-size:9.5px;
  line-height:1.45;
  word-break:break-word;
}
.r13-audit-table tbody tr:last-child td{
  border-bottom:0;
}
.r13-audit-table tbody tr:hover td{
  background:#fbf8f1!important;
}
.r13-audit-table strong{
  font-size:9.5px;
}
.r13-audit-table .r13-chip{
  white-space:nowrap;
}
@media(max-width:1100px){
  .r13-audit-grid{
    grid-template-columns:1fr;
  }
}


/* ==========================================================================
   R13 BUILD 1 R6 — ADMIN USERS SINGLE-VISUAL-OWNER
   The existing native Administrators & Access React surface owns rendering.
   R13 must not overlay a second Admin Users page.
   ========================================================================== */
