/* Reference layout layer: compact enterprise OA workspace. */
:root {
  --oa-ink: var(--ui-ink, #343034);
  --oa-muted: var(--ui-muted, #716a70);
  --oa-brand: var(--ui-primary, #b8202b);
  --oa-brand-strong: var(--ui-primary, #b8202b);
  --oa-red: #b42e3b;
  --oa-red-soft: #fbf0f1;
  --oa-canvas: #f2f5f6;
  --oa-surface: #ffffff;
  --oa-line: var(--ui-primary-line, #efd0d5);
  --oa-line-soft: #e9eef0;
  --oa-green: #3f806d;
  --oa-amber: #be8a35;
  --oa-radius: 6px;
}

html, body { background: var(--oa-canvas); color: var(--oa-ink); }
body { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; font-size: 13px; }
.app-shell { grid-template-rows: 126px minmax(0, 1fr) !important; background: var(--oa-canvas); }
.app-shell.home-shell { grid-template-rows: 126px minmax(0, 1fr) !important; }
.topbar { height: 126px; display: grid; grid-template-rows: 72px 54px; align-items: stretch; background: #fff; border-bottom: 1px solid var(--oa-line); box-shadow: 0 1px 5px rgba(56, 36, 42, .04); }
.topbar-main { min-width: 0; display: flex; align-items: center; height: 72px; border-bottom: 1px solid var(--oa-line-soft); }
.brand { width: 218px; height: 72px; padding: 0 24px 0 30px; border-right: 1px solid var(--oa-line); display: flex; align-items: center; }
.brand img { width: 164px; height: auto; }
.office-context { height: 72px; min-width: 190px; display: flex; align-items: center; gap: 10px; padding: 0 18px; color: var(--oa-ink); }
.office-context .office-mark { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 4px; color: var(--oa-brand); font-size: 18px; }
.office-context b, .office-context small { display: block; white-space: nowrap; }
.office-context b { font-size: 13px; }
.office-context small { margin-top: 3px; font-size: 9px; color: var(--oa-muted); letter-spacing: .02em; }
.global-search { width: min(420px, 34vw); height: 38px; margin-left: 20px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 6px; background: #f5f7f8; color: var(--ui-muted, #716a70); }
.global-search .icon { font-size: 19px; flex: 0 0 auto; }
.global-search input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; background: transparent; color: var(--oa-ink); }
.global-search input::placeholder { color: var(--ui-muted, #716a70); }
.global-search kbd { padding: 2px 6px; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 4px; background: #fff; color: var(--ui-muted, #716a70); font-size: 10px; white-space: nowrap; }
.top-actions { height: 72px; margin-left: auto; padding: 0 28px 0 18px; display: flex; align-items: center; gap: 10px; color: var(--ui-muted, #716a70); }
.create-application { height: 38px; padding: 0 16px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--oa-brand); border-radius: 6px; background: var(--oa-brand); color: #fff; font-weight: 600; white-space: nowrap; }
.create-application:hover { background: var(--oa-brand-strong); }
.create-application .icon { font-size: 17px; }
.top-action { width: 38px; height: 38px; padding: 0; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 6px; background: #fff; color: var(--ui-muted, #716a70); display: grid; place-items: center; font-size: 18px; }
.top-action:hover { border-color: var(--ui-primary-line, #efd0d5); background: #f5f8f9; }
.notice-dot { width: 7px; height: 7px; right: 4px; top: 4px; }
.profile { min-width: 122px; height: 48px; padding: 0 4px 0 4px; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; text-align: left; }
.profile .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--oa-red); color: #fff; font-size: 14px; font-weight: 700; }
.profile b, .profile small { display: block; }
.profile b { color: var(--oa-ink); font-size: 12px; line-height: 16px; }
.profile small { color: var(--oa-muted); font-size: 9px; line-height: 13px; }
.profile-caret { position: absolute; right: 0; top: 16px; font-style: normal; color: var(--ui-muted, #716a70); }
.profile-wrap { position: relative; }
.primary-nav { grid-row: 2; height: 54px; margin: 0; padding: 0 28px; display: flex; align-items: stretch; gap: 0; background: #fff; }
.primary-nav button { min-width: 96px; height: 54px; padding: 0 18px; border: 0; border-bottom: 2px solid transparent; background: #fff; color: var(--ui-ink, #343034); font-size: 13px; }
.primary-nav button:hover { background: #f6f8f9; color: var(--oa-ink); }
.primary-nav button.active { background: #fff; color: var(--oa-red); border-bottom-color: var(--oa-red); font-weight: 700; }
.primary-nav .nav-home { min-width: 52px !important; padding: 0; color: var(--ui-muted, #716a70) !important; font-size: 20px !important; }
.primary-nav .nav-menu-item { position: relative; height: 54px; display: flex; }
.primary-nav .nav-menu-trigger { min-width: 112px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.primary-nav .nav-caret { font-size: 10px; color: var(--ui-muted, #716a70); font-style: normal; }
.primary-nav .nav-menu-item.active > .nav-menu-trigger, .primary-nav .nav-menu-trigger.active { color: var(--oa-red); border-bottom-color: var(--oa-red); }
.primary-nav .nav-dropdown { top: 54px; border: 1px solid var(--oa-line); border-top: 0; border-radius: 0 0 6px 6px; box-shadow: 0 12px 28px rgba(56, 36, 42, .13); }
.primary-nav .nav-dropdown-link { min-width: 150px; height: 38px; text-align: left; justify-content: flex-start; font-size: 12px; }
.primary-nav .nav-spacer { flex: 1; border-right: 1px solid var(--oa-line-soft); }
.primary-nav .nav-utility { min-width: 96px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; }
.primary-nav .nav-utility .icon { font-size: 17px; }
.mobile-menu { display: none; }
.nav-backdrop { display: none; }
.tab-strip { display: none !important; }
.workspace-wrap { min-height: 0; grid-row: 2 !important; padding: 0 30px 24px; }
.workspace { height: 100%; min-height: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden; }
.page { min-height: 100%; background: var(--oa-canvas); }
.page-body { padding: 24px 0; }
.page-heading { margin: 0 0 16px; }
.page-title { color: var(--oa-ink); font-size: 23px; font-weight: 700; }
.page-subtitle { color: var(--oa-muted); font-size: 12px; }
.btn { height: 34px; border-radius: 5px; font-size: 12px; }
.btn-primary, .btn-strong { background: var(--oa-brand); border-color: var(--oa-brand); }
.btn-primary:hover, .btn-strong:hover { background: var(--oa-brand-strong); }
.btn-outline { border-color: var(--ui-primary-line, #efd0d5); color: var(--oa-brand); background: #fff; }
.btn-ghost { color: var(--ui-muted, #716a70); background: #f6f8f9; }
.search-box { height: 36px; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 5px; background: #fff; }
.search-box input { padding: 0 12px; }
.filter-select { height: 36px; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 5px; background: #fff; color: var(--ui-muted, #716a70); }
.table-frame, .project-table-frame, .filing-approval-table-frame { border-color: var(--oa-line); border-radius: 6px; background: #fff; }
.data-table th, .project-table th, .filing-approval-table th { height: 42px; background: #f5f7f8; color: var(--ui-muted, #716a70); font-size: 11px; font-weight: 600; border-color: var(--oa-line-soft); }
.data-table td, .project-table td, .filing-approval-table td { height: 50px; border-color: var(--oa-line-soft); font-size: 12px; color: var(--ui-ink, #343034); }
.data-table tr:hover td, .project-table tr:hover td, .filing-approval-table tr:hover td { background: #fbfcfc; }
.status { font-size: 11px; }
.status:before { width: 7px; height: 7px; }

/* Dashboard */
.home-shell .workspace { overflow: auto; }
.original-home { padding: 24px 0 42px; }
.home-shortcuts-head { display: flex; align-items: flex-end; justify-content: space-between; max-width: 1310px; margin: 0 auto 14px; }
.home-shortcuts-head h1 { margin: 0; color: var(--oa-ink); font-size: 23px; }
.home-shortcuts-head::after { content: "今日工作重点"; position: absolute; margin-left: 120px; margin-top: 4px; color: var(--oa-muted); font-size: 11px; }
.home-shortcuts-actions { display: none; }
.home-shortcuts { width: min(1310px, 100%); height: auto; max-width: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home-shortcuts::before { content: ""; grid-column: 1 / -1; height: 92px; order: -1; background: #fff; border: 1px solid var(--oa-line); border-radius: 6px; box-shadow: 0 2px 5px rgba(56, 36, 42, .03); }
.home-shortcuts .quick-item { width: auto; height: 96px; min-height: 96px; margin: 0; padding: 0 20px; display: flex; align-items: center; justify-content: flex-start; gap: 14px; border: 1px solid var(--oa-line); border-radius: 6px; background: #fff; box-shadow: 0 2px 5px rgba(56, 36, 42, .03); color: var(--oa-ink); text-align: left; }
.home-shortcuts .quick-item:hover { border-color: var(--ui-primary-line, #efd0d5); background: #fff; box-shadow: 0 6px 15px rgba(56, 36, 42, .08); transform: translateY(-1px); }
.home-shortcuts .quick-item img { width: 40px; height: 40px; margin: 0; object-fit: contain; }
.home-shortcuts .quick-item span { color: var(--oa-ink); font-size: 13px; font-weight: 600; }
.home-shortcuts .home-settings-quick { display: none; }

/* List and approval surfaces */
.project-page, .approval-page { min-height: 100%; padding: 24px 0 30px; background: var(--oa-canvas); }
.project-page .project-sidebar { width: 176px; margin-right: 16px; padding: 8px; border: 1px solid var(--oa-line); border-radius: 6px; background: #fff; }
.project-page .project-sidebar button { height: 38px; border-radius: 4px; color: var(--ui-muted, #716a70); }
.project-page .project-sidebar button.active { background: #e9f1f4; color: var(--oa-brand); font-weight: 700; }
.project-page .project-main { min-width: 0; }
.project-page .project-main-inner { min-width: 0; }
.project-page .project-toolbar { min-height: 42px; margin-bottom: 14px; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-page .project-toolbar-left, .project-page .project-toolbar-right { display: flex; align-items: center; gap: 8px; }
.project-search { width: 310px; height: 36px; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 5px; background: #fff; }
.project-search input { height: 100%; padding: 0 10px; }
.project-toolbar select, .project-period-button, .project-filing-button { height: 36px; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 5px; background: #fff; color: var(--ui-muted, #716a70); }
.project-filing-button { background: var(--oa-brand); border-color: var(--oa-brand); color: #fff; }
.project-toolbar .project-export-button, .project-toolbar .project-columns-button, .project-toolbar .project-reset-button, .project-toolbar .project-advanced-button { width: 36px; height: 36px; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 5px; background: #fff; color: var(--ui-muted, #716a70); }
.project-table-frame { min-height: 0; }
.project-table { min-width: 1100px !important; }
.project-table .project-column-name, .project-table .project-column-code { color: var(--oa-brand); font-weight: 600; }
.project-table .project-column-status .status { white-space: nowrap; }
.project-bottom { min-height: 52px; display: flex; align-items: center; justify-content: flex-end; background: #fff; border: 1px solid var(--oa-line); border-top: 0; border-radius: 0 0 6px 6px; }
.project-pagination { font-size: 11px; color: var(--oa-muted); }
.approval-page { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) !important; gap: 14px; }
.approval-process-nav { min-height: 44px; border: 1px solid var(--oa-line); border-radius: 6px; background: #fff; }
.approval-process-scroll { display: flex; align-items: center; overflow-x: auto; }
.approval-process-item { position: relative; }
.approval-process-trigger { height: 44px; padding: 0 16px; border-bottom: 2px solid transparent; color: var(--ui-muted, #716a70); }
.approval-process-item.active .approval-process-trigger { color: var(--oa-red); border-bottom-color: var(--oa-red); }
.approval-process-trigger i { display: none; }
.approval-process-dropdown { top: 44px; left: 0; z-index: 22; border: 1px solid var(--oa-line); box-shadow: 0 12px 24px rgba(56, 36, 42, .12); }
.approval-content { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--oa-line); border-radius: 6px; background: #fff; overflow: hidden; }
.approval-head { padding: 0; }
.filing-approval-toolbar { min-height: 60px; padding: 12px 16px; border-bottom: 1px solid var(--oa-line-soft); }
.filing-approval-search { width: 310px; height: 36px; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 5px; }
.filing-approval-search input { height: 100%; }
.filing-approval-apply { height: 36px; padding: 0 14px; border-radius: 5px; background: var(--oa-brand); color: #fff; }
.filing-approval-advanced-button, .filing-approval-reset, .filing-approval-export-wrap > button, .filing-approval-columns-wrap > button { width: 36px; height: 36px; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 5px; background: #fff; color: var(--ui-muted, #716a70); }
.filing-approval-body { padding: 0; overflow: auto; }
.filing-approval-table { min-width: 1120px !important; }
.filing-approval-table .filing-approval-name, .filing-approval-link { color: var(--oa-ink); font-weight: 600; }
.filing-approval-table .filing-approval-link:hover { color: var(--oa-brand); }
.filing-approval-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.filing-approval-status i { width: 7px; height: 7px; border-radius: 50%; background: #bd8b39; }
.filing-approval-status.success i { background: var(--oa-green); }
.filing-approval-status.danger i { background: var(--oa-red); }
.filing-approval-pagination { min-height: 52px; }

.approval-process-nav { width: 100% !important; height: auto !important; min-width: 0 !important; padding: 0 !important; overflow: hidden !important; }
.approval-process-scroll { width: 100%; height: 44px; padding: 0 8px; gap: 0; border-bottom: 1px solid var(--oa-line-soft); box-sizing: border-box; scrollbar-width: none; }
.approval-process-scroll::-webkit-scrollbar { display: none; }
.approval-process-item { width: auto !important; min-width: max-content; height: 44px !important; flex: 0 0 auto; }
.approval-process-trigger { width: auto !important; min-width: 78px; height: 44px !important; padding: 0 11px !important; text-align: center !important; }
.approval-process-dropdown { display: none !important; }
.approval-view-tabs { min-height: 40px; padding: 0 14px; display: flex; align-items: stretch; gap: 24px; overflow-x: auto; }
.approval-view-tabs .approval-process-view { min-width: max-content; height: 40px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: #fff; color: var(--ui-muted, #716a70); font-size: 11px; }
.approval-view-tabs .approval-process-view.active { color: var(--oa-red); border-bottom-color: var(--oa-red); font-weight: 700; }

/* Project workspace */
.project-workspace-page { height: 100%; grid-template-rows: auto auto minmax(0, 1fr); background: var(--oa-canvas); }
.pw-hero { min-height: 96px; padding: 18px 22px; background: #fff; border: 1px solid var(--oa-line); border-radius: 6px 6px 0 0; color: var(--oa-ink); }
.pw-hero-title h1 { color: var(--oa-ink); font-size: 20px; font-weight: 700; }
.pw-hero-title h1::before { content: ""; display: inline-block; width: 34px; height: 34px; margin-right: 12px; vertical-align: -10px; border-radius: 5px; background: #e8f0f3; box-shadow: inset 0 0 0 1px var(--ui-primary-soft, #fbeaec); }
.pw-hero-meta { margin-top: 8px; }
.pw-hero-meta > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pw-hero-meta > div > span { padding: 3px 8px; border-radius: 12px; background: #f0f4f5; color: var(--ui-muted, #716a70); font-size: 10px; }
.pw-hero-meta > div > span.success { background: #eaf4ef; color: var(--oa-green); }
.pw-hero-meta > div > span.danger { background: var(--oa-red-soft); color: var(--oa-red); }
.pw-tabs { min-height: 44px; padding: 0 20px; border: 1px solid var(--oa-line); border-top: 0; background: #fff; }
.pw-tabs button { height: 44px; padding: 0 16px; border-bottom: 2px solid transparent; color: var(--ui-muted, #716a70); font-size: 12px; }
.pw-tabs button.active { color: var(--oa-red); border-bottom-color: var(--oa-red); background: #fff; }
.pw-scroll { padding: 14px 0 30px; background: var(--oa-canvas); overflow: auto; }
.pw-basic { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.pw-section { border: 1px solid var(--oa-line); border-radius: 6px; background: #fff; }
.pw-section:first-child { grid-column: 1; }
.pw-section:nth-child(2) { grid-column: 2; grid-row: 1; }
.pw-section:nth-child(3) { grid-column: 2; grid-row: 2; }
.pw-section header { min-height: 46px; padding: 0 16px; border-bottom: 1px solid var(--oa-line-soft); }
.pw-section header h2 { color: var(--oa-ink); font-size: 14px; font-weight: 700; }
.pw-section-body { padding: 12px 16px; }
.pw-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; }
.pw-info-grid > div { min-height: 38px; border-bottom: 1px solid #eef2f3; }
.pw-info-grid dt { color: var(--ui-muted, #716a70); font-size: 11px; }
.pw-info-grid dd { color: var(--oa-ink); font-size: 12px; font-weight: 600; }
.pw-basic > .pw-close-row { grid-column: 1 / -1; }
.pw-table-frame { border-color: var(--oa-line); border-radius: 5px; }
.pw-table-frame th { background: #f5f7f8; color: var(--ui-muted, #716a70); }
.pw-table-frame td { height: 42px; border-color: var(--oa-line-soft); }

@media (max-width: 1180px) {
  .brand { width: 190px; padding-left: 18px; padding-right: 14px; }
  .brand img { width: 150px; }
  .office-context { display: none; }
  .global-search { width: min(330px, 28vw); margin-left: 8px; }
  .primary-nav { padding: 0 12px; }
  .primary-nav button { min-width: 76px; padding: 0 10px; }
  .primary-nav .nav-menu-trigger { min-width: 86px; }
  .workspace-wrap { padding-right: 18px; padding-left: 18px; }
  .home-shortcuts { gap: 12px; }
}

@media (max-width: 820px) {
  .app-shell, .app-shell.home-shell { grid-template-rows: 60px minmax(0, 1fr) !important; height: auto; min-height: 100dvh; }
  .topbar { height: 60px; display: block; }
  .topbar-main { height: 60px; }
  .mobile-menu { width: 42px; height: 60px; display: block; padding: 0; border: 0; background: transparent; color: var(--oa-ink); font-size: 20px; }
  .brand { width: auto; flex: 1; height: 60px; padding: 0 8px; border-right: 0; }
  .brand img { width: 132px; }
  .office-context, .global-search, .create-application, .top-actions .top-action:first-of-type { display: none; }
  .top-actions { height: 60px; padding: 0 8px; gap: 5px; }
  .top-actions .top-action { display: grid; width: 34px; height: 34px; }
  .profile { min-width: 36px; width: 36px; padding: 0; }
  .profile > span { display: none; }
  .profile-caret { display: none; }
  .primary-nav { position: fixed; z-index: 80; inset: 60px auto 0 0; width: 260px; height: auto; padding: 8px; display: none; flex-direction: column; align-items: stretch; overflow: auto; box-shadow: 12px 0 28px rgba(56, 36, 42, .2); }
  .primary-nav.open { display: flex; }
  .primary-nav button, .primary-nav .nav-menu-item { min-height: 46px; height: 46px; text-align: left; justify-content: flex-start; }
  .primary-nav .nav-menu-trigger { width: 100%; justify-content: flex-start; padding-left: 14px; }
  .primary-nav .nav-dropdown { position: static; display: none; border: 0; box-shadow: none; }
  .primary-nav .nav-menu-item.mobile-open .nav-dropdown { display: block; }
  .primary-nav .nav-dropdown-link { width: 100%; height: 38px; padding-left: 34px; }
  .primary-nav .nav-spacer { display: none; }
  .primary-nav .nav-utility { padding-left: 14px; }
  .nav-backdrop { position: fixed; z-index: 70; inset: 60px 0 0 0; display: block; border: 0; background: rgba(45, 41, 45, .25); }
  .workspace-wrap { padding: 0; }
  .workspace { min-height: calc(100dvh - 60px); overflow: auto; }
  .page-body { padding: 16px 12px; }
  .original-home { padding: 16px 12px 30px; }
  .home-shortcuts-head { margin-bottom: 12px; }
  .home-shortcuts-head h1 { font-size: 19px; }
  .home-shortcuts-head::after { margin-left: 100px; }
  .home-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-shortcuts::before { height: 74px; }
  .home-shortcuts .quick-item { height: 76px; min-height: 76px; padding: 0 12px; gap: 9px; }
  .home-shortcuts .quick-item img { width: 30px; height: 30px; }
  .home-shortcuts .quick-item span { font-size: 12px; }
  .project-page, .approval-page { padding: 16px 0 24px; }
  .project-page .project-sidebar { width: 100%; margin: 0 0 10px; display: flex; overflow-x: auto; }
  .project-page .project-sidebar button { min-width: 100px; }
  .project-page .project-toolbar { align-items: stretch; flex-direction: column; }
  .project-page .project-toolbar-left, .project-page .project-toolbar-right { width: 100%; flex-wrap: wrap; }
  .project-search, .filing-approval-search { width: 100%; }
  .project-page .project-toolbar-right select { flex: 1; min-width: 100px; }
  .approval-process-scroll { overflow-x: auto; }
  .filing-approval-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .filing-approval-toolbar-left, .filing-approval-toolbar-right { width: 100%; flex-wrap: wrap; }
  .filing-approval-toolbar-right { justify-content: flex-start; }
  .project-workspace-page { height: auto; min-height: calc(100dvh - 60px); grid-template-rows: auto auto auto; }
  .pw-hero { border-radius: 0; padding: 14px; }
  .pw-hero-title h1 { font-size: 17px; }
  .pw-tabs { padding: 0 8px; overflow-x: auto; white-space: nowrap; }
  .pw-tabs button { min-width: max-content; padding: 0 11px; }
  .pw-scroll { padding: 10px; overflow: visible; }
  .pw-basic { display: block; }
  .pw-section { margin-bottom: 10px; }
  .pw-info-grid { grid-template-columns: 1fr; }
  .pw-section:nth-child(2), .pw-section:nth-child(3) { grid-column: auto; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Dashboard composition */
.office-context small, .oa-eyebrow, .oa-detail-kicker, .pw-section-kicker { letter-spacing: 0; }
.oa-dashboard { width: min(1440px, 100%); margin: 0 auto; padding: 24px 30px 44px; box-sizing: border-box; }
.oa-dashboard-heading, .oa-project-heading { min-height: 66px; margin-bottom: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.oa-dashboard-heading h1, .oa-project-heading h1 { margin: 2px 0 4px; color: var(--oa-ink); font-size: 24px; line-height: 32px; }
.oa-eyebrow, .oa-detail-kicker, .pw-section-kicker { margin: 0; color: var(--ui-muted, #716a70); font-size: 9px; font-weight: 700; line-height: 14px; }
.oa-muted { margin: 0; color: var(--oa-muted); font-size: 12px; line-height: 18px; }
.oa-heading-side { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.oa-heading-side time { margin-right: 8px; color: var(--ui-muted, #716a70); font-size: 11px; white-space: nowrap; }
.oa-primary-button, .oa-secondary-button, .oa-text-button, .oa-icon-button { border-radius: 5px; font: inherit; }
.oa-primary-button, .oa-secondary-button { min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.oa-primary-button { border: 1px solid var(--oa-brand); background: var(--oa-brand); color: #fff; }
.oa-primary-button:hover { background: var(--oa-brand-strong); }
.oa-secondary-button { border: 1px solid var(--ui-primary-line, #efd0d5); background: #fff; color: var(--ui-muted, #716a70); }
.oa-secondary-button:hover { border-color: var(--ui-primary-line, #efd0d5); background: #f7f9fa; }
.oa-text-button { padding: 6px 0; display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--oa-brand); font-size: 11px; white-space: nowrap; }
.oa-icon-button { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border: 1px solid var(--ui-primary-line, #efd0d5); background: #fff; color: var(--ui-muted, #716a70); }
.oa-metric-strip { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--oa-line); border-radius: var(--oa-radius); background: #fff; }
.oa-metric-strip > button { min-width: 0; min-height: 106px; padding: 20px 24px; position: relative; display: grid; grid-template-columns: 1fr auto 16px; align-content: center; gap: 4px 12px; border: 0; border-right: 1px solid var(--oa-line-soft); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.oa-metric-strip > button:last-child { border-right: 0; }
.oa-metric-strip > button > .icon { grid-column: 3; grid-row: 1 / 3; align-self: center; color: var(--ui-muted, #716a70); font-size: 14px; transition: transform .16s ease, color .16s ease; }
.oa-metric-strip > button:hover { background: #f7faf8; }
.oa-metric-strip > button:hover > .icon { color: var(--oa-accent); transform: translateX(2px); }
.oa-metric-strip > button:focus-visible { z-index: 1; outline: 2px solid var(--oa-accent); outline-offset: -2px; }
.oa-metric-strip span { color: var(--ui-muted, #716a70); font-size: 11px; }
.oa-metric-strip b { grid-column: 1; color: var(--oa-ink); font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; line-height: 34px; }
.oa-metric-strip b.red { color: var(--oa-red); }
.oa-metric-strip small { grid-column: 2; grid-row: 2; align-self: end; padding-bottom: 4px; color: var(--ui-muted, #716a70); font-size: 10px; }
.oa-metric-strip em { color: var(--oa-green); font-style: normal; }
.red-text { color: var(--oa-red) !important; }
.green-text { color: var(--oa-green) !important; }
.blue-text { color: var(--oa-brand) !important; }
.amber-text { color: var(--oa-amber) !important; }
.oa-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); gap: 16px; align-items: start; }
.oa-dashboard-main { min-width: 0; display: grid; gap: 16px; }
.oa-dashboard-side { min-width: 0; display: grid; gap: 16px; }
.oa-panel { border: 1px solid var(--oa-line); border-radius: var(--oa-radius); background: #fff; box-shadow: 0 2px 7px rgba(56, 36, 42, .035); }
.oa-panel-head { min-height: 58px; padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--oa-line-soft); }
.oa-panel-head h2 { margin: 0; color: var(--oa-ink); font-size: 14px; line-height: 21px; }
.oa-queue-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oa-queue-item { min-width: 0; min-height: 104px; padding: 18px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 16px; align-items: center; gap: 12px; border: 0; border-right: 1px solid var(--oa-line-soft); border-bottom: 1px solid var(--oa-line-soft); background: #fff; text-align: left; }
.oa-queue-item:nth-child(2n) { border-right: 0; }
.oa-queue-item:nth-last-child(-n+2) { border-bottom: 0; }
.oa-queue-item:hover { background: #f8fafb; }
.oa-queue-count { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 5px; background: #edf3f5; color: var(--oa-brand); font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
.oa-queue-count.red { background: var(--oa-red-soft); color: var(--oa-red); }
.oa-queue-count.amber { background: #fbf5e9; color: var(--oa-amber); }
.oa-queue-count.green { background: #edf5f1; color: var(--oa-green); }
.oa-queue-copy { min-width: 0; }
.oa-queue-copy b, .oa-queue-copy small { display: block; }
.oa-queue-copy b { color: var(--oa-ink); font-size: 12px; }
.oa-queue-copy small { margin-top: 5px; color: var(--oa-muted); font-size: 10px; }
.oa-queue-item > .icon { color: var(--ui-muted, #716a70); font-size: 13px; }
.oa-agenda-panel { min-height: 246px; }
.oa-agenda-date { margin: 14px 16px 0; display: flex; align-items: center; gap: 10px; }
.oa-agenda-date > b { color: var(--oa-red); font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 500; line-height: 36px; }
.oa-agenda-date span, .oa-agenda-date small { display: block; }
.oa-agenda-date span { color: var(--oa-ink); font-size: 11px; font-weight: 600; }
.oa-agenda-date small { margin-top: 2px; color: var(--oa-muted); font-size: 9px; font-weight: 400; }
.oa-agenda-panel ul, .pw-task-panel ul { margin: 10px 0 0; padding: 0; list-style: none; }
.oa-agenda-panel li { min-height: 50px; margin: 0 16px; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; border-top: 1px solid var(--oa-line-soft); }
.oa-agenda-panel li b, .oa-agenda-panel li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-agenda-panel li b { color: var(--oa-ink); font-size: 11px; }
.oa-agenda-panel li small { margin-top: 2px; color: var(--oa-muted); font-size: 9px; }
.agenda-time { color: var(--oa-brand); font-family: Georgia, "Times New Roman", serif; font-size: 11px; }
.oa-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oa-quick-action { min-width: 0; height: 54px; padding: 0 12px; display: grid; grid-template-columns: 28px minmax(0, 1fr) 12px; align-items: center; gap: 8px; border: 0; border-right: 1px solid var(--oa-line-soft); border-bottom: 1px solid var(--oa-line-soft); background: #fff; color: var(--ui-ink, #343034); text-align: left; font-size: 11px; }
.oa-quick-action:nth-child(2n) { border-right: 0; }
.oa-quick-action:hover { background: #f8fafb; color: var(--oa-brand); }
.oa-quick-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; background: #edf3f5; }
.oa-quick-icon img { width: 23px; height: 23px; object-fit: contain; }
.oa-quick-action > .icon { color: var(--ui-muted, #716a70); font-size: 11px; }
.oa-project-panel { margin-top: 0; overflow: hidden; }
.oa-table-wrap { overflow-x: auto; }
.oa-project-panel table { width: 100%; min-width: 760px; border-collapse: collapse; }
.oa-project-panel th { height: 40px; padding: 0 16px; background: #f5f7f8; color: var(--ui-muted, #716a70); font-size: 10px; font-weight: 600; text-align: left; }
.oa-project-panel td { height: 58px; padding: 0 16px; border-top: 1px solid var(--oa-line-soft); color: var(--ui-ink, #343034); font-size: 11px; }
.oa-project-panel td:first-child { min-width: 260px; }
.oa-project-panel td:first-child small { margin-top: 3px; display: block; color: var(--oa-muted); font-size: 9px; }
.oa-project-name { padding: 0; border: 0; background: transparent; color: var(--oa-ink); font-size: 12px; font-weight: 600; text-align: left; }
.oa-project-name:hover { color: var(--oa-brand); }
.oa-status { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 10px; background: #eef5f2; color: var(--oa-green); font-size: 9px; white-space: nowrap; }
.oa-status.pending { background: #fbf4e7; color: #a87524; }
.oa-status.danger { background: var(--oa-red-soft); color: var(--oa-red); }

/* Project portfolio */
.project-page { height: auto; display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 14px !important; align-content: start; }
.oa-project-heading { grid-column: 1; grid-row: 1; margin-bottom: 0; }
.project-page .project-sidebar { grid-column: 1; grid-row: 2; width: auto; min-width: 0; height: 42px; margin: 0; padding: 3px; display: flex; align-items: center; gap: 2px; overflow-x: auto; }
.project-page .project-sidebar button { width: auto; min-width: 104px; height: 34px; padding: 0 16px; text-align: center; }
.oa-project-metrics { grid-column: 1; grid-row: 3; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--oa-line); border-radius: var(--oa-radius); background: #fff; }
.oa-project-metrics > div { min-height: 82px; padding: 13px 18px; display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 2px 10px; border-right: 1px solid var(--oa-line-soft); }
.oa-project-metrics > div:last-child { border-right: 0; }
.oa-project-metrics span { grid-column: 1; color: var(--ui-muted, #716a70); font-size: 10px; }
.oa-project-metrics b { grid-column: 1; color: var(--oa-ink); font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 500; line-height: 28px; }
.oa-project-metrics small { grid-column: 2; grid-row: 2; align-self: end; padding-bottom: 3px; color: var(--ui-muted, #716a70); font-size: 9px; }
.project-page .project-main { grid-column: 1; grid-row: 4; width: 100%; min-height: 0; }
.project-page-my { grid-template-rows: auto auto minmax(0, 1fr); }
.project-page-my .oa-project-metrics { grid-row: 2; }
.project-page-my .project-main { grid-row: 3; }
.project-page .project-main-inner { padding: 14px; border: 1px solid var(--oa-line); border-radius: var(--oa-radius); background: #fff; }
.project-page .project-toolbar { flex-wrap: wrap; }

/* Approval split view */
.oa-approval-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.oa-approval-layout .approval-content { min-height: 560px; }
.oa-approval-detail { min-width: 0; padding: 20px; border: 1px solid var(--oa-line); border-radius: var(--oa-radius); background: #fff; }
.oa-detail-title-row { margin-top: 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.oa-detail-title-row h2 { min-width: 0; margin: 0; color: var(--oa-ink); font-size: 16px; line-height: 23px; }
.oa-detail-client { margin: 6px 0 18px; color: var(--oa-muted); font-size: 10px; }
.oa-approval-detail dl { margin: 0; padding: 4px 0; border-top: 1px solid var(--oa-line-soft); border-bottom: 1px solid var(--oa-line-soft); }
.oa-approval-detail dl > div { min-height: 36px; display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 8px; }
.oa-approval-detail dt { color: var(--ui-muted, #716a70); font-size: 10px; }
.oa-approval-detail dd { margin: 0; overflow-wrap: anywhere; color: var(--ui-ink, #343034); font-size: 11px; font-weight: 600; }
.oa-detail-progress { margin-top: 18px; }
.oa-detail-progress > div:first-child { display: flex; justify-content: space-between; color: var(--ui-muted, #716a70); font-size: 10px; }
.oa-progress-track { height: 4px; margin: 9px 0 14px; overflow: hidden; border-radius: 2px; background: #e7edef; }
.oa-progress-track i { height: 100%; display: block; background: var(--oa-brand); }
.oa-detail-progress ol { margin: 0; padding: 0; list-style: none; }
.oa-detail-progress li { min-height: 48px; padding-left: 20px; position: relative; }
.oa-detail-progress li::before { content: ""; width: 8px; height: 8px; position: absolute; left: 0; top: 4px; border: 2px solid var(--ui-primary-line, #efd0d5); border-radius: 50%; background: #fff; }
.oa-detail-progress li::after { content: ""; width: 1px; height: 30px; position: absolute; left: 5px; top: 16px; background: #dce4e7; }
.oa-detail-progress li:last-child::after { display: none; }
.oa-detail-progress li.current::before { border-color: var(--oa-red); background: var(--oa-red); }
.oa-detail-progress li b, .oa-detail-progress li small { display: block; }
.oa-detail-progress li b { color: var(--ui-ink, #343034); font-size: 10px; }
.oa-detail-progress li small { margin-top: 2px; color: var(--ui-muted, #716a70); font-size: 9px; }
.oa-detail-actions { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Project detail context */
.pw-hero { position: relative; padding-right: 330px; }
.pw-hero-title, .pw-hero-meta { justify-content: flex-start; }
.pw-hero-meta > .pw-button { margin-left: auto; }
.pw-hero-actions { position: absolute; right: 18px; top: 18px; display: flex; align-items: center; gap: 8px; }
.pw-hero-actions .pw-button { height: 32px; border-color: var(--ui-primary-line, #efd0d5); background: #fff; color: var(--ui-muted, #716a70); }
.pw-basic { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.pw-basic-main, .pw-basic-side { min-width: 0; display: grid; gap: 14px; }
.pw-basic-side { grid-template-columns: minmax(0, 1fr); }
.pw-basic-side .pw-section:nth-child(2) { grid-column: auto; grid-row: auto; }
.pw-basic .pw-section { margin: 0; }
.pw-basic > .pw-close-row { grid-column: 1 / -1; }
.pw-stage-panel, .pw-task-panel { border: 1px solid var(--oa-line); border-radius: var(--oa-radius); background: #fff; }
.pw-stage-panel > header, .pw-task-panel > header { min-height: 50px; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--oa-line-soft); }
.pw-stage-panel h2, .pw-task-panel h2 { margin: 0; color: var(--oa-ink); font-size: 14px; line-height: 20px; }
.pw-stage-panel ol { min-height: 116px; margin: 0; padding: 24px 18px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; }
.pw-stage-panel li { min-width: 0; position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center; }
.pw-stage-panel li::after { content: ""; height: 1px; position: absolute; z-index: 0; top: 13px; left: calc(50% + 16px); right: calc(-50% + 16px); background: var(--ui-primary-soft, #fbeaec); }
.pw-stage-panel li:last-child::after { display: none; }
.pw-stage-panel li > span { width: 27px; height: 27px; z-index: 1; display: grid; place-items: center; border: 1px solid var(--ui-primary-line, #efd0d5); border-radius: 50%; background: #fff; color: var(--ui-muted, #716a70); font-size: 10px; }
.pw-stage-panel li.done > span { border-color: var(--oa-green); background: var(--oa-green); color: #fff; }
.pw-stage-panel li.current > span { border-color: var(--oa-red); background: var(--oa-red); color: #fff; }
.pw-stage-panel li b { width: 100%; overflow: hidden; color: var(--ui-muted, #716a70); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pw-stage-panel li small { color: var(--ui-muted, #716a70); font-size: 9px; }
.pw-task-panel ul { margin: 0; padding: 0 16px; }
.pw-task-panel li { min-height: 54px; display: grid; grid-template-columns: 9px minmax(0, 1fr) 14px; align-items: center; gap: 10px; border-bottom: 1px solid var(--oa-line-soft); }
.pw-task-panel li:last-child { border-bottom: 0; }
.pw-task-panel li b, .pw-task-panel li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-task-panel li b { color: var(--ui-ink, #343034); font-size: 11px; }
.pw-task-panel li small { margin-top: 3px; color: var(--ui-muted, #716a70); font-size: 9px; }
.pw-task-panel li > .icon { color: var(--ui-muted, #716a70); font-size: 11px; }
.pw-task-state { width: 8px; height: 8px; border-radius: 50%; background: var(--oa-amber); }
.pw-task-state.success { background: var(--oa-green); }
.pw-task-state.danger { background: var(--oa-red); }

@media (max-width: 1180px) {
  .oa-dashboard-grid { grid-template-columns: minmax(0, 1fr) 310px; }
  .oa-project-metrics > div { padding-right: 12px; padding-left: 12px; }
  .oa-project-metrics small { display: none; }
  .oa-approval-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .pw-basic { grid-template-columns: minmax(0, 1fr) 290px; }
}

@media (max-width: 900px) {
  .oa-dashboard { padding-right: 14px; padding-left: 14px; }
  .oa-dashboard-grid, .oa-approval-layout, .pw-basic { grid-template-columns: minmax(0, 1fr); }
  .oa-dashboard-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oa-approval-detail { order: -1; }
  .pw-hero { padding-right: 18px; }
  .pw-hero-actions { margin-top: 12px; position: static; }
}

@media (max-width: 820px) {
  .oa-dashboard-heading, .oa-project-heading { min-height: 0; align-items: flex-start; flex-direction: column; gap: 10px; }
  .oa-heading-side { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .oa-heading-side time { width: 100%; }
  .oa-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oa-metric-strip > button { min-height: 88px; padding: 14px; border-bottom: 1px solid var(--oa-line-soft); }
  .oa-metric-strip > button:nth-child(2n) { border-right: 0; }
  .oa-metric-strip > button:nth-last-child(-n+2) { border-bottom: 0; }
  .oa-metric-strip b { font-size: 25px; }
  .oa-metric-strip small { display: none; }
  .oa-dashboard-side { grid-template-columns: minmax(0, 1fr); }
  .oa-queue-list { grid-template-columns: minmax(0, 1fr); }
  .oa-queue-item { min-height: 82px; border-right: 0; }
  .oa-queue-item:nth-last-child(2) { border-bottom: 1px solid var(--oa-line-soft); }
  .oa-project-heading, .oa-project-metrics, .project-page .project-sidebar { margin-right: 12px; margin-left: 12px; }
  .oa-project-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oa-project-metrics > div { min-height: 70px; border-bottom: 1px solid var(--oa-line-soft); }
  .oa-project-metrics > div:nth-child(2n) { border-right: 0; }
  .oa-project-metrics > div:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .project-page .project-main-inner { padding: 12px 0; border-right: 0; border-left: 0; border-radius: 0; }
  .oa-approval-layout { gap: 10px; }
  .oa-approval-detail { margin: 0 12px; }
  .pw-basic-main, .pw-basic-side { gap: 10px; }
  .pw-stage-panel ol { padding-right: 8px; padding-left: 8px; }
  .pw-stage-panel li b { white-space: normal; }
}

@media (max-width: 520px) {
  .oa-quick-grid { grid-template-columns: minmax(0, 1fr); }
  .oa-quick-action { border-right: 0; }
  .oa-project-panel th, .oa-project-panel td { padding-right: 12px; padding-left: 12px; }
  .oa-detail-actions { grid-template-columns: minmax(0, 1fr); }
  .pw-stage-panel ol { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 10px 16px; }
  .pw-stage-panel li { min-height: 46px; grid-template-columns: 28px minmax(0, 1fr); justify-items: start; align-items: center; gap: 0 10px; text-align: left; }
  .pw-stage-panel li > span { grid-row: 1 / 3; }
  .pw-stage-panel li::after { width: 1px; height: 20px; top: 34px; left: 13px; right: auto; }
  .pw-stage-panel li b { width: auto; }
}
