:root {
  --ivory: #f5f1e8;
  --paper: #fcfaf5;
  --white: #ffffff;
  --ink: #2c2420;
  --muted: #756b64;
  --wine: #4a1712;
  --wine-soft: #702d27;
  --gold: #a8834b;
  --gold-soft: #e8dcc8;
  --line: #d8cfc2;
  --ok: #276749;
  --danger: #a53a32;
  --shadow: 0 18px 50px rgba(67, 45, 32, .10);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font: 15px/1.55 Manrope, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--wine); }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border: 1px solid var(--gold); border-radius: 50%;
  display: grid; place-items: center; color: var(--gold); font-family: Georgia, serif;
  font-size: 18px; letter-spacing: -1px; background: rgba(255,255,255,.55);
}
.brand strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 20px; letter-spacing: .4px; }
.brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; }

.topbar {
  min-height: 72px; padding: 12px clamp(18px, 4vw, 56px); border-bottom: 1px solid var(--line);
  background: rgba(252, 250, 245, .92); display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px);
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-chip { font-size: 13px; color: var(--muted); }

.shell { width: min(1100px, calc(100% - 28px)); margin: 34px auto 64px; }
.page-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 22px; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: 2px; font-size: 11px; font-weight: 700; }
h1, h2, h3 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; line-height: 1.25; }
h1 { font-size: clamp(27px, 4vw, 42px); font-weight: 500; }
h2 { font-size: 23px; font-weight: 500; }
h3 { font-size: 17px; font-weight: 600; }
.lede { max-width: 680px; color: var(--muted); margin: 10px 0 0; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.card-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.section-no {
  width: 30px; height: 30px; border-radius: 50%; background: var(--wine); color: white;
  display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: 0 0 auto;
}

.field { margin-bottom: 17px; }
.field:last-child { margin-bottom: 0; }
.field label, .field-title { display: block; font-weight: 650; margin-bottom: 7px; }
.hint { font-size: 12px; color: var(--muted); margin: -3px 0 8px; }
.req { color: var(--danger); margin-right: 3px; }
input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
input[type="date"], input[type="time"], input[type="number"], input[type="search"],
input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--white); padding: 10px 12px; outline: none; transition: .18s ease;
}
textarea { min-height: 86px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(168, 131, 75, .14); }
input[readonly], textarea[readonly] { background: #eeeae1; color: #5e554f; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }

.btn {
  min-height: 44px; border: 1px solid var(--wine); border-radius: 999px; padding: 10px 20px;
  background: var(--wine); color: white; font-weight: 700; transition: .18s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn:hover { background: var(--wine-soft); transform: translateY(-1px); }
.btn:disabled { cursor: default; opacity: .55; transform: none; }
.btn-secondary { background: transparent; color: var(--wine); }
.btn-secondary:hover { color: white; }
.btn-gold { background: var(--gold); border-color: var(--gold); }
.btn-small { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }

.choice-list { display: flex; flex-wrap: wrap; gap: 9px; }
.choice {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: white; cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--gold); background: #f3ead9; color: var(--wine); font-weight: 650; }
.choice input { accent-color: var(--wine); }

.info-panel { border-left: 3px solid var(--gold); background: #f1eadf; padding: 14px 16px; border-radius: 0 10px 10px 0; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-top: 10px; }
.info-item small { display: block; color: var(--muted); font-size: 11px; }
.info-item strong { display: block; word-break: break-word; }
.code-pill { display: inline-flex; border: 1px solid var(--gold); color: var(--wine); background: #f6eddd; border-radius: 999px; padding: 5px 10px; font: 700 12px/1.2 ui-monospace, Consolas, monospace; }

.status { display: none; margin-top: 14px; border-radius: 9px; padding: 11px 13px; font-size: 13px; }
.status.show { display: block; }
.status.ok { background: #e8f3ec; color: var(--ok); border: 1px solid #bdd8c7; }
.status.error { background: #fbeceb; color: var(--danger); border: 1px solid #e8c1be; }
.status.wait { background: #f3ead9; color: #6b4f24; border: 1px solid #dfcda9; }

.result-card { display: none; margin-top: 18px; border: 1px solid var(--gold); background: #f5ead8; border-radius: 12px; padding: 18px; }
.result-card.show { display: block; }
.task-link { display: flex; gap: 9px; margin-top: 12px; }
.task-link input { flex: 1; min-width: 0; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; }
.action-row .btn { flex: 1 1 220px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice-grid .choice { border-radius: 8px; }
.result-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 12px 0; }
.result-flow .arrow { color: var(--gold); font-weight: 800; }
.review-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.review-list li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 7px; }
.review-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.review-list span { color: var(--muted); }
.section-stack { display: grid; gap: 18px; }
.muted-link { color: var(--muted); text-decoration: none; }
.muted-link:hover { color: var(--wine); }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1.05fr) minmax(360px, .95fr); }
.login-art {
  min-height: 100vh; padding: clamp(36px, 7vw, 94px); color: white; display: flex;
  flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  background: linear-gradient(150deg, rgba(74,23,18,.95), rgba(44,36,32,.84)),
    radial-gradient(circle at 78% 20%, #b99861 0, transparent 45%), #4a1712;
}
.login-art::after { content: ""; position: absolute; width: 430px; height: 430px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; right: -160px; bottom: -120px; }
.login-art .brand-mark { border-color: #d4b989; color: #e5c99d; }
.login-art .brand small { color: #d8c8b7; }
.login-copy { position: relative; z-index: 1; max-width: 600px; }
.login-copy h1 { font-size: clamp(38px, 6vw, 70px); }
.login-copy p { color: #e3d8cc; max-width: 520px; font-size: 16px; }
.login-form-wrap { display: grid; place-items: center; padding: 28px; }
.login-card { width: min(430px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: clamp(26px, 6vw, 48px); box-shadow: var(--shadow); }
.login-card h2 { font-size: 28px; margin-bottom: 8px; }
.login-card > p { color: var(--muted); margin: 0 0 26px; }

.account-shell { max-width: 1440px; }
.account-table-wrap { width: 100%; overflow-x: auto; }
.account-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.account-table th, .account-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.account-table th { color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.account-table td strong, .account-table td small { display: block; }
.account-table td small { color: var(--muted); margin-top: 4px; }
.account-table select { min-width: 110px; padding: 9px 10px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 7px; min-width: 220px; }
.account-dialog { width: min(500px, calc(100% - 32px)); border: 0; border-radius: 20px; padding: 28px; box-shadow: 0 24px 80px #10232d52; }
.account-dialog::backdrop { background: #10232d99; }
.account-dialog h2 { margin: 7px 0; }

.flow-note { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.flow-note span { color: var(--wine); font-weight: 700; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }

@media (max-width: 780px) {
  .login-page { display: block; }
  .login-art { min-height: 280px; padding: 30px 24px; }
  .login-art .login-copy h1 { font-size: 38px; }
  .login-art footer { display: none; }
  .login-form-wrap { padding: 20px 14px 40px; }
  .page-head { display: block; }
  .topbar { position: static; }
  .user-chip { display: none; }
  .grid > [class*="span-"] { grid-column: span 12; }
  .field-row, .field-row.three, .info-grid { grid-template-columns: 1fr; }
  .task-link { display: grid; }
  .choice-grid { grid-template-columns: 1fr; }
  .review-list li { display: block; }
}

/* RoyalZen role-aware operations shell */
.rz-workspace {
  min-height: 100vh;
  background: #fbfaf7;
  color: #27211e;
}
.rz-workspace > .topbar { display: none !important; }
.rz-app-layout { min-height: 100vh; display: grid; grid-template-columns: 234px minmax(0, 1fr); }
.rz-sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30;
  display: flex; flex-direction: column; background: #fcfaf5; border-right: 1px solid #ddd5c9;
}
.rz-sidebar-brand {
  display: flex; align-items: center; gap: 12px; min-height: 88px; padding: 16px 30px;
  border-bottom: 1px solid #e8e2d9; color: #2c2420; text-decoration: none;
}
.rz-brand-mark {
  width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center;
  border: 1px solid #b68c47; border-radius: 50%; color: #9d7339; font: 500 18px/1 Georgia, serif;
}
.rz-sidebar-brand strong { display: block; font: 600 24px/1.05 Georgia, serif; letter-spacing: -.02em; }
.rz-sidebar-brand small { display: block; margin-top: 5px; color: #786d65; font-size: 10px; letter-spacing: .08em; white-space: nowrap; }
.rz-sidebar-nav { flex: 1; padding: 16px 16px 28px; }
.rz-nav-group { padding: 10px 0 15px; border-bottom: 1px solid #ece7df; }
.rz-nav-group:last-child { border-bottom: 0; }
.rz-nav-label { padding: 0 14px 7px; color: #8a7f75; font-size: 11px; font-weight: 650; letter-spacing: .08em; }
.rz-nav-link {
  display: block; min-height: 40px; margin: 2px 0; padding: 10px 14px 10px 24px; border-radius: 7px;
  color: #4e4540; font-size: 14px; font-weight: 500; line-height: 20px; text-decoration: none;
  transition: background-color 100ms, color 100ms;
}
.rz-nav-link:hover { background: #f2ede5; color: #4a1712; }
.rz-nav-link:focus-visible { outline: 2px solid #a8834b; outline-offset: 1px; }
.rz-nav-link.active { background: var(--wine); color: #fff; font-weight: 650; }
.rz-app-column { min-width: 0; }
.rz-inline-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-left: auto; }
.rz-account-wrap { position: relative; flex: 0 0 auto; }
.rz-account-button {
  display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 3px 5px 3px 9px;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; text-align: right;
}
.rz-account-button:hover { border-color: #e1d9ce; background: #f7f2ea; }
.rz-account-button:focus-visible { outline: 2px solid #a8834b; outline-offset: 2px; }
.rz-account-button strong, .rz-account-button small { display: block; }
.rz-account-button strong { font-size: 13px; font-weight: 600; }
.rz-account-button small { color: #786d65; font-size: 11px; }
.rz-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #eee8dd; color: #4a1712; font-weight: 650; }
.rz-account-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: 240px; padding: 12px;
  background: #fff; border: 1px solid #d8cfc2; border-radius: 12px; box-shadow: 0 8px 24px rgba(44,36,32,.1);
}
.rz-account-menu div { padding: 6px 8px 12px; border-bottom: 1px solid #ece6dd; }
.rz-account-menu strong, .rz-account-menu small { display: block; }
.rz-account-menu small { margin-top: 3px; color: #786d65; font-size: 12px; word-break: break-all; }
.rz-account-menu button { width: 100%; margin-top: 8px; padding: 9px; border: 0; border-radius: 8px; background: transparent; color: #8a241d; text-align: left; }
.rz-account-menu button:hover { background: #f9edeb; }
.rz-content { min-width: 0; }
.rz-content > main,
.rz-content > main.shell,
.rz-content > main.wide,
.rz-content > main.shell-wide,
.rz-content > main.dispatch-shell {
  width: 100% !important; max-width: none !important; margin: 0 !important; padding: 28px 20px 48px !important;
}
.rz-workspace .page-head { margin-bottom: 20px; align-items: center; }
.rz-workspace .page-head h1, .rz-workspace .crm-page-head h1, .rz-workspace .dispatch-page-head h1 { font-family: Manrope, "Noto Sans SC", "PingFang SC", sans-serif; font-size: 28px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.rz-workspace .page-head h2,
.rz-workspace .panel h2,
.rz-workspace .card h2,
.rz-workspace .panel h3,
.rz-workspace .card h3 { font-family: Manrope, "Noto Sans SC", "PingFang SC", sans-serif; }
.rz-workspace .eyebrow { font: 650 11px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.rz-workspace .lede { max-width: 760px; font-size: 14px; }
.rz-workspace .panel,
.rz-workspace .card { border-radius: 12px !important; box-shadow: 0 1px 2px rgba(44,36,32,.04) !important; }
.rz-workspace .btn { border-radius: 8px; }
.rz-workspace .btn:focus-visible,
.rz-workspace button:focus-visible,
.rz-workspace a:focus-visible { outline: 2px solid #a8834b; outline-offset: 2px; }
.rz-mobile-nav { display: none; }

@media (max-width: 920px) {
  .rz-app-layout { display: block; }
  .rz-sidebar { display: none; }
  .rz-account-button > span:first-child { display: none; }
  .rz-content > main,
  .rz-content > main.shell,
  .rz-content > main.wide,
  .rz-content > main.shell-wide,
  .rz-content > main.dispatch-shell { padding: 18px 14px 88px !important; }
  .rz-mobile-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; min-height: 64px;
    display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(252,250,245,.98); border-top: 1px solid #d8cfc2;
  }
  .rz-mobile-nav a { display: grid; place-items: center; padding: 9px 4px; color: #756b64; font-size: 12px; font-weight: 550; text-decoration: none; }
  .rz-mobile-nav a.active { color: var(--wine); box-shadow: inset 0 2px var(--wine); }
  .rz-workspace .page-head h1 { font-size: 24px; }
}

/* 2026-08-20 role workbench — compact shell, existing business forms remain intact */
.rz-app-layout { grid-template-columns: 208px minmax(0, 1fr); }
.rz-sidebar { background: #f8f5ef; border-right-color: #e3ddd4; overflow: visible; }
.rz-sidebar-brand {
  min-height: 64px; padding: 12px 20px; gap: 10px; border-bottom-color: #e7e1d8;
}
.rz-brand-mark {
  width: 34px; height: 34px; flex-basis: 34px; border-radius: 50%; font-size: 13px;
}
.rz-brand-word { font: 600 18px/1 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.rz-sidebar-nav { flex: 1; padding: 18px 12px; }
.rz-nav-link {
  min-height: 40px; margin: 2px 0; padding: 10px 12px; border-radius: 7px;
  font-size: 14px; font-weight: 500;
}
.rz-nav-link.active { color: var(--wine); background: #ece4d9; box-shadow: inset 2px 0 var(--wine); font-weight: 600; }
.rz-sidebar-foot { position: relative; padding: 12px; border-top: 1px solid #e3ddd4; }
.rz-account-button {
  width: 100%; min-height: 46px; padding: 5px 6px; gap: 10px; text-align: left;
}
.rz-account-copy { min-width: 0; flex: 1; }
.rz-account-copy strong, .rz-account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rz-account-copy strong { font-size: 13px; font-weight: 600; }
.rz-account-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.rz-avatar { width: 32px; height: 32px; flex: 0 0 32px; font-size: 12px; }
.rz-account-menu { top: auto; right: 8px; bottom: calc(100% + 6px); width: 224px; }
.rz-account-menu a,
.rz-account-menu button {
  display: block; width: 100%; margin-top: 6px; padding: 9px 8px; border: 0; border-radius: 6px;
  background: transparent; color: #4e4540; font-size: 13px; text-align: left; text-decoration: none;
}
.rz-account-menu a:hover, .rz-account-menu button:hover { background: #f3eee7; color: var(--wine); }
.rz-content > main,
.rz-content > main.shell,
.rz-content > main.wide,
.rz-content > main.shell-wide,
.rz-content > main.dispatch-shell,
.rz-content > main.crm-workbench {
  padding: 24px 28px 48px !important;
}
.rz-workspace .page-head,
.rz-workspace .crm-page-head,
.rz-workspace .dispatch-page-head { min-height: 48px; margin-bottom: 16px; align-items: flex-start; }
.rz-workspace .page-head h1,
.rz-workspace .crm-page-head h1,
.rz-workspace .dispatch-page-head h1 {
  font-family: Manrope, "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 26px; line-height: 1.2; font-weight: 550; letter-spacing: -.025em;
}
.rz-workspace .page-head p,
.rz-workspace .crm-page-head p,
.rz-workspace .dispatch-page-head p { margin-top: 6px; }
.rz-workspace .card,
.rz-workspace .panel { background: #fff; border-color: #e0d9cf; box-shadow: 0 1px 2px rgba(44,36,32,.035) !important; }
.rz-workspace .btn { min-height: 40px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.rz-workspace .btn:hover { transform: none; }
.rz-workspace .section-no { border-radius: 6px; background: #eee7dc; color: var(--wine); }
.rz-workspace .code-pill { border-radius: 5px; background: #f4efe7; }
.rz-workspace .choice { border-radius: 7px; }

/* Role-aware today page */
.rz-home { width: 100%; max-width: 1240px; margin: 0 auto; }
.rz-home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 4px 0 20px; border-bottom: 1px solid #e1dad0; }
.rz-home-head h1 { font: 500 30px/1.15 Manrope, "Noto Sans SC", sans-serif; letter-spacing: -.035em; }
.rz-home-head p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.rz-home-date { color: var(--muted); font: 600 12px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.rz-home-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 32px; padding-top: 24px; }
.rz-home-section { min-width: 0; }
.rz-home-section + .rz-home-section { margin-top: 32px; }
.rz-section-kicker { margin-bottom: 10px; color: #8a7f75; font-size: 11px; font-weight: 650; letter-spacing: .08em; }
.rz-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.rz-section-title h2 { font: 600 18px/1.3 Manrope, "Noto Sans SC", sans-serif; }
.rz-section-title a { color: var(--muted); font-size: 12px; text-decoration: none; }
.rz-work-list { border-top: 1px solid #ded7cd; }
.rz-work-row {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  min-height: 68px; padding: 12px 0; border-bottom: 1px solid #e7e1d8; color: inherit; text-decoration: none;
}
.rz-work-row:hover .rz-work-title { color: var(--wine); }
.rz-work-time { color: #6f655f; font: 600 12px/1.35 ui-monospace, Consolas, monospace; }
.rz-work-title { display: block; font-size: 14px; font-weight: 600; }
.rz-work-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.rz-work-state { color: var(--wine); font-size: 12px; font-weight: 600; white-space: nowrap; }
.rz-home-empty { padding: 32px 0; border-top: 1px solid #ded7cd; border-bottom: 1px solid #e7e1d8; }
.rz-home-empty strong, .rz-home-empty span { display: block; }
.rz-home-empty strong { font-size: 15px; font-weight: 600; }
.rz-home-empty span { margin-top: 5px; color: var(--muted); font-size: 13px; }
.rz-role-summary { padding: 16px 0 20px; border-top: 2px solid var(--wine); border-bottom: 1px solid #e1dad0; }
.rz-role-summary strong { display: block; font-size: 17px; font-weight: 600; }
.rz-role-summary p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.rz-tool-list { display: grid; border-top: 1px solid #ded7cd; }
.rz-tool-link {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 13px 2px;
  border-bottom: 1px solid #e7e1d8; color: inherit; text-decoration: none;
}
.rz-tool-link strong { font-size: 13px; font-weight: 600; }
.rz-tool-link small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.rz-tool-link::after { content: '→'; align-self: center; color: #9b8f85; }
.rz-tool-link:hover { color: var(--wine); }
.rz-home-note { margin-top: 24px; padding: 12px 0; border-top: 1px solid #e1dad0; color: var(--muted); font-size: 12px; }
.rz-home-loading { min-height: 180px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }

/* The legacy direct MEA form remains available, but is no longer visually promoted. */
.rz-page-admin .section-stack > .card:first-child { border-left: 2px solid var(--wine); }
.rz-page-admin .section-stack > .card:nth-child(2) { background: #fbfaf7; }
.rz-page-installation #dispatcherPanel { background: #fbfaf7; }

@media (max-width: 1080px) {
  .rz-home-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
}

@media (max-width: 920px) {
  .rz-app-layout { display: block; }
  .rz-sidebar { display: none; }
  .rz-content > main,
  .rz-content > main.shell,
  .rz-content > main.wide,
  .rz-content > main.shell-wide,
  .rz-content > main.dispatch-shell,
  .rz-content > main.crm-workbench { padding: 18px 14px 84px !important; }
  .rz-mobile-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); align-items: stretch; min-height: 58px;
    background: #fcfaf5; border-top: 1px solid #ded7cd;
  }
  .rz-mobile-nav .rz-nav-link {
    display: grid; place-items: center; min-height: 58px; margin: 0; padding: 8px 4px;
    border-radius: 0; box-shadow: none; font-size: 12px;
  }
  .rz-mobile-nav .rz-nav-link.active { box-shadow: inset 0 2px var(--wine); background: #f7f2ea; }
  .rz-home-head { display: block; padding-bottom: 16px; }
  .rz-home-head h1 { font-size: 25px; }
  .rz-home-date { display: block; margin-top: 10px; }
  .rz-home-grid { display: block; padding-top: 18px; }
  .rz-home-aside { margin-top: 32px; }
  .rz-work-row { grid-template-columns: 66px minmax(0, 1fr); gap: 10px; }
  .rz-work-state { grid-column: 2; margin-top: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  .rz-workspace *, .rz-workspace *::before, .rz-workspace *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Claude workbench integration: role modules are navigation; business contracts stay in their original pages. */
.rz-workspace {
  --rz-bg: #efeae0;
  --rz-panel: #f7f3ea;
  --rz-line: #dcd3c5;
  --rz-line-soft: #e8e0d3;
  --rz-faint: #a89b90;
  background: var(--rz-bg);
}
.rz-app-layout { grid-template-columns: 200px minmax(0, 1fr); }
.rz-sidebar { background: var(--rz-panel); border-right-color: var(--rz-line); }
.rz-sidebar-brand { min-height: 64px; padding: 13px 16px; border-bottom-color: var(--rz-line-soft); }
.rz-sidebar-brand .rz-brand-mark {
  width: 28px; height: 28px; flex-basis: 28px; border: 0; background: var(--wine); color: #fff;
  font-family: Georgia, "Times New Roman", serif; font-size: 13px;
}
.rz-sidebar-brand strong { font: 500 15px/1.15 Georgia, "Times New Roman", serif; }
.rz-sidebar-brand small { margin-top: 3px; color: #8b7e74; font-size: 9px; letter-spacing: .08em; }
.rz-sidebar-nav { padding: 10px 10px 18px; }
.rz-nav-pinned { padding: 0 0 9px; border-bottom: 1px solid var(--rz-line-soft); }
.rz-nav-pinned .rz-nav-link { font-weight: 650; }
.rz-nav-group { padding: 9px 0 8px; border-bottom: 1px solid var(--rz-line-soft); }
.rz-nav-group:last-child { border-bottom: 0; }
.rz-nav-label {
  padding: 3px 11px 5px; color: var(--rz-faint); font-size: 9.5px; font-weight: 750;
  letter-spacing: .12em; text-transform: uppercase;
}
.rz-nav-link {
  min-height: 34px; margin: 1px 0; padding: 7px 11px 7px 20px; border-radius: 6px;
  color: #5c5148; font-size: 12.5px; line-height: 20px;
}
.rz-nav-pinned .rz-nav-link { padding-left: 11px; }
.rz-nav-link:hover { background: var(--rz-line-soft); }
.rz-nav-link.active { background: var(--wine); color: #fff; box-shadow: none; }
.rz-sidebar-foot { border-top-color: var(--rz-line-soft); }
.rz-content { background: var(--rz-bg); }
.rz-content > main,
.rz-content > main.shell,
.rz-content > main.wide,
.rz-content > main.shell-wide,
.rz-content > main.dispatch-shell,
.rz-content > main.crm-workbench { padding: 22px 24px 48px !important; }
.rz-workspace .card,
.rz-workspace .panel { border-color: var(--rz-line); }

@media (max-width: 920px) {
  .rz-mobile-nav .rz-mobile-link,
  .rz-mobile-nav .rz-mobile-more-button {
    min-height: 58px; display: grid; place-items: center; padding: 8px 4px; border: 0;
    background: transparent; color: #756b64; font-size: 12px; font-weight: 600; text-decoration: none;
  }
  .rz-mobile-nav .rz-mobile-link.active,
  .rz-mobile-nav .rz-mobile-more-button[aria-expanded="true"] {
    color: var(--wine); background: #f7f2ea; box-shadow: inset 0 2px var(--wine);
  }
  .rz-mobile-more .rz-mobile-overflow-link,
  .rz-mobile-more button {
    min-height: 48px; padding: 12px; border: 0; border-radius: 8px; background: transparent;
    color: #4e4540; text-align: left; text-decoration: none;
  }
  .rz-mobile-more .rz-mobile-overflow-link.active { background: #f2ece4; color: var(--wine); }
}

/* 2026-08-20 approved role UX: no generic Today page; mobile is a first-class workspace. */
.rz-mobile-head,
.rz-mobile-more { display: none; }
.rz-app-column { min-height: 100vh; }
.rz-content { min-height: 100vh; }
.rz-workspace .flow-note { max-width: 520px; text-align: right; }
.rz-workspace input,
.rz-workspace select,
.rz-workspace textarea { border-color: #d9d1c6; }
.rz-workspace .status-pill,
.rz-workspace .badge,
.rz-workspace .access-tag { border-radius: 6px !important; }

@media (max-width: 920px) {
  .rz-workspace { padding-bottom: env(safe-area-inset-bottom); }
  .rz-mobile-head {
    position: sticky; top: 0; z-index: 32; min-height: 52px; padding: 8px 14px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: rgba(252, 250, 245, .98); border-bottom: 1px solid #ded7cd;
  }
  .rz-mobile-head strong { font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
  .rz-mobile-account {
    width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
    border: 1px solid #d8cfc2; border-radius: 50%; background: #eee8dd; color: var(--wine); font-weight: 700;
  }
  .rz-mobile-more {
    position: fixed; left: 12px; right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 38;
    padding: 8px; background: #fff; border: 1px solid #d8cfc2; border-radius: 12px;
    box-shadow: 0 12px 36px rgba(44, 36, 32, .16);
  }
  .rz-mobile-more:not([hidden]) { display: grid; }
  .rz-mobile-more .rz-nav-link,
  .rz-mobile-more button { min-height: 48px; padding: 12px; border: 0; border-radius: 8px; background: transparent; color: #4e4540; text-align: left; text-decoration: none; }
  .rz-mobile-more .rz-nav-link.active { background: #f2ece4; color: var(--wine); }
  .rz-mobile-more button { color: var(--danger); font: inherit; }
  .rz-mobile-nav { padding-bottom: env(safe-area-inset-bottom); }
  .rz-mobile-nav .rz-nav-link,
  .rz-mobile-more-button { min-height: 58px; border: 0; background: transparent; color: #756b64; font-size: 12px; font-weight: 600; }
  .rz-mobile-more-button[aria-expanded="true"] { color: var(--wine); box-shadow: inset 0 2px var(--wine); background: #f7f2ea; }
  .rz-content > main,
  .rz-content > main.shell,
  .rz-content > main.wide,
  .rz-content > main.shell-wide,
  .rz-content > main.dispatch-shell,
  .rz-content > main.crm-workbench { padding: 16px 12px calc(84px + env(safe-area-inset-bottom)) !important; }
  .rz-workspace .page-head,
  .rz-workspace .crm-page-head,
  .rz-workspace .dispatch-page-head { min-height: 0; margin-bottom: 14px; }
  .rz-workspace .page-head h1,
  .rz-workspace .crm-page-head h1,
  .rz-workspace .dispatch-page-head h1 { font-size: 23px; }
  .rz-workspace .lede { font-size: 13px; line-height: 1.55; }
  .rz-workspace .flow-note { display: none; }
  .rz-workspace .card,
  .rz-workspace .panel { padding: 16px !important; border-radius: 10px !important; }
  .rz-workspace .btn { min-height: 48px; padding: 11px 15px; font-size: 14px; }
  .rz-workspace input[type="text"],
  .rz-workspace input[type="password"],
  .rz-workspace input[type="email"],
  .rz-workspace input[type="tel"],
  .rz-workspace input[type="date"],
  .rz-workspace input[type="time"],
  .rz-workspace input[type="number"],
  .rz-workspace input[type="search"],
  .rz-workspace input[type="datetime-local"],
  .rz-workspace select,
  .rz-workspace textarea { min-height: 48px; font-size: 16px; }
  .rz-workspace .field-row,
  .rz-workspace .field-row.three { grid-template-columns: 1fr; }
  .rz-workspace .action-row,
  .rz-workspace .top-actions { align-items: stretch; }
  .rz-workspace .action-row .btn,
  .rz-workspace .top-actions .btn { flex: 1 1 100%; }
  .account-table { min-width: 0; }
  .account-table thead { display: none; }
  .account-table,
  .account-table tbody,
  .account-table tr,
  .account-table td { display: block; width: 100%; }
  .account-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .account-table td { min-width: 0 !important; padding: 6px 0; border: 0; }
}
