/* Staff portal UI. Same colors and components as the Amazon Ads tool (backend/src/ui/app.css). */
#ecsp-app {
  --ec-green: #1e293b;
  --ec-green-dark: #0f172a;
  --ec-accent: #86efac;
  --ec-tint: #f1f5f9;
  --ec-text: #1f2937;
  --ec-muted: #4b5563;
  --ec-line: #e2e8f0;
  --ec-card: #ffffff;
  --ec-danger: #b42318;
  --ec-warn: #92400e;
  max-width: 960px; margin: 0 auto; color: var(--ec-text); font-size: 16px; line-height: 1.6; text-align: left;
}
#ecsp-app *, #ecsp-app *::before, #ecsp-app *::after { box-sizing: border-box; }
#ecsp-app button, #ecsp-app select, #ecsp-app input, #ecsp-app textarea { font-family: inherit; }
#ecsp-app :focus-visible { outline: 3px solid var(--ec-accent); outline-offset: 2px; }
#ecsp-app .ecsp-muted { color: var(--ec-muted); }
#ecsp-app .ecsp-error { color: var(--ec-danger); font-weight: 600; }
#ecsp-app [hidden] { display: none !important; }

/* Header band */
#ecsp-app .ecsp-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--ec-green); color: #fff; border-radius: 20px; padding: 28px 32px; margin: 0 0 24px; }
#ecsp-app .ecsp-hero h2 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 800; color: #fff; }
#ecsp-app .ecsp-hero p { margin: 8px 0 0; font-size: 16px; color: #e2e8f0; }
#ecsp-app .ecsp-eyebrow { display: inline-block; margin: 0 0 12px; padding: 4px 14px; border-radius: 9999px; background: rgba(255, 255, 255, .14); color: var(--ec-accent); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
#ecsp-app a.ecsp-hero-link { color: #e2e8f0; font-size: 14px; font-weight: 700; text-decoration: underline; }

/* Welcome cards */
#ecsp-app .ecsp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
#ecsp-app a.ecsp-card { display: flex; flex-direction: column; gap: 6px; padding: 24px; min-height: 190px; background: var(--ec-card); color: var(--ec-text); border: 1px solid var(--ec-line); border-radius: 16px; text-decoration: none; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); transition: border-color .15s, box-shadow .15s, transform .15s; }
#ecsp-app a.ecsp-card:hover { border-color: var(--ec-green); box-shadow: 0 8px 24px rgba(15, 23, 42, .12); transform: translateY(-2px); }
#ecsp-app .ecsp-card-name { font-size: 21px; font-weight: 800; line-height: 1.3; }
#ecsp-app .ecsp-card-big { font-size: 40px; font-weight: 800; line-height: 1.1; color: var(--ec-green); }
#ecsp-app .ecsp-card-desc { font-size: 14px; color: var(--ec-muted); line-height: 1.5; }
#ecsp-app .ecsp-card-open { margin-top: auto; padding-top: 12px; font-size: 14px; font-weight: 700; color: var(--ec-green); }

/* Shared pieces */
#ecsp-app .ecsp-link { display: inline-block; margin: 0 0 16px; padding: 0; background: none; border: 0; color: var(--ec-green); font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; }
#ecsp-app .ecsp-link:hover { text-decoration: underline; }
#ecsp-app .ecsp-panel { background: var(--ec-card); border: 1px solid var(--ec-line); border-radius: 16px; padding: 24px; margin: 0 0 24px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
#ecsp-app .ecsp-panel h3 { margin: 0 0 16px; font-size: 20px; font-weight: 800; color: var(--ec-text); }
#ecsp-app .ecsp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
#ecsp-app .ecsp-head h2 { margin: 0; font-size: 26px; font-weight: 800; color: var(--ec-text); }
#ecsp-app button.ecsp-primary { padding: 12px 28px; font-size: 16px; font-weight: 800; color: #fff; background: var(--ec-green); border: 0; border-radius: 9999px; cursor: pointer; transition: background .15s; }
#ecsp-app button.ecsp-primary:hover { background: var(--ec-green-dark); }
#ecsp-app button.ecsp-primary:disabled { opacity: .6; cursor: default; }
#ecsp-app .ecsp-ghost { display: inline-block; padding: 6px 16px; font-size: 14px; font-weight: 700; color: var(--ec-green); background: #fff; border: 1px solid var(--ec-green); border-radius: 9999px; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
#ecsp-app .ecsp-ghost:hover { background: var(--ec-green); color: #fff; }
#ecsp-app .ecsp-ghost.ecsp-danger { color: var(--ec-danger); border-color: var(--ec-danger); }
#ecsp-app .ecsp-ghost.ecsp-danger:hover { background: var(--ec-danger); color: #fff; }
#ecsp-app .ecsp-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#ecsp-app .ecsp-msg { margin: 0; font-size: 14px; color: var(--ec-muted); }
#ecsp-app .ecsp-msg.ecsp-ok { display: inline-block; padding: 4px 14px; border-radius: 9999px; background: #dcfce7; color: #166534; font-weight: 700; }
#ecsp-app .ecsp-empty { padding: 32px 12px; text-align: center; color: var(--ec-muted); }

/* Forms */
#ecsp-app .ecsp-form { display: grid; gap: 18px; }
#ecsp-app .ecsp-field { display: grid; gap: 6px; margin: 0; min-width: 0; align-content: start; }
#ecsp-app .ecsp-label { font-size: 15px; font-weight: 700; color: var(--ec-text); }
#ecsp-app .ecsp-hint { font-size: 13px; color: var(--ec-muted); font-weight: 400; }
#ecsp-app .ecsp-form input[type=text], #ecsp-app .ecsp-form input[type=date], #ecsp-app .ecsp-form input[type=search], #ecsp-app .ecsp-form select, #ecsp-app .ecsp-form textarea, #ecsp-app .ecsp-form input[type=file] { width: 100%; max-width: 100%; min-height: 48px; margin: 0; padding: 10px 12px; font-size: 16px; line-height: 1.5; color: var(--ec-text); background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; box-shadow: none; }
#ecsp-app .ecsp-form textarea { min-height: 110px; resize: vertical; }
#ecsp-app .ecsp-form input[type=file] { padding: 8px; background: var(--ec-tint); border-style: dashed; cursor: pointer; }
#ecsp-app .ecsp-form input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ec-green); background: #fff; border: 1px solid var(--ec-green); border-radius: 9999px; cursor: pointer; }
#ecsp-app .ecsp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
#ecsp-app .ecsp-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

/* Segmented choice: priority, status, tabs */
#ecsp-app .ecsp-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 4px; background: var(--ec-tint); border-radius: 9999px; }
#ecsp-app .ecsp-seg button { padding: 8px 18px; font-size: 14px; font-weight: 700; color: var(--ec-muted); background: transparent; border: 0; border-radius: 9999px; cursor: pointer; white-space: nowrap; }
#ecsp-app .ecsp-seg button[aria-pressed=true] { color: #fff; background: var(--ec-green); }
#ecsp-app .ecsp-seg button .ecsp-count { margin-left: 6px; font-weight: 600; opacity: .8; }

/* Task list */
#ecsp-app .ecsp-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
#ecsp-app .ecsp-filters select, #ecsp-app .ecsp-filters input[type=search] { min-height: 42px; margin: 0; padding: 8px 12px; font-size: 15px; color: var(--ec-text); background: #fff; border: 1px solid #cbd5e1; border-radius: 9999px; max-width: 220px; }
#ecsp-app .ecsp-filters input[type=search] { flex: 1 1 160px; }
#ecsp-app .ecsp-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
#ecsp-app .ecsp-task { display: flex; align-items: flex-start; gap: 14px; margin: 0; padding: 16px 18px; background: var(--ec-card); border: 1px solid var(--ec-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
#ecsp-app .ecsp-task:hover { border-color: var(--ec-green); box-shadow: 0 4px 14px rgba(15, 23, 42, .10); }
#ecsp-app .ecsp-task { border-left-width: 5px; }
#ecsp-app .ecsp-task.ecsp-urgent { border-left-color: var(--ec-danger); }
#ecsp-app .ecsp-task.ecsp-medium { border-left-color: #f59e0b; }
#ecsp-app button.ecsp-check { flex: 0 0 auto; width: 28px; height: 28px; margin-top: 1px; padding: 0; background: #fff; border: 2px solid #94a3b8; border-radius: 50%; color: transparent; font-size: 15px; font-weight: 800; line-height: 1; cursor: pointer; }
#ecsp-app button.ecsp-check:hover { border-color: #166534; color: #166534; }
#ecsp-app .ecsp-done button.ecsp-check { background: #166534; border-color: #166534; color: #fff; }
#ecsp-app .ecsp-task-main { flex: 1 1 auto; min-width: 0; }
#ecsp-app .ecsp-task-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--ec-text); overflow-wrap: anywhere; }
#ecsp-app .ecsp-done .ecsp-task-title { color: var(--ec-muted); text-decoration: line-through; }
#ecsp-app .ecsp-meta { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--ec-muted); }
#ecsp-app .ecsp-badge { display: inline-block; padding: 2px 11px; border-radius: 9999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
#ecsp-app .ecsp-b-urgent { background: #fee2e2; color: var(--ec-danger); }
#ecsp-app .ecsp-b-medium { background: #fef3c7; color: var(--ec-warn); }
#ecsp-app .ecsp-b-normal { background: var(--ec-tint); color: var(--ec-muted); }
#ecsp-app .ecsp-b-doing { background: #dbeafe; color: #1e40af; }
#ecsp-app .ecsp-b-done { background: #dcfce7; color: #166534; }
#ecsp-app .ecsp-b-todo { background: var(--ec-tint); color: var(--ec-muted); }
#ecsp-app .ecsp-b-cat { background: #fff; color: var(--ec-green); border: 1px solid var(--ec-line); }
#ecsp-app .ecsp-overdue { color: var(--ec-danger); font-weight: 700; }

/* Task detail */
#ecsp-app .ecsp-title { margin: 0 0 16px; font-size: 24px; font-weight: 800; line-height: 1.3; color: var(--ec-text); overflow-wrap: anywhere; }
#ecsp-app .ecsp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 20px; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--ec-line); }
#ecsp-app .ecsp-fact dt { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ec-muted); }
#ecsp-app .ecsp-fact dd { margin: 2px 0 0; margin-inline-start: 0; padding: 0; font-size: 15px; color: var(--ec-text); }
#ecsp-app .ecsp-text { margin: 18px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#ecsp-app .ecsp-files { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
#ecsp-app .ecsp-file { position: relative; display: flex; align-items: center; gap: 10px; max-width: 100%; margin: 0; padding: 8px 12px; background: var(--ec-tint); border: 1px solid var(--ec-line); border-radius: 12px; font-size: 14px; }
#ecsp-app .ecsp-file a { color: var(--ec-green); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
#ecsp-app .ecsp-file a:hover { text-decoration: underline; }
#ecsp-app .ecsp-file img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: #fff; }
#ecsp-app .ecsp-file.ecsp-image { flex-direction: column; align-items: stretch; width: 122px; padding: 12px; }
#ecsp-app .ecsp-file.ecsp-image .ecsp-file-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ecsp-app button.ecsp-x { flex: 0 0 auto; width: 24px; height: 24px; padding: 0; background: #fff; border: 1px solid #cbd5e1; border-radius: 50%; color: var(--ec-muted); font-size: 14px; line-height: 1; cursor: pointer; }
#ecsp-app button.ecsp-x:hover { color: var(--ec-danger); border-color: var(--ec-danger); }
#ecsp-app .ecsp-image button.ecsp-x { position: absolute; top: 4px; right: 4px; }
#ecsp-app .ecsp-comment { margin: 0; padding: 16px 0; border-top: 1px solid var(--ec-line); }
#ecsp-app .ecsp-comment:first-child { border-top: 0; padding-top: 0; }
#ecsp-app .ecsp-comment-head { font-size: 14px; color: var(--ec-muted); }
#ecsp-app .ecsp-comment-head strong { color: var(--ec-text); }
#ecsp-app .ecsp-comment .ecsp-text { margin: 6px 0 10px; }

/* Tables: performance and categories */
#ecsp-app .ecsp-scroll { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
#ecsp-app table.ecsp-table { width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: 15px; background: transparent; }
#ecsp-app .ecsp-table th { padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ec-muted); background: transparent; border: 0; border-bottom: 2px solid var(--ec-line); white-space: nowrap; }
#ecsp-app .ecsp-table td { padding: 12px; border: 0; border-bottom: 1px solid var(--ec-line); vertical-align: middle; background: transparent; color: var(--ec-text); }
#ecsp-app .ecsp-table tr:last-child td { border-bottom: 0; }
#ecsp-app .ecsp-table td.ecsp-cell { text-align: center; padding: 12px 6px; }
#ecsp-app .ecsp-table th.ecsp-cell { text-align: center; padding: 10px 6px; }
#ecsp-app a.ecsp-yes { display: inline-block; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; background: #dcfce7; color: #166534; font-weight: 800; text-decoration: none; }
#ecsp-app .ecsp-no { color: #94a3b8; }
#ecsp-app .ecsp-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#ecsp-app .ecsp-inline input[type=text], #ecsp-app .ecsp-inline select { min-height: 38px; margin: 0; padding: 6px 10px; font-size: 14px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ec-text); max-width: 200px; }

@media (max-width: 640px) {
  #ecsp-app .ecsp-hero { padding: 22px 20px; border-radius: 16px; }
  #ecsp-app .ecsp-hero h2 { font-size: 23px; }
  #ecsp-app .ecsp-panel { padding: 18px; }
  #ecsp-app .ecsp-row, #ecsp-app .ecsp-row3 { grid-template-columns: 1fr; }
  #ecsp-app .ecsp-form button.ecsp-primary { width: 100%; }
  #ecsp-app .ecsp-filters select, #ecsp-app .ecsp-filters input[type=search] { max-width: none; flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
  #ecsp-app a.ecsp-card, #ecsp-app .ecsp-task, #ecsp-app .ecsp-ghost, #ecsp-app button.ecsp-primary { transition: none; }
  #ecsp-app a.ecsp-card:hover { transform: none; }
}
#ecsp-app .ecsp-filters + .ecsp-msg.ecsp-ok { margin-bottom: 12px; }

/* Account Security page (/staff/security/) */
#ecsp-app .ecsp-sec-state { display: inline-block; margin: 0 0 16px; padding: 6px 16px; border-radius: 9999px; font-size: 15px; font-weight: 700; }
#ecsp-app .ecsp-sec-on { background: #dcfce7; color: #166534; }
#ecsp-app .ecsp-sec-off { background: #fee2e2; color: var(--ec-danger); }
#ecsp-app .ecsp-sec-steps ol { margin: 0 0 12px; padding-left: 22px; }
#ecsp-app .ecsp-sec-steps li { margin: 0 0 8px; }
#ecsp-app .ecsp-sec-steps p { margin: 0; font-size: 14px; }
#ecsp-app .ecsp-sec-manage { overflow-x: auto; }
/* Wordfence's help link goes to the vendor's site; the steps above replace it. */
#ecsp-app .ecsp-sec-manage #wfls-activation-help-link-container { visibility: hidden; }

/* Monthly Plan (plan.js) */
#ecsp-app .ecsp-form input[type=number], #ecsp-app .ecsp-form input[type=month] { width: 100%; max-width: 100%; min-height: 48px; margin: 0; padding: 10px 12px; font-size: 16px; color: var(--ec-text); background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; }
#ecsp-app .ecsp-inline input[type=number], #ecsp-app .ecsp-inline input[type=date], #ecsp-app .ecsp-actions input[type=text], #ecsp-app .ecsp-actions input[type=number], #ecsp-app .ecsp-table input[type=text], #ecsp-app .ecsp-table input[type=date], #ecsp-app .ecsp-table input[type=number], #ecsp-app .ecsp-table select { min-height: 38px; margin: 0; padding: 6px 10px; font-size: 14px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ec-text); max-width: 220px; }
#ecsp-app .ecsp-filters input[type=month], #ecsp-app .ecsp-hero select { min-height: 42px; margin: 0; padding: 8px 12px; font-size: 15px; color: var(--ec-text); background: #fff; border: 1px solid #cbd5e1; border-radius: 9999px; }
#ecsp-app .ecsp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 20px; }
#ecsp-app .ecsp-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--ec-card); border: 1px solid var(--ec-line); border-radius: 14px; }
#ecsp-app .ecsp-tile-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ec-muted); }
#ecsp-app .ecsp-tile-value { font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--ec-green); }
#ecsp-app .ecsp-tile-sub { font-size: 13px; color: var(--ec-muted); }
#ecsp-app .ecsp-notice { margin: 0 0 16px; padding: 12px 16px; background: #fef3c7; color: var(--ec-warn); border-radius: 12px; font-size: 15px; }
#ecsp-app .ecsp-notice a { color: var(--ec-warn); font-weight: 700; }
#ecsp-app h3.ecsp-group { margin: 24px 0 12px; font-size: 20px; font-weight: 800; color: var(--ec-text); }
#ecsp-app .ecsp-plan-item { cursor: default; align-items: flex-start; }
#ecsp-app .ecsp-plan-item:hover { border-color: var(--ec-line); box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
#ecsp-app .ecsp-plan-item.ecsp-urgent { border-left-color: var(--ec-danger); }
#ecsp-app .ecsp-plan-item.ecsp-done { border-left-color: #166534; }
#ecsp-app .ecsp-plan-item > input[type=checkbox] { margin-top: 6px; width: 18px; height: 18px; }
#ecsp-app .ecsp-dot { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 6px; border-radius: 50%; border: 2px solid #94a3b8; background: #fff; }
#ecsp-app .ecsp-dot-submitted { border-color: #1e40af; background: #dbeafe; }
#ecsp-app .ecsp-dot-approved { border-color: #166534; background: #166534; }
#ecsp-app .ecsp-dot-returned { border-color: var(--ec-danger); background: #fee2e2; }
#ecsp-app .ecsp-cancelled .ecsp-task-title { color: var(--ec-muted); text-decoration: line-through; }
#ecsp-app .ecsp-returned { margin: 8px 0 0; padding: 8px 12px; background: #fee2e2; color: var(--ec-danger); border-radius: 10px; font-size: 14px; font-weight: 600; white-space: pre-wrap; }
#ecsp-app .ecsp-subform { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ec-line); }
#ecsp-app .ecsp-attention { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .15); }
#ecsp-app .ecsp-suggest { margin: 0 0 14px; }
#ecsp-app .ecsp-check-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 15px; cursor: pointer; }
#ecsp-app .ecsp-check-row input { width: 18px; height: 18px; margin: 0; }
#ecsp-app .ecsp-cards-small { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0 0 16px; }
#ecsp-app .ecsp-cards-small a.ecsp-card { min-height: 0; padding: 16px 18px; }
#ecsp-app .ecsp-cards-small .ecsp-card-big { font-size: 30px; }
#ecsp-app a.ecsp-card.ecsp-card-alert { border-color: #f59e0b; }
#ecsp-app tr.ecsp-click { cursor: pointer; }
#ecsp-app tr.ecsp-click:hover td { background: var(--ec-tint); }
#ecsp-app .ecsp-flags { margin: 0 0 8px; padding: 8px 12px 8px 30px; background: #fee2e2; color: var(--ec-danger); border-radius: 10px; font-size: 14px; font-weight: 600; }
#ecsp-app .ecsp-notes { margin: 0 0 8px; padding-left: 22px; color: var(--ec-muted); font-size: 14px; }
#ecsp-app .ecsp-monthstrip { display: flex; gap: 6px; }
#ecsp-app .ecsp-mcell { flex: 0 0 auto; padding: 6px 10px; border-radius: 10px; background: #fee2e2; color: var(--ec-danger); font-size: 13px; white-space: nowrap; }
#ecsp-app .ecsp-mcell.ecsp-mdone { background: #dcfce7; color: #166534; }
#ecsp-app .ecsp-mcell.ecsp-mtrial { background: var(--ec-tint); color: var(--ec-muted); }
@media (max-width: 640px) {
  #ecsp-app .ecsp-tile-value { font-size: 22px; }
  #ecsp-app .ecsp-actions input[type=text] { max-width: none; flex: 1 1 100%; }
}
#ecsp-app .ecsp-plan-item { padding: 10px 16px; }
#ecsp-app .ecsp-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
#ecsp-app .ecsp-item-actions { justify-content: flex-end; gap: 8px; }
#ecsp-app .ecsp-plan-item .ecsp-meta { margin-top: 2px; }
#ecsp-app .ecsp-plan-item .ecsp-dot { margin-top: 4px; }
#ecsp-app .ecsp-plan-item .ecsp-files { margin-top: 8px; }
#ecsp-app .ecsp-bar { width: 100%; min-width: 120px; height: 8px; background: var(--ec-tint); border-radius: 9999px; overflow: hidden; }
#ecsp-app .ecsp-bar span { display: block; height: 100%; background: #16a34a; border-radius: 9999px; }
#ecsp-app .ecsp-feed { margin: 0; padding: 0; list-style: none; }
#ecsp-app .ecsp-feed li { padding: 8px 0; border-bottom: 1px solid var(--ec-line); font-size: 14px; overflow-wrap: anywhere; }
#ecsp-app .ecsp-feed li:last-child { border-bottom: 0; }
/* Monthly Plan: save notice at the bottom of the screen */
#ecsp-app .ecsp-toast { position: fixed; left: 50%; bottom: 24px; z-index: 99999; max-width: calc(100% - 32px); padding: 10px 20px; border-radius: 9999px; background: #166534; color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#ecsp-app .ecsp-toast.ecsp-toast-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { #ecsp-app .ecsp-toast { transition: none; } }
/* Onboarding quiz (quiz.js) */
#ecsp-app .ecsp-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
#ecsp-app .ecsp-steps span { flex: 1 1 120px; padding: 8px; text-align: center; border-radius: 12px; background: var(--ec-tint); color: var(--ec-muted); font-size: 14px; font-weight: 700; }
#ecsp-app .ecsp-steps span.ecsp-step-on { background: var(--ec-green); color: #fff; }
#ecsp-app .ecsp-notice.ecsp-notice-ok { background: #dcfce7; color: #166534; }
#ecsp-app .ecsp-card-status { margin: 4px 0; }
#ecsp-app .ecsp-card-status .ecsp-badge { font-size: 15px; padding: 4px 14px; }
#ecsp-app .ecsp-doc { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--ec-line); }
#ecsp-app .ecsp-doc strong { display: block; }
#ecsp-app .ecsp-doc .ecsp-muted { font-size: 14px; }
#ecsp-app .ecsp-confirm { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; padding: 14px 16px; background: var(--ec-tint); border-radius: 12px; font-weight: 700; cursor: pointer; }
#ecsp-app .ecsp-confirm input { width: 20px; height: 20px; margin: 3px 0 0; flex: 0 0 auto; }
#ecsp-app .ecsp-progress { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 16px; padding: 12px 20px; background: #fff; border: 1px solid var(--ec-line); border-radius: 16px; box-shadow: 0 4px 14px rgba(15, 23, 42, .08); }
#ecsp-app .ecsp-progress .ecsp-muted { font-size: 13px; }
#ecsp-app .ecsp-bar-track { flex: 1 1 120px; height: 8px; background: var(--ec-tint); border-radius: 9999px; overflow: hidden; }
#ecsp-app .ecsp-bar-track i { display: block; width: 0; height: 100%; background: var(--ec-green); border-radius: 9999px; transition: width .2s; }
#ecsp-app fieldset.ecsp-q { min-width: 0; margin: 0 0 16px; padding: 20px 24px; background: var(--ec-card); border: 1px solid var(--ec-line); border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
#ecsp-app fieldset.ecsp-q.ecsp-q-missing { border-color: var(--ec-danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
#ecsp-app .ecsp-q legend { float: left; width: 100%; display: flex; align-items: center; gap: 8px; margin: 0 0 4px; padding: 0; }
#ecsp-app .ecsp-q legend + * { clear: both; }
#ecsp-app .ecsp-q-num { font-size: 13px; font-weight: 700; color: var(--ec-muted); }
#ecsp-app .ecsp-q-text { margin: 0 0 12px; font-size: 17px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
#ecsp-app .ecsp-q .ecsp-hint { display: block; margin: -6px 0 10px; }
#ecsp-app label.ecsp-opt { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; padding: 10px 14px; border: 1px solid var(--ec-line); border-radius: 12px; cursor: pointer; font-weight: 400; transition: background .15s, border-color .15s; }
#ecsp-app label.ecsp-opt:hover { background: var(--ec-tint); }
#ecsp-app label.ecsp-opt.ecsp-opt-on { border-color: var(--ec-green); background: var(--ec-tint); box-shadow: inset 0 0 0 1px var(--ec-green); }
#ecsp-app label.ecsp-opt input { width: 18px; height: 18px; margin: 3px 0 0; flex: 0 0 auto; accent-color: var(--ec-green); }
#ecsp-app .ecsp-opt-key { flex: 0 0 auto; min-width: 16px; font-weight: 800; }
#ecsp-app .ecsp-submit { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 32px; }
#ecsp-app .ecsp-score { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
#ecsp-app .ecsp-score p { margin: 6px 0 0; font-size: 14px; }
#ecsp-app .ecsp-score-big { font-size: 48px; font-weight: 800; line-height: 1; color: var(--ec-text); }
#ecsp-app .ecsp-score-big small { font-size: 20px; font-weight: 700; color: var(--ec-muted); }
#ecsp-app .ecsp-wrong { margin: 0 0 10px; padding: 14px 18px; border: 1px solid var(--ec-line); border-left: 4px solid var(--ec-danger); border-radius: 12px; }
#ecsp-app .ecsp-wrong p { margin: 0 0 4px; overflow-wrap: anywhere; }
#ecsp-app .ecsp-wrong-q { font-weight: 700; }
#ecsp-app .ecsp-wrong-you { color: var(--ec-danger); font-size: 15px; }
#ecsp-app .ecsp-wrong-right { color: #166534; font-size: 15px; font-weight: 700; }
#ecsp-app .ecsp-src { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 8px; background: var(--ec-tint); color: var(--ec-muted); font-size: 13px; }
#ecsp-app a.ecsp-link-inline { color: var(--ec-green); font-weight: 700; text-decoration: none; white-space: nowrap; }
#ecsp-app a.ecsp-link-inline:hover { text-decoration: underline; }
#ecsp-app .ecsp-wrap { display: inline-block; min-width: 200px; white-space: normal; font-size: 14px; }
#ecsp-app tr.ecsp-cancelled td { color: var(--ec-muted); }
@media (max-width: 640px) {
  #ecsp-app fieldset.ecsp-q { padding: 16px; }
  #ecsp-app .ecsp-score-big { font-size: 40px; }
  #ecsp-app .ecsp-doc { flex-wrap: wrap; }
}
/* Staff records (records.js) */
#ecsp-app .ecsp-head.ecsp-head-sm { margin: 0 0 16px; }
#ecsp-app .ecsp-head.ecsp-head-sm h3 { margin: 0; }
#ecsp-app .ecsp-facts.ecsp-facts-top { margin: 0; padding: 0; border-top: 0; }
#ecsp-app .ecsp-fact dd { font-weight: 700; }
#ecsp-app .ecsp-small { font-size: 13px; font-weight: 400; }
#ecsp-app .ecsp-grouplabel { margin: 18px 0 8px; font-size: 13px; font-weight: 800; color: var(--ec-muted); }
#ecsp-app .ecsp-grouplabel:first-of-type { margin-top: 0; }
#ecsp-app .ecsp-tile.ecsp-tile-bad .ecsp-tile-value { color: var(--ec-danger); }
#ecsp-app .ecsp-salary-now { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
#ecsp-app .ecsp-salary-now strong { font-size: 34px; font-weight: 800; line-height: 1.1; }
#ecsp-app .ecsp-subhead { margin: 24px 0 8px; font-size: 16px; font-weight: 800; }
#ecsp-app .ecsp-up { color: #166534; font-weight: 700; }
#ecsp-app .ecsp-down { color: var(--ec-danger); font-weight: 700; }
#ecsp-app button.ecsp-linkbtn { padding: 0; background: none; border: 0; color: var(--ec-green); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
#ecsp-app button.ecsp-linkbtn:hover { text-decoration: underline; }
#ecsp-app button.ecsp-linkbtn.ecsp-danger-text { color: var(--ec-danger); }
#ecsp-app .ecsp-mark { margin: -4px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--ec-tint); font-size: 14px; color: var(--ec-text); }
#ecsp-app .ecsp-mark:empty { display: none; }
#ecsp-app .ecsp-total { font-size: 18px; }
#ecsp-app .ecsp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 24px; }
#ecsp-app .ecsp-split .ecsp-panel { margin: 0; }
#ecsp-app .ecsp-split .ecsp-panel h3 { margin: 0 0 16px; }
@media (max-width: 760px) {
  #ecsp-app .ecsp-split { grid-template-columns: 1fr; }
  #ecsp-app .ecsp-row3 { grid-template-columns: 1fr 1fr; }
}

/* Monthly Plan: "查看明细" under the available-time tile (added in 1.3.3) */
#ecsp-app .ecsp-link-btn { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--ec-green); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
#ecsp-app .ecsp-link-btn:focus-visible { outline: 2px solid var(--ec-green); outline-offset: 2px; border-radius: 4px; }
#ecsp-app .ecsp-avail[hidden] { display: none; }
#ecsp-app .ecsp-avail { margin-top: -8px; }
#ecsp-app .ecsp-avail-table { border-collapse: collapse !important; border: 0 !important; width: 100%; max-width: 680px; margin: 0; font-size: 15px; background: none !important; table-layout: auto; }
#ecsp-app .ecsp-avail-table tr { border: 0 !important; background: none !important; }
#ecsp-app .ecsp-avail-table th, #ecsp-app .ecsp-avail-table td { padding: 10px 12px !important; text-align: left; vertical-align: middle; border: 0 !important; border-bottom: 1px solid var(--ec-line) !important; background: none !important; line-height: 1.4; }
#ecsp-app .ecsp-avail-table th { font-weight: 600; white-space: nowrap; color: inherit; width: 1%; padding-left: 0 !important; }
#ecsp-app .ecsp-avail-num { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right !important; width: 1%; }
#ecsp-app .ecsp-avail-note { color: var(--ec-muted); font-size: 13px; padding-right: 0 !important; }
#ecsp-app .ecsp-avail-total th, #ecsp-app .ecsp-avail-total td { border-bottom: 0 !important; border-top: 2px solid var(--ec-green) !important; font-weight: 800; color: var(--ec-green); }
@media (max-width: 560px) {
  #ecsp-app .ecsp-avail-table, #ecsp-app .ecsp-avail-table tbody, #ecsp-app .ecsp-avail-table tr { display: block; }
  #ecsp-app .ecsp-avail-table tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-bottom: 1px solid var(--ec-line) !important; }
  #ecsp-app .ecsp-avail-table th, #ecsp-app .ecsp-avail-table td { border: 0 !important; padding: 0 !important; width: auto; }
  #ecsp-app .ecsp-avail-num { padding-right: 0 !important; }
  #ecsp-app .ecsp-avail-note { grid-column: 1 / -1; padding-top: 2px !important; }
  #ecsp-app .ecsp-avail-table tr.ecsp-avail-total { border-top: 2px solid var(--ec-green) !important; border-bottom: 0 !important; }
  #ecsp-app .ecsp-avail-total th, #ecsp-app .ecsp-avail-total td { border-top: 0 !important; }
}

/* Onboarding quiz: next step under the score (1.3.6) */
#ecsp-app .ecsp-next { margin: 6px 0 0; font-weight: 600; color: var(--ec-text, #1f2937); }
#ecsp-app .ecsp-wrong.ecsp-wrong-ok { border-left-color: #16a34a; }
#ecsp-app .ecsp-row-total { white-space: nowrap; font-size: 15px; color: var(--ec-green); }
#ecsp-app .ecsp-partial { margin: 6px 0 0; padding: 6px 12px; background: #fef3c7; color: var(--ec-warn); border-radius: 10px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
