/* RONGTOU Global OA 2.5.70 — real workspace, not a separate preview.
   Every rule is screen-only. Existing A4 templates and print rules are untouched.
   Palette values come from rongtou-theme.js; fallbacks cover first paint. */
@media screen {
  .shell.rt-oa-shell {
    --oa-primary: var(--rt-theme-primary, #071b2f);
    --oa-secondary: var(--rt-theme-secondary, #123b61);
    --oa-accent: var(--rt-theme-accent, #c9a35a);
    --oa-accent-ink: var(--rt-theme-accentText, #805f29);
    --oa-accent-soft: var(--rt-theme-accentSoft, #f7f1e5);
    --oa-canvas: var(--rt-theme-canvas, #f2f5f8);
    --oa-panel: var(--rt-theme-panel, #fff);
    --oa-ink: var(--rt-theme-ink, #132c44);
    --oa-heading: var(--rt-theme-heading, #102c47);
    --oa-muted: var(--rt-theme-muted, #526b80);
    --oa-line: var(--rt-theme-line, #dfe7ee);
    --oa-soft: var(--rt-theme-surfaceAlt, #edf2f7);
    --oa-nav-ink: var(--rt-theme-navText, #fff);
    --oa-nav-muted: var(--rt-theme-navMuted, #c1ceda);
    --oa-hover: var(--rt-theme-hover, #f8fafc);
    min-width: 0;
    width: 100%;
    min-height: 100vh;
    background: var(--oa-canvas);
    color: var(--oa-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  .rt-oa-shell > .sidebar {
    width: 248px;
    padding: 28px 18px 22px;
    border-right: 1px solid rgba(255,255,255,.05);
    background: linear-gradient(180deg, var(--oa-primary), var(--oa-secondary));
    box-shadow: none;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .rt-oa-shell .sidebar .brand {
    gap: 11px;
    margin: 0 0 32px;
    min-width: 0;
  }
  .rt-oa-shell .sidebar .brand > div:last-child { display: block; min-width: 0; }
  html[data-rt-theme] .shell.rt-oa-shell .sidebar .brandmark,
  .rt-oa-shell .sidebar .brandmark {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--oa-accent) !important;
    background: linear-gradient(145deg, var(--oa-accent-soft), var(--oa-accent)) !important;
    color: var(--oa-primary) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.10) !important;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
  }
  .rt-oa-shell .sidebar .brand strong {
    display: block;
    color: var(--oa-nav-ink);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: .05px;
    overflow-wrap: anywhere;
  }
  .rt-oa-shell .sidebar .brand small {
    display: block;
    margin: 4px 0 0;
    color: var(--oa-nav-muted);
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: .6px;
  }
  .rt-oa-shell .rt-oa-navgroup {
    margin: 18px 12px 9px;
    color: var(--oa-nav-muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
  }
  .rt-oa-shell .sidebar .nav {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    margin: 0 0 7px;
    padding: 12px 12px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--oa-nav-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    box-shadow: none;
    white-space: normal;
    overflow-wrap: anywhere;
    transform: none;
  }
  .rt-oa-shell .sidebar .nav > svg { width: 19px; height: 19px; flex: 0 0 19px; }
  html[data-rt-theme] .rt-oa-shell .sidebar .nav.active:not(.paper):not([data-rt-paper-child]),
  .rt-oa-shell .sidebar .nav.active {
    border-left-color: var(--oa-accent) !important;
    background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.07)) !important;
    color: var(--oa-nav-ink) !important;
    box-shadow: none;
  }
  html[data-rt-theme] .rt-oa-shell .sidebar .nav.active:before,
  .rt-oa-shell .sidebar .nav.active:before { content: none; }
  .rt-oa-shell .sidebar .nav:hover { background: rgba(255,255,255,.08); }
  .rt-oa-shell .sidebar .nav:focus-visible {
    outline: 2px solid var(--oa-accent);
    outline-offset: 2px;
  }
  .rt-oa-shell .sidebar .sidebar-foot,
  .rt-oa-shell .sidebar .sidebottom {
    margin-top: auto;
    padding: 30px 9px 0;
    color: var(--oa-nav-muted);
    font-size: 11px;
    line-height: 1.8;
    overflow-wrap: normal;
  }
  .rt-oa-shell .sidebar .sidebar-foot {
    font-size: 0;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
  }
  .rt-oa-shell .sidebar .sidebar-foot > br,
  .rt-oa-shell .sidebar .sidebar-foot > hr {
    display: none !important;
  }
  .rt-oa-shell .sidebar .sidebar-foot::before {
    content: "融投环科实业投资（广东）有限公司";
    display: block;
    color: #a8bad0;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -.25px;
    white-space: nowrap;
  }
  .rt-oa-shell .sidebar .sidebar-foot::after {
    content: "RONGTOU HUANKE INDUSTRIAL INVESTMENT (GUANGDONG) CO., LTD.";
    display: block;
    margin-top: 7px;
    color: var(--oa-accent);
    font-size: 5px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    white-space: nowrap;
    text-transform: uppercase;
  }
  .rt-oa-shell > .workspace {
    flex: 1 1 auto;
    width: calc(100% - 248px);
    max-width: calc(100% - 248px);
    min-width: 0;
    margin-left: 248px;
  }
  .rt-oa-shell .workspace > .topbar {
    min-width: 0;
    min-height: 82px;
    padding: 16px 32px;
    gap: 12px;
    background: var(--oa-panel);
    border-bottom: 1px solid var(--oa-line);
    box-shadow: none;
    backdrop-filter: none;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .rt-oa-shell .topbar > * { min-width: 0; max-width: 100%; }
  .rt-oa-shell .topbar a { color: var(--oa-secondary); font-weight: 500; }
  .rt-oa-shell .topbar .rt-theme-control { margin-left: auto; }
  .rt-oa-shell .rt-oa-account { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .rt-oa-shell .rt-oa-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: var(--oa-accent-soft);
    color: var(--oa-accent-ink);
    font-size: 12px;
    font-weight: 600;
  }
  .rt-oa-shell .workspace-body {
    width: 100%;
    max-width: 1600px;
    min-width: 0;
    margin: 0 auto;
    padding: 28px 32px 56px;
  }
  .rt-oa-shell .workspace-body > .notice { overflow-wrap: anywhere; }

  .rt-oa-dashboard { min-width: 0; max-width: 100%; }
  .rt-oa-dashboard *, .rt-oa-dashboard *:before, .rt-oa-dashboard *:after { box-sizing: border-box; }
  .rt-oa-dashboard button { font-family: inherit; font-weight: 500; }
  .rt-oa-dashboard button:focus-visible {
    outline: 3px solid var(--rt-theme-focusRing, #e9dabb);
    outline-offset: 2px;
  }
  .rt-oa-dashboard button:disabled { cursor: not-allowed; opacity: .6; }
  .rt-oa-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 26px;
  }
  .rt-oa-tabs button {
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid var(--oa-line);
    border-radius: 9px;
    background: var(--oa-panel);
    color: var(--oa-muted);
    font-size: 13px;
    box-shadow: none;
  }
  .rt-oa-tabs button.active,
  .rt-oa-tabs button[aria-current="page"],
  .rt-oa-tabs button[aria-selected="true"] {
    background: var(--oa-primary);
    border-color: var(--oa-primary);
    color: #fff;
  }
  .rt-oa-pagehead {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 26px;
  }
  .rt-oa-pagehead > div { min-width: 0; }
  .rt-oa-eyebrow,
  .rt-oa-pagehead .eyebrow {
    display: block;
    margin: 0 0 6px;
    color: var(--oa-accent-ink);
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: .7px;
    font-weight: 500;
  }
  .rt-oa-dashboard h1 {
    margin: 6px 0 4px;
    font-size: 28px;
    line-height: 1.35;
    font-weight: 500;
    letter-spacing: -.5px;
    overflow-wrap: anywhere;
  }
  .rt-oa-pagehead p,
  .rt-oa-subtitle {
    margin: 0;
    color: var(--oa-muted);
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
  }
  .rt-oa-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .rt-oa-actions button { min-height: 42px; border-radius: 10px; padding: 9px 14px; font-size: 13px; }
  .rt-oa-actions button.primary { box-shadow: 0 8px 20px rgba(7,27,47,.13); }
  .rt-oa-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 14px;
  }
  .rt-oa-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 0;
    min-height: 126px;
    padding: 20px 20px 18px;
    border: 1px solid var(--oa-line);
    border-top: 3px solid var(--oa-accent);
    border-radius: 13px;
    background: var(--oa-panel);
    color: var(--oa-heading);
    text-align: left;
    box-shadow: 0 8px 22px rgba(19,44,68,.045);
    gap: 0;
  }
  button.rt-oa-metric:hover { background: var(--oa-panel); border-color: var(--oa-accent); box-shadow: 0 8px 24px rgba(19,44,68,.09); }
  .rt-oa-metric > span { display: block; color: var(--oa-muted); font-size: 13px; font-weight: 400; }
  .rt-oa-metric > strong,
  .rt-oa-metric > b { display: block; margin-top: 12px; color: var(--oa-heading); font-size: 30px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
  .rt-oa-metric small { margin-left: 5px; color: var(--oa-muted); font-size: 12px; font-weight: 400; }
  .rt-oa-metric > small { margin: 8px 0 0; font-size: 11px; }
  .rt-oa-scope {
    margin: 0 0 22px;
    color: var(--oa-muted);
    font-size: 11px;
    line-height: 1.7;
    overflow-wrap: anywhere;
  }
  .rt-oa-panel {
    min-width: 0;
    margin: 0 0 20px;
    padding: 22px;
    border: 1px solid var(--oa-line);
    border-radius: 15px;
    background: var(--oa-panel);
    box-shadow: 0 8px 26px rgba(19,44,68,.04);
  }
  .rt-oa-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
  }
  .rt-oa-panel-head h2,
  .rt-oa-panel-head strong,
  .rt-oa-panel-head b { margin: 0; color: var(--oa-heading); font-size: 16px; line-height: 1.5; font-weight: 500; }
  .rt-oa-panel-head > span { color: var(--oa-accent-ink); font-size: 10px; letter-spacing: .7px; }
  .rt-oa-panel-head button { min-height: 34px; padding: 6px 10px; font-size: 12px; box-shadow: none; }
  .rt-oa-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .rt-oa-table-scroll table { width: 100%; min-width: 530px; border-collapse: collapse; table-layout: auto; font-size: 13px; }
  .rt-oa-table-scroll th { padding: 12px 12px; background: var(--oa-soft); color: var(--oa-muted); font-size: 12px; line-height: 1.6; font-weight: 500; text-align: left; white-space: nowrap; }
  .rt-oa-table-scroll td { padding: 14px 12px; border-bottom: 1px solid var(--oa-line); color: var(--oa-ink); font-size: 13px; line-height: 1.65; vertical-align: middle; font-variant-numeric: tabular-nums; }
  .rt-oa-table-scroll td small { display: block; margin-top: 3px; color: var(--oa-muted); font-size: 11px; }
  .rt-oa-table-scroll tbody tr:last-child td { border-bottom: 0; }
  .rt-oa-table-scroll td:nth-last-child(2) { white-space: nowrap; }
  .rt-oa-rowbutton {
    justify-content: flex-start;
    min-height: 36px;
    max-width: 100%;
    padding: 4px 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--oa-heading);
    font: inherit;
    text-align: left;
    box-shadow: none;
    overflow-wrap: anywhere;
  }
  .rt-oa-rowbutton:hover { background: transparent; color: var(--oa-accent-ink); text-decoration: underline; text-underline-offset: 3px; box-shadow: none; }
  .rt-oa-status { display: inline-block; padding: 4px 9px; border-radius: 999px; background: var(--oa-soft); color: var(--oa-muted); font-size: 11px; line-height: 1.5; white-space: nowrap; }
  .rt-oa-status.is-complete,
  .rt-oa-status.is-active,
  .rt-oa-status[data-tone="success"] { background: #e9f3ef; color: #24624d; }
  .rt-oa-status.is-pending,
  .rt-oa-status[data-tone="pending"],
  .rt-oa-status[data-tone="warning"] { background: #f5efe2; color: #805f29; }
  .rt-oa-status.is-error,
  .rt-oa-status[data-tone="error"] { background: #fceeed; color: #963e36; }
  .rt-oa-activity { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .rt-oa-task {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-width: 0;
    padding: 5px 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--oa-ink);
    text-align: left;
    box-shadow: none;
  }
  button.rt-oa-task { width: 100%; }
  button.rt-oa-task:hover { background: var(--oa-hover); box-shadow: none; }
  .rt-oa-task > div,
  .rt-oa-task-copy { min-width: 0; overflow-wrap: anywhere; }
  .rt-oa-task-icon,
  .rt-oa-task > svg {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
    background: var(--oa-accent-soft);
    color: var(--oa-accent-ink);
  }
  .rt-oa-task > svg { padding: 7px; }
  .rt-oa-task-icon svg { width: 20px; height: 20px; }
  .rt-oa-task strong,
  .rt-oa-task b { display: block; margin-bottom: 2px; color: var(--oa-heading); font-size: 13px; font-weight: 500; line-height: 1.5; }
  .rt-oa-task small,
  .rt-oa-task-copy > span,
  .rt-oa-task > div > span { display: block; color: var(--oa-muted); font-size: 11px; line-height: 1.6; }
  .rt-oa-empty { margin: 0; padding: 28px 12px; color: var(--oa-muted); text-align: center; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
  .rt-oa-empty strong { display: block; margin-bottom: 5px; color: var(--oa-heading); font-size: 14px; font-weight: 500; }
  .rt-oa-error { padding: 12px 15px; margin: 0 0 15px; border: 1px solid #eed5ce; border-radius: 9px; background: #fff7f3; color: #8a4738; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
  .rt-oa-dashboard [hidden] { display: none !important; }
}

@media screen and (min-width: 1600px) {
  .rt-oa-shell > .sidebar { width: 264px; padding-left: 20px; padding-right: 20px; }
  .rt-oa-shell > .workspace { margin-left: 264px; width: calc(100% - 264px); max-width: calc(100% - 264px); }
  .rt-oa-shell .workspace-body { padding: 32px 38px 60px; }
  .rt-oa-shell .workspace > .topbar { padding-right: 38px; padding-left: 38px; }
  .rt-oa-metric { min-height: 140px; padding: 23px; }
}

@media screen and (max-width: 1100px) {
  .rt-oa-shell > .sidebar { width: 220px; padding: 24px 13px 20px; }
  .rt-oa-shell > .workspace { margin-left: 220px; width: calc(100% - 220px); max-width: calc(100% - 220px); }
  .rt-oa-shell .sidebar .brand { gap: 9px; }
  .rt-oa-shell .sidebar .brandmark { width: 39px; height: 39px; flex-basis: 39px; font-size: 22px; }
  .rt-oa-shell .sidebar .brand strong { font-size: 13px; }
  .rt-oa-shell .sidebar .brand small { font-size: 9px; letter-spacing: .3px; }
  .rt-oa-shell .workspace > .topbar { padding: 14px 24px; }
  .rt-oa-shell .workspace-body { padding: 25px 24px 52px; }
  .rt-oa-metrics { gap: 12px; }
  .rt-oa-metric { padding: 17px 14px; }
  .rt-oa-activity { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

@media screen and (min-width: 681px) and (max-width: 900px) {
  .rt-oa-shell > .sidebar { width: 200px; padding-left: 11px; padding-right: 11px; }
  .rt-oa-shell > .workspace { margin-left: 200px; width: calc(100% - 200px); max-width: calc(100% - 200px); }
  .rt-oa-shell .sidebar .brand { flex-wrap: wrap; }
  .rt-oa-shell .sidebar .nav { gap: 8px; padding: 11px 9px; font-size: 13px; }
  .rt-oa-shell .workspace-body { padding: 24px 20px 48px; }
  .rt-oa-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-oa-activity { grid-template-columns: minmax(0, 1fr); }
  .rt-oa-dashboard h1 { font-size: 25px; }
}

@media screen and (max-width: 680px) {
  .shell.rt-oa-shell { display: block; }
  .rt-oa-shell > .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 16px 14px 14px;
    gap: 6px;
    overflow: visible;
    border-right: 0;
  }
  .rt-oa-shell .sidebar .brand { grid-column: 1 / -1; margin: 0 0 10px; gap: 10px; flex-wrap: nowrap; }
  .rt-oa-shell .sidebar .brand strong { font-size: 15px; }
  .rt-oa-shell .sidebar .brand small { font-size: 10px; letter-spacing: .6px; }
  .rt-oa-shell .sidebar .brandmark { width: 41px; height: 41px; flex-basis: 41px; }
  .rt-oa-shell .sidebar .rt-oa-navgroup { grid-column: 1 / -1; margin: 7px 9px 2px; font-size: 9px; letter-spacing: .8px; }
  .rt-oa-shell .sidebar .nav { min-width: 0; min-height: 44px; margin: 0; padding: 10px 8px; gap: 7px; border-radius: 8px; font-size: 12px; line-height: 1.4; }
  .rt-oa-shell .sidebar .nav > svg { width: 17px; height: 17px; flex-basis: 17px; }
  .rt-oa-shell .sidebar .sidebar-foot,
  .rt-oa-shell .sidebar .sidebottom { display: none; }
  .rt-oa-shell > .workspace { width: 100%; max-width: 100%; margin-left: 0; }
  .rt-oa-shell .workspace > .topbar { min-height: 64px; padding: 11px 16px; gap: 8px; font-size: 12px; }
  .rt-oa-shell .topbar .rt-theme-control { margin-left: 0; }
  .rt-oa-shell .workspace-body { padding: 22px 16px 52px; }
  .rt-oa-tabs { gap: 7px; margin-bottom: 21px; }
  .rt-oa-tabs button { min-height: 42px; padding: 8px 12px; font-size: 12px; }
  .rt-oa-pagehead { margin-bottom: 20px; gap: 14px; }
  .rt-oa-dashboard h1 { font-size: 25px; letter-spacing: -.3px; }
  .rt-oa-pagehead p { font-size: 12px; }
  .rt-oa-eyebrow { font-size: 10px; }
  .rt-oa-actions { width: 100%; }
  .rt-oa-actions button { flex: 1 1 auto; min-height: 44px; padding: 10px 12px; }
  .rt-oa-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
  .rt-oa-metric { min-height: 112px; padding: 16px 14px; border-radius: 12px; }
  .rt-oa-metric > span { font-size: 12px; }
  .rt-oa-metric > strong,
  .rt-oa-metric > b { margin-top: 10px; font-size: 27px; }
  .rt-oa-metric small { font-size: 11px; }
  .rt-oa-scope { margin-bottom: 18px; font-size: 10px; }
  .rt-oa-panel { margin-bottom: 15px; padding: 17px 14px; border-radius: 13px; }
  .rt-oa-panel-head { gap: 7px; margin-bottom: 13px; }
  .rt-oa-panel-head h2,
  .rt-oa-panel-head strong { font-size: 15px; }
  .rt-oa-panel-head > span { font-size: 9px; letter-spacing: .5px; }
  .rt-oa-table-scroll table { min-width: 480px; font-size: 12px; }
  .rt-oa-table-scroll th { padding: 10px 9px; font-size: 11px; }
  .rt-oa-table-scroll td { padding: 12px 9px; font-size: 12px; }
  .rt-oa-rowbutton { min-height: 44px; }
  .rt-oa-activity { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rt-oa-task { padding: 7px 0; gap: 10px; }
  .rt-oa-task strong { font-size: 13px; }
  .rt-oa-empty { padding: 21px 5px; font-size: 12px; }
}

@media screen and (max-width: 360px) {
  .rt-oa-shell > .sidebar { padding-right: 11px; padding-left: 11px; }
  .rt-oa-shell .sidebar .nav { gap: 5px; padding-right: 6px; padding-left: 6px; font-size: 12px; }
  .rt-oa-shell .workspace-body { padding-right: 12px; padding-left: 12px; }
  .rt-oa-metric { padding-right: 11px; padding-left: 11px; }
  .rt-oa-dashboard h1 { font-size: 23px; }
}

@media screen and (prefers-reduced-motion: reduce) {
  .rt-oa-shell .sidebar .nav,
  .rt-oa-dashboard button { transition: none; }
  .rt-oa-dashboard button:active { transform: none; }
}
