:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #172033;
  --muted: #697386;
  --line: #e3e7ee;
  --primary: #246bfd;
  --primary-dark: #1854d1;
  --danger: #e5484d;
  --success: #1f9d68;
  --shadow: 0 18px 48px rgba(22, 32, 51, .12);
  --radius: 18px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; }
[hidden] { display: none !important; }
.btn { border: 0; border-radius: 12px; min-height: 42px; padding: 0 16px; background: #e9edf4; color: #30384a; font-weight: 700; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 8px 22px rgba(36, 107, 253, .25); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { background: #fff0f0; color: var(--danger); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.small { min-height: 34px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn.icon { width: 42px; padding: 0; display: grid; place-items: center; }
.field { display: grid; gap: 7px; }
.field label { color: #394258; font-size: 13px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); padding: 11px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(36, 107, 253, .12); }
.muted { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: #edf1f7; color: #4f5b70; font-size: 12px; font-weight: 700; }
.pill.feedback { background: #fff3e8; color: #b95314; }
.pill.waiting { background: #eaf2ff; color: #2160c4; }
.pill.completed { background: #e9f8f1; color: #177d52; }
.pill.archived { background: #eceef2; color: #626b79; }
.empty { padding: 38px 20px; text-align: center; color: var(--muted); border: 1px dashed #cfd6e1; border-radius: 14px; background: #fafbfc; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.clipboard-helper { position: fixed; left: -9999px; top: 0; opacity: 0; pointer-events: none; }
.toast-stack { position: fixed; z-index: 1000; top: 20px; right: 20px; display: grid; gap: 10px; }
.toast { max-width: 360px; padding: 13px 16px; border-radius: 12px; background: #192235; color: #fff; box-shadow: var(--shadow); animation: toast-in .2s ease; }
.toast.error { background: #a7242b; }
.toast.success { background: #16734d; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }
.admin-body { min-height: 100vh; background: linear-gradient(180deg, #f6f8fb 0%, #eef1f6 100%); }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); padding: 34px; border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, #246bfd, #6ea2ff); color: #fff; font-size: 24px; font-weight: 900; box-shadow: 0 10px 24px rgba(36,107,253,.28); }
.login-card h1 { margin: 18px 0 7px; font-size: 25px; }
.login-card p { margin: 0 0 25px; color: var(--muted); line-height: 1.65; }
.login-card .btn { width: 100%; margin-top: 18px; }
.admin-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 14px max(24px, calc((100vw - 1320px) / 2)); background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(220,225,234,.9); backdrop-filter: blur(16px); }
.admin-header .brand { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.admin-header .brand-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
.admin-header .brand strong { display: block; font-size: 16px; }
.admin-header .brand span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.admin-header .header-actions { margin-left: auto; display: flex; gap: 10px; }
.default-warning { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 10px; background: #fff8e7; color: #966112; font-size: 12px; }
.admin-main { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 26px 0 60px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin-top: 8px; font-size: 25px; }
.admin-grid { display: grid; grid-template-columns: minmax(300px, 390px) 1fr; gap: 18px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(31,43,68,.04); }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 17px; }
.panel-head .grow { flex: 1; }
.panel-body { padding: 20px; }
.create-form { display: grid; gap: 15px; }
.new-project-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.new-project-dropzone { display: grid; gap: 5px; padding: 18px 14px; border: 1.5px dashed #8ca8d6; border-radius: 14px; background: linear-gradient(135deg, #f4f8ff, #eef4ff); color: #3e4c65; text-align: center; transition: border-color .15s, background .15s; }
.new-project-dropzone strong { color: #2859a8; font-size: 13px; }
.new-project-dropzone span { color: #70809a; font-size: 11px; line-height: 1.5; }
.new-project-dropzone.dragover { border-color: #2f7cf6; background: #e4efff; }
.batch-share-panel { margin: 0 16px 16px; padding: 13px; border: 1px solid #c9daf7; border-radius: 14px; background: #f4f8ff; }
.batch-share-head { display: flex; align-items: flex-start; gap: 10px; }
.batch-share-head > div { min-width: 0; flex: 1; }
.batch-share-head strong { display: block; color: #2859a8; font-size: 13px; }
.batch-share-head span { display: block; margin-top: 3px; color: #70809a; font-size: 11px; }
.batch-share-list { display: grid; gap: 7px; margin-top: 11px; }
.batch-share-item { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 10px; background: #fff; border: 1px solid #dbe5f5; }
.batch-share-item div { min-width: 0; flex: 1; }
.batch-share-item strong { display: block; color: #344258; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-share-item span { display: block; margin-top: 2px; color: #74849c; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-share-item button { flex: 0 0 auto; border: 0; background: transparent; color: #2f6df6; font-size: 11px; font-weight: 800; }
.project-list { display: grid; gap: 12px; padding: 16px; }
.project-card { padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; transition: border-color .15s, transform .15s, box-shadow .15s; }
.project-card:hover { border-color: #b8c9ec; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(36,107,253,.08); }
.project-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(36,107,253,.09); }
.project-card .top { display: flex; gap: 10px; align-items: flex-start; }
.project-card h3 { margin: 0 0 5px; font-size: 16px; }
.project-card p { margin: 0; color: var(--muted); font-size: 13px; }
.project-card .meta { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 13px; color: var(--muted); font-size: 12px; }
.project-card .actions { display: flex; gap: 8px; margin-top: 14px; }
.project-card .actions .btn { flex: 1; }
.workspace { min-height: 560px; }
.workspace-toolbar { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.workspace-toolbar h2 { margin: 0; font-size: 18px; }
.workspace-toolbar .grow { flex: 1; }
.order-extra { border: 1px solid #dbe3ef; border-radius: 13px; background: #f8fafc; }
.order-extra summary { padding: 11px 12px; color: #44536b; font-size: 12px; font-weight: 800; cursor: pointer; }
.order-extra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding: 0 12px 13px; }
.order-extra-grid .order-wide { grid-column: 1 / -1; }
.checkbox-field { display: flex; align-items: center; gap: 8px; padding-top: 24px; color: #44536b; font-size: 12px; font-weight: 700; }
.checkbox-field input { width: 16px; height: 16px; accent-color: #2f6df6; }
.stage-progress { display: flex; gap: 6px; margin: 14px 18px 0; padding: 5px; overflow-x: auto; scrollbar-width: none; }
.stage-progress::-webkit-scrollbar { display: none; }
.stage-step { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: #eef2f7; color: #8a96a9; }
.stage-step span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #dbe2ed; font-size: 10px; font-weight: 900; }
.stage-step strong { font-size: 10px; white-space: nowrap; }
.stage-step.completed { background: #eaf8f1; color: #28815d; }
.stage-step.completed span { background: #2fa572; color: #fff; }
.stage-step.active { background: #e8f1ff; color: #2f6df6; box-shadow: 0 0 0 1px #bcd2ff inset; }
.stage-step.active span { background: #2f6df6; color: #fff; }
.workflow-strip { display: flex; align-items: center; gap: 8px; margin: 0 18px 14px; padding: 11px 12px; border: 1px solid #d7e3f7; border-left: 4px solid #2f6df6; border-radius: 12px; background: linear-gradient(90deg, #f2f7ff, #fbfdff); }
.workflow-current { min-width: 220px; display: grid; gap: 2px; }
.workflow-stage { color: #2f6df6; font-size: 12px; font-weight: 900; }
.workflow-current small { color: #7b879b; font-size: 10px; }
.workflow-strip select { min-width: 170px; min-height: 34px; padding: 0 9px; border: 1px solid #d4ddeb; border-radius: 9px; background: #fff; color: #344258; font-size: 12px; }
.settlement-strip { display: flex; align-items: center; gap: 8px; margin: 0 18px 14px; padding: 10px 12px; border: 1px solid #e4e8ef; border-radius: 12px; background: #fbfcfe; }
.settlement-label { min-width: 150px; color: #52617a; font-size: 12px; font-weight: 800; }
.settlement-strip select { min-width: 145px; min-height: 34px; padding: 0 9px; border: 1px solid #d4ddeb; border-radius: 9px; background: #fff; color: #344258; font-size: 12px; }
.assignment-strip { display: flex; align-items: center; gap: 10px; margin: 0 18px 14px; padding: 10px 12px; border: 1px solid #e3e7ef; border-radius: 12px; background: #fbfcfe; }
.assignment-strip label { display: flex; align-items: center; gap: 6px; color: #65728a; font-size: 11px; font-weight: 800; }
.assignment-strip select { min-height: 34px; min-width: 120px; padding: 0 9px; border: 1px solid #d4ddeb; border-radius: 9px; background: #fff; color: #344258; }
.share-box { display: flex; gap: 8px; margin: 0 18px 18px; padding: 12px; border-radius: 12px; background: #f3f7ff; border: 1px solid #dce7ff; }
.share-box input { min-width: 0; flex: 1; border: 0; background: transparent; color: #2e5fb7; outline: none; }
.organize-button { border: 1px solid #d97706; background: linear-gradient(135deg, #f59e0b, #fb923c); color: #201400; font-weight: 900; box-shadow: 0 8px 20px rgba(245, 158, 11, .22); }
.organize-button:hover { border-color: #fbbf24; background: linear-gradient(135deg, #fbbf24, #fb923c); color: #160e00; transform: translateY(-1px); }
.organize-button:disabled { border-color: #3a4658; background: #252d39; color: #748095; box-shadow: none; }



.workspace-body { padding: 0 18px 20px; }
.dropzone { margin: 0 0 18px; padding: 22px; border: 1.5px dashed #b9c6da; border-radius: 15px; background: #fafcff; text-align: center; transition: border-color .15s, background .15s; }
.dropzone.dragover { border-color: var(--primary); background: #eef4ff; }
.dropzone strong { display: block; margin-bottom: 5px; }
.dropzone p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.revision-upload-progress { display: grid; gap: 8px; margin: 0 0 16px; padding: 13px; border: 1px solid #bcd0f2; border-radius: 12px; background: #f3f7ff; }
.revision-upload-progress > div { display: flex; justify-content: space-between; gap: 12px; color: #64748b; font-size: 12px; }
.revision-upload-progress strong { color: #2d5ea8; }
.revision-upload-progress progress { width: 100%; height: 8px; accent-color: #2f6df6; }
.image-list { display: grid; gap: 12px; }
.image-review { display: grid; grid-template-columns: 116px 1fr; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; }
.image-thumb { width: 116px; height: 86px; border-radius: 11px; background: #111722; overflow: hidden; display: grid; place-items: center; color: #7f8b9f; font-size: 11px; }
.image-thumb img { width: 100%; height: 100%; object-fit: contain; }
.image-review h4 { margin: 2px 0 6px; font-size: 14px; overflow-wrap: anywhere; }
.image-review .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.image-review .review-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.feedback-list { display: grid; gap: 8px; margin-top: 11px; }
.feedback-item { padding: 10px 11px; border-radius: 10px; background: #f7f9fc; color: #3d475a; font-size: 13px; line-height: 1.55; }
.feedback-item strong { color: var(--danger); margin-right: 6px; }
.empty-project { display: grid; place-items: center; min-height: 420px; color: var(--muted); text-align: center; padding: 30px; }
.admin-review-modal { position: fixed; z-index: 620; inset: 0; background: #090c11; color: #edf1f7; color-scheme: dark; }
.admin-review-shell { height: 100dvh; display: grid; grid-template-rows: 70px minmax(0, 1fr); }
.admin-review-header { z-index: 10; display: flex; align-items: center; gap: 18px; padding: 10px 16px; background: #151b25; border-bottom: 1px solid #28303d; }
.admin-review-title { min-width: 0; flex: 1; }
.review-kicker { display: block; margin-bottom: 3px; color: #6f9cff; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.admin-review-title h2 { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-review-title p { margin: 3px 0 0; color: #8793a4; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-review-header-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.admin-review-header-actions .btn { min-height: 34px; }
.admin-review-main { min-height: 0; display: grid; grid-template-columns: 164px minmax(0, 1fr) 350px; }
.admin-review-nav, .admin-review-feedback { min-height: 0; overflow-y: auto; background: #111720; }
.admin-review-nav { padding: 11px; border-right: 1px solid #28303d; }
.admin-review-feedback { border-left: 1px solid #28303d; }
.review-panel-label { padding: 5px 4px 11px; color: #778396; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.review-image-nav { display: grid; gap: 8px; }
.review-image-nav button { position: relative; width: 100%; padding: 0; border: 1px solid #303949; border-radius: 10px; overflow: hidden; background: #1b222d; color: #cbd3df; text-align: left; }
.review-image-nav button.active { border-color: #5b8cff; box-shadow: 0 0 0 2px rgba(91,140,255,.18); }
.review-image-nav img { display: block; width: 100%; height: 88px; background: #090c11; object-fit: contain; }
.review-image-nav span { display: block; padding: 6px 7px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-image-nav .review-nav-count { position: absolute; top: 6px; right: 6px; min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; background: #ff9f0a; color: #211500; font-size: 10px; font-weight: 900; }
.admin-review-stage-wrap { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: #090c11; }
.admin-review-stage { position: relative; min-height: 0; overflow: hidden; touch-action: none; }
#adminReviewCanvas { display: block; width: 100%; height: 100%; user-select: none; cursor: grab; }
#adminReviewCanvas:active { cursor: grabbing; }
.review-loading { position: absolute; z-index: 4; inset: 0; display: grid; place-items: center; background: rgba(9,12,17,.84); color: #cbd3df; font-size: 13px; }
.review-floating-hint { position: absolute; z-index: 3; top: 11px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 7px 11px; border-radius: 999px; background: rgba(21,27,37,.86); border: 1px solid #394456; color: #aeb9c9; font-size: 10px; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-review-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #151b25; border-top: 1px solid #28303d; }
.review-toolbar-tip { margin-left: auto; color: #778396; font-size: 10px; white-space: nowrap; }
.admin-review-feedback { padding: 12px; }
.review-comments { display: grid; gap: 9px; }
.review-comment { padding: 12px; border: 1px solid #303949; border-radius: 11px; background: #1a212c; cursor: pointer; }
.review-comment.selected { border-color: #5b8cff; background: #1c2942; }
.review-comment-main { display: flex; align-items: flex-start; gap: 9px; }
.review-comment-index { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #ff453a; color: #fff; font-size: 11px; font-weight: 900; }
.review-comment p { flex: 1; margin: 3px 0 0; color: #e2e8f1; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.review-comment small { display: block; margin-top: 7px; color: #778396; font-size: 10px; }
.review-reference { margin-top: 10px; padding-top: 9px; border-top: 1px solid #303949; }
.review-reference-label { display: block; margin-bottom: 6px; color: #87aaf0; font-size: 10px; font-weight: 800; }
.review-reference img { display: block; width: 100%; max-height: 180px; border-radius: 9px; background: #0c1118; object-fit: contain; cursor: zoom-in; }
.scene-wide-note { margin-bottom: 10px; padding: 12px; border: 1px solid #4c6ba8; border-radius: 11px; background: #172642; color: #dce7fb; font-size: 12px; line-height: 1.6; }
.scene-wide-note strong { display: block; margin-bottom: 5px; color: #9fc0ff; font-size: 11px; }
.scene-wide-note img { display: block; width: 100%; max-height: 150px; margin-top: 8px; border-radius: 8px; background: #0c1118; object-fit: contain; cursor: zoom-in; }
.review-comment-empty { padding: 28px 13px; border: 1px dashed #344054; border-radius: 11px; color: #7f8b9d; text-align: center; font-size: 12px; line-height: 1.7; }
/* Settlement center */
.settlement-panel { margin-bottom: 20px; padding: 22px; border: 1px solid rgba(214,222,235,.9); border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 16px 42px rgba(31,49,78,.07); }
.settlement-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.settlement-panel-head h2 { margin: 5px 0 3px; font-size: 21px; }
.settlement-panel-head p { margin: 0; color: #738096; font-size: 12px; }
.settlement-panel-tools { display: flex; gap: 8px; }
.settlement-panel-tools input { min-height: 36px; padding: 0 10px; border: 1px solid #d9e1ee; border-radius: 9px; background: #f8fafc; color: #344258; }
.settlement-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 17px 0; }
.settlement-summary div { padding: 13px 15px; border-radius: 13px; background: #f4f7fc; }
.settlement-summary span { display: block; color: #7b879b; font-size: 11px; }
.settlement-summary strong { display: block; margin-top: 5px; color: #27374f; font-size: 21px; }
.commission-board { margin-top: 20px; padding-top: 17px; border-top: 1px solid #e4e9f1; }
.commission-board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.commission-board-head h3 { margin: 0; font-size: 16px; }
.commission-board-head span { color: #7c899c; font-size: 11px; }
.commission-settlement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 11px; margin-top: 12px; }
.commission-user-card { padding: 14px; border: 1px solid #dfe6f0; border-radius: 14px; background: #fbfcff; }
.commission-user-head { display: flex; justify-content: space-between; gap: 8px; }
.commission-user-head strong { font-size: 14px; }
.commission-money { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 11px 0; }
.commission-money div { padding: 8px; border-radius: 9px; background: #f1f5fb; }
.commission-money span { display: block; color: #8390a5; font-size: 10px; }
.commission-money strong { display: block; margin-top: 3px; font-size: 13px; }
.commission-items { display: grid; gap: 6px; }
.commission-item { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 8px; background: #fff; border: 1px solid #e6ebf3; }
.commission-item span { min-width: 0; flex: 1; color: #51617a; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.commission-item button { border: 0; background: transparent; color: #269b68; font-size: 10px; font-weight: 800; }
.settlement-merchant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.settlement-merchant-card { padding: 15px; border: 1px solid #dfe6f0; border-radius: 15px; background: #fbfcff; }
.settlement-merchant-head { display: flex; align-items: flex-start; gap: 8px; }
.settlement-merchant-head > div { min-width: 0; flex: 1; }
.settlement-merchant-head h3 { margin: 0 0 3px; font-size: 15px; }
.settlement-merchant-head span { color: #7b879b; font-size: 11px; }
.settlement-money { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.settlement-money div { padding: 9px; border-radius: 9px; background: #f1f5fb; }
.settlement-money span { display: block; color: #8390a5; font-size: 10px; }
.settlement-money strong { display: block; margin-top: 3px; color: #2f405a; font-size: 14px; }
.settlement-projects { display: grid; gap: 6px; margin-bottom: 10px; }
.settlement-project-row { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 8px; background: #fff; border: 1px solid #e6ebf3; }
.settlement-project-row span { min-width: 0; flex: 1; color: #51617a; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settlement-project-row button { border: 0; background: transparent; color: #269b68; font-size: 10px; font-weight: 800; }
.settlement-card-actions { display: flex; gap: 7px; }
.settlement-card-actions .btn { flex: 1; min-height: 34px; }
.current-user-badge { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; background: #eef4ff; color: #2f6df6; font-size: 11px; font-weight: 800; }
.user-modal { position: fixed; z-index: 420; inset: 0; display: grid; place-items: center; padding: 22px; }
.user-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,38,.52); backdrop-filter: blur(5px); }
.user-modal-card { position: relative; width: min(860px, 100%); max-height: calc(100dvh - 44px); overflow: auto; padding: 22px; border-radius: 20px; background: #fff; box-shadow: 0 28px 80px rgba(20,35,60,.28); }
.user-modal-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.user-modal-head h2 { margin: 4px 0 3px; }
.user-modal-head p { margin: 0; color: #768399; font-size: 12px; }
.user-create-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 15px; border-radius: 14px; background: #f6f8fb; }
.user-create-form .btn { grid-column: 1 / -1; }
.permission-editor { padding: 16px; border: 1px solid #dde5f0; border-radius: 14px; background: #f8fafc; }
.permission-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.permission-editor-head h3 { margin: 0 0 4px; }
.permission-editor-head p { margin: 0; color: #7b879a; font-size: 11px; }
.commission-setting { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 15px; padding: 13px; border: 1px solid #dde5f0; border-radius: 12px; background: #fff; }
.permission-checkboxes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 16px 0; }
.permission-checkbox { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #e0e6ef; border-radius: 10px; background: #fff; color: #45536b; font-size: 12px; }
.permission-checkbox input { width: 16px; height: 16px; accent-color: #2f6df6; }
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.settings-modal-card .btn.primary { margin-top: 16px; }
.user-list { display: grid; gap: 9px; margin-top: 18px; }
.user-row { display: grid; grid-template-columns: 1.2fr 1fr .8fr .7fr auto auto auto; gap: 9px; align-items: center; padding: 10px; border: 1px solid #e2e7ef; border-radius: 11px; }
.user-row strong { font-size: 13px; }
.user-row span { color: #748198; font-size: 11px; }
.user-row select { min-height: 34px; border: 1px solid #d8e0ec; border-radius: 8px; background: #fff; }
.user-row .btn { min-height: 34px; }
/* Intake center */
.intake-main { width: min(1120px, calc(100% - 32px)); margin: 28px auto 60px; }
.intake-header { position: sticky; top: 0; }
.intake-tabs { display: flex; gap: 8px; margin-bottom: 16px; padding: 5px; border-radius: 14px; background: #e9eef6; }
.intake-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: #66748b; font-weight: 800; }
.intake-tabs button.active { background: #fff; color: #2f6df6; box-shadow: 0 7px 18px rgba(36,67,120,.1); }
.intake-panel { padding: 24px; border: 1px solid #dce4f0; border-radius: 22px; background: #fff; box-shadow: 0 18px 46px rgba(31,49,78,.09); }
.intake-intro { margin-bottom: 20px; }
.intake-intro h1 { margin: 5px 0 7px; font-size: 26px; }
.intake-intro p { margin: 0; color: #748198; font-size: 13px; line-height: 1.7; }
.intake-quick-entry { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-bottom: 15px; padding: 14px; border-radius: 14px; background: #f5f8fd; }
.intake-dropzone { display: grid; place-items: center; gap: 8px; min-height: 230px; padding: 30px; border: 2px dashed #a9bddc; border-radius: 18px; background: linear-gradient(145deg, #f5f9ff, #edf4ff); text-align: center; transition: border-color .16s, background .16s, transform .16s; }
.intake-dropzone.dragover { border-color: #2f6df6; background: #e3efff; transform: scale(1.005); }
.intake-dropzone strong { color: #274d89; font-size: 18px; }
.intake-dropzone span { color: #77869f; font-size: 12px; }
.intake-result-card { margin-top: 18px; padding: 18px; border: 1px solid #dce4f0; border-radius: 16px; background: #fafcff; }
.intake-result-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.intake-result-head h2 { min-width: 0; flex: 1; margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.intake-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.intake-match-info { margin: 12px 0; padding: 11px; border-radius: 10px; background: #f1f5fb; color: #55657d; font-size: 12px; line-height: 1.6; }
.intake-progress { margin-top: 15px; padding: 13px; border-radius: 12px; background: #f1f5fb; color: #4f5f77; font-size: 12px; }
@media (max-width: 760px) {
  .intake-main { width: calc(100% - 20px); margin-top: 14px; }
  .intake-panel { padding: 16px; }
  .intake-intro h1 { font-size: 21px; }
  .intake-form-grid { grid-template-columns: 1fr; }`r`n  .intake-quick-entry { grid-template-columns: 1fr; }
  .intake-header .header-actions { width: 100%; }
}
/* Tech admin theme and kanban */
.admin-body { background: radial-gradient(circle at 12% 0%, #12284a 0, transparent 34%), radial-gradient(circle at 92% 4%, #103033 0, transparent 28%), #080d15 !important; color: #e7eef9; }
.admin-body .admin-header { background: rgba(10,17,28,.92); border-bottom-color: #223148; box-shadow: 0 10px 34px rgba(0,0,0,.28); }
.admin-body .brand strong, .admin-body h1, .admin-body h2, .admin-body h3, .admin-body h4 { color: #edf4ff; }
.admin-body .brand span, .admin-body p, .admin-body .muted, .admin-body .project-customer, .admin-body small { color: #8493aa; }
.admin-body .panel, .admin-body .dashboard-panel, .admin-body .settlement-panel { background: rgba(15,24,38,.94); border-color: #26364c; box-shadow: 0 16px 42px rgba(0,0,0,.24); }
.admin-body .panel-head, .admin-body .workspace-toolbar { border-color: #27364a; background: rgba(17,28,44,.75); }
.admin-body .project-list { scrollbar-color: #334966 transparent; }
.admin-body .project-card { background: #111c2c; border-color: #26374d; }
.admin-body .project-card:hover, .admin-body .project-card.selected { background: linear-gradient(145deg, #13253d, #101a2a); border-color: #3c7eff; }
.admin-body .field label, .admin-body .order-extra summary { color: #aebbd0; }
.admin-body .field input, .admin-body .field textarea, .admin-body .field select, .admin-body .dashboard-tools input, .admin-body .workflow-strip select, .admin-body .settlement-strip select { background: #0d1725; color: #e8f0fb; border-color: #2b3d56; }
.admin-body .order-extra, .admin-body .new-project-dropzone, .admin-body .workflow-strip, .admin-body .settlement-strip { background: #101a29; border-color: #293a50; }
.admin-body .dashboard-grid { grid-template-columns: repeat(8, minmax(235px, 1fr)); overflow-x: auto; padding-bottom: 8px; scrollbar-color: #365079 transparent; }
.admin-body .dashboard-tabs { display: none; }
.kanban-column { min-height: 420px; padding: 10px; border: 1px solid #26374d; border-radius: 14px; background: rgba(13,23,36,.84); }
.kanban-column.dragover { border-color: #4d91ff; box-shadow: 0 0 0 2px rgba(77,145,255,.18) inset; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px; color: #aebcd0; font-size: 12px; }
.kanban-head span { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 999px; background: #1b2d47; color: #83b1ff; font-weight: 900; }
.kanban-list { display: grid; gap: 9px; }
.kanban-empty { padding: 24px 8px; border: 1px dashed #2c405c; border-radius: 10px; color: #62728b; text-align: center; font-size: 11px; }
.kanban-card { padding: 12px; border: 1px solid #2a3b53; border-radius: 12px; background: linear-gradient(145deg, #162438, #111b2a); cursor: grab; transition: transform .15s, border-color .15s, box-shadow .15s; }
.kanban-card:hover { transform: translateY(-2px); border-color: #4d85dd; box-shadow: 0 10px 24px rgba(31,99,205,.14); }
.kanban-card.dragging { opacity: .48; }
.kanban-card-top { display: flex; align-items: flex-start; gap: 7px; }
.kanban-card-top strong { min-width: 0; flex: 1; color: #edf4ff; font-size: 13px; line-height: 1.4; }
.kanban-card-top .pill { font-size: 9px; padding: 3px 6px; }
.kanban-customer { margin-top: 6px; color: #8291a8; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kanban-metrics { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; color: #8ea0ba; font-size: 9px; }
.kanban-metrics span { padding: 4px 6px; border-radius: 6px; background: #0e1826; }
.kanban-actions { display: flex; gap: 6px; }
.kanban-actions .btn { flex: 1; min-height: 31px; font-size: 10px; padding: 0 7px; }
@media (max-width: 760px) {
  .admin-body .dashboard-grid { grid-template-columns: repeat(8, 250px); }
  .kanban-column { min-height: 360px; }
}
/* Admin redesign */
.admin-body { background: radial-gradient(circle at 8% 0%, #e9f1ff 0, transparent 30%), linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%); }
.admin-header { background: rgba(255,255,255,.92); box-shadow: 0 8px 26px rgba(29,48,78,.06); }
.admin-main { width: min(1440px, calc(100% - 48px)); }
.stats-redesign { gap: 16px; }
.stats-redesign .stat { position: relative; min-height: 126px; overflow: hidden; padding: 22px 24px; border: 0; box-shadow: 0 12px 32px rgba(35,55,88,.1); color: #fff; }
.stats-redesign .stat::after { content: ''; position: absolute; width: 130px; height: 130px; right: -48px; top: -60px; border-radius: 50%; background: rgba(255,255,255,.16); }
.stats-redesign .stat span, .stats-redesign .stat small { position: relative; z-index: 1; color: rgba(255,255,255,.82); }
.stats-redesign .stat strong { position: relative; z-index: 1; margin: 8px 0 5px; font-size: 32px; }
.stats-redesign .stat small { display: block; font-size: 11px; }
.stat-total { background: linear-gradient(135deg, #3069d8, #5994ff); }
.stat-waiting { background: linear-gradient(135deg, #7357c9, #9c7be8); }
.stat-action { background: linear-gradient(135deg, #e56b2f, #f49a43); }
.dashboard-panel { margin-bottom: 20px; padding: 22px; border: 1px solid rgba(214,222,235,.9); border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 16px 42px rgba(31,49,78,.08); }
.dashboard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.dashboard-eyebrow { color: #2f6df6; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.dashboard-title h2 { margin: 5px 0 3px; font-size: 23px; }
.dashboard-title p { margin: 0; color: #738096; font-size: 12px; }
.dashboard-tools { display: grid; gap: 10px; justify-items: end; }
.dashboard-tools input { width: 250px; min-height: 40px; padding: 0 13px; border: 1px solid #d9e1ee; border-radius: 11px; background: #f8fafc; color: #26344a; outline: none; }
.dashboard-tools input:focus { border-color: #6a9af6; box-shadow: 0 0 0 3px rgba(47,109,246,.1); }
.dashboard-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: #eef2f8; }
.dashboard-tabs button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #65728a; font-size: 12px; font-weight: 800; }
.dashboard-tabs button span { margin-left: 4px; }
.dashboard-tabs button.active { background: #fff; color: #2f6df6; box-shadow: 0 5px 14px rgba(39,66,108,.11); }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 13px; }
.dashboard-card { position: relative; overflow: hidden; padding: 17px; border: 1px solid #dfe6f0; border-radius: 16px; background: linear-gradient(150deg, #fff, #f9fbff); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.dashboard-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: #2f6df6; }
.dashboard-card.action::before { background: #ef7d32; }
.dashboard-card.waiting::before { background: #7357c9; }
.dashboard-card.completed::before { background: #269b68; }
.dashboard-card:hover { transform: translateY(-2px); border-color: #b9caf0; box-shadow: 0 14px 32px rgba(47,109,246,.12); }
.dashboard-card-head { display: flex; align-items: flex-start; gap: 10px; }
.dashboard-card-head > div { min-width: 0; flex: 1; }
.dashboard-card h3 { margin: 0 0 4px; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-card .project-customer { color: #748198; font-size: 12px; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 15px 0; }
.dashboard-metrics div { padding: 9px; border-radius: 10px; background: #f2f5fa; }
.dashboard-metrics strong { display: block; color: #2a3850; font-size: 15px; }
.dashboard-metrics span { color: #8390a5; font-size: 10px; }
.dashboard-settlement { margin-bottom: 11px; padding: 7px 9px; border-radius: 9px; background: #f4f7fc; color: #62708a; font-size: 11px; }
.dashboard-card-actions { display: flex; gap: 8px; }
.dashboard-card-actions .btn { flex: 1; min-height: 36px; }
.dashboard-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 150px; padding: 25px; border: 1px dashed #cfd9e8; border-radius: 15px; color: #7d899c; background: #fafcff; text-align: center; }
.project-card { box-shadow: 0 7px 20px rgba(31,49,78,.05); }
.project-card.selected { border-color: #5b8cff; background: linear-gradient(145deg, #fff, #f5f8ff); }
.panel { box-shadow: 0 14px 38px rgba(31,49,78,.07); }
.workspace { position: sticky; top: 92px; }
.admin-grid > aside { position: sticky; top: 84px; max-height: calc(100dvh - 104px); overflow: hidden; }
.admin-grid > aside .project-list { max-height: 42vh; overflow-y: auto; }
.workspace { overflow: hidden; background: linear-gradient(180deg, #fff, #fbfcff); }
.workspace-toolbar h2 { max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-list { padding-bottom: 8px; }
.dashboard-card { min-height: 205px; }
.settlement-merchant-card, .commission-user-card { box-shadow: 0 7px 20px rgba(31,49,78,.045); }
@media (max-width: 1000px) {
  .admin-grid > aside { position: static; max-height: none; overflow: visible; }
}
.client-body { height: 100vh; overflow: hidden; background: #0d1118; color: #edf1f7; color-scheme: dark; }
.client-app { height: 100vh; display: grid; grid-template-rows: 62px 1fr; }
.client-header { z-index: 30; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: #151b25; border-bottom: 1px solid #28303d; }
.client-title { min-width: 0; flex: 1; }
.client-title h1 { margin: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-title p { margin: 3px 0 0; color: #8d99aa; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-progress { color: #a9b4c4; font-size: 12px; white-space: nowrap; }
.client-main { min-height: 0; display: grid; grid-template-columns: 180px minmax(0, 1fr) 340px; }
.client-sidebar, .comment-panel { min-height: 0; overflow-y: auto; background: #151b25; }
.client-sidebar { border-right: 1px solid #28303d; padding: 10px; }
.sidebar-label { padding: 8px 8px 10px; color: #8591a2; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.image-nav { display: grid; gap: 8px; }
.nav-section-title { padding: 9px 7px 4px; color: #7f8da3; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.nav-section-title.finalized-title { margin-top: 9px; padding-top: 13px; border-top: 1px solid #2b3545; color: #63d6a5; }
.nav-empty-note { padding: 12px 7px; color: #6f7c90; font-size: 11px; text-align: center; }
.image-nav button {  position: relative; width: 100%; padding: 0; border: 1px solid #303949; border-radius: 10px; background: #1b222d; color: #cbd3df; overflow: hidden; text-align: left; }
.image-nav button.active { border-color: #5b8cff; box-shadow: 0 0 0 2px rgba(91,140,255,.18); }
.image-nav img { display: block; width: 100%; height: 95px; background: #090c11; object-fit: contain; }
.image-nav .nav-name { display: block; padding: 7px 8px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-nav button.finalized { border-color: #24634d; background: #132b24; }
.image-nav button.finalized .nav-name { color: #8ee0b9; }
.image-nav .nav-complete { position: absolute; top: 7px; right: 7px; padding: 4px 7px; border-radius: 999px; background: #1f8c62; color: #fff; font-size: 10px; font-weight: 900; }
.image-nav .nav-badge { position: absolute; top: 7px; right: 7px; min-width: 21px; height: 21px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: #ff9f0a; color: #201400; font-size: 11px; font-weight: 900; }
.stage-wrap { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; background: #090c11; }
.stage { position: relative; min-height: 0; overflow: hidden; touch-action: none; }
#reviewCanvas { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.stage-loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(9,12,17,.8); color: #cbd3df; z-index: 5; }
.client-view-actions { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: linear-gradient(90deg, #111b2b, #141d2a); border-top: 1px solid #2d3a4e; }
.image-pager { display: flex; align-items: center; gap: 7px; margin-right: auto; }
.image-position { min-width: 52px; color: #a8bdd9; font-size: 11px; text-align: center; white-space: nowrap; }
#previousImageButton, #nextImageButton { border: 1px solid #3568ac; background: #17345d; color: #a8caff; }
.compare-version-control { display: flex; align-items: center; gap: 8px; }
.compare-version-hint { color: #8f9bb0; font-size: 10px; line-height: 1.4; white-space: nowrap; }
#compareVersionButton { border: 1px solid #7b58b5; background: #2c2147; color: #c7a9ff; touch-action: none; user-select: none; -webkit-user-select: none; }
#compareVersionButton.active { border-color: #ae8cff; background: #4a3380; color: #fff; }
#noChangesButton { border: 1px solid #2aa777; background: #176b4d; color: #eafff5; box-shadow: 0 8px 18px rgba(30, 140, 100, .2); }
#confirmAllButton { border: 1px solid #a96d1d; background: #2c2418; color: #ffd18a; }
.view-finalize-button { min-width: 126px; font-weight: 800; }
.toolbar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #151b25; border-top: 1px solid #28303d; overflow-x: auto; }
.tool-btn {
  --tool-bg: #1b222d;
  --tool-border: #303949;
  --tool-text: #b9c3d2;
  --tool-active: #3f7df0;
  --tool-active-text: #ffffff;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--tool-border);
  border-radius: 9px;
  background: var(--tool-bg);
  color: var(--tool-text);
  font-size: 12px;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.tool-btn:hover { transform: translateY(-1px); }
.tool-btn[data-tool="browse"] { --tool-bg: #17345d; --tool-border: #2f69b8; --tool-text: #9dc5ff; --tool-active: #2f7cf6; }
.tool-btn[data-tool="rect"] { --tool-bg: #3a2e0e; --tool-border: #705a1b; --tool-text: #ffd76b; --tool-active: #e8b93b; --tool-active-text: #1d1500; }
.tool-btn[data-tool="arrow"] { --tool-bg: #3d1d1a; --tool-border: #7c3a32; --tool-text: #ff9e91; --tool-active: #f05b4e; }
.tool-btn[data-tool="pen"] { --tool-bg: #113329; --tool-border: #23664f; --tool-text: #78e5b5; --tool-active: #2fc47d; --tool-active-text: #062417; }
#colorButton { --tool-bg: #2c2147; --tool-border: #5d478d; --tool-text: #c7a9ff; }
#undoButton { --tool-bg: #3b2028; --tool-border: #783d4a; --tool-text: #ff9eb0; }
#zoomOutButton, #zoomInButton { --tool-bg: #12333c; --tool-border: #286274; --tool-text: #82dbea; }
#resetViewButton { --tool-bg: #242d55; --tool-border: #46558f; --tool-text: #b3c1ff; }
.tool-btn.active { border-color: transparent; background: var(--tool-active); color: var(--tool-active-text); box-shadow: 0 7px 18px rgba(47,124,246,.22); }
.toolbar .divider { width: 1px; height: 25px; background: #354157; margin: 0 4px; flex: 0 0 auto; }
.zoom-label { min-width: 42px; text-align: center; color: #9ba7b8; font-size: 12px; }
.comment-panel { border-left: 1px solid #28303d; display: flex; flex-direction: column; }
.comment-head { position: sticky; top: 0; z-index: 3; padding: 14px; background: #151b25; border-bottom: 1px solid #28303d; }
.comment-head h2 { margin: 0 0 5px; font-size: 14px; }
.comment-head p { margin: 0; color: #8995a6; font-size: 11px; line-height: 1.5; }
.polite-reminder { margin-top: 10px; padding: 10px 11px; border-left: 3px solid #5b8cff; border-radius: 8px; background: #1a2536; color: #aebcd0; font-size: 11px; line-height: 1.65; }
.comment-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; }
.comment-form-card { padding: 12px; border: 1px solid #3c4a62; border-radius: 12px; background: #1b2330; margin-bottom: 14px; }
.comment-form-card .field label { color: #cbd3df; font-size: 12px; }
.comment-form-card textarea { min-height: 78px; border-color: #3a4558; background: #111720; color: #fff; }
.reference-uploader { margin-top: 11px; padding-top: 11px; border-top: 1px solid #303949; }
.reference-uploader-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.reference-uploader-head label { color: #cbd3df; font-size: 12px; font-weight: 700; }
.reference-uploader-head span { color: #778396; font-size: 10px; }
.reference-preview { position: relative; margin-top: 9px; overflow: hidden; border: 1px solid #344054; border-radius: 11px; background: #0d121a; }
.reference-preview canvas { display: block; width: 100%; height: 150px; object-fit: contain; }
.reference-preview-info { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-top: 1px solid #303949; }
.apply-reference-all { width: 100%; min-height: 38px; margin-top: 9px; padding: 0 10px; border: 1px solid #3b5f9f; border-radius: 10px; background: #172a4a; color: #9fc0ff; font-size: 11px; font-weight: 800; line-height: 1.35; }
.apply-reference-all.active { border-color: #5b8cff; background: #23417a; color: #fff; box-shadow: 0 0 0 2px rgba(91,140,255,.14); }
.reference-preview-info strong { min-width: 0; flex: 1; color: #b9c3d2; font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reference-remove { border: 0; background: transparent; color: #ff6961; font-size: 10px; font-weight: 800; }
.comment-reference-row { display: flex; align-items: center; gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px solid #303949; color: #86a9ee; font-size: 10px; }
.comment-reference-row canvas { width: 54px; height: 40px; border-radius: 6px; background: #0d121a; object-fit: contain; }
.comment-form-actions { display: flex; gap: 8px; margin-top: 10px; }
.comment-form-actions .btn { flex: 1; min-height: 36px; }
.comment-list { display: grid; gap: 9px; }
.comment-card { padding: 11px; border: 1px solid #303949; border-radius: 11px; background: #1a212c; cursor: pointer; }
.comment-card.selected { border-color: #5b8cff; }
.comment-card .comment-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.comment-card .comment-top strong { min-width: 0; flex: 1; }
.comment-delete-button { flex: 0 0 auto; min-height: 28px; padding: 0 9px; border: 1px solid #4a3036; border-radius: 8px; background: #301b20; color: #ff7b76; font-size: 10px; font-weight: 800; }
.comment-delete-button:hover { border-color: #ff6961; color: #fff; background: #6f2529; }
.comment-index { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #ff453a; color: #fff; font-size: 12px; font-weight: 900; }
.comment-index.color-blue { background: #0a84ff; }
.comment-index.color-yellow { background: #ffd60a; color: #201400; }
.comment-index.color-green { background: #30d158; color: #072c12; }
.comment-index.color-white { background: #fff; color: #172033; }
.comment-card p { margin: 0; color: #dbe1ea; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.comment-card .comment-time { margin-top: 7px; color: #7f8a9b; font-size: 10px; }
.comment-empty { padding: 25px 8px; color: #7f8a9b; text-align: center; font-size: 12px; line-height: 1.7; }
.comment-footer { padding: 13px 14px 16px; border-top: 1px solid #28303d; background: #151b25; }
.comment-footer .btn { width: 100%; margin-bottom: 8px; }
.comment-back-button { display: none; }
.mobile-comment-entry { display: none; }
.mobile-annotation-entry { display: none; }
.comment-footer .btn.primary { background: #2f6df6; }
.mobile-tabs { display: none; }
.help-banner { position: absolute; z-index: 7; top: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 8px 12px; border-radius: 999px; background: rgba(17,23,32,.88); border: 1px solid #394456; color: #c8d1de; font-size: 11px; backdrop-filter: blur(8px); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#chooseReferenceButton { border: 1px solid #3a6fb8; background: #17345d; color: #a8caff; }
#saveAnnotationButton { background: #2f7cf6; color: #fff; }
#cancelAnnotationButton { border: 1px solid #4a5470; background: #252d42; color: #c7d0e5; }
#deleteAnnotationButton { border: 1px solid #8b4046; background: #3b2026; color: #ff9ca2; }
.guide-close { border-color: #496aa2; background: #1d3559; color: #b7d1ff; }
.client-help-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #3a4659;
  border-radius: 10px;
  background: #202936;
  color: #dce4ef;
  font-size: 12px;
  font-weight: 800;
}
.client-help-button:hover { border-color: #5b8cff; color: #fff; }
.guide-modal { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 22px; }
.guide-backdrop { position: absolute; inset: 0; background: rgba(4, 8, 14, .78); backdrop-filter: blur(7px); }
.guide-card {
  position: relative;
  width: min(680px, 100%);
  max-height: min(840px, calc(100dvh - 36px));
  overflow-y: auto;
  padding: 25px;
  border: 1px solid #344054;
  border-radius: 22px;
  background: #171e29;
  color: #eef2f8;
  box-shadow: 0 28px 80px rgba(0,0,0,.46);
}
.guide-head { display: flex; gap: 18px; align-items: flex-start; }
.guide-kicker { display: inline-block; margin-bottom: 8px; color: #7fa9ff; font-size: 11px; font-weight: 900; letter-spacing: .13em; }
.guide-head h2 { margin: 0; font-size: 23px; line-height: 1.3; }
.guide-head p { margin: 9px 0 0; color: #98a4b5; font-size: 13px; line-height: 1.7; }
.guide-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid #3b4657;
  border-radius: 10px;
  background: #202936;
  color: #aab5c5;
  font-size: 23px;
  line-height: 1;
}
.guide-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 22px; }
.guide-step { display: flex; gap: 12px; min-height: 128px; padding: 15px; border: 1px solid #303a49; border-radius: 14px; background: #1c2430; }
.guide-number { flex: 0 0 auto; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #2f6df6; color: #fff; font-size: 13px; font-weight: 900; }
.guide-step h3 { margin: 3px 0 7px; color: #f1f5fb; font-size: 14px; }
.guide-step p { margin: 0; color: #9ba7b8; font-size: 12px; line-height: 1.65; }
.guide-tips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 15px; padding: 12px; border-radius: 12px; background: #111821; color: #9ba7b8; font-size: 11px; }
.guide-tips strong { margin-right: 3px; color: #dce4ef; }
.guide-tips span { padding: 5px 8px; border-radius: 999px; background: #222c3a; }
.guide-footer { display: flex; gap: 15px; align-items: center; justify-content: space-between; margin-top: 20px; }
.guide-footer > span { color: #7f8b9d; font-size: 11px; line-height: 1.5; }
.guide-footer .btn { flex: 0 0 auto; min-width: 150px; }
body.guide-open { overflow: hidden; }
body.review-open { overflow: hidden; }
@media (max-width: 1000px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-review-main { grid-template-columns: 126px minmax(0, 1fr) 280px; }
  .client-main { grid-template-columns: 130px minmax(0, 1fr) 290px; }
}
@media (max-width: 760px) {
  .admin-review-shell { grid-template-rows: auto minmax(0, 1fr); }
  .admin-review-header { align-items: flex-start; flex-wrap: wrap; gap: 8px; padding: 10px; }
  .admin-review-title { flex-basis: calc(100% - 70px); }
  .admin-review-header-actions { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .admin-review-header-actions .btn { padding: 0 7px; font-size: 11px; }
  .admin-review-main { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: minmax(260px, 1fr) 230px; }
  .admin-review-nav { padding: 7px; }
  .review-image-nav img { height: 64px; }
  .admin-review-feedback { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #28303d; }
  .review-toolbar-tip { display: none; }
  .admin-header { padding: 12px 14px; flex-wrap: wrap; }
  .admin-header .brand { min-width: 0; flex: 1; }
  .default-warning { order: 3; width: 100%; }
  .admin-main { width: calc(100% - 24px); padding-top: 16px; }
  .stats { grid-template-columns: 1fr; gap: 9px; }
  .dashboard-panel { padding: 16px; }
  .dashboard-head { display: grid; }
  .dashboard-tools { justify-items: stretch; }
  .dashboard-tools input { width: 100%; }
  .dashboard-tabs { overflow-x: auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .workspace { position: static; }
  .settlement-panel { padding: 16px; }
  .settlement-panel-head { display: grid; }
  .settlement-panel-tools { display: grid; grid-template-columns: 1fr 1fr; }
  .settlement-summary { grid-template-columns: 1fr; }
  .user-create-form { grid-template-columns: 1fr; }
  .user-row { grid-template-columns: 1fr 1fr; }
  .commission-setting { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 15px; padding: 13px; border: 1px solid #dde5f0; border-radius: 12px; background: #fff; }
.permission-checkboxes { grid-template-columns: 1fr; }
  .commission-board { margin-top: 20px; padding-top: 17px; border-top: 1px solid #e4e9f1; }
.commission-board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.commission-board-head h3 { margin: 0; font-size: 16px; }
.commission-board-head span { color: #7c899c; font-size: 11px; }
.commission-settlement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 11px; margin-top: 12px; }
.commission-user-card { padding: 14px; border: 1px solid #dfe6f0; border-radius: 14px; background: #fbfcff; }
.commission-user-head { display: flex; justify-content: space-between; gap: 8px; }
.commission-user-head strong { font-size: 14px; }
.commission-money { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 11px 0; }
.commission-money div { padding: 8px; border-radius: 9px; background: #f1f5fb; }
.commission-money span { display: block; color: #8390a5; font-size: 10px; }
.commission-money strong { display: block; margin-top: 3px; font-size: 13px; }
.commission-items { display: grid; gap: 6px; }
.commission-item { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 8px; background: #fff; border: 1px solid #e6ebf3; }
.commission-item span { min-width: 0; flex: 1; color: #51617a; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.commission-item button { border: 0; background: transparent; color: #269b68; font-size: 10px; font-weight: 800; }
.settlement-merchant-grid { grid-template-columns: 1fr; }
  .order-extra-grid { grid-template-columns: 1fr; }
  .checkbox-field { padding-top: 0; }
  .stage-progress { display: flex; gap: 6px; margin: 14px 18px 0; padding: 5px; overflow-x: auto; scrollbar-width: none; }
.stage-progress::-webkit-scrollbar { display: none; }
.stage-step { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: #eef2f7; color: #8a96a9; }
.stage-step span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #dbe2ed; font-size: 10px; font-weight: 900; }
.stage-step strong { font-size: 10px; white-space: nowrap; }
.stage-step.completed { background: #eaf8f1; color: #28815d; }
.stage-step.completed span { background: #2fa572; color: #fff; }
.stage-step.active { background: #e8f1ff; color: #2f6df6; box-shadow: 0 0 0 1px #bcd2ff inset; }
.stage-step.active span { background: #2f6df6; color: #fff; }
.workflow-strip { flex-wrap: wrap; margin-left: 12px; margin-right: 12px; }
  .workflow-strip select { flex: 1; min-width: 130px; }
  .settlement-strip { flex-wrap: wrap; margin-left: 12px; margin-right: 12px; }
  .settlement-strip select { flex: 1; min-width: 130px; }
  .stat { padding: 14px 16px; }
  .stat strong { display: inline; margin-left: 8px; font-size: 20px; }
  .panel-head, .panel-body { padding-left: 15px; padding-right: 15px; }
  .workspace-toolbar { padding: 12px; }
  .order-extra { border: 1px solid #dbe3ef; border-radius: 13px; background: #f8fafc; }
.order-extra summary { padding: 11px 12px; color: #44536b; font-size: 12px; font-weight: 800; cursor: pointer; }
.order-extra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding: 0 12px 13px; }
.order-extra-grid .order-wide { grid-column: 1 / -1; }
.checkbox-field { display: flex; align-items: center; gap: 8px; padding-top: 24px; color: #44536b; font-size: 12px; font-weight: 700; }
.checkbox-field input { width: 16px; height: 16px; accent-color: #2f6df6; }
.stage-progress { display: flex; gap: 6px; margin: 14px 18px 0; padding: 5px; overflow-x: auto; scrollbar-width: none; }
.stage-progress::-webkit-scrollbar { display: none; }
.stage-step { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: #eef2f7; color: #8a96a9; }
.stage-step span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #dbe2ed; font-size: 10px; font-weight: 900; }
.stage-step strong { font-size: 10px; white-space: nowrap; }
.stage-step.completed { background: #eaf8f1; color: #28815d; }
.stage-step.completed span { background: #2fa572; color: #fff; }
.stage-step.active { background: #e8f1ff; color: #2f6df6; box-shadow: 0 0 0 1px #bcd2ff inset; }
.stage-step.active span { background: #2f6df6; color: #fff; }
.workflow-strip { display: flex; align-items: center; gap: 8px; margin: 0 18px 14px; padding: 11px 12px; border: 1px solid #d7e3f7; border-left: 4px solid #2f6df6; border-radius: 12px; background: linear-gradient(90deg, #f2f7ff, #fbfdff); }
.workflow-current { min-width: 220px; display: grid; gap: 2px; }
.workflow-stage { color: #2f6df6; font-size: 12px; font-weight: 900; }
.workflow-current small { color: #7b879b; font-size: 10px; }
.workflow-strip select { min-width: 170px; min-height: 34px; padding: 0 9px; border: 1px solid #d4ddeb; border-radius: 9px; background: #fff; color: #344258; font-size: 12px; }
.settlement-strip { display: flex; align-items: center; gap: 8px; margin: 0 18px 14px; padding: 10px 12px; border: 1px solid #e4e8ef; border-radius: 12px; background: #fbfcfe; }
.settlement-label { min-width: 150px; color: #52617a; font-size: 12px; font-weight: 800; }
.settlement-strip select { min-width: 145px; min-height: 34px; padding: 0 9px; border: 1px solid #d4ddeb; border-radius: 9px; background: #fff; color: #344258; font-size: 12px; }
.assignment-strip { display: flex; align-items: center; gap: 10px; margin: 0 18px 14px; padding: 10px 12px; border: 1px solid #e3e7ef; border-radius: 12px; background: #fbfcfe; }
.assignment-strip label { display: flex; align-items: center; gap: 6px; color: #65728a; font-size: 11px; font-weight: 800; }
.assignment-strip select { min-height: 34px; min-width: 120px; padding: 0 9px; border: 1px solid #d4ddeb; border-radius: 9px; background: #fff; color: #344258; }
.share-box { margin-left: 12px; margin-right: 12px; }
  .workspace-body { padding-left: 12px; padding-right: 12px; }
  .image-review { grid-template-columns: 88px 1fr; }
  .image-thumb { width: 88px; height: 72px; }
  .admin-review-modal { position: fixed; z-index: 620; inset: 0; background: #090c11; color: #edf1f7; color-scheme: dark; }
.admin-review-shell { height: 100dvh; display: grid; grid-template-rows: 70px minmax(0, 1fr); }
.admin-review-header { z-index: 10; display: flex; align-items: center; gap: 18px; padding: 10px 16px; background: #151b25; border-bottom: 1px solid #28303d; }
.admin-review-title { min-width: 0; flex: 1; }
.review-kicker { display: block; margin-bottom: 3px; color: #6f9cff; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.admin-review-title h2 { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-review-title p { margin: 3px 0 0; color: #8793a4; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-review-header-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.admin-review-header-actions .btn { min-height: 34px; }
.admin-review-main { min-height: 0; display: grid; grid-template-columns: 164px minmax(0, 1fr) 350px; }
.admin-review-nav, .admin-review-feedback { min-height: 0; overflow-y: auto; background: #111720; }
.admin-review-nav { padding: 11px; border-right: 1px solid #28303d; }
.admin-review-feedback { border-left: 1px solid #28303d; }
.review-panel-label { padding: 5px 4px 11px; color: #778396; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.review-image-nav { display: grid; gap: 8px; }
.review-image-nav button { position: relative; width: 100%; padding: 0; border: 1px solid #303949; border-radius: 10px; overflow: hidden; background: #1b222d; color: #cbd3df; text-align: left; }
.review-image-nav button.active { border-color: #5b8cff; box-shadow: 0 0 0 2px rgba(91,140,255,.18); }
.review-image-nav img { display: block; width: 100%; height: 88px; background: #090c11; object-fit: contain; }
.review-image-nav span { display: block; padding: 6px 7px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-image-nav .review-nav-count { position: absolute; top: 6px; right: 6px; min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; background: #ff9f0a; color: #211500; font-size: 10px; font-weight: 900; }
.admin-review-stage-wrap { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: #090c11; }
.admin-review-stage { position: relative; min-height: 0; overflow: hidden; touch-action: none; }
#adminReviewCanvas { display: block; width: 100%; height: 100%; user-select: none; cursor: grab; }
#adminReviewCanvas:active { cursor: grabbing; }
.review-loading { position: absolute; z-index: 4; inset: 0; display: grid; place-items: center; background: rgba(9,12,17,.84); color: #cbd3df; font-size: 13px; }
.review-floating-hint { position: absolute; z-index: 3; top: 11px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 7px 11px; border-radius: 999px; background: rgba(21,27,37,.86); border: 1px solid #394456; color: #aeb9c9; font-size: 10px; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-review-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #151b25; border-top: 1px solid #28303d; }
.review-toolbar-tip { margin-left: auto; color: #778396; font-size: 10px; white-space: nowrap; }
.admin-review-feedback { padding: 12px; }
.review-comments { display: grid; gap: 9px; }
.review-comment { padding: 12px; border: 1px solid #303949; border-radius: 11px; background: #1a212c; cursor: pointer; }
.review-comment.selected { border-color: #5b8cff; background: #1c2942; }
.review-comment-main { display: flex; align-items: flex-start; gap: 9px; }
.review-comment-index { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #ff453a; color: #fff; font-size: 11px; font-weight: 900; }
.review-comment p { flex: 1; margin: 3px 0 0; color: #e2e8f1; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.review-comment small { display: block; margin-top: 7px; color: #778396; font-size: 10px; }
.review-reference { margin-top: 10px; padding-top: 9px; border-top: 1px solid #303949; }
.review-reference-label { display: block; margin-bottom: 6px; color: #87aaf0; font-size: 10px; font-weight: 800; }
.review-reference img { display: block; width: 100%; max-height: 180px; border-radius: 9px; background: #0c1118; object-fit: contain; cursor: zoom-in; }
.scene-wide-note { margin-bottom: 10px; padding: 12px; border: 1px solid #4c6ba8; border-radius: 11px; background: #172642; color: #dce7fb; font-size: 12px; line-height: 1.6; }
.scene-wide-note strong { display: block; margin-bottom: 5px; color: #9fc0ff; font-size: 11px; }
.scene-wide-note img { display: block; width: 100%; max-height: 150px; margin-top: 8px; border-radius: 8px; background: #0c1118; object-fit: contain; cursor: zoom-in; }
.review-comment-empty { padding: 28px 13px; border: 1px dashed #344054; border-radius: 11px; color: #7f8b9d; text-align: center; font-size: 12px; line-height: 1.7; }
/* Settlement center */
.settlement-panel { margin-bottom: 20px; padding: 22px; border: 1px solid rgba(214,222,235,.9); border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 16px 42px rgba(31,49,78,.07); }
.settlement-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.settlement-panel-head h2 { margin: 5px 0 3px; font-size: 21px; }
.settlement-panel-head p { margin: 0; color: #738096; font-size: 12px; }
.settlement-panel-tools { display: flex; gap: 8px; }
.settlement-panel-tools input { min-height: 36px; padding: 0 10px; border: 1px solid #d9e1ee; border-radius: 9px; background: #f8fafc; color: #344258; }
.settlement-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 17px 0; }
.settlement-summary div { padding: 13px 15px; border-radius: 13px; background: #f4f7fc; }
.settlement-summary span { display: block; color: #7b879b; font-size: 11px; }
.settlement-summary strong { display: block; margin-top: 5px; color: #27374f; font-size: 21px; }
.commission-board { margin-top: 20px; padding-top: 17px; border-top: 1px solid #e4e9f1; }
.commission-board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.commission-board-head h3 { margin: 0; font-size: 16px; }
.commission-board-head span { color: #7c899c; font-size: 11px; }
.commission-settlement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 11px; margin-top: 12px; }
.commission-user-card { padding: 14px; border: 1px solid #dfe6f0; border-radius: 14px; background: #fbfcff; }
.commission-user-head { display: flex; justify-content: space-between; gap: 8px; }
.commission-user-head strong { font-size: 14px; }
.commission-money { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 11px 0; }
.commission-money div { padding: 8px; border-radius: 9px; background: #f1f5fb; }
.commission-money span { display: block; color: #8390a5; font-size: 10px; }
.commission-money strong { display: block; margin-top: 3px; font-size: 13px; }
.commission-items { display: grid; gap: 6px; }
.commission-item { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 8px; background: #fff; border: 1px solid #e6ebf3; }
.commission-item span { min-width: 0; flex: 1; color: #51617a; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.commission-item button { border: 0; background: transparent; color: #269b68; font-size: 10px; font-weight: 800; }
.settlement-merchant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.settlement-merchant-card { padding: 15px; border: 1px solid #dfe6f0; border-radius: 15px; background: #fbfcff; }
.settlement-merchant-head { display: flex; align-items: flex-start; gap: 8px; }
.settlement-merchant-head > div { min-width: 0; flex: 1; }
.settlement-merchant-head h3 { margin: 0 0 3px; font-size: 15px; }
.settlement-merchant-head span { color: #7b879b; font-size: 11px; }
.settlement-money { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.settlement-money div { padding: 9px; border-radius: 9px; background: #f1f5fb; }
.settlement-money span { display: block; color: #8390a5; font-size: 10px; }
.settlement-money strong { display: block; margin-top: 3px; color: #2f405a; font-size: 14px; }
.settlement-projects { display: grid; gap: 6px; margin-bottom: 10px; }
.settlement-project-row { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 8px; background: #fff; border: 1px solid #e6ebf3; }
.settlement-project-row span { min-width: 0; flex: 1; color: #51617a; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settlement-project-row button { border: 0; background: transparent; color: #269b68; font-size: 10px; font-weight: 800; }
.settlement-card-actions { display: flex; gap: 7px; }
.settlement-card-actions .btn { flex: 1; min-height: 34px; }
.current-user-badge { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; background: #eef4ff; color: #2f6df6; font-size: 11px; font-weight: 800; }
.user-modal { position: fixed; z-index: 420; inset: 0; display: grid; place-items: center; padding: 22px; }
.user-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,38,.52); backdrop-filter: blur(5px); }
.user-modal-card { position: relative; width: min(860px, 100%); max-height: calc(100dvh - 44px); overflow: auto; padding: 22px; border-radius: 20px; background: #fff; box-shadow: 0 28px 80px rgba(20,35,60,.28); }
.user-modal-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.user-modal-head h2 { margin: 4px 0 3px; }
.user-modal-head p { margin: 0; color: #768399; font-size: 12px; }
.user-create-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 15px; border-radius: 14px; background: #f6f8fb; }
.user-create-form .btn { grid-column: 1 / -1; }
.permission-editor { padding: 16px; border: 1px solid #dde5f0; border-radius: 14px; background: #f8fafc; }
.permission-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.permission-editor-head h3 { margin: 0 0 4px; }
.permission-editor-head p { margin: 0; color: #7b879a; font-size: 11px; }
.commission-setting { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 15px; padding: 13px; border: 1px solid #dde5f0; border-radius: 12px; background: #fff; }
.permission-checkboxes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 16px 0; }
.permission-checkbox { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #e0e6ef; border-radius: 10px; background: #fff; color: #45536b; font-size: 12px; }
.permission-checkbox input { width: 16px; height: 16px; accent-color: #2f6df6; }
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.settings-modal-card .btn.primary { margin-top: 16px; }
.user-list { display: grid; gap: 9px; margin-top: 18px; }
.user-row { display: grid; grid-template-columns: 1.2fr 1fr .8fr .7fr auto auto auto; gap: 9px; align-items: center; padding: 10px; border: 1px solid #e2e7ef; border-radius: 11px; }
.user-row strong { font-size: 13px; }
.user-row span { color: #748198; font-size: 11px; }
.user-row select { min-height: 34px; border: 1px solid #d8e0ec; border-radius: 8px; background: #fff; }
.user-row .btn { min-height: 34px; }
/* Intake center */
.intake-main { width: min(1120px, calc(100% - 32px)); margin: 28px auto 60px; }
.intake-header { position: sticky; top: 0; }
.intake-tabs { display: flex; gap: 8px; margin-bottom: 16px; padding: 5px; border-radius: 14px; background: #e9eef6; }
.intake-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: #66748b; font-weight: 800; }
.intake-tabs button.active { background: #fff; color: #2f6df6; box-shadow: 0 7px 18px rgba(36,67,120,.1); }
.intake-panel { padding: 24px; border: 1px solid #dce4f0; border-radius: 22px; background: #fff; box-shadow: 0 18px 46px rgba(31,49,78,.09); }
.intake-intro { margin-bottom: 20px; }
.intake-intro h1 { margin: 5px 0 7px; font-size: 26px; }
.intake-intro p { margin: 0; color: #748198; font-size: 13px; line-height: 1.7; }
.intake-quick-entry { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-bottom: 15px; padding: 14px; border-radius: 14px; background: #f5f8fd; }
.intake-dropzone { display: grid; place-items: center; gap: 8px; min-height: 230px; padding: 30px; border: 2px dashed #a9bddc; border-radius: 18px; background: linear-gradient(145deg, #f5f9ff, #edf4ff); text-align: center; transition: border-color .16s, background .16s, transform .16s; }
.intake-dropzone.dragover { border-color: #2f6df6; background: #e3efff; transform: scale(1.005); }
.intake-dropzone strong { color: #274d89; font-size: 18px; }
.intake-dropzone span { color: #77869f; font-size: 12px; }
.intake-result-card { margin-top: 18px; padding: 18px; border: 1px solid #dce4f0; border-radius: 16px; background: #fafcff; }
.intake-result-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.intake-result-head h2 { min-width: 0; flex: 1; margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.intake-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.intake-match-info { margin: 12px 0; padding: 11px; border-radius: 10px; background: #f1f5fb; color: #55657d; font-size: 12px; line-height: 1.6; }
.intake-progress { margin-top: 15px; padding: 13px; border-radius: 12px; background: #f1f5fb; color: #4f5f77; font-size: 12px; }
@media (max-width: 760px) {
  .intake-main { width: calc(100% - 20px); margin-top: 14px; }
  .intake-panel { padding: 16px; }
  .intake-intro h1 { font-size: 21px; }
  .intake-form-grid { grid-template-columns: 1fr; }`r`n  .intake-quick-entry { grid-template-columns: 1fr; }
  .intake-header .header-actions { width: 100%; }
}
/* Tech admin theme and kanban */
.admin-body { background: radial-gradient(circle at 12% 0%, #12284a 0, transparent 34%), radial-gradient(circle at 92% 4%, #103033 0, transparent 28%), #080d15 !important; color: #e7eef9; }
.admin-body .admin-header { background: rgba(10,17,28,.92); border-bottom-color: #223148; box-shadow: 0 10px 34px rgba(0,0,0,.28); }
.admin-body .brand strong, .admin-body h1, .admin-body h2, .admin-body h3, .admin-body h4 { color: #edf4ff; }
.admin-body .brand span, .admin-body p, .admin-body .muted, .admin-body .project-customer, .admin-body small { color: #8493aa; }
.admin-body .panel, .admin-body .dashboard-panel, .admin-body .settlement-panel { background: rgba(15,24,38,.94); border-color: #26364c; box-shadow: 0 16px 42px rgba(0,0,0,.24); }
.admin-body .panel-head, .admin-body .workspace-toolbar { border-color: #27364a; background: rgba(17,28,44,.75); }
.admin-body .project-list { scrollbar-color: #334966 transparent; }
.admin-body .project-card { background: #111c2c; border-color: #26374d; }
.admin-body .project-card:hover, .admin-body .project-card.selected { background: linear-gradient(145deg, #13253d, #101a2a); border-color: #3c7eff; }
.admin-body .field label, .admin-body .order-extra summary { color: #aebbd0; }
.admin-body .field input, .admin-body .field textarea, .admin-body .field select, .admin-body .dashboard-tools input, .admin-body .workflow-strip select, .admin-body .settlement-strip select { background: #0d1725; color: #e8f0fb; border-color: #2b3d56; }
.admin-body .order-extra, .admin-body .new-project-dropzone, .admin-body .workflow-strip, .admin-body .settlement-strip { background: #101a29; border-color: #293a50; }
.admin-body .dashboard-grid { grid-template-columns: repeat(8, minmax(235px, 1fr)); overflow-x: auto; padding-bottom: 8px; scrollbar-color: #365079 transparent; }
.admin-body .dashboard-tabs { display: none; }
.kanban-column { min-height: 420px; padding: 10px; border: 1px solid #26374d; border-radius: 14px; background: rgba(13,23,36,.84); }
.kanban-column.dragover { border-color: #4d91ff; box-shadow: 0 0 0 2px rgba(77,145,255,.18) inset; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px; color: #aebcd0; font-size: 12px; }
.kanban-head span { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 999px; background: #1b2d47; color: #83b1ff; font-weight: 900; }
.kanban-list { display: grid; gap: 9px; }
.kanban-empty { padding: 24px 8px; border: 1px dashed #2c405c; border-radius: 10px; color: #62728b; text-align: center; font-size: 11px; }
.kanban-card { padding: 12px; border: 1px solid #2a3b53; border-radius: 12px; background: linear-gradient(145deg, #162438, #111b2a); cursor: grab; transition: transform .15s, border-color .15s, box-shadow .15s; }
.kanban-card:hover { transform: translateY(-2px); border-color: #4d85dd; box-shadow: 0 10px 24px rgba(31,99,205,.14); }
.kanban-card.dragging { opacity: .48; }
.kanban-card-top { display: flex; align-items: flex-start; gap: 7px; }
.kanban-card-top strong { min-width: 0; flex: 1; color: #edf4ff; font-size: 13px; line-height: 1.4; }
.kanban-card-top .pill { font-size: 9px; padding: 3px 6px; }
.kanban-customer { margin-top: 6px; color: #8291a8; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kanban-metrics { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; color: #8ea0ba; font-size: 9px; }
.kanban-metrics span { padding: 4px 6px; border-radius: 6px; background: #0e1826; }
.kanban-actions { display: flex; gap: 6px; }
.kanban-actions .btn { flex: 1; min-height: 31px; font-size: 10px; padding: 0 7px; }
@media (max-width: 760px) {
  .admin-body .dashboard-grid { grid-template-columns: repeat(8, 250px); }
  .kanban-column { min-height: 360px; }
}
/* Admin redesign */
.admin-body { background: radial-gradient(circle at 8% 0%, #e9f1ff 0, transparent 30%), linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%); }
.admin-header { background: rgba(255,255,255,.92); box-shadow: 0 8px 26px rgba(29,48,78,.06); }
.admin-main { width: min(1440px, calc(100% - 48px)); }
.stats-redesign { gap: 16px; }
.stats-redesign .stat { position: relative; min-height: 126px; overflow: hidden; padding: 22px 24px; border: 0; box-shadow: 0 12px 32px rgba(35,55,88,.1); color: #fff; }
.stats-redesign .stat::after { content: ''; position: absolute; width: 130px; height: 130px; right: -48px; top: -60px; border-radius: 50%; background: rgba(255,255,255,.16); }
.stats-redesign .stat span, .stats-redesign .stat small { position: relative; z-index: 1; color: rgba(255,255,255,.82); }
.stats-redesign .stat strong { position: relative; z-index: 1; margin: 8px 0 5px; font-size: 32px; }
.stats-redesign .stat small { display: block; font-size: 11px; }
.stat-total { background: linear-gradient(135deg, #3069d8, #5994ff); }
.stat-waiting { background: linear-gradient(135deg, #7357c9, #9c7be8); }
.stat-action { background: linear-gradient(135deg, #e56b2f, #f49a43); }
.dashboard-panel { margin-bottom: 20px; padding: 22px; border: 1px solid rgba(214,222,235,.9); border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 16px 42px rgba(31,49,78,.08); }
.dashboard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.dashboard-eyebrow { color: #2f6df6; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.dashboard-title h2 { margin: 5px 0 3px; font-size: 23px; }
.dashboard-title p { margin: 0; color: #738096; font-size: 12px; }
.dashboard-tools { display: grid; gap: 10px; justify-items: end; }
.dashboard-tools input { width: 250px; min-height: 40px; padding: 0 13px; border: 1px solid #d9e1ee; border-radius: 11px; background: #f8fafc; color: #26344a; outline: none; }
.dashboard-tools input:focus { border-color: #6a9af6; box-shadow: 0 0 0 3px rgba(47,109,246,.1); }
.dashboard-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: #eef2f8; }
.dashboard-tabs button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #65728a; font-size: 12px; font-weight: 800; }
.dashboard-tabs button span { margin-left: 4px; }
.dashboard-tabs button.active { background: #fff; color: #2f6df6; box-shadow: 0 5px 14px rgba(39,66,108,.11); }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 13px; }
.dashboard-card { position: relative; overflow: hidden; padding: 17px; border: 1px solid #dfe6f0; border-radius: 16px; background: linear-gradient(150deg, #fff, #f9fbff); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.dashboard-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: #2f6df6; }
.dashboard-card.action::before { background: #ef7d32; }
.dashboard-card.waiting::before { background: #7357c9; }
.dashboard-card.completed::before { background: #269b68; }
.dashboard-card:hover { transform: translateY(-2px); border-color: #b9caf0; box-shadow: 0 14px 32px rgba(47,109,246,.12); }
.dashboard-card-head { display: flex; align-items: flex-start; gap: 10px; }
.dashboard-card-head > div { min-width: 0; flex: 1; }
.dashboard-card h3 { margin: 0 0 4px; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-card .project-customer { color: #748198; font-size: 12px; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 15px 0; }
.dashboard-metrics div { padding: 9px; border-radius: 10px; background: #f2f5fa; }
.dashboard-metrics strong { display: block; color: #2a3850; font-size: 15px; }
.dashboard-metrics span { color: #8390a5; font-size: 10px; }
.dashboard-settlement { margin-bottom: 11px; padding: 7px 9px; border-radius: 9px; background: #f4f7fc; color: #62708a; font-size: 11px; }
.dashboard-card-actions { display: flex; gap: 8px; }
.dashboard-card-actions .btn { flex: 1; min-height: 36px; }
.dashboard-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 150px; padding: 25px; border: 1px dashed #cfd9e8; border-radius: 15px; color: #7d899c; background: #fafcff; text-align: center; }
.project-card { box-shadow: 0 7px 20px rgba(31,49,78,.05); }
.project-card.selected { border-color: #5b8cff; background: linear-gradient(145deg, #fff, #f5f8ff); }
.panel { box-shadow: 0 14px 38px rgba(31,49,78,.07); }
.workspace { position: sticky; top: 92px; }
.admin-grid > aside { position: sticky; top: 84px; max-height: calc(100dvh - 104px); overflow: hidden; }
.admin-grid > aside .project-list { max-height: 42vh; overflow-y: auto; }
.workspace { overflow: hidden; background: linear-gradient(180deg, #fff, #fbfcff); }
.workspace-toolbar h2 { max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-list { padding-bottom: 8px; }
.dashboard-card { min-height: 205px; }
.settlement-merchant-card, .commission-user-card { box-shadow: 0 7px 20px rgba(31,49,78,.045); }
@media (max-width: 1000px) {
  .admin-grid > aside { position: static; max-height: none; overflow: visible; }
}
.client-body { height: 100dvh; overflow: hidden; }
  .client-app { height: 100dvh; grid-template-rows: calc(56px + env(safe-area-inset-top)) minmax(0, 1fr); }
  .client-header { gap: 8px; padding: env(safe-area-inset-top) 10px 0; }
  .client-header .brand-mark { width: 38px; height: 38px; border-radius: 11px; font-size: 17px; }
  .client-title h1 { font-size: 14px; }
  .client-title p { font-size: 10px; }
  .client-progress { display: none; }
  .client-main { display: block; position: relative; min-height: 0; padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .stage-wrap { height: 100%; min-height: 0; }
  .client-sidebar, .comment-panel { position: absolute; z-index: 25; top: 0; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); display: none; border: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .client-sidebar.mobile-active, .comment-panel.mobile-active { display: block; }
  .comment-panel.mobile-active { display: flex; }
  .image-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comment-back-button { display: inline-flex; width: 100%; min-height: 44px; margin-bottom: 12px; justify-content: center; border: 1px solid #69a8ff !important; background: linear-gradient(135deg, #1b4f91, #236dcc) !important; color: #ffffff !important; font-size: 14px; font-weight: 900; box-shadow: 0 8px 20px rgba(47, 109, 246, .24); }
  .mobile-comment-entry { display: inline-flex; }
  .mobile-annotation-entry { display: inline-flex; width: 100%; justify-content: center; min-height: 42px; border-color: #ca8a04 !important; background: #2d2617 !important; color: #ffd77a !important; font-weight: 900; }
  .comment-head { padding-top: 12px; }
  .mobile-tabs { position: absolute; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(58px + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom); display: grid; grid-template-columns: 1fr 1fr; gap: 7px; background: #111722; border-top: 1px solid #303949; }
  .mobile-tabs button { min-width: 0; border: 0; border-radius: 10px; padding: 0 8px; font-size: 12px; font-weight: 900; white-space: nowrap; }
  #mobileNoChangesButton { background: #176b4d; color: #eafff5; }
  #mobileConfirmAllButton { background: #2c2418; color: #ffd18a; border: 1px solid #a96d1d; }
  #chooseReferenceButton { border: 1px solid #3a6fb8; background: #17345d; color: #a8caff; }
#saveAnnotationButton { background: #2f7cf6; color: #fff; }
#cancelAnnotationButton { border: 1px solid #4a5470; background: #252d42; color: #c7d0e5; }
#deleteAnnotationButton { border: 1px solid #8b4046; background: #3b2026; color: #ff9ca2; }
.guide-close { border-color: #496aa2; background: #1d3559; color: #b7d1ff; }
.client-help-button { min-height: 34px; padding: 0 10px; font-size: 11px; }
  .guide-modal { padding: 0; align-items: end; }
  .guide-card { width: 100%; max-height: 92dvh; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .guide-head h2 { font-size: 20px; }
  .guide-head p { font-size: 12px; }
  .guide-steps { grid-template-columns: 1fr; margin-top: 17px; }
  .guide-step { min-height: 0; padding: 13px; }
  .guide-footer { align-items: stretch; flex-direction: column; }
  .guide-footer .btn { width: 100%; }
  .help-banner { top: 8px; max-width: calc(100% - 20px); font-size: 10px; }
  .client-view-actions { display: grid; grid-template-columns: 1fr; gap: 7px; padding: 8px; }
.image-pager { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; width: 100%; margin: 0; }
.image-pager .btn { min-height: 38px; padding: 0 8px; }
.image-position { min-width: 54px; font-size: 12px; }
.compare-version-control { grid-column: 1 / -1; align-items: stretch; flex-direction: column; gap: 4px; }
  .compare-version-button { width: 100%; min-height: 38px; }
  .compare-version-hint { text-align: center; }
  .view-finalize-button { display: none; }
.toolbar { padding: 7px 8px; scrollbar-width: none; }
  .toolbar::-webkit-scrollbar { display: none; }
  .tool-btn { min-height: 42px; padding: 0 12px; font-size: 12px; }
  .comment-head { padding: 12px; }
  .comment-scroll { padding: 12px; }
  .comment-card { padding: 12px; }
  .comment-card p { font-size: 13px; }
  .comment-footer { position: sticky; bottom: 0; z-index: 8; padding-bottom: 12px; }
}




















































/* Motion system */
@keyframes page-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes panel-enter {
  from { opacity: 0; transform: translateY(12px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes card-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modal-enter {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modal-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes toast-enter {
  from { opacity: 0; transform: translateX(20px) scale(.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes stage-pulse {
  0%, 100% { box-shadow: 0 0 0 1px #bcd2ff inset, 0 0 0 rgba(47,109,246,0); }
  50% { box-shadow: 0 0 0 1px #bcd2ff inset, 0 0 0 5px rgba(47,109,246,.08); }
}
@keyframes soft-glow {
  0%, 100% { box-shadow: 0 8px 22px rgba(36,107,253,.18); }
  50% { box-shadow: 0 10px 28px rgba(36,107,253,.34); }
}

.admin-main, .intake-main, .client-app, .login-shell {
  animation: page-enter .42s cubic-bezier(.22,.8,.28,1) both;
}
.login-card, .panel, .dashboard-panel, .settlement-panel, .intake-panel, .workspace {
  animation: panel-enter .48s cubic-bezier(.22,.8,.28,1) both;
}
.project-card, .dashboard-card, .image-review, .kanban-card, .settlement-merchant-card, .commission-user-card {
  animation: card-enter .38s cubic-bezier(.22,.8,.28,1) both;
}
.project-card:nth-child(2), .dashboard-card:nth-child(2), .image-review:nth-child(2), .kanban-card:nth-child(2) { animation-delay: .035s; }
.project-card:nth-child(3), .dashboard-card:nth-child(3), .image-review:nth-child(3), .kanban-card:nth-child(3) { animation-delay: .07s; }
.project-card:nth-child(4), .dashboard-card:nth-child(4), .image-review:nth-child(4), .kanban-card:nth-child(4) { animation-delay: .105s; }
.project-card:nth-child(5), .dashboard-card:nth-child(5), .image-review:nth-child(5), .kanban-card:nth-child(5) { animation-delay: .14s; }
.project-card:nth-child(n+6), .dashboard-card:nth-child(n+6), .image-review:nth-child(n+6), .kanban-card:nth-child(n+6) { animation-delay: .16s; }

.btn {
  position: relative;
  overflow: hidden;
  transition: transform .16s ease, background-color .18s ease, border-color .18s ease, box-shadow .2s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.975); }
.btn.primary:hover { animation: soft-glow .9s ease-in-out infinite alternate; }
.btn:focus-visible, .tool-btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid rgba(78,141,255,.55);
  outline-offset: 2px;
}

.dashboard-card, .project-card, .image-review, .kanban-card, .settlement-merchant-card, .commission-user-card, .image-nav button, .tool-btn {
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .22s ease, filter .18s ease;
}
.dashboard-card:hover, .image-review:hover, .kanban-card:hover { filter: brightness(1.035); }

.stage-step.active { animation: stage-pulse 2.2s ease-in-out infinite; }
.workflow-strip { transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.workflow-strip:hover { transform: translateY(-1px); }
.stage-progress { scroll-behavior: smooth; }

.modal:not([hidden]), .user-modal:not([hidden]), .guide-modal:not([hidden]), .admin-review-modal:not([hidden]) {
  animation: modal-backdrop-enter .2s ease both;
}
.guide-card, .user-modal-card, .admin-review-shell, .login-card {
  animation: modal-enter .3s cubic-bezier(.22,.8,.28,1) both;
}
.guide-backdrop, .user-modal-backdrop, .review-backdrop {
  animation: modal-backdrop-enter .22s ease both;
}
.toast { animation: toast-enter .28s cubic-bezier(.22,.8,.28,1) both; }

.stage-loading, .review-loading, .intake-result-card, .comment-form-card, .revision-upload-progress {
  animation: panel-enter .3s ease both;
}
.image-nav button:hover, .review-image-nav button:hover { transform: translateX(2px); }
.tool-btn:hover { transform: translateY(-2px); }
.tool-btn.active { animation: soft-glow 1.5s ease-in-out infinite alternate; }
.mobile-tabs button { transition: color .18s ease, background .18s ease, box-shadow .18s ease; }
.client-view-actions .btn { transition: transform .15s ease, filter .15s ease, box-shadow .18s ease; }
.client-view-actions .btn:hover { filter: brightness(1.08); }

.kanban-column.dragover { animation: soft-glow .7s ease-in-out infinite alternate; }
.kanban-card.dragging { transform: rotate(1.2deg) scale(1.018); }

@media (hover: none) {
  .btn:hover, .tool-btn:hover, .image-nav button:hover, .kanban-card:hover { transform: none; }
  .btn.primary:hover, .tool-btn.active { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
/* Button visibility upgrade */
.btn { min-height: 42px; border: 1px solid transparent; font-weight: 800; }
.btn.small { min-height: 36px; }
.btn.ghost { background: #f5f7fb; border-color: #d3dbe8; color: #344258; }
.btn.danger { border-color: #f0b8bb; }
.btn.primary { border-color: #246bfd; }
.admin-body .btn { background: #1b2a40; border-color: #334a67; color: #d9e6f8; box-shadow: 0 5px 14px rgba(0,0,0,.14); }
.admin-body .btn:hover { background: #223650; border-color: #4a76ad; color: #fff; }
.admin-body .btn.primary { background: linear-gradient(135deg, #2f6df6, #4b91ff); border-color: #5a98ff; color: #fff; box-shadow: 0 8px 20px rgba(47,109,246,.28); }
.admin-body .btn.primary:hover { background: linear-gradient(135deg, #3f7df9, #62a0ff); }
.admin-body .btn.ghost { background: #111d2d; border-color: #354a66; color: #bfd0e6; }
.admin-body .btn.ghost:hover { background: #192a41; border-color: #4f7eb8; color: #fff; }
.admin-body .btn.danger { background: #351b24; border-color: #7d3b48; color: #ff9eac; }
.admin-body .btn.danger:hover { background: #51242f; border-color: #d15b6d; color: #fff; }
.admin-body .tool-btn { border-width: 1px; box-shadow: 0 4px 12px rgba(0,0,0,.16); }
.admin-body .client-view-actions .btn { min-height: 38px; }
.intake-body .btn.primary { background: linear-gradient(135deg, #2f6df6, #4f96ff); border-color: #6ba4ff; }
.client-body .btn:not(.primary):not(.danger) { border-color: #3a465a; }
/* Sci-fi visual system */
.admin-body {
  background-color: #050a12 !important;
  background-image:
    linear-gradient(rgba(46,126,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,126,255,.055) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgba(31,111,255,.22), transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(0,220,255,.12), transparent 28%) !important;
  background-size: 34px 34px, 34px 34px, auto, auto !important;
}
.admin-body .panel,
.admin-body .dashboard-panel,
.admin-body .settlement-panel,
.admin-body .intake-panel {
  position: relative;
  border-color: #2c527d !important;
  box-shadow: 0 0 0 1px rgba(58,138,255,.08), 0 18px 50px rgba(0,0,0,.32), inset 0 1px 0 rgba(136,196,255,.08) !important;
}
.admin-body .panel::before,
.admin-body .dashboard-panel::before,
.admin-body .settlement-panel::before,
.admin-body .intake-panel::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 22px;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, #2f7dff, transparent);
  box-shadow: 0 0 14px rgba(0,212,255,.75);
}
.btn {
  position: relative;
  isolation: isolate;
  border-radius: 8px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  letter-spacing: .02em;
}
.btn:not(.ghost):not(.primary):not(.danger) { background: linear-gradient(145deg, #263a58, #1b2a42); border-color: #456b9e; color: #e8f3ff; }
.btn::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.18) 45%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .45s ease;
}
.btn:hover::after { transform: translateX(120%); }
.btn.primary {
  background: linear-gradient(135deg, #0fc6ff 0%, #2876ff 52%, #475cff 100%) !important;
  border-color: #68d8ff !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(81,190,255,.35), 0 8px 24px rgba(25,129,255,.42), 0 0 22px rgba(0,198,255,.14) !important;
}
.btn.primary:hover { filter: brightness(1.12); box-shadow: 0 0 0 1px rgba(126,220,255,.62), 0 10px 30px rgba(25,129,255,.52), 0 0 30px rgba(0,198,255,.24) !important; }
.admin-body .btn.ghost {
  background: rgba(10,25,43,.82) !important;
  border-color: #3b78b7 !important;
  color: #a9dcff !important;
  box-shadow: inset 0 0 12px rgba(0,151,255,.08), 0 5px 16px rgba(0,0,0,.18);
}
.admin-body .btn.ghost:hover { border-color: #28c9ff !important; color: #fff !important; box-shadow: inset 0 0 16px rgba(0,179,255,.15), 0 0 18px rgba(0,184,255,.18); }
.admin-body .btn.danger { background: linear-gradient(145deg, #4b202c, #321721) !important; border-color: #a84b62 !important; color: #ffb0bf !important; }
.admin-body .tool-btn { border-color: #355b88 !important; box-shadow: inset 0 0 10px rgba(46,133,255,.08), 0 5px 15px rgba(0,0,0,.2); }
.admin-body .tool-btn.active { box-shadow: 0 0 0 1px rgba(95,196,255,.5), 0 0 20px rgba(0,170,255,.35) !important; }
.admin-body input,
.admin-body textarea,
.admin-body select {
  caret-color: #36d8ff;
  box-shadow: inset 0 0 0 1px rgba(60,126,204,.04);
}
.admin-body input:focus,
.admin-body textarea:focus,
.admin-body select:focus {
  border-color: #19baff !important;
  box-shadow: 0 0 0 3px rgba(25,186,255,.13), inset 0 0 12px rgba(0,132,255,.08) !important;
}
.project-card,
.dashboard-card,
.kanban-card,
.image-review,
.settlement-merchant-card,
.commission-user-card {
  border-color: #284666 !important;
  background-image: linear-gradient(145deg, rgba(23,42,67,.96), rgba(11,23,39,.96)) !important;
}
.project-card:hover,
.dashboard-card:hover,
.kanban-card:hover,
.image-review:hover {
  border-color: #2fc8ff !important;
  box-shadow: 0 0 0 1px rgba(47,200,255,.14), 0 12px 30px rgba(0,117,255,.18), inset 0 0 22px rgba(27,139,255,.05) !important;
}
.pill { border: 1px solid rgba(102,164,232,.24); background: rgba(35,68,105,.7); color: #a9c9eb; }
.admin-header { backdrop-filter: blur(18px); }
.admin-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, #18c8ff, #356dff, transparent); opacity: .65; }
.client-body .btn:not(.primary):not(.danger) { background: #172436; border-color: #365a84; color: #c5d9ee; }
.client-body .tool-btn { border-color: #355574; box-shadow: 0 0 12px rgba(33,127,255,.08); }
.client-body .tool-btn.active { box-shadow: 0 0 0 1px rgba(96,190,255,.4), 0 0 18px rgba(27,137,255,.28); }
@media (hover: none) {
  .btn::after { display: none; }
}

.custom-modules-section{margin-top:15px;padding:14px;border:1px solid #dce4f0;border-radius:12px;background:#fff}.custom-modules-head{display:flex;justify-content:space-between;gap:10px;margin-bottom:10px}.custom-modules-head span{display:block;color:#7b879b;font-size:10px}.custom-modules-editor{display:grid;gap:8px}.custom-module-row{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center}.custom-module-row input[type=text],.custom-module-row input:not([type]){min-height:36px;padding:0 9px;border:1px solid #d6dfeb;border-radius:8px}.custom-module-row .checkbox-field{padding:0}

.kanban-drag-handle{margin:9px 0;padding:6px;border:1px dashed #355b88;border-radius:7px;color:#75a9e8;text-align:center;font-size:9px;cursor:grab}.task-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.task-detail-item{padding:12px;border-radius:10px;background:#f3f7fc}.task-detail-item span{display:block;color:#738198;font-size:10px}.task-detail-item strong{display:block;margin-top:4px;color:#26344b}.task-detail-actions{display:flex;gap:9px;margin-top:16px}.task-detail-actions .btn{flex:1}

/* Pointer-drag kanban interaction */
.kanban-card {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}
.kanban-card.draggable { cursor: grab; }
.kanban-card.dragging,
.kanban-card.dragging:hover {
  opacity: .34;
  cursor: grabbing;
  transform: scale(.985);
}
.kanban-card:focus-visible {
  outline: 2px solid #2fc8ff;
  outline-offset: 2px;
}
.kanban-drag-handle {
  touch-action: none;
  user-select: none;
  background: linear-gradient(90deg, rgba(24,63,108,.28), rgba(18,42,73,.58), rgba(24,63,108,.28));
  box-shadow: inset 0 0 0 1px rgba(79,156,255,.08);
}
.kanban-card.draggable:hover .kanban-drag-handle {
  border-color: #4f9cff;
  color: #a8d4ff;
}
.kanban-column.dragover {
  border-color: #2fc8ff !important;
  background: linear-gradient(180deg, rgba(23,74,111,.92), rgba(13,31,51,.94)) !important;
  box-shadow: 0 0 0 2px rgba(47,200,255,.2) inset, 0 0 28px rgba(0,145,255,.2) !important;
}
.kanban-drag-ghost {
  position: fixed !important;
  z-index: 9999 !important;
  margin: 0 !important;
  pointer-events: none !important;
  opacity: .97 !important;
  transform: rotate(1deg) scale(1.025) !important;
  border-color: #2fc8ff !important;
  box-shadow: 0 22px 50px rgba(0,0,0,.42), 0 0 0 1px rgba(47,200,255,.28) !important;
  will-change: left, top;
}
.kanban-drag-ghost .kanban-actions { opacity: .58; }
body.kanban-dragging,
body.kanban-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .kanban-drag-ghost { transform: none !important; }
}

/* Immediate card interaction and task-detail close affordance */
.task-detail-card .user-modal-head {
  position: sticky;
  z-index: 3;
  top: -22px;
  margin: -22px -22px 18px;
  padding: 22px;
  border-bottom: 1px solid #dfe7f3;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
#closeTaskDetailButton {
  min-width: 76px;
  min-height: 38px;
  border: 1px solid #78a9ff !important;
  background: #edf5ff !important;
  color: #1f62d8 !important;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(47,109,246,.12);
}
#closeTaskDetailButton:hover {
  border-color: #2f6df6 !important;
  background: #2f6df6 !important;
  color: #fff !important;
}
.kanban-card.draggable:active .kanban-drag-handle {
  border-color: #2fc8ff;
  color: #d7efff;
}

/* Project workspace as a true overlay */
.workspace-modal-backdrop {
  position: fixed;
  z-index: 410;
  inset: 0;
  background: rgba(3, 8, 16, .72);
  backdrop-filter: blur(8px);
  animation: workspace-backdrop-enter .2s ease both;
}
.workspace-modal-backdrop[hidden] { display: none !important; }
.workspace.workspace-modal-open {
  position: fixed !important;
  z-index: 415;
  top: 14px !important;
  right: 14px !important;
  bottom: 14px !important;
  left: 14px !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: auto !important;
  border: 1px solid #315273;
  border-radius: 20px;
  background: linear-gradient(155deg, #0e1929, #111f31 58%, #101a29);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .58), 0 0 0 1px rgba(47, 200, 255, .08);
  animation: workspace-modal-enter .24s cubic-bezier(.2, .8, .2, 1) both;
}
body.workspace-modal-open { overflow: hidden; }
.workspace-modal-open .workspace-toolbar {
  position: sticky;
  z-index: 6;
  top: 0;
  flex-wrap: wrap;
  border-bottom-color: #2c4867;
  background: rgba(13, 25, 41, .96);
  backdrop-filter: blur(16px);
}
.workspace-modal-close {
  border: 1px solid #5fa8ff !important;
  background: #17345d !important;
  color: #c9e3ff !important;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(47, 140, 255, .2);
}
.workspace-modal-close:hover {
  border-color: #2fc8ff !important;
  background: #245b9e !important;
  color: #fff !important;
}
@keyframes workspace-modal-enter {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes workspace-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (max-width: 760px) {
  .workspace.workspace-modal-open {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    border-radius: 0;
  }
  .workspace-modal-close {
    width: 100%;
    order: 20;
  }
}
@media (prefers-reduced-motion: reduce) {
  .workspace.workspace-modal-open,
  .workspace-modal-backdrop { animation: none; }
}

/* Dashboard search: centered, prominent, and auto-locating */
.dashboard-head.dashboard-head-search {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(380px, 560px) minmax(240px, 1fr);
  gap: 24px;
  align-items: start;
}
.dashboard-head-search .dashboard-title { justify-self: start; }
.dashboard-head-search .dashboard-tools { justify-self: end; }
.dashboard-search-wrap {
  width: 100%;
  max-width: 560px;
  justify-self: center;
  display: grid;
  gap: 7px;
  text-align: center;
}
.dashboard-search-label {
  color: #9fc8ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.dashboard-search-box {
  position: relative;
  width: 100%;
}
.dashboard-search-box input {
  width: 100%;
  min-height: 58px;
  padding: 0 84px 0 52px;
  border: 1px solid #3a5b80;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(10,24,40,.96), rgba(18,38,61,.94));
  color: #eef7ff;
  font-size: 16px;
  font-weight: 700;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(78,151,255,.05), 0 12px 32px rgba(0,0,0,.22);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.dashboard-search-box input::placeholder { color: #738aa8; font-weight: 600; }
.dashboard-search-box input:focus {
  border-color: #2fc8ff;
  background: linear-gradient(145deg, #0c2037, #153253);
  box-shadow: 0 0 0 4px rgba(47,200,255,.12), 0 14px 38px rgba(0,116,255,.2);
}
.dashboard-search-icon {
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
  color: #63b8ff;
  font-size: 25px;
  line-height: 1;
  pointer-events: none;
}
.dashboard-search-shortcut {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 8px;
  border: 1px solid #385578;
  border-radius: 7px;
  background: rgba(24,48,77,.9);
  color: #8da9c8;
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
}
.dashboard-search-hint {
  min-height: 18px;
  margin: 0;
  color: #7186a3 !important;
  font-size: 11px;
  line-height: 1.5;
}
.dashboard-search-hint.empty { color: #ff9c76 !important; }
.kanban-card.search-target {
  z-index: 2;
  border-color: #2fc8ff !important;
  box-shadow: 0 0 0 2px rgba(47,200,255,.28), 0 0 32px rgba(47,200,255,.34) !important;
  animation: search-card-pulse 1.05s ease-in-out 2;
}
@keyframes search-card-pulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.018); }
}
@media (max-width: 1180px) {
  .dashboard-head.dashboard-head-search {
    grid-template-columns: 1fr auto;
  }
  .dashboard-search-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    margin-top: 4px;
  }
}
@media (max-width: 760px) {
  .dashboard-head.dashboard-head-search { grid-template-columns: 1fr; }
  .dashboard-head-search .dashboard-tools { justify-self: stretch; }
  .dashboard-search-wrap { grid-column: 1; grid-row: auto; }
  .dashboard-search-box input { min-height: 52px; padding-right: 16px; padding-left: 48px; font-size: 14px; }
  .dashboard-search-shortcut { display: none; }
}

.dashboard-search-box input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* Editable custom business modules */
.custom-modules-section {
  border-color: #cfdaea;
  background: linear-gradient(145deg, #ffffff, #f4f8ff);
}
.custom-modules-head { align-items: center; }
.custom-modules-head strong { color: #213b69; font-size: 14px; }
.custom-modules-head span { margin-top: 3px; color: #60718d; line-height: 1.5; }
.custom-modules-editor { gap: 9px; margin-top: 12px; }
.custom-modules-empty {
  padding: 20px 14px;
  border: 1px dashed #b9c9e2;
  border-radius: 12px;
  background: rgba(238, 245, 255, .72);
  color: #6d7e99;
  text-align: center;
  font-size: 12px;
}
.custom-module-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid #d6e1f0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(39, 72, 122, .06);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.custom-module-row:hover { border-color: #9fbdf0; box-shadow: 0 8px 22px rgba(47,109,246,.1); }
.custom-module-row input {
  flex: 1 1 260px;
  min-width: 180px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #cad7e9;
  border-radius: 10px;
  background: #f7faff;
  color: #243854;
  font-size: 13px;
  font-weight: 700;
}
.custom-module-row input:disabled {
  border-color: transparent;
  background: #f3f7fd;
  color: #3c4f6b;
  opacity: 1;
}
.custom-module-row input:not(:disabled):focus {
  outline: none;
  border-color: #2f6df6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47,109,246,.1);
}
.module-status,
.module-icon-button,
.module-delete-button,
.module-edit-button {
  min-height: 38px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}
.module-status {
  min-width: 72px;
  border: 1px solid #91b5ef !important;
  background: #eef5ff !important;
  color: #2861c7 !important;
}
.module-status.inactive {
  border-color: #c9d2df !important;
  background: #f0f3f7 !important;
  color: #6e7d92 !important;
}
.module-icon-button {
  width: 38px;
  padding: 0 !important;
  border: 1px solid #bcd0ef !important;
  background: #f3f7ff !important;
  color: #2f67cc !important;
}
.module-icon-button:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.module-delete-button {
  min-width: 58px;
  border: 1px solid #efb5b8 !important;
  background: #fff1f2 !important;
  color: #c53d48 !important;
}
.module-delete-button:hover { background: #d94b57 !important; color: #fff !important; }
@media (max-width: 760px) {
  .custom-module-row input { flex-basis: 100%; min-width: 0; }
  .module-status { margin-right: auto; }
}

/* Dynamic workflow columns and explicit module enable switch */
.admin-body .dashboard-grid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(235px, 1fr);
}
.kanban-column.custom-module-column {
  border-color: rgba(47, 200, 255, .38);
  background: linear-gradient(180deg, rgba(15, 39, 61, .96), rgba(12, 24, 39, .96));
  box-shadow: inset 0 0 0 1px rgba(47, 200, 255, .06);
}
.kanban-column.custom-module-column .kanban-head strong::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #2fc8ff;
  box-shadow: 0 0 12px rgba(47, 200, 255, .75);
  vertical-align: 1px;
}
.stage-step.custom-stage-step {
  border-color: rgba(47, 200, 255, .48) !important;
  background: rgba(23, 65, 98, .72) !important;
  color: #bcecff !important;
}
.module-status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #b9cff1;
  border-radius: 10px;
  background: #eef5ff;
  color: #2c62c4;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}
.module-status-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #2f6df6;
}
.module-status-toggle.active {
  border-color: #6fa2f5;
  background: #e7f0ff;
  color: #1f5fce;
}
.module-status-toggle.inactive {
  border-color: #ccd5e2;
  background: #f1f4f8;
  color: #718096;
}
@media (max-width: 760px) {
  .admin-body .dashboard-grid {
    grid-auto-columns: 250px;
  }
}

.module-builtin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #b9cce8;
  border-radius: 9px;
  background: #f2f6fc;
  color: #5f7393;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

/* Dedicated workflow editor page */
.workflow-editor-body {
  min-height: 100vh;
  background: radial-gradient(circle at 12% 0%, #12345d 0, transparent 34%), radial-gradient(circle at 88% 4%, #123b42 0, transparent 28%), #080e18;
}
.workflow-editor-main {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 70px;
}
.workflow-editor-panel {
  padding: 24px;
  border: 1px solid #29415f;
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(14,27,44,.98), rgba(12,22,36,.98));
  box-shadow: 0 26px 70px rgba(0,0,0,.36);
}
.workflow-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.workflow-editor-head h1 { margin: 6px 0; color: #eef7ff; font-size: 28px; }
.workflow-editor-head p { margin: 0; color: #8498b3; font-size: 13px; }
.workflow-editor-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.workflow-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0 14px;
  padding: 13px 15px;
  border: 1px solid #2c4768;
  border-radius: 14px;
  background: rgba(17,35,56,.78);
}
.workflow-editor-toolbar strong { color: #b9dcff; font-size: 13px; }
.workflow-editor-toolbar span { color: #7189a7; font-size: 11px; }
.workflow-editor-list { display: grid; gap: 11px; }
.flow-editor-row {
  display: grid;
  grid-template-columns: 76px 42px minmax(220px, 1fr) auto 40px 40px auto;
  cursor: grab;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid #2a425f;
  border-radius: 15px;
  background: linear-gradient(145deg, #13243a, #101b2c);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.flow-editor-row:hover { border-color: #3f7ac8; box-shadow: 0 14px 30px rgba(22,93,190,.18); }
.flow-editor-row.dragging {
  z-index: 3;
  opacity: .78;
  border-color: #2fc8ff;
  transform: scale(1.008);
  box-shadow: 0 22px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(47,200,255,.25);
}
.flow-drag-handle {
  width: 70px;
  height: 40px;
  border: 1px solid #3b5c82;
  border-radius: 10px;
  background: #172b45;
  color: #82b9ff;
  font-size: 20px;
  cursor: grab;
  touch-action: none;
}
.flow-drag-handle:active { cursor: grabbing; background: #214c7c; }
.flow-order-number { color: #5e7898; font-size: 12px; font-weight: 900; text-align: center; }
.flow-name-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #35506f;
  border-radius: 10px;
  background: #0d1929;
  color: #eef7ff;
  font-size: 14px;
  font-weight: 800;
  outline: none;
}
.flow-name-input:focus { border-color: #2fc8ff; box-shadow: 0 0 0 3px rgba(47,200,255,.12); }
.flow-enabled-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #41658f;
  border-radius: 10px;
  background: #142943;
  color: #a9cdf4;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.flow-enabled-toggle input { width: 16px; height: 16px; accent-color: #2f8cff; }
.flow-kind-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #405a7b;
  border-radius: 9px;
  background: #172840;
  color: #8ea8c9;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.workflow-editor-empty {
  padding: 45px 18px;
  border: 1px dashed #35506f;
  border-radius: 15px;
  color: #7890ad;
  text-align: center;
}
@media (max-width: 920px) {
  .workflow-editor-head { flex-direction: column; }
  .flow-editor-row { grid-template-columns: 76px 36px minmax(180px, 1fr) auto; }
  .flow-kind-badge { grid-column: 3; justify-self: start; }
  .flow-editor-row .module-icon-button,
  .flow-editor-row .module-delete-button { min-width: 38px; }
}
@media (max-width: 620px) {
  .workflow-editor-panel { padding: 16px; }
  .workflow-editor-toolbar { align-items: flex-start; flex-direction: column; }
  .flow-editor-row { grid-template-columns: 76px 1fr auto; }
  .flow-order-number { display: none; }
  .flow-name-input { grid-column: 1 / -1; grid-row: 2; }
  .flow-kind-badge { grid-column: 1 / 3; }
}

.workflow-entry-section { display: grid; gap: 10px; }
.workflow-entry-hint {
  padding: 12px 13px;
  border: 1px dashed #b8caE4;
  border-radius: 11px;
  background: #f2f7ff;
  color: #657792;
  font-size: 11px;
  line-height: 1.6;
}



.flow-editor-placeholder {
  border: 1px dashed rgba(47, 200, 255, .6);
  border-radius: 15px;
  background: rgba(22, 72, 111, .28);
  box-shadow: inset 0 0 20px rgba(47, 200, 255, .08);
}
.flow-editor-row.drag-floating {
  margin: 0 !important;
  pointer-events: none;
  transform: rotate(.3deg) scale(1.01);
  box-shadow: 0 28px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(47,200,255,.35);
}
body.workflow-dragging,
body.workflow-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

/* Merchant read-only settlement portal */
.merchant-portal-body { min-height: 100vh; background: radial-gradient(circle at 10% 0%, #12345d 0, transparent 32%), radial-gradient(circle at 90% 5%, #153b36 0, transparent 28%), #080e18; }
.merchant-portal-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; width: min(1380px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 18px; }
.merchant-portal-header h1 { margin: 6px 0 4px; color: #f1f8ff; font-size: 28px; }
.merchant-portal-header p { margin: 0; color: #8298b4; font-size: 12px; }
.merchant-portal-main { width: min(1380px, calc(100% - 32px)); margin: 0 auto 70px; }
.merchant-summary-grid { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.merchant-summary-card { padding: 18px; border: 1px solid #2a405d; border-radius: 16px; background: linear-gradient(145deg, #12233a, #0f1a2b); box-shadow: 0 14px 32px rgba(0,0,0,.22); }
.merchant-summary-card span { display: block; color: #8298b4; font-size: 11px; }
.merchant-summary-card strong { display: block; margin-top: 8px; color: #eff7ff; font-size: 24px; }
.merchant-summary-card.expected { border-color: #385d8f; }
.merchant-summary-card.settleable { border-color: #a77b32; }
.merchant-summary-card.reported { border-color: #8b5cf6; }
.merchant-summary-card.paid { border-color: #2d8b67; }
.merchant-summary-card.debt strong { color: #ff8d88; }
.merchant-portal-panel { padding: 20px; border: 1px solid #273d59; border-radius: 20px; background: rgba(13,25,41,.96); box-shadow: 0 22px 58px rgba(0,0,0,.32); }
.merchant-portal-toolbar { display: flex; align-items: end; gap: 10px; margin-bottom: 14px; }
.merchant-portal-toolbar .field { min-width: 170px; }
.merchant-table-wrap { width: 100%; overflow-x: auto; }
.merchant-table { width: 100%; min-width: 1080px; border-collapse: collapse; }
.merchant-table th { padding: 11px 10px; border-bottom: 1px solid #31435b; color: #8095b0; font-size: 10px; text-align: left; white-space: nowrap; }
.merchant-table td { padding: 12px 10px; border-bottom: 1px solid #202f43; color: #c8d6e8; font-size: 12px; }
.merchant-table tr:hover td { background: rgba(35,67,102,.16); }
.merchant-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.merchant-status.expected { background: #17345a; color: #8ec5ff; }
.merchant-status.settleable { background: #4a3515; color: #ffd582; }
.merchant-status.reported { background: #3a2860; color: #d5b4ff; }
.merchant-status.paid { background: #123d30; color: #83e2bc; }
.merchant-portal-empty { padding: 45px 20px; color: #7188a5; text-align: center; }
@media (max-width: 1080px) { .merchant-summary-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); } }
@media (max-width: 700px) {
  .merchant-portal-header { align-items: flex-start; flex-direction: column; }
  .merchant-summary-grid { grid-template-columns: 1fr 1fr; }
  .merchant-portal-toolbar { align-items: stretch; flex-direction: column; }
  .merchant-portal-toolbar .field { width: 100%; }
}

/* Financial stage totals */
.settlement-summary { grid-template-columns: repeat(5, minmax(150px, 1fr)) !important; }
.settlement-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.settlement-mode-card {
  padding: 16px;
  border: 1px solid #d8e1ee;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #f5f8fd);
  box-shadow: 0 10px 24px rgba(33,57,93,.07);
}
.settlement-mode-head strong { display: block; color: #263b5e; font-size: 15px; }
.settlement-mode-head span { display: block; margin-top: 3px; color: #7b899d; font-size: 10px; }
.settlement-mode-values { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.settlement-mode-values div { padding: 8px; border-radius: 9px; background: #edf3fb; }
.settlement-mode-values span { display: block; color: #7a899f; font-size: 9px; }
.settlement-mode-values strong { display: block; margin-top: 4px; color: #273b5b; font-size: 13px; }
.settlement-mode-money { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.settlement-mode-money div { padding: 9px; border-radius: 9px; background: #f1f5fb; }
.settlement-mode-money span { display: block; color: #8390a5; font-size: 9px; }
.settlement-mode-money strong { display: block; margin-top: 3px; color: #2f405a; font-size: 13px; }
.settlement-card-actions { flex-wrap: wrap; }
.settlement-card-actions .btn { flex: 1 1 150px; }
@media (max-width: 980px) {
  .settlement-summary { grid-template-columns: repeat(3, 1fr) !important; }
  .settlement-mode-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .settlement-summary { grid-template-columns: 1fr 1fr !important; }
  .settlement-mode-money { grid-template-columns: 1fr 1fr; }
}

/* Unified finance center */
.finance-overview-grid { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 10px; margin: 14px 0; }
.finance-overview-card { padding: 14px; border: 1px solid #d7e2f1; border-radius: 13px; background: linear-gradient(145deg, #fff, #f3f7fd); }
.finance-overview-card span { display: block; color: #7a8aa1; font-size: 10px; }
.finance-overview-card strong { display: block; margin-top: 6px; color: #223a61; font-size: 18px; }
.finance-distribution-panel { margin-top: 20px; padding: 18px; border: 1px solid #dbe4f0; border-radius: 16px; background: #f8fbff; }
.finance-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.finance-section-head h3 { margin: 0; }
.finance-section-head p { margin: 4px 0 0; color: #7b899c; font-size: 11px; }
.finance-section-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.finance-action-row { display: flex; gap: 8px; margin-top: 14px; }
.finance-action-row select { flex: 1; min-height: 38px; padding: 0 10px; border: 1px solid #cfdae9; border-radius: 9px; }
.finance-ledger-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 16px; }
.finance-ledger-grid h4 { margin: 0 0 8px; font-size: 13px; }
.finance-ledger-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 9px; border-radius: 8px; color: #5b6d87; font-size: 11px; }
.finance-ledger-row:nth-child(odd) { background: #fff; }
@media (max-width: 1100px) { .finance-overview-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .finance-overview-grid, .finance-ledger-grid { grid-template-columns: 1fr 1fr; } .finance-action-row, .finance-section-head { flex-direction: column; } }

/* Merchant management center */
.merchant-center-list { display: grid; gap: 10px; padding: 14px; max-height: 460px; overflow-y: auto; }
.merchant-center-card { padding: 13px; border: 1px solid #d9e3f1; border-radius: 13px; background: linear-gradient(145deg, #fff, #f6f9fe); box-shadow: 0 7px 18px rgba(31,55,91,.06); }
.merchant-center-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.merchant-center-head strong { color: #263d63; font-size: 14px; }
.merchant-center-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.merchant-center-meta span { padding: 5px 7px; border-radius: 7px; background: #edf3fb; color: #6d7f98; font-size: 9px; }
.merchant-center-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.merchant-center-actions .btn { flex: 1 1 calc(33.333% - 7px); min-width: 92px; min-height: 34px; font-size: 10px; }

/* Intake batch recognition */
.intake-batch-list { display: grid; gap: 7px; margin: 12px 0; }
.intake-batch-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 9px 10px; border: 1px solid #d7e2f0; border-radius: 10px; background: #fff; }
.intake-batch-row > span { color: #2f6df6; font-weight: 900; }
.intake-batch-row strong { min-width: 0; color: #263d63; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intake-batch-row small { color: #7b899d; font-size: 10px; }
@media (max-width: 620px) { .intake-batch-row { grid-template-columns: 28px 1fr; } .intake-batch-row small { grid-column: 2; } }

/* Enforce hidden state */
[hidden] { display: none !important; }

.intake-quick-entry textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 13px;
  border: 1px solid #d8e1ee;
  border-radius: 11px;
  background: #f8fafc;
  color: #26344a;
  font: inherit;
  resize: vertical;
  outline: none;
}
.intake-quick-entry textarea:focus { border-color: #6a9af6; box-shadow: 0 0 0 3px rgba(47,109,246,.1); }
.intake-batch-remove { border: 0; background: transparent; color: #d64b57; font-size: 10px; font-weight: 900; }

.intake-batch-row { cursor: pointer; }
.intake-batch-row.selected { border-color: #5b8cff; background: #f3f7ff; box-shadow: 0 0 0 2px rgba(47,109,246,.09); }
.intake-batch-main { min-width: 0; display: grid; gap: 3px; }
.intake-batch-actions { display: flex; align-items: center; gap: 6px; }
.intake-batch-actions .btn { min-height: 31px; padding: 0 9px; font-size: 10px; }
@media (max-width: 620px) { .intake-batch-actions { grid-column: 2; justify-self: start; } }

/* Homepage project management and full project table */
.project-management-panel { min-height: 420px; }
.recent-project-list { display: grid; gap: 10px; padding: 16px; }
.recent-project-card { padding: 14px; border: 1px solid #dbe4f0; border-radius: 13px; background: linear-gradient(145deg, #fff, #f7faff); cursor: pointer; transition: border-color .16s ease, transform .16s ease; }
.recent-project-card:hover { transform: translateY(-2px); border-color: #6da0ff; }
.recent-project-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.recent-project-head strong { color: #263d63; }
.recent-project-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.recent-project-meta span { padding: 5px 7px; border-radius: 7px; background: #eef4fc; color: #6f8099; font-size: 9px; }
.all-projects-card { width: min(1480px, 100%) !important; }
.project-table-filters, .project-batch-editor { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.project-table-filters input, .project-table-filters select, .project-batch-editor select { min-height: 38px; padding: 0 10px; border: 1px solid #d5dfed; border-radius: 9px; background: #f8fafc; }
.project-table-filters input { flex: 1 1 240px; }
.project-table-wrap { max-height: 58vh; overflow: auto; border: 1px solid #dce4ef; border-radius: 12px; }
.project-table { width: 100%; min-width: 1180px; border-collapse: collapse; }
.project-table th { position: sticky; top: 0; z-index: 1; padding: 10px 8px; background: #eef4fb; color: #62738d; font-size: 10px; text-align: left; }
.project-table td { padding: 7px 6px; border-bottom: 1px solid #edf1f6; }
.project-table input, .project-table select { width: 100%; min-height: 34px; padding: 0 7px; border: 1px solid #d8e1ee; border-radius: 8px; background: #fff; font-size: 11px; }
.project-table td:nth-child(1) input { width: 16px; min-height: 16px; }
.project-table td:nth-child(5) select, .project-table td:nth-child(8) select { min-width: 110px; }

.finance-recipient-row { display: flex; gap: 8px; margin-top: 14px; }
.finance-recipient-row input { flex: 1; min-height: 38px; padding: 0 10px; border: 1px solid #d2dcea; border-radius: 9px; }
.finance-recipient-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 15px; }
.finance-recipient-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px 6px 10px; border-radius: 999px; background: #eaf2ff; color: #315ea7; font-size: 11px; font-weight: 800; }
.finance-recipient-chip button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #d9e7ff; color: #315ea7; }
.finance-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.finance-form-card { display: grid; gap: 8px; padding: 14px; border: 1px solid #dae3f0; border-radius: 13px; background: #fff; }
.finance-form-card h4 { margin: 0; }
.finance-form-card input, .finance-form-card select { min-height: 38px; padding: 0 9px; border: 1px solid #d5dfed; border-radius: 9px; background: #f8fafc; }
.merchant-balance-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; padding: 13px; border: 1px solid #d6e1ef; border-radius: 12px; background: #f4f8fe; }
.merchant-balance-summary span { display: block; color: #74839b; font-size: 10px; }
.merchant-balance-summary strong { display: block; margin-top: 4px; color: #254a83; font-size: 20px; }
.merchant-transaction-panel { margin-bottom: 14px; }
.merchant-transaction-panel h3 { margin: 0 0 8px; font-size: 14px; }
.merchant-transaction-list { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.merchant-transaction-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 9px; border-radius: 9px; background: #f7f9fc; font-size: 11px; }
.merchant-transaction-row strong, .merchant-transaction-row small { display: block; }
.merchant-transaction-row .positive { color: #23966a; font-weight: 900; }
.merchant-transaction-row .negative { color: #d94b57; font-weight: 900; }
@media (max-width: 700px) { .finance-form-grid { grid-template-columns: 1fr; } .merchant-transaction-row { grid-template-columns: 1fr auto; } }

.finance-distribution-recipient { display: grid; grid-template-columns: 20px 1fr 130px; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 9px; background: #f4f7fc; }
.finance-distribution-recipient input[type="checkbox"] { width: 16px; height: 16px; }
.finance-distribution-recipient input[type="number"] { min-height: 34px; }
.finance-ledger-section { margin-top: 16px; }
.finance-ledger-section h4 { margin: 0 0 8px; }
.finance-ledger-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 10px; border-bottom: 1px solid #e7edf5; }
.finance-ledger-row .positive { color: #23966a; }
.finance-ledger-row .negative { color: #d94b57; }
.finance-ledger-row small { color: #718096; }



/* 2026.10.04 readability and interaction upgrade */
.admin-section-nav {
  position: sticky;
  top: 68px;
  z-index: 18;
  display: flex;
  gap: 8px;
  padding: 10px max(20px, calc((100vw - 1320px) / 2));
  overflow-x: auto;
  background: rgba(7, 16, 30, .88);
  border-bottom: 1px solid rgba(83, 125, 180, .24);
  backdrop-filter: blur(18px);
}
.admin-section-nav button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(104, 149, 205, .28);
  border-radius: 999px;
  background: rgba(17, 35, 58, .78);
  color: #a9bdd7;
  font-size: 12px;
  font-weight: 800;
  transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease;
}
.admin-section-nav button:hover,
.admin-section-nav button.active {
  transform: translateY(-1px);
  border-color: #3f8cff;
  background: linear-gradient(135deg, rgba(27, 92, 194, .8), rgba(18, 61, 128, .8));
  color: #fff;
  box-shadow: 0 8px 24px rgba(36, 107, 253, .24);
}
.scroll-section { scroll-margin-top: 132px; animation: section-enter .38s ease both; }
@keyframes section-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.clickable-card,
.clickable-metric,
.clickable-row { cursor: pointer; }
.clickable-card,
.clickable-metric { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.clickable-card:hover,
.clickable-card:focus-visible,
.clickable-metric:hover,
.clickable-metric:focus-visible {
  transform: translateY(-3px);
  border-color: #3f8cff;
  box-shadow: 0 16px 34px rgba(24, 91, 191, .18);
  outline: none;
}
.clickable-row:hover { background: #edf5ff; }
.card-detail-hint,
.clickable-metric small { display: block; margin-top: 7px; color: #5a6d88; font-size: 11px; font-weight: 700; }
.settlement-summary { grid-template-columns: repeat(5, minmax(150px, 1fr)) !important; }
.settlement-summary > div { min-height: 96px; border: 1px solid #dbe5f2; }
.settlement-summary span { color: #566a86 !important; font-size: 12px !important; font-weight: 800; }
.settlement-summary strong { font-size: 22px !important; }
.settlement-summary small { color: #6f8199; }
.settlement-mode-values span,
.settlement-mode-money span,
.finance-overview-card span { font-size: 12px !important; color: #536984 !important; font-weight: 800; }
.settlement-mode-values strong,
.settlement-mode-money strong { font-size: 15px !important; color: #182b4a !important; }
.finance-overview-grid { grid-template-columns: repeat(4, minmax(170px, 1fr)) !important; }
.finance-overview-card { min-height: 105px; border-color: #c9d8ec; }
.finance-overview-card strong { font-size: 21px !important; }
.merchant-center-meta span { font-size: 12px; color: #526984; }
.current-user-badge,
.dashboard-eyebrow { font-size: 12px !important; font-weight: 900; }
.dashboard-panel .dashboard-search-hint,
.dashboard-panel .dashboard-title p,
.dashboard-panel .empty,
.kanban-empty { color: #a5b8d0 !important; }
.btn { min-height: 40px; font-size: 13px; }
.btn.small { min-height: 36px; padding: 0 13px; font-size: 12px; font-weight: 800; }
.btn.primary { background: linear-gradient(135deg, #2f7cff, #1557d8) !important; color: #fff !important; }
.btn.danger { border: 1px solid rgba(229, 72, 77, .24); background: linear-gradient(135deg, #ef5358, #c9323d) !important; color: #fff !important; }
.btn.ghost { background: rgba(255,255,255,.68); }
.inline-actions,
.modal-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.selection-count { padding: 7px 10px; border-radius: 999px; background: #edf4ff; color: #245bb7; font-size: 12px; font-weight: 900; }
.billing-drawer { position: fixed; inset: 0; z-index: 90; }
.billing-drawer-backdrop { position: absolute; inset: 0; background: rgba(3, 10, 20, .62); backdrop-filter: blur(7px); animation: fade-in .2s ease both; }
.billing-drawer-card {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(1080px, 94vw);
  padding: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, #f8fbff, #eef4fb);
  box-shadow: -24px 0 70px rgba(5, 18, 38, .34);
  animation: drawer-enter .28s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes drawer-enter { from { transform: translateX(42px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.billing-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.billing-drawer-head h2 { margin: 4px 0 5px; color: #142a4d; font-size: 24px; }
.billing-drawer-head p { margin: 0; color: #5e718b; font-size: 13px; }
.billing-filter-row { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 18px 0 12px; padding: 12px; border: 1px solid #d6e1ef; border-radius: 14px; background: #fff; }
.billing-filter-row label { display: grid; gap: 5px; color: #465c78; font-size: 12px; font-weight: 800; }
.billing-filter-row input { min-height: 36px; border: 1px solid #d7e1ee; border-radius: 10px; padding: 0 10px; }
.billing-summary { display: grid; grid-template-columns: repeat(2, minmax(150px, 230px)); gap: 10px; margin-bottom: 12px; }
.billing-summary article { padding: 13px 15px; border: 1px solid #cbd9eb; border-radius: 14px; background: #fff; }
.billing-summary span { display: block; color: #657891; font-size: 12px; }
.billing-summary strong { display: block; margin-top: 6px; color: #17345f; font-size: 22px; }
.billing-table-wrap { min-height: 160px; flex: 1; overflow: auto; border: 1px solid #d3dfed; border-radius: 16px; background: #fff; }
.billing-detail-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.billing-detail-table th { position: sticky; top: 0; z-index: 1; padding: 12px 11px; background: #f3f7fc; color: #536983; font-size: 12px; text-align: left; white-space: nowrap; }
.billing-detail-table td { padding: 12px 11px; border-top: 1px solid #e6edf6; color: #263b59; font-size: 12px; }
.billing-detail-table tbody tr:hover td { background: #f5f9ff; }
.billing-detail-table .money-cell { color: #174f9f; font-weight: 900; text-align: right; }
.billing-loading,
.billing-error { display: grid; min-height: 180px; place-items: center; color: #5d718c; font-weight: 800; }
.batch-delete-impact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.batch-delete-impact > div { padding: 13px; border: 1px solid #ead3d5; border-radius: 12px; background: #fff8f8; }
.batch-delete-impact span { display: block; color: #8c6770; font-size: 12px; }
.batch-delete-impact strong { display: block; margin-top: 6px; color: #9f2330; font-size: 19px; }
.batch-delete-confirm { display: grid; gap: 7px; margin: 12px 0 16px; color: #653440; font-size: 13px; font-weight: 800; }
.batch-delete-confirm input { min-height: 42px; border: 1px solid #e1c7ca; border-radius: 11px; padding: 0 12px; }
.backup-settings-card { grid-column: 1 / -1; margin-top: 6px; padding: 16px; border: 1px solid #cfdced; border-radius: 16px; background: linear-gradient(145deg, #f7fbff, #edf4fb); }
.backup-settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.backup-settings-head strong { display: block; color: #18345c; font-size: 16px; }
.backup-settings-head span { display: block; margin-top: 4px; color: #60748f; font-size: 12px; }
.backup-settings-grid { margin-top: 12px; }
.backup-directory-field { grid-column: span 2; }
.backup-status-panel { display: grid; gap: 8px; margin-top: 14px; }
.backup-record { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid #d4e0ee; border-radius: 12px; background: #fff; }
.backup-record.failed { border-color: #efc8cb; background: #fff7f7; }
.backup-record strong,
.backup-record span { display: block; }
.backup-record strong { color: #254265; font-size: 13px; }
.backup-record span { margin-top: 3px; color: #6c7f98; font-size: 11px; }
.backup-record-actions { display: flex; gap: 7px; flex: 0 0 auto; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
@media (max-width: 980px) {
  .admin-section-nav { top: 62px; }
  .settlement-summary { grid-template-columns: repeat(3, 1fr) !important; }
  .finance-overview-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .billing-drawer-card { width: 100vw; padding: 16px; }
}
@media (max-width: 620px) {
  .admin-section-nav { padding-inline: 10px; }
  .settlement-summary { grid-template-columns: 1fr 1fr !important; }
  .finance-overview-grid { grid-template-columns: 1fr !important; }
  .batch-delete-impact { grid-template-columns: 1fr 1fr; }
  .backup-directory-field { grid-column: 1 / -1; }
  .backup-record { align-items: stretch; flex-direction: column; }
  .billing-filter-row { align-items: stretch; flex-direction: column; }
  .billing-summary { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.user-modal-card .user-modal-head h2 { color: #142a4d !important; }
.user-modal-card .user-modal-head p { color: #5e718b !important; }
.user-modal-card .user-modal-head .dashboard-eyebrow { color: #246bfd !important; }
.settings-modal-card .field label { color: #405774 !important; font-weight: 800; }
.settings-modal-card .permission-checkbox span { color: #334b69 !important; font-weight: 700; }
.settings-modal-card .btn.ghost { background: #f5f8fd !important; color: #29486f !important; border-color: #ccdaeb !important; }
.batch-delete-card .user-modal-head h2 { color: #8f2030 !important; }

.dashboard-eyebrow { color: #7db5ff !important; }
.current-user-badge { color: #194fb8 !important; background: #edf4ff !important; }
.card-detail-hint,
.clickable-metric small,
.finance-overview-card .card-detail-hint { color: #40566f !important; font-size: 12px !important; }
.finance-overview-card span { color: #3f5674 !important; }
.stat small,
.dashboard-search-label,
.dashboard-search-hint,
.settlement-mode-head span,
.commission-board-head span { font-size: 12px !important; }

.dashboard-search-shortcut,
.finance-distribution-panel p,
.finance-recipient-chip,
.finance-ledger-row span,
.finance-ledger-row small,
.merchant-transaction-row span,
.merchant-transaction-row small { font-size: 12px !important; }

@media (max-width: 700px) {
  #adminApp { overflow-x: clip; }
  .admin-header { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .admin-header .brand { flex: 1 1 100%; min-width: 0; }
  .admin-header .default-warning { flex: 1 1 100%; }
  .header-actions { display: flex; width: 100%; flex-wrap: nowrap; gap: 7px; overflow-x: auto; padding-bottom: 3px; }
  .header-actions .btn { flex: 0 0 auto; min-height: 36px; padding: 0 10px; font-size: 12px; }
  .admin-section-nav { top: 0; padding-top: 8px; padding-bottom: 8px; }
}

/* Workspace shell and dashboard */
.brand-logo { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; box-shadow: 0 12px 28px rgba(36,107,253,.3); }
.brand-logo-small { width: 38px; height: 38px; }
.admin-workspace { display: grid; grid-template-columns: 232px minmax(0, 1fr); width: min(1640px, calc(100% - 28px)); margin: 0 auto; }
.admin-sidebar { position: sticky; top: 76px; align-self: start; height: calc(100vh - 92px); padding: 16px 13px; overflow-y: auto; border-right: 1px solid rgba(92,130,180,.2); background: linear-gradient(180deg, rgba(10,22,39,.98), rgba(7,16,30,.96)); }
.sidebar-brand { display: flex; align-items: center; width: 100%; gap: 10px; padding: 8px; border: 0; border-radius: 15px; background: transparent; color: #f4f8ff; text-align: left; }
.sidebar-brand:hover { background: rgba(52,111,190,.16); }
.sidebar-brand img { width: 44px; height: 44px; border-radius: 13px; }
.sidebar-brand span { display: grid; gap: 2px; }
.sidebar-brand strong { font-size: 16px; letter-spacing: .02em; }
.sidebar-brand small { color: #86a2c5; font-size: 10px; }
.sidebar-tagline { margin: 12px 8px 15px; color: #84a5cc; font-size: 11px; line-height: 1.55; }
.sidebar-nav { display: grid; gap: 6px; }
.sidebar-nav button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 11px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #a9bfdc; font-size: 13px; font-weight: 800; text-align: left; transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease; }
.sidebar-nav button:hover { transform: translateX(2px); background: rgba(45,102,181,.15); color: #f3f8ff; }
.sidebar-nav button.active { border-color: rgba(81,157,255,.38); background: linear-gradient(135deg, rgba(34,105,220,.45), rgba(20,61,125,.38)); color: #fff; box-shadow: 0 10px 26px rgba(13,51,111,.24); }
.nav-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgba(114,175,255,.12); color: #72b2ff; font-size: 9px; letter-spacing: .04em; }
.sidebar-nav button.active .nav-icon { background: #3282ff; color: #fff; }
.admin-content-shell { min-width: 0; }
.admin-content-shell .admin-main { width: 100%; max-width: none; margin: 0; padding: 18px 22px 64px; }
.admin-view { display: none !important; }
.admin-view.is-active { display: block !important; animation: view-enter .32s cubic-bezier(.2,.8,.2,1) both; }
.admin-grid { display: block !important; }
@keyframes view-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.home-dashboard { display: grid; gap: 16px; }
.home-hero { position: relative; overflow: hidden; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 26px 28px; border: 1px solid rgba(91,151,226,.3); border-radius: 22px; background: radial-gradient(circle at 88% 12%, rgba(58,147,255,.28), transparent 30%), linear-gradient(135deg, #102848, #0a172a 68%); box-shadow: 0 24px 60px rgba(5,15,31,.32); }
.home-hero::after { content: ''; position: absolute; right: -55px; bottom: -80px; width: 260px; height: 260px; border: 1px solid rgba(94,185,255,.14); border-radius: 50%; box-shadow: 0 0 0 32px rgba(94,185,255,.04), 0 0 0 64px rgba(94,185,255,.025); }
.home-hero h1 { margin: 4px 0 7px; color: #f4f9ff; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.03em; }
.home-hero p { margin: 0; color: #a9c3e2; font-size: 14px; }
.home-range-tabs { position: relative; z-index: 1; display: flex; gap: 7px; padding: 5px; border: 1px solid rgba(107,167,235,.25); border-radius: 13px; background: rgba(5,16,31,.4); }
.home-range-tabs button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #9fb8d7; font-size: 12px; font-weight: 800; }
.home-range-tabs button.active { background: #2d7fff; color: #fff; box-shadow: 0 8px 20px rgba(45,127,255,.3); }
.home-metric-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 10px; }
.home-metric-card { position: relative; overflow: hidden; min-height: 122px; padding: 17px; border: 1px solid rgba(114,154,204,.28); border-radius: 17px; background: linear-gradient(145deg, rgba(20,43,73,.98), rgba(10,25,45,.98)); color: #f6faff; text-align: left; box-shadow: 0 14px 32px rgba(3,13,27,.24); animation: metric-enter .42s ease both; animation-delay: var(--delay, 0ms); }
.home-metric-card::after { content: ''; position: absolute; right: -24px; top: -32px; width: 105px; height: 105px; border-radius: 50%; background: currentColor; opacity: .08; }
.home-metric-card:hover { transform: translateY(-3px); border-color: rgba(108,183,255,.6); box-shadow: 0 20px 42px rgba(12,84,174,.28); }
.home-metric-card span { display: block; color: #9bb5d5; font-size: 12px; font-weight: 800; }
.home-metric-card strong { display: block; margin: 11px 0 8px; color: #f8fbff; font-size: 27px; letter-spacing: -.025em; }
.home-metric-card small { color: #86a7ce; font-size: 11px; }
.home-metric-card.blue { color: #70b4ff; } .home-metric-card.purple { color: #aa9bff; } .home-metric-card.orange { color: #ffb66b; } .home-metric-card.cyan { color: #63e4ec; } .home-metric-card.green { color: #71dfaa; } .home-metric-card.violet { color: #d4a7ff; } .home-metric-card.red { color: #ff8d99; }
@keyframes metric-enter { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.home-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.home-chart-card { min-width: 0; padding: 18px; border: 1px solid rgba(100,142,194,.25); border-radius: 18px; background: linear-gradient(150deg, rgba(16,33,56,.98), rgba(9,21,38,.98)); box-shadow: 0 16px 40px rgba(3,12,25,.24); }
.home-chart-card.wide { grid-column: 1 / -1; }
.home-chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.home-chart-head h2 { margin: 0; color: #eff6ff; font-size: 16px; }
.home-chart-head p { margin: 4px 0 0; color: #839fbe; font-size: 11px; }
.home-chart-canvas { min-height: 220px; }
.home-chart-canvas svg { display: block; width: 100%; height: 250px; overflow: visible; }
.chart-grid-line { stroke: rgba(132,170,213,.14); stroke-width: 1; }
.chart-line { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 7px rgba(88,175,255,.25)); }
.chart-line.created { stroke: #5db1ff; } .chart-line.completed { stroke: #66e0ae; }
.home-chart-legend { display: flex; gap: 16px; color: #9eb8d7; font-size: 11px; }
.home-chart-legend span::before { content: ''; display: inline-block; width: 18px; height: 4px; margin-right: 6px; vertical-align: middle; border-radius: 999px; }
.legend-created::before { background: #5db1ff; } .legend-completed::before { background: #66e0ae; }
.home-bar-row, .home-finance-row, .home-merchant-row, .home-activity-row { display: grid; align-items: center; width: 100%; gap: 10px; border: 0; background: transparent; text-align: left; }
.home-bar-row { grid-template-columns: 88px minmax(0,1fr) 30px; min-height: 35px; color: #b9cce3; font-size: 12px; }
.home-bar-row i, .home-finance-row i, .home-merchant-row i { display: block; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(96,135,182,.14); }
.home-bar-row b, .home-finance-row b, .home-merchant-row b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2d7fff,#60d4f4); animation: bar-rise .55s ease both; }
@keyframes bar-rise { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
.home-bar-row strong, .home-finance-row strong, .home-merchant-row em { color: #eff7ff; font-style: normal; font-weight: 900; }
.home-finance-row { grid-template-columns: 86px minmax(0,1fr) 86px; min-height: 35px; color: #b7cbe4; font-size: 12px; }
.home-finance-row strong { text-align: right; }
.home-finance-row.blue i b { background: #4d9dff; } .home-finance-row.cyan i b { background: #5bdce8; } .home-finance-row.violet i b { background: #a78bfa; } .home-finance-row.green i b { background: #5fdca4; } .home-finance-row.orange i b { background: #ffb15d; } .home-finance-row.red i b { background: #ff7181; }
.home-merchant-row { grid-template-columns: minmax(130px,1.2fr) 90px minmax(70px,.8fr); min-height: 45px; color: #d5e5f7; }
.home-merchant-row span { display: grid; gap: 2px; }
.home-merchant-row small { color: #7896b8; font-size: 10px; }
.home-merchant-row em { text-align: right; }
.home-merchant-row i b { background: linear-gradient(90deg,#30b5dc,#7b8cff); }
.home-activity-list { display: grid; gap: 4px; }
.home-activity-row { grid-template-columns: 10px minmax(0,1fr) auto; min-height: 43px; color: #d9e8f8; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: #58b7ff; box-shadow: 0 0 0 5px rgba(88,183,255,.1); }
.home-activity-row span { display: grid; gap: 2px; }
.home-activity-row strong { font-size: 12px; } .home-activity-row small, .home-activity-row em { color: #7f9cbd; font-size: 10px; font-style: normal; }
.home-chart-empty { display: grid; min-height: 180px; place-items: center; color: #738daa; font-size: 12px; }
@media (max-width: 1100px) { .home-metric-grid { grid-template-columns: repeat(3, minmax(150px,1fr)); } .admin-workspace { grid-template-columns: 196px minmax(0,1fr); } }
@media (max-width: 760px) {
  .admin-workspace { display: block; width: 100%; }
  .admin-sidebar { position: static; height: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid rgba(92,130,180,.2); overflow: visible; }
  .sidebar-brand { max-width: 220px; }
  .sidebar-tagline { margin: 7px 8px 10px; }
  .sidebar-nav { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; }
  .sidebar-nav button { flex: 0 0 auto; width: auto; min-height: 38px; padding: 0 10px; }
  .nav-icon { width: 24px; height: 24px; }
  .admin-content-shell .admin-main { padding: 12px 10px 54px; }
  .home-hero { flex-direction: column; padding: 20px; }
  .home-metric-grid { grid-template-columns: 1fr 1fr; }
  .home-chart-grid { grid-template-columns: 1fr; }
  .home-chart-card.wide { grid-column: auto; }
  .home-chart-canvas svg { height: 210px; }
}
@media (max-width: 460px) { .home-metric-grid { grid-template-columns: 1fr; } .home-range-tabs { width: 100%; justify-content: space-between; } .home-range-tabs button { flex: 1; padding: 0 7px; } }

.metric-delay-0 { animation-delay: 0ms; } .metric-delay-1 { animation-delay: 45ms; } .metric-delay-2 { animation-delay: 90ms; } .metric-delay-3 { animation-delay: 135ms; } .metric-delay-4 { animation-delay: 180ms; } .metric-delay-5 { animation-delay: 225ms; } .metric-delay-6 { animation-delay: 270ms; } .metric-delay-7 { animation-delay: 315ms; } .metric-delay-8 { animation-delay: 360ms; } .metric-delay-9 { animation-delay: 405ms; }
.home-progress { appearance: none; width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 999px; background: rgba(96,135,182,.14); }
.home-progress::-webkit-progress-bar { border-radius: 999px; background: rgba(96,135,182,.14); }
.home-progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg,#2d7fff,#60d4f4); transition: width .55s ease; }
.home-progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg,#2d7fff,#60d4f4); }
.home-finance-row.blue .home-progress::-webkit-progress-value { background: #4d9dff; } .home-finance-row.cyan .home-progress::-webkit-progress-value { background: #5bdce8; } .home-finance-row.violet .home-progress::-webkit-progress-value { background: #a78bfa; } .home-finance-row.green .home-progress::-webkit-progress-value { background: #5fdca4; } .home-finance-row.orange .home-progress::-webkit-progress-value { background: #ffb15d; } .home-finance-row.red .home-progress::-webkit-progress-value { background: #ff7181; }
.home-merchant-row .home-progress::-webkit-progress-value { background: linear-gradient(90deg,#30b5dc,#7b8cff); }

.overview-subhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 9px; color: #c6d9ef; }
.overview-subhead strong { font-size: 14px; } .overview-subhead span { color: #7893b3; font-size: 11px; }
.project-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; max-height: 520px; overflow-y: auto; padding-right: 3px; }
.project-overview-card { display: grid; gap: 7px; min-height: 120px; padding: 14px; border: 1px solid rgba(104,146,196,.25); border-radius: 14px; background: linear-gradient(145deg, rgba(20,43,73,.97), rgba(11,26,46,.97)); color: #d8e8fa; text-align: left; }
.project-overview-card:hover { transform: translateY(-2px); border-color: rgba(93,177,255,.58); box-shadow: 0 16px 34px rgba(9,67,144,.24); }
.project-overview-card strong { color: #eff7ff; font-size: 14px; }
.project-overview-card small, .project-overview-card em { color: #8ca8c7; font-size: 11px; font-style: normal; }
.project-overview-status { width: fit-content; padding: 4px 8px; border-radius: 999px; background: rgba(70,140,224,.18); color: #83c4ff; font-size: 10px; }
.project-overview-status.paid { background: rgba(56,176,126,.16); color: #74e0ae; }
@media (max-width: 1050px) { .project-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 580px) { .project-overview-grid { grid-template-columns: 1fr; } }

@media (max-width: 760px) {
  .sidebar-brand, .sidebar-tagline { display: none; }
  .admin-sidebar { padding-top: 7px; }
}

.merchant-brand { display:flex; align-items:center; gap:8px; margin-bottom:10px; color:#a9c9ee; font-size:12px; font-weight:900; }
.merchant-brand img { width:30px; height:30px; border-radius:9px; }
.client-brand-name { display:block; margin-bottom:4px; color:#7fb9ff; font-size:11px; font-weight:900; letter-spacing:.04em; }

.intake-dropzone .intake-folder-hint { color:#7893b3; font-size:11px; line-height:1.6; }
.intake-dropzone .btn + .btn { margin-left:8px; }
@media (max-width:620px) { .intake-dropzone .btn + .btn { margin:8px 0 0; } }

.copy-helper-textarea { position:fixed; left:-9999px; top:0; width:1px; height:1px; opacity:0; pointer-events:none; }

.intake-tool-card { width:min(1400px,96vw); height:min(900px,92vh); display:flex; flex-direction:column; overflow:hidden; padding:0; }
.intake-tool-card .user-modal-head { padding:18px 22px; margin:0; border-bottom:1px solid #dce6f2; background:#f8fbff; }
.intake-tool-frame { width:100%; flex:1; border:0; background:#0b1728; }
.share-result-card { width:min(1100px,94vw); max-height:90vh; display:flex; flex-direction:column; }
.share-result-list { min-height:120px; overflow-y:auto; display:grid; gap:10px; padding:4px 2px 12px; }
.share-result-row { padding:14px; border:1px solid #d6e2f0; border-radius:14px; background:linear-gradient(145deg,#fff,#f4f8fd); }
.share-result-title { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:10px; }
.share-result-title strong { color:#19385f; } .share-result-title span { color:#73869f; font-size:11px; }
.share-result-fields { display:grid; grid-template-columns:1fr 1.5fr .8fr; gap:9px; }
.share-result-fields input,.share-result-fields select,.result-share-fields input,.result-share-fields select { min-width:0; min-height:40px; border:1px solid #cfdceb; border-radius:10px; padding:0 11px; background:#fff; color:#213a5b; }
.share-result-row-actions,.share-result-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.share-result-row.advanced { border-color:#63c79b; box-shadow:0 0 0 2px rgba(70,190,140,.12); }
.result-share-panel { margin-top:16px; padding:16px; border:1px solid #d3e1f0; border-radius:16px; background:#f7fbff; }
.result-share-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:12px; }
.result-share-head strong,.result-share-head span { display:block; } .result-share-head strong { color:#1c3c64; } .result-share-head span { color:#71859f; font-size:11px; margin-top:3px; }
.result-share-list { display:grid; gap:9px; }
.result-share-row { padding:12px; border:1px solid #d7e3f1; border-radius:12px; background:#fff; }
.result-share-row-head { display:flex; justify-content:space-between; margin-bottom:8px; color:#28486f; } .result-share-row-head span { color:#2aa678; font-size:11px; }
.result-share-fields { display:grid; grid-template-columns:1fr 1.5fr .8fr; gap:8px; }
.result-share-actions { display:flex; justify-content:flex-end; gap:7px; margin-top:8px; }
body.embedded-intake .intake-header { display:none; }
body.embedded-intake { background:#0b1728; }
body.embedded-intake .intake-main { width:min(1380px,calc(100% - 24px)); margin:0 auto; padding:16px 0 36px; }
@media (max-width:760px) {
  .share-result-fields,.result-share-fields { grid-template-columns:1fr; }
  .share-result-row-actions,.result-share-actions,.result-share-head { align-items:stretch; flex-direction:column; }
}

.result-file-list { display:grid; gap:7px; max-height:260px; overflow:auto; margin:10px 0; padding:10px; border:1px solid #d8e3f0; border-radius:12px; background:#fff; }
.result-file-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; border-radius:9px; background:#f5f9fe; }
.result-file-row strong,.result-file-row small { display:block; } .result-file-row strong { color:#244466; font-size:12px; } .result-file-row small { margin-top:2px; color:#768ba5; font-size:11px; }

.result-upload-type { display:flex; align-items:end; gap:10px; padding:14px; margin-bottom:12px; border:1px solid #d7e3f1; border-radius:14px; background:#f7fbff; }
.result-upload-type label { color:#29496e; font-size:12px; font-weight:900; }
.result-upload-type select { min-width:180px; min-height:40px; border:1px solid #cfdceb; border-radius:10px; padding:0 10px; }
.result-upload-type span { color:#71859f; font-size:11px; }
@media(max-width:620px){.result-upload-type{align-items:stretch;flex-direction:column}.result-upload-type select{width:100%}}

.stats-redesign { display:block !important; padding:0 !important; background:transparent !important; border:0 !important; }
.kanban-attention-strip { display:flex; gap:9px; overflow-x:auto; padding:2px 0 8px; }
.attention-chip { flex:0 0 auto; min-width:118px; min-height:68px; padding:10px 13px; border:1px solid rgba(103,151,208,.3); border-radius:14px; background:linear-gradient(145deg,#17304f,#0d213a); color:#d9e9fb; text-align:left; box-shadow:0 10px 24px rgba(3,13,27,.18); }
.attention-chip:hover,.attention-chip.active { transform:translateY(-2px); border-color:#4b9cff; background:linear-gradient(145deg,#1c4677,#12315a); }
.attention-chip strong { display:block; color:#fff; font-size:22px; } .attention-chip span { display:block; margin-top:4px; color:#9db8d7; font-size:11px; white-space:nowrap; }

.kanban-card { display:grid; gap:9px; }
.kanban-quick-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.kanban-quick-grid select:last-child { grid-column:1 / -1; }
.kanban-quick-select { min-width:0; min-height:34px; border:1px solid #415b7c; border-radius:8px; padding:0 7px; background:#10243f; color:#d8e8fa; font-size:11px; }
.kanban-card-actions { display:flex; gap:6px; } .kanban-card-actions .btn { flex:1; min-height:32px; font-size:11px; }
.task-note-card { width:min(880px,94vw); max-height:90vh; display:flex; flex-direction:column; }
.task-note-list { display:grid; gap:9px; max-height:48vh; overflow:auto; padding:4px 2px 10px; }
.task-note-item { padding:11px; border:1px solid #d6e2f0; border-radius:12px; background:#f8fbff; }
.task-note-meta { display:flex; justify-content:space-between; margin-bottom:6px; color:#3f5878; font-size:12px; } .task-note-meta span { color:#7b8fa8; font-size:11px; }
.task-note-item p { margin:4px 0 8px; color:#2a405e; white-space:pre-wrap; }
.task-note-image { display:block; max-width:220px; max-height:160px; margin:6px 0; border-radius:9px; object-fit:cover; }
.task-note-editor { display:grid; gap:8px; padding-top:12px; border-top:1px solid #dce6f2; }.task-note-editor textarea { width:100%; resize:vertical; border:1px solid #cfdceb; border-radius:10px; padding:10px; }.task-note-image-names { color:#6f849e; font-size:11px; }
@media(max-width:620px){.kanban-quick-grid{grid-template-columns:1fr}.kanban-quick-grid select:last-child{grid-column:auto}}

.flow-business-type { min-width:150px; min-height:36px; border:1px solid #cfdceb; border-radius:9px; padding:0 8px; background:#f8fbff; color:#27476b; font-size:12px; }


.metric-tasks-card { width: min(980px, 100%); }
.metric-task-list { display: grid; gap: 10px; }
.metric-task-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) auto minmax(150px, .75fr) minmax(110px, .55fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #d8e4f2;
  border-radius: 14px;
  background: linear-gradient(135deg, #fbfdff, #f2f7ff);
  color: #173153;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.metric-task-row:hover { transform: translateY(-2px); border-color: #82adf6; box-shadow: 0 12px 26px rgba(38,91,166,.13); }
.metric-task-main { display: grid; gap: 4px; min-width: 0; }
.metric-task-main strong { overflow: hidden; color: #10294a; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.metric-task-main small,
.metric-task-owner small,
.metric-task-date { color: #647994; font-size: 12px; }
.metric-task-owner { display: grid; gap: 4px; }
.metric-task-date { white-space: nowrap; }
.metric-task-empty { padding: 38px 18px; border: 1px dashed #cddcee; border-radius: 14px; background: #f8fbff; color: #687f9b; text-align: center; }
@media (max-width: 760px) {
  .metric-task-row { grid-template-columns: 1fr auto; }
  .metric-task-owner, .metric-task-date { grid-column: 1 / -1; }
  .metric-task-date { white-space: normal; }
}


.notification-chip {
  border-color: #f59e0b !important;
  background: linear-gradient(145deg, #f59e0b, #ea580c) !important;
  color: #1d1200 !important;
  box-shadow: 0 12px 28px rgba(245, 158, 11, .3) !important;
}
.notification-chip strong,
.notification-chip span { color: #1d1200 !important; }
.notification-row { display:grid; grid-template-columns:minmax(180px,1fr) minmax(220px,1.6fr) auto; gap:14px; align-items:center; width:100%; padding:14px; border:1px solid #d7e3f1; border-radius:14px; background:#f9fcff; color:#173153; text-align:left; }
.notification-row:hover { border-color:#f59e0b; background:#fff8eb; }
.notification-row-main { display:grid; gap:4px; }
.notification-row-main small,.notification-row-note { color:#62758e; font-size:12px; }
.notification-row-action { color:#b45309; font-weight:900; }
.notification-list { display:grid; gap:10px; }
.notification-empty { padding:36px; color:#6b7e96; text-align:center; }
.notification-detail { display:grid; gap:12px; }
.notification-detail pre { max-height:42vh; overflow:auto; padding:16px; border:1px solid #d7e3f1; border-radius:12px; background:#f7faff; color:#19324f; white-space:pre-wrap; font:inherit; }
.notification-detail input { width:100%; padding:11px; border:1px solid #d2deec; border-radius:10px; background:#f9fbff; color:#36506e; }
.notification-detail-actions { display:flex; flex-wrap:wrap; gap:8px; }
.revision-note-input { width:100%; min-height:68px; margin:10px 0 12px; padding:10px 12px; border:1px solid #cfdceb; border-radius:11px; resize:vertical; background:#f8fbff; color:#25405f; }
.result-batch-notes { display:grid; gap:9px; margin:12px 0; }
.result-batch-note-row { display:grid; gap:7px; padding:11px; border:1px solid #d7e3f1; border-radius:12px; background:#f8fbff; }
.result-batch-note { width:100%; min-height:58px; padding:9px; border:1px solid #ccdaeb; border-radius:9px; resize:vertical; }
.notification-template-settings { grid-column:1 / -1; padding:14px; border:1px solid #dce5f1; border-radius:14px; background:#f8fbff; }
.notification-template-head { display:flex; justify-content:space-between; margin-bottom:12px; }
.notification-template-head span { display:block; margin-top:4px; color:#6c7f97; font-size:11px; }
.notification-template-editor { display:grid; gap:10px; max-height:360px; overflow:auto; }
.notification-template-row { display:grid; gap:6px; }
.notification-template-input { width:100%; min-height:72px; padding:10px; border:1px solid #ccd9e8; border-radius:10px; resize:vertical; font:inherit; }
.revision-note-button { border-color:#f59e0b !important; background:#fff4df !important; color:#9a4d00 !important; }
.revision-note-in-guide { margin-top:16px; padding:14px; border:1px solid #f2c36b; border-radius:12px; background:#fff9ec; }
.revision-note-in-guide strong { color:#8a4b00; }
.revision-note-in-guide p,.revision-note-modal-text { margin:7px 0 0; color:#4d5f75; white-space:pre-wrap; line-height:1.7; }
.revision-note-modal-text { min-height:80px; padding:16px; border-radius:12px; background:#f7faff; }
.revision-note-actions { display:flex; justify-content:flex-end; margin-top:16px; }
#compareVersionButton.unavailable { opacity:.72; border-color:#596579; background:#25303e; color:#aab4c5; }
@media (max-width:760px) {
  .notification-row { grid-template-columns:1fr; }
  .notification-row-action { text-align:right; }
  .notification-detail-actions .btn { flex:1; }
}


.submit-confirm-card,.submit-success-card { width:min(520px,100%); }
.submit-confirm-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
.submit-confirm-actions .btn { min-width:130px; }
@media (max-width:620px) {
  .submit-confirm-actions { flex-direction:column-reverse; }
  .submit-confirm-actions .btn { width:100%; }
}


.result-candidate-select { width:100%; min-height:38px; border:1px solid #cbd9e8; border-radius:9px; padding:0 9px; background:#fff; color:#24405f; }
.result-candidate-info { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.result-candidate-info span { color:#6c7f97; font-size:11px; }
@media (max-width:620px) { .result-candidate-info { display:grid; } }


.notification-template-module { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px; border:1px solid #d8e4f2; border-radius:14px; background:linear-gradient(135deg,#f8fbff,#eef5ff); }
.notification-template-module strong { display:block; color:#173153; font-size:14px; }
.notification-template-module span { display:block; margin-top:4px; color:#60748e; font-size:11px; }
.notification-template-modal-card { width:min(900px,100%); }
.notification-template-modal-card .notification-template-editor { max-height:56vh; }
.notification-template-modal-card .notification-template-row strong { color:#24415f; font-size:13px; }
.notification-template-modal-card .notification-template-input { min-height:96px; color:#203a57; background:#fbfdff; line-height:1.6; }
@media (max-width:620px) {
  .notification-template-module { align-items:stretch; flex-direction:column; }
  .notification-template-module .btn { width:100%; }
}

/* Form link manager */
.form-link-card { width: min(760px, 94vw); }
.form-link-url-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.form-share-link { min-width: 0; width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #cfdceb; border-radius: 10px; color: #334b6e; background: #f8fbff; }
.form-link-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 13px 0 4px; color: #607795; font-size: 12px; }
.form-link-tip, .form-link-loading { margin: 12px 0 0; color: #687d98; font-size: 12px; line-height: 1.7; }

/* Public order collection form */
.collect-body { min-height: 100vh; margin: 0; background: radial-gradient(circle at 10% 0%, #17365c 0, #07111f 42%, #050a12 100%); color: #e7f1ff; }
.collect-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; max-width: 920px; margin: 0 auto; padding: 22px 18px; }
.collect-brand { display: inline-flex; align-items: center; gap: 10px; color: #e7f1ff; text-decoration: none; }
.collect-brand img { width: 42px; height: 42px; }
.collect-brand span { display: grid; gap: 2px; }
.collect-brand strong { font-size: 16px; letter-spacing: .04em; }
.collect-brand small, .collect-security { color: #8da9c8; font-size: 11px; }
.collect-main { width: min(920px, 100%); margin: 0 auto; padding: 0 18px 54px; }
.collect-card { padding: clamp(24px, 5vw, 48px); border: 1px solid rgba(108, 160, 218, .26); border-radius: 22px; background: rgba(12, 26, 46, .9); box-shadow: 0 24px 80px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04); backdrop-filter: blur(12px); }
.collect-loading { display: grid; place-items: center; min-height: 260px; color: #9fb7d3; }
.collect-spinner { width: 28px; height: 28px; margin-bottom: 8px; border: 3px solid rgba(104, 160, 225, .22); border-top-color: #65a9ff; border-radius: 50%; animation: collect-spin .8s linear infinite; }
@keyframes collect-spin { to { transform: rotate(360deg); } }
.collect-intro { margin-bottom: 28px; }
.collect-eyebrow { display: inline-flex; margin-bottom: 12px; padding: 6px 10px; border: 1px solid rgba(107, 172, 255, .3); border-radius: 999px; color: #8fc3ff; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.collect-intro h1 { margin: 0 0 10px; color: #f3f8ff; font-size: clamp(25px, 4vw, 38px); letter-spacing: -.02em; }
.collect-intro p { margin: 0; color: #9fb7d3; font-size: 14px; line-height: 1.8; }
.collect-form { display: grid; gap: 18px; }
.collect-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.collect-field { display: grid; gap: 8px; min-width: 0; }
.collect-field label { color: #c7d9ee; font-size: 13px; font-weight: 800; }
.collect-field label em { color: #ff8ca0; font-style: normal; }
.collect-field input, .collect-field select, .collect-field textarea { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px; border: 1px solid #314d6e; border-radius: 11px; outline: none; color: #ecf6ff; background: #0a192c; font: inherit; transition: border-color .18s, box-shadow .18s, background .18s; }
.collect-field textarea { resize: vertical; min-height: 108px; }
.collect-field input::placeholder, .collect-field textarea::placeholder { color: #65809f; }
.collect-field input:focus, .collect-field select:focus, .collect-field textarea:focus { border-color: #61a6ff; background: #0d2038; box-shadow: 0 0 0 3px rgba(74, 146, 255, .16); }
.collect-hint { min-height: 16px; color: #7fa4cb; font-size: 11px; line-height: 1.5; }
.collect-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.collect-submit { min-height: 50px; margin-top: 4px; font-size: 15px; font-weight: 900; }
.collect-privacy { margin: 17px 0 0; color: #718ba8; font-size: 11px; line-height: 1.7; }
.collect-success { text-align: center; padding-top: 54px; padding-bottom: 58px; }
.collect-success-mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border: 1px solid rgba(91, 211, 150, .5); border-radius: 50%; color: #7de6ae; background: rgba(48, 167, 106, .16); font-size: 34px; font-weight: 900; }
.collect-success h1 { margin: 0 0 10px; color: #effff7; font-size: 30px; }
.collect-success p { margin: 0 auto; max-width: 520px; color: #a8c8ba; font-size: 14px; line-height: 1.8; }
.collect-success-project { margin: 18px 0 24px; color: #cdeedd; font-size: 14px; font-weight: 800; }
@media (max-width: 640px) {
  .collect-header { padding: 16px 14px; }
  .collect-security { display: none; }
  .collect-main { padding: 0 12px 34px; }
  .collect-card { padding: 22px 16px; border-radius: 17px; }
  .collect-grid, .form-link-url-row { grid-template-columns: 1fr; }
  .form-link-url-row .btn { width: 100%; }
}
/* Storage health */
.storage-stats-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.storage-stat-item { padding: 10px; border: 1px solid #d9e5f3; border-radius: 10px; background: #f8fbff; }
.storage-stat-item span { display: block; color: #71849e; font-size: 11px; }
.storage-stat-item strong { display: block; margin-top: 4px; color: #263f63; font-size: 13px; word-break: break-word; }
@media (max-width: 620px) { .storage-stats-panel { grid-template-columns: 1fr; } }