/* Mastdan / RPA workspace visual language. Layouts retain CT's existing workflows. */
:root {
  --primary: #0755f5;
  --primary-hover: #0048dd;
  --ink: #172d4e;
  --muted: #64748b;
  --secondary: #526a8c;
  --line: #e2eaf5;
  --surface: #fff;
  --bg: #fff;
  --wash: #f5f8fc;
  --sidebar: 238px;
  --radius: 11px;
  --green: var(--primary);
  --green-dark: var(--primary-hover);
  --green-pale: #edf4ff;
  --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
body, body.feedback-app { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.65; --muted: #64748b; }
button, input, select, textarea { font-family: inherit; }
::selection { background: #d3e5ff; color: var(--ink); }
:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline-color: #93c5fd; }
button:disabled { cursor: not-allowed; }
.brand { gap: 11px; font-size: 23px; font-weight: 650; letter-spacing: 0; padding: 0; }
.brand-logo { width: 46px; height: 46px; flex: none; object-fit: contain; }
.brand small { font-family: var(--font); font-size: 10px; font-weight: 500; letter-spacing: 1.2px; color: #526a8c; margin-top: 5px; }
.footer-logo { width: 30px; height: 30px; object-fit: contain; flex: none; }
.mobile-brand-logo { width: 28px; height: 28px; object-fit: contain; flex: none; }
.feedback-app .sidebar { width: var(--sidebar); padding: 25px 20px 0; background: #e7f2ff; border-right: 1px solid #e3edfa; box-shadow: none; }
.workspace-switch { margin: 28px 0 23px; padding: 14px 0 19px; gap: 9px; background: transparent; border: 0; border-bottom: 1px solid #cfdff2; border-radius: 0; font-size: 13px; color: var(--ink); }
.workspace-avatar { width: 32px; height: 32px; border: 0; background: #d3e5ff; color: var(--primary); }
.workspace-switch small { margin-top: 5px; color: #526a8c; font-size: 10px; }
.feedback-app .primary-nav { margin-top: 0; gap: 7px; }
.feedback-app .primary-nav a, .feedback-app .primary-nav a.active { position: relative; padding: 0 13px; height: 45px; min-height: 45px; gap: 12px; border-radius: 5px; font-size: 14px; font-weight: 500; color: #526a8c; box-shadow: none; }
.feedback-app .primary-nav a:hover { background: #dfecff; color: var(--primary); }
.feedback-app .primary-nav a.active { background: #d3e5ff; color: var(--primary); font-weight: 600; }
.feedback-app .primary-nav a.active::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--primary); }
.feedback-app .primary-nav a .icon { width: 19px; height: 19px; }
.workspace-footer { margin: 0 -20px; padding: 20px; border-top: 1px solid #cfdff2; color: #526a8c; font-size: 12px; }
.workspace-footer small { font-size: 10px; color: #526a8c; white-space: normal; }
.feedback-app .sidebar-bottom { margin-top: auto; }
.feedback-app .app-shell { margin-left: var(--sidebar); min-width: 0; background: #fff; }
.feedback-app .topbar { height: 66px; padding: 0 38px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: none; backdrop-filter: none; }
.breadcrumbs { gap: 12px; min-width: 0; font-size: 14px; font-weight: 500; }
.breadcrumb-workspace { color: #64748b; }
.breadcrumb-slash { color: #b3c0d3; }
#current-project { color: var(--ink); font-weight: 600; }
.stream-state { color: #64748b; font-size: 11px; font-weight: 500; }
.stream-state:before { background: #3979d3; }
.stream-state.disconnected { color: #946018; }
#account-session { font-size: 12px; }
#account-session button { color: #526a8c; }
#account-session button:hover { color: var(--primary); background: #edf4ff; }
.feedback-app #main { max-width: 1480px; padding: 34px 38px 28px; min-width: 0; }
.page-heading, .feedback-app .page-heading { margin-bottom: 26px; gap: 20px; }
h1, .feedback-app h1 { color: var(--ink); font-size: 30px; font-weight: 650; line-height: 1.45; letter-spacing: -.7px; }
h2 { color: var(--ink); font-size: 18px; font-weight: 600; }
h3 { color: var(--ink); font-weight: 600; }
.page-heading p, .feedback-app .page-heading p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.eyebrow, .feedback-app .eyebrow{ color: #526a8c; font-size: 10px; letter-spacing: 1.5px; font-weight: 500; }
.heading-period { color: var(--primary); }
.button { min-height: 40px; padding: 10px 15px; font-size: 13px; font-weight: 500; border-radius: 7px; box-shadow: none; }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: none; }
.button.primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); box-shadow: none; transform: none; }
.button.secondary { background: #fff; color: #34507a; border-color: #cbdbf4; }
.button.secondary:hover:not(:disabled) { background: #edf4ff; border-color: #abc0df; color: var(--primary); }
.button.small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.button.danger { background: #bf3535; border-color: #bf3535; }
.button.danger:hover:not(:disabled) { background: #a62b2b; }
.icon-button { min-width: 34px; min-height: 34px; color: #64748b; border-radius: 6px; }
.icon-button:hover { background: #edf4ff; color: var(--primary); }
.text-link, .feedback-app .text-link { color: #3979d3; font-size: 12px; }
.form-field span { color: #34507a; font-size: 13px; font-weight: 500; }
.form-field input, .form-field select, .form-field textarea, .project-search { border: 1px solid #cbd9ec; border-radius: 7px; background: #fff; color: var(--ink); min-height: 42px; }
.form-field input, .form-field select, .form-field textarea { padding: 10px 12px; font-size: 14px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #669bff; box-shadow: 0 0 0 3px #0755f514; }
input::placeholder, textarea::placeholder { color: #7b8ea9; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.project-search:focus-within { outline-color: #93c5fd; }
.project-search input{ font-size: 13px; color: var(--ink); }
.form-error { padding: 12px 14px; border: 1px solid #f5caca; border-radius: 7px; background: #fff5f5; color: #a62b2b; font-size: 13px; overflow-wrap: anywhere; }
.form-error:empty { display: none; }
.panel, .stats-strip, .project-table-wrap, .candidate-queue{ background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
.panel-heading { padding: 20px 22px; gap: 12px; }
.panel-heading h2 { font-size: 16px; font-weight: 600; }
.panel-footnote, .feedback-app .panel-footnote { padding: 13px 22px; background: #f9fbfe; border-color: var(--line); color: var(--muted); font-size: 11px; }
.count-badge { border-radius: 5px; background: #edf4ff; color: #3979d3; font-size: 12px; font-weight: 500; }

.project-monogram, .project-monogram.jade, .project-monogram.blue { background: #edf4ff; border-color: #d9e6f9; color: var(--primary); font-weight: 600; border-radius: 11px; }

 .project-table th{ background: #f5f8fc; color: #526a8c; font-size: 12px; font-weight: 500; border-color: var(--line); }
 .project-table td{ border-color: var(--line); font-size: 13px; color: var(--ink); }
 .project-table tr:hover { background: #f9fbff; }

.empty-state{ background: #f9fbfe; border: 1px dashed #cbd9ec; border-radius: 11px; box-shadow: none; padding: 48px 24px; color: var(--muted); }
.empty-state h2, .empty-state h3{ color: var(--ink); font-weight: 600; }
.empty-state p{ font-size: 13px; color: var(--muted); }

.loading-state { min-height: 260px; padding: 40px 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; color: var(--muted); font-size: 14px; text-align: center; }
.loading-state::before { content: ''; display: block; width: 48px; height: 48px; background: url('/assets/mastdan-logo-20261008.png') center / contain no-repeat; }
.loading-ring { border-color: #d3e5ff; border-top-color: var(--primary); width: 20px; height: 20px; }

.ap-report-card { padding: 24px; }
.ap-report-card h2 { color: var(--ink); font-size: 18px; font-weight: 600; }
.ap-stage { background: #edf4ff; color: #3979d3; }
.ap-stage.stage-attention { color: #946018; background: #fff5e5; }
.ap-stage.stage-completed { color: #19704f; background: #ecf8f1; }
.ap-process { border-color: var(--line); }
.ap-report-card pre, .ap-batch { background: #f5f8fc; border-radius: 8px; }
.ap-report-card summary { color: #34507a; font-weight: 500; padding: 5px 0; }
.ap-report-note { margin: 14px 0; }
.feedback-toolbar { gap: 12px; flex-wrap: wrap; }
.account-panel { padding: 0 24px; }
.account-row { padding: 22px 0; border-color: var(--line); }
.account-row strong { font-size: 15px; font-weight: 600; color: var(--ink); }
.account-row p, .account-row small { color: var(--muted); font-size: 12px; }
.account-projects { border-color: var(--line); border-radius: 8px; padding: 16px; }
.account-projects legend { color: #34507a; font-size: 13px; }
.account-projects label { padding: 5px 0; }
.settings-hint { color: var(--muted); font-size: 12px; }
dialog { border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 70px #172d4e26; max-height: calc(100dvh - 48px); }
dialog::backdrop { background: #172d4e52; backdrop-filter: blur(3px); }
.dialog-header { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { color: var(--ink); font-size: 20px; font-weight: 600; }
.dialog-body { padding: 24px; overflow-wrap: anywhere; }
.dialog-footer { padding: 16px 24px; background: #f9fbfe; border-color: var(--line); gap: 10px; }
.toast { background: var(--ink); border-radius: 9px; font-size: 13px; }
.page-footer { color: #64748b; padding: 10px 38px 22px; font-size: 10px; max-width: 1480px; }
.page-footer>span:first-child { font-size: 9px; }
.login-page { background: #f9fbfd; }
.login-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.login-story { min-width: 0; display: flex; flex-direction: column; padding: 40px 55px; background: #dfe9f9; }
.login-story-copy { margin: auto 0; padding: 65px 0; }
.login-story-copy h1 { font-size: clamp(32px, 3.6vw, 48px); font-weight: 500; line-height: 1.5; letter-spacing: -1px; margin: 20px 0 18px; color: #283d5d; }
.login-story-copy>p:last-child { color: #526a8c; font-size: 14px; line-height: 2; }
.login-story>small { color: #526a8c; font-size: 10px; letter-spacing: 1px; }
.login-form-side { padding: 45px; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 360px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.login-card h2 { font-size: 25px; font-weight: 600; }
.login-card>p { margin: 12px 0 30px; color: var(--muted); font-size: 13px; }
.login-card form { display: grid; gap: 22px; margin: 0; }
.login-card .form-field { display: grid; gap: 8px; }
.login-card .form-field span { color: #34507a; font-size: 13px; font-weight: 500; }
.login-card .form-field small { color: var(--muted); font-size: 11px; }
.login-card input { min-height: 44px; background: #f9fbfd; border-color: #cbd9ec; font-size: 15px; border-radius: 7px; }
.login-card input:focus { border-color: #669bff; box-shadow: 0 0 0 3px #0755f514; }
.login-card .button { width: 100%; min-height: 44px; margin-top: 10px; }
.login-card>small { display: block; margin-top: 24px; font-size: 11px; line-height: 1.8; color: var(--muted); }
@media (max-width: 1100px) and (min-width: 761px) {
  :root { --sidebar: 218px; }
  .feedback-app .sidebar { padding-left: 16px; padding-right: 16px; }
  .feedback-app .topbar { padding: 0 26px; }
  .feedback-app #main { padding: 28px 26px; }
  .workspace-footer { margin-left: -16px; margin-right: -16px; padding-left: 16px; }
}
@media (max-width: 760px) {
  body.sidebar-open { overflow: hidden; }
  .feedback-app .sidebar { width: min(280px, calc(100vw - 52px)); padding-top: 24px; z-index: 40; }
  .sidebar-backdrop { z-index: 39; background: #172d4e52; }
  .feedback-app .app-shell { margin-left: 0; }
  .feedback-app .topbar { height: 64px; padding: 0 16px; gap: 8px; }
  .mobile-menu { width: 36px; height: 40px; }
  .breadcrumbs { gap: 9px; font-size: 14px; }
  .breadcrumb-workspace, .breadcrumb-slash { display: none; }
  .feedback-app #main { padding: 24px 16px; }
  .feedback-app .page-heading { flex-wrap: wrap; align-items: flex-start; gap: 16px; }
  h1, .feedback-app h1 { font-size: 26px; }
  .feedback-app .page-heading p { font-size: 13px; }
  .report-heading-actions { flex-wrap: wrap; gap: 8px; }
  .report-heading-actions .button{ min-height: 42px; }

  .ap-report-filter { min-height: 42px; }
  .ap-report-controls .project-search { flex-basis: 100%; margin-left: 0; }
  .ap-report-card { padding: 18px; }
  .feedback-toolbar { align-items: stretch; }
  .feedback-toolbar .project-search { width: 100%; flex-basis: 100%; }
  .feedback-toolbar .project-search input { width: 100%; }
  .ap-report-card footer .button { min-height: 42px; }
  .account-panel { padding: 0 18px; }
  .account-row-actions { flex-wrap: wrap; }
  .empty-state{ padding: 32px 18px; }
  .page-footer { padding: 6px 16px 20px; flex-wrap: wrap; gap: 6px; }
  dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .dialog-header, .dialog-body { padding: 20px; }
  .dialog-footer { padding: 16px 20px; flex-wrap: wrap; }
  .dialog-footer .button { min-height: 44px; }
  .form-field input, .form-field select, .form-field textarea, .project-search input { font-size: 16px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-story { padding: 28px; }
  .login-story-copy { margin: 0; padding: 30px 0 0; }
  .login-story-copy h1 { font-size: 29px; letter-spacing: -.5px; margin: 0; }
  .login-story-copy h1 br { display: none; }
  .login-story-copy p, .login-story>small { display: none; }
  .login-form-side { padding: 36px 28px 44px; align-items: flex-start; }
  .login-card { max-width: 400px; }
  .login-card h2 { font-size: 24px; }
  .login-card input { font-size: 16px; }
}

/* Reset the former centered login card's outer frame. */
.login-page { display: block; padding: 0; }
.login-shell { width: 100%; margin: 0; }

.workspace-type { display: none; }

.confirm-dialog .dialog-body p { color: var(--muted); font-size: 13px; }
.confirm-dialog .dialog-body .form-error { color: #a62b2b; }

.feedback-app .page-heading>.button { font-size: 13px; min-height: 40px; }
.feedback-app.project-registry-page .app-shell { background: #f7f9fd; }
.feedback-app.project-registry-page #main { padding-top: 40px; padding-bottom: 40px; }
.registry-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 34px; }
.registry-heading .eyebrow { color: var(--primary); font-size: 12px; font-weight: 600; letter-spacing: 1px; margin-bottom: 8px; }
.registry-heading h1 { font-size: 32px; font-weight: 650; letter-spacing: -.8px; }
.registry-heading p { margin-top: 9px; font-size: 14px; color: var(--muted); }
.registry-total { display: flex; align-items: center; gap: 12px; padding: 16px 21px; border: 1px solid #dde7f6; border-radius: 12px; background: #edf3ff; white-space: nowrap; }
.registry-total .icon { width: 22px; height: 22px; color: var(--primary); margin-right: 2px; }
.registry-total strong { font-size: 28px; line-height: 1; font-weight: 650; letter-spacing: -1px; color: var(--ink); }
.registry-total>span { font-size: 12px; color: var(--secondary); }
.registry-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 19px; }
.registry-section-title { display: flex; align-items: center; gap: 10px; }
.registry-section-title h2 { font-size: 15px; font-weight: 600; }
.registry-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; padding: 2px 7px; border-radius: 6px; background: #e7edf6; color: var(--secondary); font-size: 11px; font-weight: 600; }
.registry-search { display: flex; align-items: center; gap: 10px; width: 290px; min-width: 0; padding: 0 13px; border: 1px solid #dce5f1; border-radius: 9px; background: #fff; color: #8191a8; }
.registry-search .icon { width: 17px; height: 17px; }
.registry-search:focus-within { border-color: #73a2fa; box-shadow: 0 0 0 3px #0755f50c; }
.registry-search input { width: 100%; min-height: 42px; border: 0; background: transparent; outline: none; color: var(--ink); font-size: 13px; }
.registry-search input:focus-visible { outline: none; }
.project-registry-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.project-registry-card { display: flex; flex-direction: column; min-width: 0; min-height: 234px; padding: 24px 23px 0; border: 1px solid #e2e9f3; border-radius: 14px; background: #fff; box-shadow: 0 2px 5px #172d4e03; }
.registry-symbol { display: flex; align-items: center; justify-content: center; width: 43px; height: 43px; margin-bottom: 18px; border: 1px solid #e0eaff; border-radius: 11px; background: #eef4ff; color: var(--primary); }
.registry-symbol .icon { width: 22px; height: 22px; stroke-width: 1.6; }
.project-registry-card h2 { margin: 0; color: var(--ink); font-size: 19px; font-weight: 650; line-height: 1.4; letter-spacing: -.25px; overflow-wrap: anywhere; }
.registry-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 9px 0 20px; min-height: 42px; color: #62748c; font-size: 12px; line-height: 1.75; }
.registry-website, .registry-no-website { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-top: auto; border-top: 1px solid #edf1f7; font-size: 12px; }
.registry-website { color: #456b9d; }
.registry-website:hover { color: var(--primary); }
.registry-website .icon { width: 15px; height: 15px; color: #8497b2; }
.registry-website:hover .icon { color: var(--primary); }
.registry-website>span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.registry-no-website { justify-content: flex-start; gap: 7px; color: #687b94; }
.registry-no-website .icon { width: 14px; height: 14px; }
.registry-tasks { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 10px; padding: 6px 12px; border: 1px solid var(--border, #e2eaf5); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--primary); background: #fff; }
.registry-tasks:hover { background: var(--sidebar, #e7f2ff); }
.registry-tasks .icon { width: 14px; height: 14px; }
.registry-empty { display: flex; flex-direction: column; align-items: center; padding: 65px 20px; border: 1px dashed #d6e1ef; border-radius: 14px; background: #fff; text-align: center; }
.registry-empty>.icon { width: 28px; height: 28px; margin-bottom: 18px; color: #7796c5; }
.registry-empty h2 { font-size: 17px; }
.registry-empty p { margin: 8px 0 22px; color: var(--muted); }
@media (min-width: 1500px) { .project-registry-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .project-registry-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .registry-heading { gap: 16px; } }
@media (max-width: 760px) { .feedback-app.project-registry-page #main { padding-top: 28px; } .registry-heading h1 { font-size: 28px; } .registry-total { padding: 14px; gap: 8px; } .registry-total .icon { display: none; } .registry-total strong { font-size: 24px; } .registry-heading p { font-size: 12px; } }
@media (max-width: 560px) { .registry-heading { align-items: flex-start; margin-bottom: 28px; } .registry-total { margin-top: 24px; padding: 11px; gap: 6px; } .registry-toolbar { flex-wrap: wrap; gap: 14px; } .registry-search { width: 100%; } .registry-search input { font-size: 16px; } .project-registry-list { grid-template-columns: minmax(0, 1fr); gap: 14px; } .project-registry-card { min-height: 210px; padding: 21px 21px 0; } .registry-symbol { margin-bottom: 14px; } }
@media (max-width: 760px) { .feedback-toolbar .project-search { max-width: none; } }

/* 执行者选择（确认执行弹窗）与任务卡片上的执行者标记 */
.executor-picker { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 6px; display: grid; gap: 6px; }
.executor-picker legend { color: #34507a; font-size: 13px; padding: 0 4px; }
.executor-option { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.executor-option:hover { background: #f3f7ff; }
.executor-option input { margin-top: 4px; }
.executor-option span { display: grid; gap: 2px; }
.executor-option strong { color: var(--ink); font-size: 13px; font-weight: 600; }
.executor-option small { color: var(--muted); font-size: 11px; }
.executor-option.disabled { opacity: .55; cursor: not-allowed; }
.candidate-task-executor { display: inline-flex; align-items: center; gap: 4px; color: #34507a; font-size: 10px; white-space: nowrap; }
.candidate-task-executor::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
/* Project provisioning uses the existing project/task page layout. */
.project-setup-status { margin: 0 0 24px; padding: 20px 24px; overflow-wrap: anywhere; }
.project-setup-status h2 { margin: 0 0 10px; font-size: 18px; }
.project-setup-status p { margin: 8px 0; }
.project-setup-status details { margin: 12px 0; }
.project-setup-label { color: #0755f5; font-size: 13px; font-weight: 600; }
