:root {
  --bg: #faf7f6;
  --surface: #ffffff;
  --surface-muted: #fcf7f6;
  --border: #eee5e3;
  --text: #2b2524;
  --muted: #766a68;
  --blue: #e31b18;
  --blue-dark: #b91412;
  --blue-soft: #fff0ef;
  --green: #12b76a;
  --green-soft: #ecfdf3;
  --orange: #f79009;
  --orange-soft: #fff7e8;
  --red: #f04438;
  --red-soft: #fff1f0;
  --shadow: 0 10px 30px rgba(62, 24, 22, .07);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

.operations-empty, .operation-card { padding: 24px; }
.operation-session-list { display: grid; gap: 10px; }
.operation-session { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; }
.operation-session div { display: grid; gap: 4px; }
.operation-session span, .operation-session em { color: var(--muted); font-size: 13px; font-style: normal; }
.operation-paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.operation-paths div { display: grid; gap: 8px; padding: 16px; border-radius: 12px; background: var(--surface-soft); }
.operation-paths span { color: var(--muted); font-size: 13px; }
.danger-zone { border-color: #efc5c3; }
.cleanup-form, .cleanup-disabled { margin-top: 18px; padding: 18px; border-radius: 12px; background: #fff7f6; }
.cleanup-form p { margin: 0 0 16px; color: var(--muted); line-height: 1.7; }
.cleanup-disabled { color: var(--muted); }
@media (max-width: 760px) { .operation-paths { grid-template-columns: 1fr; } .operation-session { align-items: flex-start; flex-direction: column; } }

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  background: #fcf7f6;
}
.login-brand {
  position: relative;
  overflow: hidden;
  padding: 64px clamp(32px, 8vw, 132px);
  color: white;
  background: linear-gradient(145deg, #590d0c 0%, #ba1512 52%, #e9352d 100%);
}
.login-brand::before, .login-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
}
.login-brand::before { width: 520px; height: 520px; right: -170px; top: -120px; }
.login-brand::after { width: 760px; height: 760px; left: -420px; bottom: -380px; }
.brand-mark { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-logo { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; color: var(--blue); }
.brand-logo svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-linecap: square; stroke-linejoin: miter; stroke-width: 7; }
.brand-name { display: grid; gap: 2px; color: currentColor; font-size: 20px; font-weight: 700; letter-spacing: .03em; line-height: 1.05; }
.brand-name strong { font: inherit; }
.brand-name small { color: inherit; font-size: 10px; font-weight: 600; letter-spacing: .18em; opacity: .68; }
.login-brand .brand-logo { color: white; }
.login-copy { position: relative; z-index: 1; max-width: 520px; margin-top: clamp(96px, 16vh, 180px); }
.login-copy h1 { margin: 0; font-size: clamp(32px, 4vw, 54px); line-height: 1.15; letter-spacing: -.04em; }
.login-copy p { margin: 24px 0 0; max-width: 420px; color: rgba(255,255,255,.75); font-size: 16px; line-height: 1.8; }
.login-features { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.login-feature { padding: 9px 13px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: rgba(255,255,255,.9); font-size: 13px; background: rgba(255,255,255,.08); }
.login-panel { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(420px, 100%); padding: 42px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.login-card h2 { margin: 0 0 8px; font-size: 25px; }
.login-card > p { margin: 0 0 30px; color: var(--muted); font-size: 14px; }
.registration-card { max-height: calc(100vh - 64px); overflow-y: auto; }
.registration-card > p { margin-bottom: 22px; }
.login-text-action { display: block; width: max-content; margin: 15px auto 0; padding: 4px 8px; border: 0; color: var(--blue-dark); background: transparent; font-size: 13px; font-weight: 700; }
.login-account-actions { display: flex; align-items: center; justify-content: center; margin-top: 16px; }
.login-inline-action { min-width: 104px; padding: 3px 18px; border: 0; color: var(--blue-dark); background: transparent; font-size: 13px; font-weight: 700; }
.login-inline-action + .login-inline-action { border-left: 1px solid var(--border); }
.login-text-action:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.demo-hint, .login-security-hint { margin-top: 20px; padding: 12px 14px; border-radius: 10px; color: #475467; background: var(--surface-muted); font-size: 12px; line-height: 1.7; }
.login-security-hint { border: 1px solid var(--border); color: var(--muted); }
.environment-notice { display: grid; gap: 3px; margin: -8px 0 22px; padding: 10px 12px; border: 1px solid; border-radius: 10px; font-size: 11px; line-height: 1.55; }
.environment-notice strong { font-size: 12px; }
.environment-notice.environment-development { border-color: #ffd6a2; color: #92400e; background: #fff7e8; }
.environment-notice.environment-test { border-color: #bfdbfe; color: #1d4ed8; background: #eff6ff; }
.environment-notice.environment-production { border-color: #b7ebcd; color: #087443; background: #ecfdf3; }

.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: 244px; flex: 0 0 244px; padding: 25px 14px; color: #d7b8b5; background: #291615; }
.sidebar .brand-mark { padding: 0 12px; color: white; }
.sidebar .brand-logo { color: #ff4b43; }
.sidebar .brand-name { font-size: 17px; }
.nav-section { margin: 40px 10px 10px; color: #a88b88; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; margin: 4px 0; padding: 11px 12px; border: 0; border-radius: 9px; color: #d7b8b5; text-align: left; background: transparent; transition: .15s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.08); }
.nav-item.active { color: white; background: var(--blue); box-shadow: 0 7px 14px rgba(227,27,24,.24); }
.nav-group { position: relative; z-index: 1; margin: 4px 0; }
.nav-group:hover, .nav-group:focus-within { z-index: 7; }
.nav-group::after { content: ""; position: absolute; top: 0; left: 100%; width: 14px; height: 100%; }
.nav-subitems { position: absolute; top: 0; left: calc(100% + 14px); z-index: 6; display: grid; gap: 3px; min-width: 156px; padding: 8px; visibility: hidden; border: 1px solid rgba(255,209,204,.16); border-radius: 10px; background: #3b1e1c; box-shadow: 0 12px 24px rgba(45,12,10,.3); opacity: 0; pointer-events: none; transform: translateX(-5px); transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
.nav-group:hover .nav-subitems, .nav-group:focus-within .nav-subitems { visibility: visible; opacity: 1; pointer-events: auto; transform: translateX(0); }
.nav-subitem { display: flex; align-items: center; min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; color: #d8b7b3; background: transparent; font-size: 12px; text-align: left; cursor: pointer; transition: .15s ease; }
.nav-subitem::before { content: ""; width: 5px; height: 5px; margin-right: 9px; border-radius: 50%; background: currentColor; opacity: .6; }
.nav-subitem:hover { color: white; background: rgba(255,255,255,.08); }
.nav-subitem.active { color: white; background: rgba(227,27,24,.72); }
.nav-icon { width: 20px; text-align: center; font-size: 16px; }
.sidebar-foot { margin-top: 60px; padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.09); color: #a88b88; font-size: 12px; line-height: 1.7; }
.sidebar-foot .environment-badge { margin-top: 9px; border-color: rgba(255,255,255,.2); color: #f6cbc7; background: rgba(255,255,255,.08); }
.sidebar-foot .environment-badge.environment-production { color: #9ce5be; background: rgba(18,183,106,.12); }
.main-area { min-width: 0; flex: 1; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 34px; border-bottom: 1px solid var(--border); background: var(--surface); }
.topbar-context { display: flex; align-items: center; min-width: 0; gap: 10px; }
.topbar-title { overflow: hidden; color: var(--muted); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.environment-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .04em; white-space: nowrap; }
.environment-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.environment-badge.environment-development { border-color: #ffd6a2; color: #b45309; background: #fff7e8; }
.environment-badge.environment-test { border-color: #bfdbfe; color: #2563eb; background: #eff6ff; }
.environment-badge.environment-production { border-color: #b7ebcd; color: #087443; background: #ecfdf3; }
.user-area { display: flex; align-items: center; gap: 12px; }
.system-clock { color: #98a2b3; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.notification-wrap { position: relative; }
.notification-trigger { position: relative; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; color: #667085; background: transparent; font-size: 22px; line-height: 1; }
.notification-trigger:hover { color: var(--blue); background: var(--blue-soft); }
.notification-count { position: absolute; top: -3px; right: -4px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border: 2px solid white; border-radius: 999px; color: white; background: var(--red); font-size: 9px; font-weight: 700; }
.notification-panel { position: absolute; top: 45px; right: -65px; z-index: 8; width: 360px; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: white; box-shadow: 0 18px 45px rgba(16,24,40,.16); }
.notification-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 17px 13px; border-bottom: 1px solid var(--border); }
.notification-header strong, .notification-header span { display: block; }
.notification-header strong { font-size: 14px; }
.notification-header span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.notification-read-all { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 11px; }
.notification-read-all:disabled { cursor: not-allowed; color: #98a2b3; }
.notification-list { max-height: 390px; overflow-y: auto; }
.notification-item { width: 100%; display: flex; gap: 10px; padding: 13px 17px; border: 0; border-bottom: 1px solid #f0f2f5; color: var(--text); text-align: left; background: white; }
.notification-item:hover { background: #fffafa; }
.notification-item.unread { background: #fff7f6; }
.notification-dot { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 5px; border-radius: 50%; background: transparent; }
.notification-item.unread .notification-dot { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.notification-copy { min-width: 0; display: grid; gap: 4px; }
.notification-copy strong { font-size: 12px; }
.notification-copy small { color: #475467; font-size: 11px; line-height: 1.5; }
.notification-copy em { color: #98a2b3; font-size: 10px; font-style: normal; }
.notification-empty { padding: 38px 20px; color: var(--muted); text-align: center; font-size: 12px; }
.user-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(135deg, #f04438, #c81815); font-size: 14px; font-weight: 700; }
.user-profile { display: flex; align-items: center; gap: 12px; padding: 3px 6px 3px 3px; border: 0; border-radius: 11px; color: var(--text); text-align: left; background: transparent; }
.user-profile:hover { background: var(--surface-muted); }
.user-meta { line-height: 1.35; }
.user-meta strong { display: block; font-size: 13px; }
.user-meta span { color: var(--muted); font-size: 11px; }
.card-header > div > .muted { margin: 5px 0 0; font-size: 12px; }
.section-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.section-link span:last-child { color: var(--blue); font-size: 16px; line-height: 1; transition: transform .15s ease; }
.section-link:hover { color: var(--text); }
.section-link:hover span:last-child { transform: translateX(3px); }
.content { max-width: 1500px; margin: 0 auto; padding: 34px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.page-heading h1 { margin: 0 0 7px; font-size: 27px; letter-spacing: -.025em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.page-actions { display: flex; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 600; transition: .15s ease; }
.btn-primary { color: white; background: var(--blue); box-shadow: 0 5px 10px rgba(227,27,24,.16); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { color: #344054; border-color: var(--border); background: white; }
.btn-secondary:hover { border-color: #b8c2d1; background: #fbfcfe; }
.approval-actions .btn-secondary { color: var(--blue); border-color: #f0c6c2; background: #fff7f6; }
.btn-danger { color: var(--red); border-color: #ffd6d2; background: var(--red-soft); }
.btn-success { color: #087443; border-color: #b7ebcd; background: var(--green-soft); }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 12px; }
.btn:disabled { cursor: not-allowed; opacity: .45; }
.btn-logout { border: 0; color: #667085; background: transparent; font-size: 12px; }
.btn-logout:hover { color: var(--red); }

.card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { position: relative; padding: 21px; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 84px; height: 84px; right: -25px; bottom: -35px; border-radius: 50%; background: var(--blue-soft); }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { margin-top: 12px; font-size: 29px; font-weight: 750; letter-spacing: -.04em; }
.stat-note { margin-top: 9px; color: var(--muted); font-size: 12px; }
.stat-card.warn .stat-value { color: var(--orange); }
.stat-card.success .stat-value { color: var(--green); }
.stat-card.blue .stat-value { color: var(--blue); }
.two-columns { display: grid; grid-template-columns: 1.3fr .7fr; gap: 22px; min-width: 0; }
.two-columns > * { min-width: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.card-header h3 { margin: 0; font-size: 15px; }
.card-header a { border: 0; color: var(--blue); background: transparent; font-size: 12px; }
.card-body { padding: 22px; }
.expense-filters { display: grid; grid-template-columns: minmax(230px, 1fr) 170px 170px 150px 150px; gap: 10px; margin-bottom: 16px; }
.expense-filters > input, .expense-filters > select { min-width: 0; width: 100%; }
.expense-filters > input, .expense-filters > select, .date-filter, .date-filter input { font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.4; }
.date-filter { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: white; font-size: 13px; }
.date-filter span { flex: 0 0 auto; white-space: nowrap; }
.date-filter input { min-width: 0; width: 100%; height: 36px; padding: 0; border: 0; color: var(--text); background: transparent; font-size: 13px; outline: 0; }
.date-filter input::placeholder { color: #98a2b3; }
.process-center-card { overflow: hidden; }
.process-filters { min-width: 0; grid-template-columns: minmax(220px, 1fr) 150px 150px 150px 145px 145px; }
.workbench-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 13px 22px 0; }
.workbench-tab { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 7px 11px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; white-space: nowrap; transition: .15s ease; }
.workbench-tab span { min-width: 18px; padding: 2px 5px; border-radius: 999px; color: #98a2b3; background: #f2f4f7; font-size: 10px; text-align: center; }
.workbench-tab:hover { color: var(--text); background: var(--surface-muted); }
.workbench-tab.active { border-color: #c8d8ff; color: var(--blue); background: var(--blue-soft); }
.workbench-tab.active span { color: var(--blue); background: white; }
.process-result-note { margin: -2px 0 12px; color: var(--muted); font-size: 11px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th { padding: 12px 22px; color: #98a2b3; font-size: 11px; font-weight: 600; text-align: left; background: #fbfcfe; }
td { padding: 15px 22px; border-top: 1px solid #f0f2f5; color: #475467; font-size: 13px; vertical-align: middle; }
tbody tr:hover { background: #fbfdff; }
.expense-row { cursor: pointer; }
.row-link { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 12px; }
.row-link:hover { text-decoration: underline; }
.draft-delete-link { margin-left: 12px; color: #b42318; }
.primary-text { color: var(--text); font-weight: 600; }
.muted { color: var(--muted); }
.amount { color: var(--text); font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; font-size: 11px; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pending { color: #b54708; background: var(--orange-soft); }
.status-success { color: #087443; background: var(--green-soft); }
.status-danger { color: #b42318; background: var(--red-soft); }
.status-info { color: #175cd3; background: var(--blue-soft); }
.deadline-note { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.deadline-note.overdue { color: #b42318; font-weight: 600; }
.process-reason { display: block; max-width: 240px; margin-top: 5px; color: #b42318; font-size: 10px; line-height: 1.45; white-space: normal; }
.process-reason.review { color: #b54708; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-action { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-align: left; background: white; }
.quick-action:hover { border-color: #b9c9ef; background: var(--blue-soft); }
.quick-action-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); }
.quick-action span { display: block; color: var(--muted); font-size: 11px; }
.quick-action strong { display: block; margin-top: 3px; font-size: 13px; }
.activity-list { display: grid; gap: 18px; }
.activity { display: flex; gap: 12px; }
.activity-dot { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 5px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.activity p { margin: 0; color: #475467; font-size: 13px; line-height: 1.5; }
.activity small { display: block; margin-top: 3px; color: #98a2b3; font-size: 11px; }

.form-card { max-width: 940px; }
.return-notice { display: grid; gap: 5px; max-width: 940px; margin: -8px 0 22px; padding: 13px 16px; border: 1px solid #ffd6d2; border-radius: 10px; color: #7a271a; background: var(--red-soft); font-size: 12px; line-height: 1.6; }
.return-notice strong { font-size: 12px; }
.return-notice span { color: #b42318; }
.form-section { padding: 24px; border-bottom: 1px solid var(--border); }
.form-section:last-child { border-bottom: 0; }
.form-section h3 { margin: 0 0 20px; font-size: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.project-capital-preview { margin-top: 21px; padding: 15px 16px; border: 1px solid #b8dcc9; border-radius: 11px; background: linear-gradient(135deg, #f2fbf6, #fbfefc); }
.project-capital-preview.warning { border-color: #f2c7c2; background: linear-gradient(135deg, #fff7f6, #fffdfd); }
.project-capital-preview.empty { border-color: #cbd9ff; background: #f7f9ff; }
.project-capital-preview.neutral { display: flex; margin-top: 21px; border-color: var(--border); background: var(--surface-muted); }
.project-capital-preview.neutral > div, .project-capital-preview.empty > div { display: grid; gap: 5px; }
.project-capital-preview.neutral strong, .project-capital-preview.empty strong { color: var(--text); font-size: 12px; }
.project-capital-preview.neutral span, .project-capital-preview.empty span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.project-capital-preview-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-capital-preview-top > div { display: grid; gap: 4px; }
.project-capital-preview-top span { color: #087443; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.project-capital-preview.warning .project-capital-preview-top span { color: #b42318; }
.project-capital-preview-top strong { color: var(--text); font-size: 13px; }
.project-capital-preview-top b { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: #087443; background: var(--green-soft); font-size: 10px; }
.project-capital-preview.warning .project-capital-preview-top b { color: #b42318; background: var(--red-soft); }
.project-capital-preview.empty .project-capital-preview-top b { color: #175cd3; background: var(--blue-soft); }
.project-capital-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.project-capital-preview-grid > div { display: grid; gap: 5px; min-width: 0; padding: 9px 10px; border-radius: 8px; background: rgba(255,255,255,.76); }
.project-capital-preview-grid span { color: var(--muted); font-size: 10px; }
.project-capital-preview-grid strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-capital-preview p { margin: 11px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.form-field { display: grid; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: #475467; font-size: 12px; font-weight: 600; }
.form-field label em { color: var(--red); font-style: normal; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #dfd6d4; border-radius: 8px; color: var(--text); outline: none; background: white; transition: .15s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(227,27,24,.1); }
textarea { min-height: 100px; resize: vertical; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 12px; top: 10px; color: var(--muted); font-size: 13px; }
.input-prefix input { padding-left: 27px; }
.file-input { padding: 19px; border: 1px dashed #b8c7e9; border-radius: 9px; color: var(--muted); text-align: center; background: #fbfdff; }
.file-input input { display: none; }
.file-label { display: block; color: var(--blue); font-size: 13px; font-weight: 600; cursor: pointer; }
.file-name { display: block; margin-top: 6px; font-size: 12px; }
.file-name-success { color: #087443; }
.file-name-success::before { content: "✓ "; font-weight: 800; }
.file-name-error { color: #b42318; }
.file-name-error::before { content: "! "; font-weight: 800; }
.file-name-uploading { color: var(--blue); }
.file-name-uploading::before { content: "… "; font-weight: 800; }
.form-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 20px 24px; background: #fbfcfe; }
.flow-preview { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 14px 16px; border-radius: 9px; background: var(--surface-muted); }
.flow-node { padding: 7px 10px; border-radius: 7px; color: #344054; background: white; font-size: 12px; }
.flow-node-skipped { color: #667085; background: #f2f4f7; box-shadow: inset 0 0 0 1px #e4e7ec; }
.flow-node .flow-skip-note { color: #667085; }
.flow-arrow { color: #98a2b3; }
.workflow-editor { max-width: 1120px; overflow: hidden; }
.workflow-version { color: var(--muted); font-size: 12px; }
.workflow-history-card { max-width: 1120px; margin-top: 22px; overflow: hidden; }
.workflow-history-count { color: var(--muted); font-size: 12px; }
.workflow-history-list { display: grid; }
.workflow-history-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 24px; border-top: 1px solid var(--border); }
.workflow-history-main { min-width: 0; }
.workflow-history-title { display: flex; align-items: center; gap: 9px; }
.workflow-history-title strong { display: inline-grid; min-width: 32px; height: 24px; place-items: center; padding: 0 7px; border-radius: 6px; color: var(--blue); background: var(--blue-soft); font-size: 12px; }
.workflow-history-title span { overflow: hidden; color: #344054; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.workflow-history-main p, .workflow-history-main small { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.workflow-history-main small { display: block; font-size: 11px; }
.workflow-history-empty { padding: 28px 24px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.role-checks { display: flex; flex-wrap: wrap; gap: 12px; }
.role-check { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 8px; color: #344054; background: white; font-size: 13px; cursor: pointer; }
.role-check:has(input:checked) { border-color: #b8c9ff; color: var(--blue); background: var(--blue-soft); }
.role-check input { width: auto; accent-color: var(--blue); }
.role-check-fixed { cursor: default; }
.role-check-fixed input:disabled { opacity: 1; }
.form-tip { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.section-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.section-title-row h3 { margin-bottom: 5px; }
.workflow-step-list { display: grid; gap: 10px; }
.workflow-step-editor { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe; }
.workflow-step-fixed { border-color: #c9d7ff; background: #f6f8ff; }
.workflow-step-fixed select:disabled { color: #344054; opacity: 1; background: #eef3ff; }
.step-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 700; }
.step-fields { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 12px; }
.step-fields .form-field { gap: 5px; }
.step-fields input, .step-fields select { padding: 8px 10px; font-size: 12px; }
.step-actions { display: flex; gap: 5px; }
.icon-btn { width: 28px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: 7px; color: #667085; background: white; font-size: 14px; }
.icon-btn:hover:not(:disabled) { border-color: #b8c9ff; color: var(--blue); background: var(--blue-soft); }
.icon-btn.danger:hover:not(:disabled) { border-color: #ffd6d2; color: var(--red); background: var(--red-soft); }
.icon-btn:disabled { cursor: not-allowed; opacity: .35; }
.workflow-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px 24px; border-top: 1px solid var(--border); background: var(--surface-muted); }
.workflow-rules div { display: grid; gap: 5px; }
.workflow-rules strong { font-size: 12px; }
.workflow-rules span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.form-config-card { max-width: 1120px; margin-top: 22px; overflow: hidden; }
.form-config-list { display: grid; gap: 10px; padding: 22px 24px; }
.form-config-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe; }
.form-config-fields { display: grid; grid-template-columns: 1fr 1.1fr 1fr 1.15fr; gap: 12px; align-items: end; }
.form-config-fields .form-field { gap: 5px; }
.form-config-fields input, .form-config-fields select { padding: 8px 10px; font-size: 12px; }
.form-config-fields input[readonly], .form-config-fields select:disabled { color: var(--muted); background: #f2f4f7; }
.form-field-options { grid-column: span 2; }
.required-check { display: inline-flex; align-items: center; align-self: end; gap: 7px; height: 35px; color: #475467; font-size: 12px; cursor: pointer; }
.required-check input { width: auto; accent-color: var(--blue); }
.form-config-note { display: flex; gap: 9px; margin: 0 24px 20px; padding: 12px 14px; border-radius: 9px; color: var(--muted); background: var(--surface-muted); font-size: 11px; line-height: 1.6; }
.info-dot { width: 17px; height: 17px; flex: 0 0 17px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 800; }
.user-modal-backdrop { position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; padding: 20px; background: rgba(16,24,40,.42); }
.user-modal { width: min(720px, 100%); max-height: 90vh; overflow-y: auto; border-radius: 16px; background: white; box-shadow: 0 24px 60px rgba(16,24,40,.2); }
.user-modal .modal-top { align-items: flex-start; }
.user-modal .modal-top h3 { margin-bottom: 5px; }
.user-modal .modal-top p { margin: 0; font-size: 12px; }
.registration-request-card { margin-bottom: 18px; }
.registration-review-modal { width: min(760px, 100%); }
.user-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; padding: 24px; }
.user-form-grid .form-field.full { grid-column: 1 / -1; }
.project-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.project-check { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.project-check:has(input:checked) { border-color: #b8c9ff; background: var(--blue-soft); }
.project-check input { width: auto; accent-color: var(--blue); }
.project-check span { min-width: 0; }
.project-check strong, .project-check small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-check strong { color: #344054; font-size: 12px; }
.project-check small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-active { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.account-active:has(input:checked) { border-color: #b8c9ff; background: var(--blue-soft); }
.account-active input { width: auto; accent-color: var(--blue); }
.account-active strong, .account-active small { display: block; }
.account-active strong { color: #344054; font-size: 12px; }
.account-active small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-summary { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 10px 12px; border-radius: 8px; background: var(--surface-muted); }
.account-summary strong { font-size: 13px; }
.account-summary span { color: var(--muted); font-size: 12px; }
.snapshot-modal { width: min(820px, 100%); }
.snapshot-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--border); background: #fbfcfe; }
.snapshot-toolbar > div { display: grid; gap: 4px; }
.snapshot-toolbar strong { font-size: 14px; }
.snapshot-toolbar span { color: var(--muted); font-size: 12px; }
.snapshot-list { display: grid; max-height: 390px; overflow-y: auto; }
.snapshot-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 24px; border-bottom: 1px solid var(--border); }
.snapshot-main { min-width: 0; display: grid; gap: 4px; }
.snapshot-main strong { color: #344054; font-size: 13px; }
.snapshot-main span { overflow: hidden; color: var(--text); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.snapshot-main small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.snapshot-empty { padding: 34px 24px; color: var(--muted); text-align: center; font-size: 13px; }
.snapshot-restore-confirm { display: grid; gap: 14px; padding: 20px 24px 24px; border-top: 1px solid #ffd6d2; background: #fff8f7; }
.snapshot-restore-confirm strong { color: #b42318; font-size: 14px; }
.snapshot-restore-confirm p { margin: 7px 0 0; color: #7a271a; font-size: 12px; line-height: 1.7; }
.snapshot-restore-confirm code { padding: 1px 4px; border-radius: 4px; color: #7a271a; background: #fee4e2; }
.snapshot-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 9px; }
.search-input { width: 230px; }
.empty-state { padding: 54px 20px; color: var(--muted); text-align: center; }
.empty-icon { margin-bottom: 13px; font-size: 30px; opacity: .5; }
.finance-template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.finance-template-card { position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 112px; padding: 18px; border: 1px solid var(--border); color: var(--text); text-align: left; box-shadow: var(--shadow); }
button.finance-template-card { cursor: pointer; }
button.finance-template-card:hover { border-color: #b8c9ff; background: var(--blue-soft); }
.disabled-card { cursor: default; opacity: .86; }
.template-icon { position: relative; width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 10px; color: #667085; background: #f2f4f7; transition: .15s ease; }
.template-icon::before { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; }
.template-icon-loan-application::before { border-radius: 3px; }
.template-icon-payment-application::before { border-radius: 3px; transform: rotate(45deg); }
.template-icon-material-reimbursement::before { width: 4px; height: 16px; border: 0; border-radius: 3px; background: currentColor; box-shadow: -6px 0 currentColor, 6px 0 currentColor; }
.template-icon-uncontracted-reimbursement::before { border-style: dashed; }
.template-icon-wage-claim::before { width: 16px; height: 4px; border: 0; border-radius: 3px; background: currentColor; box-shadow: 0 -7px currentColor, 0 7px currentColor; }
.template-icon-special-payment::before { width: 14px; height: 14px; border: 0; border-radius: 3px; background: currentColor; transform: rotate(45deg); }
.template-icon-planned-payment::before { width: 14px; height: 14px; border: 0; border-radius: 3px; background: currentColor; transform: rotate(45deg); }
.template-icon-machinery-reimbursement::before { width: 4px; height: 16px; border: 0; border-radius: 3px; background: currentColor; box-shadow: -7px 0 currentColor, 7px 0 currentColor; }
.template-icon-uncontracted-payment::before { border-style: dashed; border-radius: 3px; }
.template-icon-dedicated-wage::before { width: 16px; height: 4px; border: 0; border-radius: 3px; background: currentColor; box-shadow: 0 -7px currentColor, 0 7px currentColor; }
.template-icon-accident-insurance::before { width: 14px; height: 16px; border-width: 2px 2px 3px; border-radius: 8px 8px 6px 6px; transform: rotate(45deg) scale(.72); }
.template-icon-invoice-application::before { width: 14px; height: 16px; border-radius: 3px; }
.template-icon-project-income::before { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px currentColor; }
.finance-template-card:hover .template-icon { color: var(--blue); background: var(--blue-soft); }
.template-copy { min-width: 0; display: grid; gap: 7px; padding-right: 17px; }
.template-copy strong { font-size: 14px; }
.template-copy span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.template-arrow { position: absolute; right: 16px; bottom: 16px; color: #98a2b3; font-size: 12px; transition: .15s ease; }
.finance-template-card:hover .template-arrow { color: var(--blue); }
.finance-entry-panel, .finance-scene-panel, .finance-all-panel { margin-bottom: 22px; padding: 24px; }
.finance-entry-heading, .finance-scene-heading, .finance-scene-form-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.finance-entry-heading h3, .finance-scene-form-heading strong { margin: 0; font-size: 15px; }
.finance-entry-heading p, .finance-scene-heading span, .finance-scene-form-heading span { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.finance-all-link { flex: 0 0 auto; }
.finance-common-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.finance-template-option { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-width: 0; min-height: 76px; padding: 12px 38px 12px 12px; border: 1px solid var(--border); border-radius: 11px; color: var(--text); text-align: left; background: white; transition: .15s ease; }
.finance-template-option:hover { border-color: #b8c9ff; background: var(--blue-soft); }
.finance-template-option .template-icon { width: 34px; height: 34px; flex: 0 0 34px; }
.finance-template-option-copy { min-width: 0; display: grid; gap: 4px; }
.finance-template-option-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.finance-template-option-copy small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.finance-template-option .template-arrow { top: 50%; right: 13px; bottom: auto; transform: translateY(-50%); }
.finance-template-option:hover .template-arrow { color: var(--blue); }
.finance-scene-heading { justify-content: flex-start; margin: 24px 0 12px; }
.finance-scene-heading strong { font-size: 13px; }
.finance-scene-heading span { margin: 0; }
.finance-scene-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.finance-scene-card { position: relative; display: flex; align-items: flex-start; gap: 9px; min-width: 0; min-height: 92px; padding: 13px 28px 13px 13px; border: 1px solid var(--border); border-radius: 11px; color: var(--text); text-align: left; background: var(--surface-muted); transition: .15s ease; }
.finance-scene-card:hover { border-color: #b8c9ff; background: var(--blue-soft); }
.finance-scene-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 700; }
.finance-scene-card strong { display: block; font-size: 12px; line-height: 1.45; }
.finance-scene-card small { display: -webkit-box; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.finance-scene-arrow { position: absolute; top: 50%; right: 11px; color: #98a2b3; font-size: 14px; transform: translateY(-50%); }
.finance-scene-card:hover .finance-scene-arrow { color: var(--blue); }
.finance-entry-info { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; padding: 20px 24px; }
.finance-entry-info h3 { margin: 0; font-size: 14px; }
.finance-entry-info p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.finance-back-link { padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.finance-back-link:hover { color: var(--blue); }
.finance-scene-title { display: flex; align-items: center; gap: 13px; margin: 22px 0 26px; }
.finance-scene-title .finance-scene-icon { width: 40px; height: 40px; flex-basis: 40px; font-size: 14px; }
.finance-scene-title h2, .finance-all-title h2 { margin: 0; font-size: 20px; }
.finance-scene-title p, .finance-all-title p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.finance-template-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 13px; }
.finance-template-group + .finance-template-group { margin-top: 25px; padding-top: 21px; border-top: 1px solid var(--border); }
.finance-template-group-heading { display: flex; align-items: baseline; gap: 10px; }
.finance-template-group-heading strong { font-size: 14px; }
.finance-template-group-heading span { color: var(--muted); font-size: 11px; }
.finance-all-title { margin: 22px 0 25px; }
.finance-list-card { overflow: hidden; }
.announcement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.announcement-card { padding: 20px; }
.announcement-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.announcement-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.announcement-type, .announcement-pin { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 5px; color: var(--blue); background: var(--blue-soft); font-size: 10px; }
.announcement-pin { margin-left: 6px; color: #b54708; background: var(--orange-soft); }
.announcement-card h3 { margin: 10px 0 0; font-size: 16px; }
.announcement-content { min-height: 68px; margin: 17px 0; color: #475467; white-space: pre-wrap; font-size: 13px; line-height: 1.75; }
.announcement-meta { display: flex; flex-wrap: wrap; gap: 10px 17px; padding-top: 13px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.announcement-meta time { margin-left: auto; }
.task-filter-card { margin-bottom: 16px; overflow: hidden; }
.task-filters { display: grid; grid-template-columns: minmax(260px, 1fr) 190px 170px; gap: 10px; padding: 18px 20px 12px; }
.task-filter-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 0 20px 16px; color: var(--muted); font-size: 11px; }
.task-filter-summary > strong { color: var(--text); font-size: 12px; }
.task-overdue { color: var(--red) !important; font-weight: 700; }
.task-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.task-stats .card { display: flex; align-items: center; justify-content: space-between; padding: 16px 19px; }
.task-stats span { color: var(--muted); font-size: 12px; }
.task-stats strong { color: var(--blue); font-size: 24px; }
.task-overdue-stat strong { color: var(--red); }
.task-filter { display: flex; align-items: center; gap: 10px; margin: -10px 0 18px; color: var(--muted); font-size: 12px; }
.task-filter select { min-width: 220px; }
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.task-card { padding: 20px; }
.task-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.task-top h3 { margin: 9px 0 0; font-size: 16px; }
.task-title-button { padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.task-title-button:hover { color: var(--blue); }
.task-delete-btn:hover, .document-delete-link:hover { color: var(--red); }
.task-priority { display: inline-flex; padding: 4px 7px; border-radius: 5px; font-size: 10px; }
.priority-normal { color: var(--muted); background: var(--surface-muted); }
.priority-important { color: #b54708; background: var(--orange-soft); }
.priority-urgent { color: var(--red); background: var(--red-soft); }
.task-description { min-height: 45px; margin: 16px 0; color: #475467; white-space: pre-wrap; font-size: 12px; line-height: 1.7; }
.task-attachments { display: grid; gap: 7px; padding: 10px 0 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.task-attachments > div { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.task-attachments .row-link { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-attachment-link { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.task-attachment-download { color: var(--muted); font-size: 11px; }
.task-meta { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.task-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.task-status-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.task-detail-modal { max-width: 760px; }
.task-detail-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px 24px; background: var(--surface-muted); }
.task-detail-summary > div { display: grid; gap: 6px; min-width: 0; }
.task-detail-summary span:first-child { color: var(--muted); font-size: 11px; }
.task-detail-summary strong { color: var(--text); font-size: 13px; }
.task-detail-section { padding: 20px 24px; border-top: 1px solid var(--border); }
.task-detail-section h4 { margin: 0 0 11px; font-size: 14px; }
.task-detail-description { margin: 0; color: #475467; white-space: pre-wrap; font-size: 13px; line-height: 1.7; }
.task-detail-section .task-attachments { padding: 0; border-top: 0; }
.task-detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.task-detail-section-heading h4 { margin: 0; }
.task-detail-section-heading span { color: var(--muted); font-size: 11px; }
.task-history-list { display: grid; gap: 16px; }
.task-history-item { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 11px; }
.task-history-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.task-history-item strong { font-size: 12px; }
.task-history-item p { margin: 5px 0 4px; color: #475467; font-size: 12px; line-height: 1.5; }
.task-history-item small { color: var(--muted); font-size: 10px; }
.task-history-attachments { display: grid; gap: 6px; margin: 8px 0 7px; color: var(--muted); font-size: 11px; }
.task-history-attachments > div { display: flex; flex-wrap: wrap; gap: 7px 13px; }
.task-history-attachments .row-link { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-update-section { background: #fcfdff; }
.task-update-section .task-detail-section-heading { margin-bottom: 14px; }
.task-update-section .task-detail-section-heading h4 { margin-bottom: 4px; }
.task-update-section .task-detail-section-heading span { display: block; }
.task-update-section form { display: grid; gap: 12px; }
.task-update-section .form-footer { margin: 0; padding: 4px 0 0; background: transparent; }
.task-detail-status-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.document-filter-card { margin-bottom: 18px; overflow: hidden; }
.document-filters { display: grid; grid-template-columns: minmax(220px, 1fr) 190px 170px; gap: 10px; padding: 18px; }
.document-filters input, .document-filters select { width: 100%; }
.document-filter-note { padding: 0 18px 16px; color: var(--muted); font-size: 11px; }
.document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.document-card { min-width: 0; padding: 19px; }
.document-top { display: flex; align-items: flex-start; gap: 11px; }
.document-file-icon { width: 38px; height: 42px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 800; }
.document-title { min-width: 0; flex: 1; }
.document-title h3 { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.document-title span { display: inline-block; margin-top: 7px; padding: 4px 7px; border-radius: 5px; color: #475467; background: var(--surface-muted); font-size: 10px; }
.document-version { flex: 0 0 auto; padding: 4px 7px; border-radius: 5px; color: #087443; background: var(--green-soft); font-size: 10px; font-weight: 700; }
.document-description { min-height: 40px; margin: 16px 0; color: #475467; font-size: 12px; line-height: 1.7; }
.document-meta { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.document-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 11px; }
.document-bottom time { flex: 0 0 auto; color: #98a2b3; font-size: 10px; }
.document-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.document-delete-link { color: var(--red); }
.document-empty { grid-column: 1 / -1; }
.document-current-file { display: grid; gap: 4px; padding: 13px 14px; border-radius: 9px; background: var(--surface-muted); }
.document-current-file span, .document-current-file small { color: var(--muted); font-size: 11px; }
.document-current-file strong { font-size: 13px; }
.document-history-list { display: grid; gap: 0; padding: 7px 24px 20px; }
.document-version-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.document-version-row:last-child { border-bottom: 0; }
.document-version-row > div { min-width: 0; display: grid; gap: 4px; }
.document-version-row strong { color: var(--blue); font-size: 12px; }
.document-version-row span { overflow: hidden; color: #344054; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.document-version-row small { color: var(--muted); font-size: 10px; }
.project-filter-card { margin-bottom: 16px; overflow: hidden; }
.project-filters { display: grid; grid-template-columns: minmax(240px, 1fr) 190px; gap: 10px; padding: 18px 20px 12px; }
.project-filter-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 0 20px 16px; color: var(--muted); font-size: 11px; }
.project-filter-summary > strong { color: var(--text); font-size: 12px; }
.project-filter-summary > span { display: inline-flex; align-items: center; gap: 5px; }
.project-filter-summary > span strong { color: var(--blue); font-size: 12px; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card { padding: 20px; }
.project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-actions { display: flex; align-items: center; gap: 7px; }
.project-code { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
#project-form .form-field:has(#project-state) { grid-column: 1 / -1; }
.project-card h3 { margin: 7px 0 5px; font-size: 16px; }
.project-location { color: var(--muted); font-size: 12px; }
.project-progress { height: 6px; margin: 22px 0 11px; overflow: hidden; border-radius: 999px; background: #edf0f5; }
.project-progress span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.project-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.project-business-meta { margin-top: 8px; }
.project-contract-funding { margin-top: 15px; padding: 13px; border: 1px solid #b8dcc9; border-radius: 11px; background: linear-gradient(135deg, #f2fbf6, #fbfefc); }
.project-contract-funding.overdrawn { border-color: #f2c7c2; background: linear-gradient(135deg, #fff7f6, #fffdfd); }
.project-contract-funding-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.project-contract-funding-head > span { color: #087443; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.project-contract-funding.overdrawn .project-contract-funding-head > span { color: #b42318; }
.project-contract-action { appearance: none; padding: 0; border: 0; color: var(--blue); background: transparent; cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; white-space: nowrap; }
.project-contract-action:hover { color: #124fca; text-decoration: underline; text-underline-offset: 3px; }
.project-contract-funding-primary { display: grid; gap: 5px; margin-top: 12px; }
.project-contract-funding-primary span, .project-contract-funding-grid span { color: var(--muted); font-size: 10px; }
.project-contract-funding-primary strong { font-size: 21px; letter-spacing: -.03em; line-height: 1.05; }
.project-contract-funding-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.project-contract-funding-grid > div { display: grid; gap: 4px; min-width: 0; padding: 8px 9px; border-radius: 8px; background: rgba(255,255,255,.74); }
.project-contract-funding-grid strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.project-contract-funding p { margin: 11px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.project-approval-config { padding-top: 4px; }
.project-approval-list { display: grid; gap: 8px; margin-top: 10px; }
.project-approval-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-muted); }
.project-approval-row > span { display: grid; gap: 4px; min-width: 0; }
.project-approval-row strong { color: var(--text); font-size: 12px; }
.project-approval-row small { color: var(--muted); font-size: 10px; }
.project-approval-row select { width: min(245px, 48%); min-width: 0; }
.project-approval-fixed { min-width: min(245px, 48%); padding: 9px 12px; border: 1px solid #c9d7ff; border-radius: 8px; color: #344054; background: #eef3ff; font-size: 12px; text-align: center; }
.flow-node small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.project-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.member-filter-card { margin-bottom: 16px; }
.member-filter { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.member-filter label { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 600; }
.member-filter select { width: min(360px, 100%); }
.member-project-card { margin-bottom: 16px; overflow: hidden; }
.member-project-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 17px; border-bottom: 1px solid var(--border); }
.member-project-header h3 { margin: 6px 0 4px; font-size: 17px; }
.member-project-header p { margin: 0; color: var(--muted); font-size: 12px; }
.member-count { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 700; }
.member-manager-row { display: flex; align-items: center; gap: 18px; padding: 15px 22px; border-bottom: 1px solid var(--border); background: var(--surface-muted); }
.member-manager-row > span { width: 58px; flex: 0 0 58px; color: var(--muted); font-size: 11px; font-weight: 600; }
.member-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.member-person > div:last-child { min-width: 0; }
.member-person strong, .member-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-person strong { color: var(--text); font-size: 13px; }
.member-person small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.member-avatar { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 700; }
.member-avatar.manager { color: #7a4b00; background: var(--orange-soft); }
.member-list { padding: 5px 22px; }
.member-person-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.member-person-row:last-child { border-bottom: 0; }
.member-remove-link { color: var(--red); }
.member-empty { padding: 24px 0; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }
.member-add-row { display: flex; gap: 10px; padding: 15px 22px 20px; border-top: 1px solid var(--border); background: #fbfcfe; }
.member-add-row select { min-width: 0; flex: 1; }
.member-add-note { margin: -9px 22px 17px; color: var(--muted); font-size: 11px; }
.ledger-filter-card { margin-bottom: 16px; }
.ledger-filter { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.ledger-filter label { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 600; }
.ledger-filter select { width: min(340px, 100%); }
.ledger-filter span { color: var(--muted); font-size: 11px; line-height: 1.6; }
.ledger-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.ledger-stat { position: relative; min-width: 0; padding: 18px; overflow: hidden; }
.ledger-stat::after { content: ""; position: absolute; right: -26px; bottom: -38px; width: 84px; height: 84px; border-radius: 50%; background: #f2f4f7; }
.ledger-stat > * { position: relative; z-index: 1; }
.ledger-stat span, .ledger-stat small { display: block; color: var(--muted); font-size: 11px; }
.ledger-stat strong { display: block; margin: 10px 0 8px; color: var(--text); font-size: 21px; letter-spacing: -.025em; white-space: nowrap; }
.ledger-stat.applied::after { background: var(--blue-soft); }
.ledger-stat.payment::after { background: var(--orange-soft); }
.ledger-stat.accounting::after { background: var(--green-soft); }
.ledger-stat.pending::after { background: var(--blue-soft); }
.ledger-stat.balance::after { background: #f3f5f9; }
.ledger-income-text { color: #087443 !important; }
.ledger-outflow-text { color: #b54708 !important; }
.ledger-project-summary, .ledger-detail-card { overflow: hidden; }
.ledger-detail-card { margin-top: 18px; }
.ledger-count { padding: 5px 9px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 700; }
.ledger-pending-cell strong, .ledger-pending-cell small, .ledger-budget-cell strong, .ledger-budget-cell small { display: block; }
.ledger-pending-cell small, .ledger-budget-cell small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; white-space: nowrap; }
.ledger-table td > strong, .ledger-table td > small { display: block; }
.ledger-table td > strong { color: var(--text); font-size: 13px; }
.ledger-table td > small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.ledger-direction { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 4px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.ledger-direction.income { color: #087443; background: var(--green-soft); }
.ledger-direction.outflow { color: #b54708; background: var(--orange-soft); }
.ledger-stage { display: inline-flex; align-items: center; justify-content: center; padding: 4px 7px; border-radius: 999px; color: #475467; background: #f2f4f7; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ledger-stage.approval { color: #175cd3; background: var(--blue-soft); }
.ledger-stage.payment { color: #b54708; background: var(--orange-soft); }
.ledger-stage.accounting, .ledger-stage.accounted { color: #087443; background: var(--green-soft); }
.ledger-stage.returned, .ledger-stage.rejected { color: #b42318; background: var(--red-soft); }
.ledger-empty { min-height: 190px; border: 0; box-shadow: none; }
.contract-filter-card, .contract-table-card { overflow: hidden; }
.contract-filters { display: grid; grid-template-columns: minmax(300px, 1fr) 240px 190px; gap: 10px; padding: 18px; }
.contract-filters input, .contract-filters select { width: 100%; }
.contract-filter-note { padding: 0 18px 16px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.contract-count { padding: 5px 9px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 700; }
.contract-table { min-width: 1080px; }
.contract-table td > strong, .contract-table td > small, .contract-table td > span { display: block; }
.contract-table td > strong { color: var(--text); font-size: 13px; }
.contract-table td > small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.contract-table td > .status { display: inline-flex; width: fit-content; }
.contract-date-note { color: var(--muted) !important; }
.contract-period { color: var(--muted); white-space: nowrap; }
.contract-row-actions, .contract-file-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.contract-delete-link { color: var(--red); }
.contract-empty { min-height: 230px; border: 0; box-shadow: none; }
.contract-modal { width: min(820px, 100%); }
.contract-document-tip { margin-top: 6px; }
.project-detail-modal { width: min(920px, 100%); }
.project-detail-top-actions { display: flex; align-items: flex-start; gap: 12px; }
.project-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--surface-muted); }
.project-detail-stat { display: grid; gap: 6px; min-width: 0; }
.project-detail-stat span { color: var(--muted); font-size: 11px; }
.project-detail-stat strong { overflow: hidden; color: var(--text); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.project-detail-health { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--border); background: #fff; }
.project-detail-health > strong { flex: 0 0 auto; color: var(--text); font-size: 11px; }
.project-detail-health > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.project-alert { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 10px; line-height: 1.3; }
.project-alert-danger { color: #b42318; background: var(--red-soft); }
.project-alert-info { color: #175cd3; background: var(--blue-soft); }
.project-alert-success { color: #087443; background: var(--green-soft); }
.overview-risk-card{margin-bottom:18px;overflow:hidden}.overview-risk-card>.card-header{padding:20px 22px;border-bottom:1px solid var(--border)}.overview-risk-count{padding:5px 10px;border-radius:999px;color:#b42318;background:var(--red-soft);font-size:12px}.overview-risk-list{display:grid}.overview-risk-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 22px;border-bottom:1px solid var(--border);color:var(--text);background:#fff;text-align:left}.overview-risk-row:hover{background:#fff9f8}.overview-risk-row span,.overview-risk-row strong,.overview-risk-row small{display:block}.overview-risk-row small{margin-top:5px;color:#8b6b66}.overview-risk-actions{display:flex;flex:none;flex-wrap:wrap;justify-content:flex-end;gap:10px}.overview-risk-empty{padding:18px 22px}.overview-risk-empty strong,.overview-risk-empty span{display:block}.overview-risk-empty span{margin-top:5px;color:var(--muted);font-size:12px}.overview-risk-more{margin:12px 22px}
.project-detail-readonly { color: var(--muted); font-size: 11px; white-space: nowrap; }
.project-detail-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 22px 24px; }
.project-detail-section { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.project-detail-contract-section { grid-column: 1 / -1; }
.project-detail-ledger-section { grid-column: 1 / -1; }
.project-detail-section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-detail-section-header h4 { margin: 0 0 5px; color: var(--text); font-size: 14px; }
.project-detail-section-header span { color: var(--muted); font-size: 11px; }
.project-detail-contract-metrics { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 15px; color: var(--muted); font-size: 11px; }
.project-detail-contract-metrics span { white-space: nowrap; }
.contract-overdue { color: var(--red); font-weight: 700; }
.project-detail-list { display: grid; gap: 9px; margin-top: 14px; }
.project-detail-ledger-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
.project-detail-ledger-metrics > div { display: grid; gap: 6px; min-width: 0; padding: 11px 12px; border-radius: 9px; background: var(--surface-muted); }
.project-detail-ledger-metrics span { color: var(--muted); font-size: 10px; }
.project-detail-ledger-metrics strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-detail-ledger-note { margin: 11px 0 0; color: var(--muted); font-size: 10px; }
.project-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 9px; background: #fbfcfe; }
.project-detail-row-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.project-detail-row-main > div:last-child { min-width: 0; }
.project-detail-row-main strong, .project-detail-row-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-detail-row-main strong { color: #344054; font-size: 12px; }
.project-detail-row-main small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.project-detail-row .document-file-icon { width: 30px; height: 34px; flex-basis: 30px; font-size: 8px; }
.contract-detail-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 800; }
.project-detail-row-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.project-detail-empty { padding: 22px 8px 10px; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.6; }
.project-detail-more { margin: 11px 0 0; color: var(--muted); font-size: 11px; text-align: right; }
.project-detail-footer { border-top: 1px solid var(--border); }
.badge { padding: 4px 7px; border-radius: 5px; color: #087443; background: var(--green-soft); font-size: 11px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 30px; }
.input-suffix span { position: absolute; top: 10px; right: 12px; color: var(--muted); font-size: 12px; }
.detail { padding: 22px; }
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.detail-header h2 { margin: 0 0 8px; font-size: 19px; }
.detail-meta { color: var(--muted); font-size: 12px; line-height: 1.7; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding: 21px 0; }
.detail-item label { display: block; margin-bottom: 5px; color: #98a2b3; font-size: 11px; }
.detail-item span { color: #344054; font-size: 13px; font-weight: 600; }
.detail-funding-snapshot { margin: 0 0 21px; padding: 14px 15px; border: 1px solid #b8dcc9; border-radius: 11px; background: linear-gradient(135deg, #f2fbf6, #fbfefc); }
.detail-funding-snapshot.warning { border-color: #f2c7c2; background: linear-gradient(135deg, #fff7f6, #fffdfd); }
.detail-funding-snapshot.empty { border-color: #cbd9ff; background: #f7f9ff; }
.detail-funding-snapshot-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-funding-snapshot-top > div { display: grid; gap: 4px; }
.detail-funding-snapshot-top span { color: #087443; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.detail-funding-snapshot.warning .detail-funding-snapshot-top span { color: #b42318; }
.detail-funding-snapshot.empty .detail-funding-snapshot-top span { color: #175cd3; }
.detail-funding-snapshot-top strong { color: var(--text); font-size: 13px; }
.detail-funding-snapshot-top b { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: #087443; background: var(--green-soft); font-size: 10px; }
.detail-funding-snapshot.warning .detail-funding-snapshot-top b { color: #b42318; background: var(--red-soft); }
.detail-funding-snapshot.empty .detail-funding-snapshot-top b { color: #175cd3; background: var(--blue-soft); }
.detail-funding-snapshot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.detail-funding-snapshot-grid > div { display: grid; gap: 5px; min-width: 0; padding: 8px 9px; border-radius: 8px; background: rgba(255,255,255,.76); }
.detail-funding-snapshot-grid span { color: var(--muted); font-size: 10px; }
.detail-funding-snapshot-grid strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.detail-funding-snapshot p { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.timeline { display: grid; gap: 0; margin-top: 22px; }
.detail-flow { margin-top: 12px; overflow-x: auto; }
.timeline-item { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; min-height: 62px; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 15px; bottom: 0; width: 1px; background: #dbe2ee; }
.timeline-dot { position: relative; width: 13px; height: 13px; margin-top: 2px; border: 3px solid #d7e2ff; border-radius: 50%; background: var(--blue); }
.timeline-content strong { display: block; font-size: 12px; }
.timeline-content p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.timeline-attachments { display: grid; gap: 5px; margin-top: 8px; padding: 9px 11px; border-radius: 8px; background: var(--surface-muted); }
.attachment-list { display: grid; gap: 5px; }
.attachment-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.attachment-link { width: fit-content; padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 12px; text-align: left; }
.attachment-link:hover { text-decoration: underline; }
.document-version-actions { display: flex; align-items: center; gap: 10px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: rgba(16,24,40,.42); }
.modal { width: min(760px, 100%); max-height: 90vh; overflow-y: auto; border-radius: 16px; background: white; box-shadow: 0 24px 60px rgba(16,24,40,.2); }
.modal-top { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-top h3 { margin: 0; font-size: 16px; }
.modal-close { width: 28px; height: 28px; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface-muted); }
.approval-actions { display: flex; gap: 9px; padding: 18px 24px; border-top: 1px solid var(--border); background: #fbfcfe; }
.action-form { display: grid; gap: 14px; padding: 18px 24px; border-top: 1px solid var(--border); background: #fbfcfe; }
.action-form textarea { min-height: 86px; }
.approval-submit-form { gap: 16px; }
.approval-note-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.approval-note-heading strong { color: var(--text); font-size: 14px; }
.approval-note-heading span { color: var(--muted); font-size: 11px; }
.action-file-input { padding: 14px; }
.action-form-actions { display: flex; justify-content: flex-end; gap: 9px; }
.alert-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(16,24,40,.42); }
.alert-modal { position: relative; display: grid; grid-template-columns: 42px 1fr; column-gap: 13px; width: min(390px, 100%); padding: 26px 26px 22px; border: 1px solid var(--border); border-radius: 16px; background: white; box-shadow: 0 24px 60px rgba(16,24,40,.2); }
.alert-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #b42318; background: var(--red-soft); font-size: 17px; font-weight: 800; }
.alert-content { padding-right: 24px; }
.alert-content h3 { margin: 1px 0 8px; font-size: 16px; }
.alert-content p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.alert-modal > .modal-close { position: absolute; top: 17px; right: 17px; }
.alert-confirm { grid-column: 2; justify-self: end; margin-top: 21px; min-width: 76px; }
.preview-backdrop { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 20px; background: rgba(16,24,40,.58); }
.preview-modal { width: min(1060px, 100%); height: min(88vh, 820px); display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: white; box-shadow: 0 24px 70px rgba(16,24,40,.3); }
.preview-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.preview-top h3 { margin: 0; font-size: 16px; }
.preview-top p { overflow: hidden; margin: 5px 0 0; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.preview-body { min-height: 0; flex: 1; display: grid; place-items: center; padding: 20px; overflow: auto; background: #f4f6fa; }
.preview-image { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; background: white; box-shadow: 0 8px 24px rgba(16,24,40,.12); }
.preview-frame { width: 100%; height: 100%; min-height: 520px; border: 0; border-radius: 8px; background: white; box-shadow: 0 8px 24px rgba(16,24,40,.08); }
.preview-loading, .preview-message { display: grid; gap: 9px; padding: 35px; color: var(--muted); text-align: center; font-size: 13px; }
.preview-message strong { color: var(--text); font-size: 15px; }
.preview-error strong { color: var(--red); }
.preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.preview-footer > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-footer > div { display: flex; flex: 0 0 auto; gap: 9px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; padding: 13px 17px; border: 1px solid #b7ebcd; border-radius: 9px; color: #087443; background: white; box-shadow: var(--shadow); font-size: 13px; animation: slide-in .2s ease; }
@keyframes slide-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 1050px) {
  .sidebar { width: 208px; flex-basis: 208px; }
  .content { padding: 26px; }
  .two-columns { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .ledger-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .expense-filters { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(135px, .8fr)); }
  .date-filter { min-height: 38px; }
  .finance-scene-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .expense-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-filters > .search-input { grid-column: 1 / -1; }
  .finance-common-grid, .finance-scene-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-capital-preview-grid, .detail-funding-snapshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .login-page { display: block; }
  .login-brand { min-height: 270px; padding: 28px 24px; }
  .login-copy { margin-top: 52px; }
  .login-copy h1 { font-size: 31px; }
  .login-copy p, .login-features { display: none; }
  .login-panel { min-height: calc(100vh - 270px); padding: 20px; }
  .login-card { padding: 28px 22px; }
  .sidebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; width: 100%; height: 62px; padding: 6px 8px; border-top: 1px solid rgba(255,255,255,.1); }
  .sidebar .brand-mark, .nav-section, .sidebar-foot { display: none; }
  .nav-items { display: flex; justify-content: stretch; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .nav-items::-webkit-scrollbar { display: none; }
  .nav-group { flex: 1 1 0; min-width: 0; margin: 0; }
  .nav-group > .nav-item { width: 100%; }
  .nav-subitems { display: none; }
  .nav-group.mobile-open { z-index: 8; }
  .nav-group.mobile-open .nav-subitems { top: auto; bottom: 68px; left: 50%; display: grid; width: min(180px, calc(100vw - 24px)); min-width: 0; padding: 8px; visibility: visible; border: 1px solid rgba(183,197,232,.2); border-radius: 12px; background: #17284f; box-shadow: 0 12px 28px rgba(5,16,45,.3); opacity: 1; pointer-events: auto; transform: translateX(-50%); }
  .nav-item { width: 100%; min-width: 0; flex: 1 1 0; justify-content: center; flex-direction: column; gap: 2px; margin: 0; padding: 5px 2px; font-size: 10px; text-align: center; }
  .nav-icon { font-size: 15px; }
  .main-area { padding-bottom: 62px; }
  .topbar { height: 65px; padding: 0 18px; }
  .topbar-title { display: none; }
  .topbar-context { flex: 1; }
  .topbar-context .environment-badge { display: inline-flex; }
  .system-clock { display: none; }
  .content { padding: 22px 16px; }
  .page-heading { flex-direction: column; margin-bottom: 20px; }
  .page-heading h1 { font-size: 23px; }
  .page-heading > .btn { align-self: stretch; flex: 0 0 auto; min-height: 34px; padding: 0 10px; font-size: 12px; }
  .page-heading > .page-actions { width: 100%; }
  .page-actions { flex-wrap: wrap; }
  .page-actions .btn { flex: 1 1 auto; }
  .page-actions .btn-secondary { display: none; }
  .page-actions .snapshot-button { display: inline-flex; }
  .page-actions .project-back-button { display: inline-flex; }
  .page-actions .ledger-export-button { display: inline-flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-value { margin-top: 8px; font-size: 24px; }
  .quick-actions { gap: 8px; }
  .card-header, .card-body { padding: 16px; }
  .expense-filters { grid-template-columns: 1fr; }
  .task-filters { grid-template-columns: 1fr; padding: 16px 16px 10px; }
  .task-filter-summary { padding: 0 16px 16px; }
  .date-filter { min-height: 38px; padding: 0 12px; }
  .date-filter span { flex-basis: 56px; }
  .process-center-card .card-body { overflow: hidden; }
  .process-tabs { gap: 4px; padding: 11px 16px 0; }
  .workbench-tabs { padding: 11px 16px 0; }
  .process-result-note { margin-top: -2px; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .project-capital-preview-grid, .detail-funding-snapshot-grid { grid-template-columns: 1fr; }
  .user-form-grid { grid-template-columns: 1fr; padding: 18px 16px; }
  .user-form-grid .form-field.full { grid-column: auto; }
  .project-checks { grid-template-columns: 1fr; }
  .snapshot-toolbar, .snapshot-row { align-items: flex-start; flex-direction: column; padding-right: 16px; padding-left: 16px; }
  .snapshot-row .btn { width: 100%; }
  .snapshot-restore-confirm { padding: 18px 16px; }
  .snapshot-confirm-actions { align-items: stretch; flex-direction: column-reverse; }
  .snapshot-confirm-actions .btn { width: 100%; }
  .form-config-list { padding: 16px; }
  .form-config-row { grid-template-columns: 28px minmax(0, 1fr); align-items: start; }
  .form-config-fields { grid-template-columns: 1fr; }
  .form-field-options { grid-column: auto; }
  .form-config-row .step-actions { grid-column: 2; }
  .form-config-note { margin: 0 16px 16px; }
  .workflow-step-editor { grid-template-columns: 28px minmax(0, 1fr); align-items: start; }
  .step-fields { grid-template-columns: 1fr; }
  .step-actions { grid-column: 2; }
  .workflow-history-row { align-items: flex-start; flex-direction: column; padding: 15px 16px; }
  .workflow-history-row .btn { width: 100%; }
  .workflow-history-empty { padding: 24px 16px; }
  .workflow-rules { grid-template-columns: 1fr; padding: 16px; }
  .form-field.full { grid-column: auto; }
  .form-section { padding: 18px 16px; }
  .form-footer { padding: 16px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .search-input { width: 100%; }
  .task-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .project-filters { grid-template-columns: 1fr; padding: 16px 16px 10px; }
  .project-filter-summary { padding: 0 16px 16px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-contract-funding-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-approval-row { align-items: flex-start; flex-direction: column; }
  .project-approval-row select { width: 100%; }
  .project-approval-fixed { width: 100%; min-width: 0; text-align: left; }
  .project-detail-summary, .project-detail-body { grid-template-columns: 1fr; }
  .project-detail-summary { padding: 16px; }
  .project-detail-health { align-items: flex-start; flex-direction: column; padding: 14px 16px; }
  .project-detail-health > div { justify-content: flex-start; }
  .project-detail-body { padding: 16px; }
  .project-detail-contract-section { grid-column: auto; }
  .project-detail-ledger-section { grid-column: auto; }
  .project-detail-ledger-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-detail-row-actions { align-items: flex-end; flex-direction: column; gap: 5px; }
  .project-detail-footer { align-items: stretch; flex-direction: column; }
  .project-detail-footer .btn { width: 100%; }
  .member-filter { align-items: stretch; flex-direction: column; padding: 16px; }
  .member-filter select { width: 100%; }
  .member-project-header { padding: 17px 16px 15px; }
  .member-manager-row { gap: 12px; padding: 14px 16px; }
  .member-manager-row > span { width: 52px; flex-basis: 52px; }
  .member-list { padding: 5px 16px; }
  .member-add-row { padding: 14px 16px 16px; }
  .member-add-note { margin-right: 16px; margin-left: 16px; }
  .ledger-filter { align-items: stretch; flex-direction: column; padding: 16px; }
  .ledger-filter select { width: 100%; }
  .ledger-stats { grid-template-columns: 1fr; gap: 10px; }
  .ledger-stat { padding: 15px 16px; }
  .ledger-stat strong { margin: 8px 0 6px; font-size: 20px; }
  .contract-filters { grid-template-columns: 1fr; padding: 16px; }
  .contract-filter-note { padding: 0 16px 15px; }
  .contract-table-card .card-header { align-items: flex-start; }
  .contract-modal { width: 100%; }
  .finance-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .finance-template-card { min-height: 122px; padding: 14px; }
  .finance-entry-panel, .finance-scene-panel, .finance-all-panel { padding: 16px; }
  .finance-entry-heading, .finance-scene-heading, .finance-scene-form-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .finance-common-grid, .finance-scene-grid, .finance-template-option-grid { grid-template-columns: 1fr; }
  .finance-entry-info { align-items: stretch; flex-direction: column; padding: 16px; }
  .finance-entry-info .btn { width: 100%; }
  .finance-scene-title { align-items: flex-start; margin: 20px 0 22px; }
  .finance-template-group-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .announcement-grid, .task-grid { grid-template-columns: 1fr; gap: 12px; }
  .document-filters { grid-template-columns: 1fr; padding: 16px; }
  .document-filter-note { padding: 0 16px 15px; line-height: 1.6; }
  .document-grid { grid-template-columns: 1fr; gap: 12px; }
  .document-card { padding: 16px; }
  .document-bottom { align-items: flex-start; flex-direction: column; }
  .document-actions { justify-content: flex-start; }
  .document-history-list { padding: 5px 16px 16px; }
  .announcement-card, .task-card { padding: 16px; }
  .task-detail-summary { grid-template-columns: 1fr; padding: 16px; }
  .task-detail-section { padding: 16px; }
  .task-detail-modal .form-footer { align-items: stretch; flex-direction: column; }
  .task-detail-modal .form-footer .btn, .task-detail-status-actions { width: 100%; }
  .task-detail-status-actions { justify-content: flex-start; }
  .task-stats { gap: 8px; }
  .task-stats .card { padding: 13px; }
  .task-stats strong { font-size: 21px; }
  .announcement-meta time { margin-left: 0; }
  .user-meta { display: none; }
  .user-profile { padding-right: 0; }
  .notification-panel { position: fixed; top: 70px; right: 12px; left: 12px; width: auto; }
  .toast { right: 16px; bottom: 78px; }
  .approval-actions { flex-wrap: wrap; padding: 14px 16px; }
  .approval-actions .btn { flex: 1 1 42%; }
  .action-form { padding: 16px; }
  .approval-note-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .action-form-actions { flex-wrap: wrap; }
  .action-form-actions .btn { flex: 1; }
  .detail-header { flex-direction: column; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 94vh; border-radius: 16px 16px 0 0; }
  .user-modal-backdrop { align-items: end; padding: 0; }
  .user-modal { width: 100%; max-height: 94vh; border-radius: 16px 16px 0 0; }
  .preview-backdrop { align-items: end; padding: 0; }
  .preview-modal { width: 100%; height: 94vh; border-radius: 16px 16px 0 0; }
  .preview-body { padding: 12px; }
  .preview-frame { min-height: 0; }
  .preview-footer { align-items: flex-end; padding: 10px 14px; }
  .detail { padding: 16px; }
  .table-wrap { width: 100%; max-width: 100%; }
  table { min-width: 620px; }
  th, td { padding-left: 14px; padding-right: 14px; }
}
