:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #202534;
  background: #f6f8fc;
  font-size: 14px;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #4263eb;
  text-decoration: none;
}
a:hover {
  color: #2949c8;
}
.brand {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.8px;
  color: #17233b;
}
.brand span {
  font-size: 12px;
  letter-spacing: 0;
  color: #66738a;
}
body:has(> .admin-sidebar) {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-self: start;
  overflow-y: auto;
  padding: 28px 16px 16px;
  background: #17233b;
  color: #e9eef8;
}
.admin-brand,
.admin-brand:hover {
  display: block;
  padding: 0 12px;
  color: #fff;
}
.admin-brand b { color: #91ddc7; }
.admin-brand span {
  display: block;
  margin-top: 1px;
  color: #aab9d1;
  font-weight: 500;
}
.admin-nav {
  display: grid;
  gap: 5px;
  margin: 30px 0 24px;
}
.admin-nav a,
.admin-sidebar-actions a,
.admin-sidebar-actions button {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 7px;
  color: #cbd6e9;
}
.admin-nav a {
  border-inline-start: 3px solid transparent;
  font-weight: 600;
}
.admin-nav a:hover,
.admin-sidebar-actions a:hover,
.admin-sidebar-actions button:hover {
  color: #fff;
  background: #233451;
}
.admin-nav a[aria-current="page"] {
  border-inline-start-color: #9dc1ff;
  color: #fff;
  background: #2b4065;
}
.admin-sidebar .unread-dot { margin-inline-start: auto; }
.admin-sidebar-actions {
  display: grid;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #ffffff24;
}
.admin-sidebar-actions button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}
body > .admin-sidebar + .shell {
  width: 100%;
  min-width: 0;
  max-width: 1520px;
  margin: 0 auto;
  padding: 32px clamp(20px, 3vw, 48px) 56px;
}
body > .admin-sidebar + .form-shell {
  max-width: 1170px;
}
.shell {
  max-width: 1200px;
  margin: 40px auto 80px;
  padding: 0 24px;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 22px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 0;
}
h2 {
  font-size: 18px;
  margin: 0 0 20px;
}
.panel {
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px #18253903;
}
.filters {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.filters > input {
  flex: 1;
  min-width: 200px;
}
.filters > label {
  margin: 0;
}
.filters > select {
  max-width: 180px;
}
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: #fff;
  width: 100%;
  border: 1px solid #dce1eb;
  border-radius: 9px;
  padding: 10px 12px;
  min-height: 44px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #4263eb15;
  border-color: #8da3f0;
}
button,
.button {
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #dce1eb;
  border-radius: 10px;
  background: #fff;
  color: #354058;
  padding: 10px 18px;
  box-shadow: 0 2px 4px #15244906;
  white-space: nowrap;
  transition:
    box-shadow 0.18s,
    transform 0.18s;
}
button:hover,
.button:hover {
  box-shadow: 0 5px 12px #15244913;
  transform: translateY(-1px);
}
button:active,
.button:active {
  transform: translateY(1px);
}
.primary {
  background: #4263eb;
  border-color: #4263eb;
  color: #fff;
  box-shadow: 0 4px 12px #4263eb23;
}
.primary:hover {
  color: #fff;
  background: #3451d1;
}
.quiet {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #737b8e;
  padding: 0 6px;
}
.notice {
  padding: 12px 18px;
  border-radius: 10px;
  background: #eef3ff;
}
.error {
  background: #fff0f0;
  color: #a32839;
}
.success {
  background: #edf8f2;
  color: #27704c;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  background: #f3f6fb;
}
td,
th {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f5;
}
td:first-child {
  max-width: 360px;
  overflow-wrap: anywhere;
}
tbody tr:hover { background: #f8faff; }
tr:last-child td {
  border-bottom: 0;
}
.table-scroll {
  overflow: auto;
}
.table-scroll > table {
  min-width: 700px;
}
.actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.status {
  font-size: 12px;
  border: 1px solid #e3e8f3;
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
  font-weight: 600;
}
.status-active {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.status-closed {
  color: #596273;
  background: #f1f3f6;
  border-color: #d7dce4;
}
.status-draft {
  color: #946200;
  background: #fff8e5;
  border-color: #f6dda4;
}
.empty {
  padding: 32px;
  color: #7b8293;
  text-align: center;
}
.pagination {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  margin: 24px 0;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.wide {
  grid-column: 1/-1;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
.check {
  flex-direction: row;
  align-items: center;
}
.check input {
  width: 18px;
  min-height: 18px;
}
.form-shell {
  max-width: 1000px;
}
.publish {
  position: sticky;
  bottom: 0;
  box-shadow: 0 -4px 20px #1c2b4908;
}
.publish label {
  margin: 0;
}
.publish .actions {
  margin-top: 20px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
}
details > p,
.caption {
  font-size: 12px;
  color: #56657b;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stats .panel {
  margin: 0;
}
.stats span {
  color: #737b8e;
}
.stats strong {
  display: block;
  font-size: 32px;
  font-variant-numeric: tabular-nums;
  margin-top: 12px;
}
.revenue {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
}
.revenue strong {
  font-size: 24px;
}
meter {
  accent-color: #4263eb;
  width: 100px;
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e5e9f2;
  border-top: 4px solid #4263eb;
  border-radius: 14px;
  padding: 36px;
  box-shadow: 0 16px 48px #15264a08;
}
.login-card .brand span { margin-left: 12px; }
.login-card h1 {
  font-size: 26px;
  margin: 32px 0;
}
.full {
  width: 100%;
}
:focus-visible {
  outline: 3px solid #4263eb50;
  outline-offset: 3px;
}
@media (max-width: 700px) {
  .shell {
    margin-top: 24px;
    padding: 0 16px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .panel {
    padding: 20px;
  }
  .brand {
    font-size: 20px;
  }
  .publish {
    position: static;
  }
  .heading h1 {
    font-size: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    transform: none !important;
  }
}

.metrics-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 24px;
}
.date-range-field {
  min-width: 280px;
  flex: 1;
  max-width: 370px;
}
.date-range-field label {
  display: block;
  font-size: 12px;
  color: #657087;
  margin-bottom: 8px;
}
.date-range-field input {
  width: 100%;
  cursor: pointer;
  font-weight: 500;
}
.date-shortcuts {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.date-shortcuts button {
  padding: 9px 12px;
  border-radius: 8px;
  color: #69748a;
}
.date-shortcuts button.selected {
  background: #edf1ff;
  color: #3454d4;
}
.metrics-filter > .primary {
  margin-left: auto;
}
.date-error {
  flex-basis: 100%;
  color: #b83434;
  margin: 0;
}
.metrics-page .heading .caption {
  margin: 5px 0 0;
}
.metrics-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}
.metrics-stats .panel {
  min-width: 0;
  padding: 17px 19px;
}
.metrics-stats strong {
  margin-top: 6px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.metrics-stats small {
  display: block;
  margin-top: 8px;
  color: #56657b;
  font-size: 12px;
}
.metric-card h2 {
  margin: 0;
  color: #44546c;
  font-size: 14px;
}
.metric-card.metric-card-primary {
  border-color: #c7d7f8;
  background: #ebf2ff;
  color: #203d76;
}
.metrics-main {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(245px, 1fr);
  align-items: start;
  gap: 20px;
}
.metrics-main > *, .metrics-side > * { min-width: 0; }
.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.section-heading h2, .ranking-heading h2 { margin: 0; }
.section-heading .caption, .ranking-heading .caption { margin: 4px 0 0; }
.trend-select {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0;
  color: #56657b;
}
.trend-select select { width: auto; }
.trend-chart {
  height: 290px;
  position: relative;
  margin: 18px 0 8px;
}
.trend-details, .metric-definitions {
  border-top: 1px solid #e6eaf2;
  padding-top: 10px;
}
.trend-details summary, .metric-definitions summary {
  min-height: 40px;
  color: #425676;
  font-size: 13px;
}
.revenue-panel h2, .metrics-side h2 { margin-bottom: 12px; }
.revenue-panel .caption { margin-bottom: 0; }
.revenue-empty {
  padding: 12px;
  background: #f4f7fb;
  border-radius: 7px;
  color: #495c75;
}
.revenue {
  display: grid;
  gap: 2px;
  margin: 12px 0;
}
.revenue strong {
  font-size: 24px;
  color: #203d76;
  overflow-wrap: anywhere;
}
.metric-breakdown { margin: 0; }
.metric-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #edf0f5;
}
.metric-breakdown div:last-child { padding-bottom: 0; border: 0; }
.metric-breakdown dt { color: #46566e; }
.metric-breakdown dd {
  margin: 0;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.ranking-panel { padding: 0; }
.ranking-heading { padding: 18px 22px; }
.ranking-panel :is(th, td):nth-child(n + 3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.flatpickr-calendar {
  border-radius: 14px;
  border: 0;
  box-shadow:
    0 0 0 1px #e3e8f3,
    0 12px 40px #18264420;
  padding: 0;
}
.flatpickr-months .flatpickr-month {
  height: 44px;
}
.flatpickr-current-month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0;
  font-size: 15px;
  line-height: 24px;
}
.flatpickr-current-month input.cur-year,
.flatpickr-current-month .flatpickr-monthDropdown-months {
  min-height: 0;
  height: 24px;
  line-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.flatpickr-current-month .numInputWrapper {
  width: 5ch;
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  height: 44px;
  padding: 15px 12px;
}
.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange {
  background: #4263eb;
  border-color: #4263eb;
}
.flatpickr-calendar .flatpickr-day.inRange {
  background: #edf1ff;
  border-color: #edf1ff;
  box-shadow:
    -5px 0 0 #edf1ff,
    5px 0 0 #edf1ff;
}
@media (max-width: 1180px) {
  .metrics-main { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .metrics-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 821px) and (max-width: 1000px) {
  .metrics-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  body:has(> .admin-sidebar) { display: block; }
  .admin-sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    padding: 12px 16px 8px;
  }
  .admin-brand, .admin-brand:hover { padding: 0; }
  .admin-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    gap: 4px;
  }
  .admin-nav a {
    position: relative;
    justify-content: center;
    padding-inline: 2px;
    border-inline-start: 0;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    white-space: nowrap;
  }
  .admin-nav a[aria-current="page"] { border-bottom-color: #9dc1ff; }
  .admin-nav .unread-dot {
    position: absolute;
    top: 5px;
    right: 4px;
    margin: 0;
    width: 6px;
    height: 6px;
  }
  .admin-sidebar-actions {
    align-items: start;
    grid-template-columns: auto auto;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .admin-sidebar-actions a, .admin-sidebar-actions button { padding-inline: 7px; }
  body > .admin-sidebar + .shell { padding: 24px 16px 40px; }
}
@media (max-width: 600px) {
  .metrics-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metrics-side { display: block; }
  .trend-chart { height: 235px; }
  .date-range-field { min-width: 0; max-width: none; flex-basis: 100%; }
  .metrics-filter { gap: 10px; }
  .metrics-filter > .primary { width: 100%; }
  .date-shortcuts { gap: 0; }
  .date-shortcuts button { padding-inline: 8px; }
  .metrics-stats .panel { padding: 14px; }
  .filters > input { min-width: min(100%, 200px); }
  .filters > select { max-width: 100%; }
}
.application-files { margin: 16px 0; }
.application-file { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid #e7eaf1; }
.application-file > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.application-file small { display: block; color: #737b8e; margin-top: 4px; }
.application-file .filters { margin: 0; flex-shrink: 0; }
@media (max-width: 600px) { .application-file { flex-wrap: wrap; } }

.feedback-message { white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; border-radius: 10px; background: #f7f9fc; margin: 16px 0; }
.feedback-record textarea { width: 100%; resize: vertical; }

.unread-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#ef4444;vertical-align:middle;margin-left:5px;margin-right:5px}.unread-dot[hidden]{display:none}.consultation-preview{display:block;color:inherit;text-decoration:none;margin-bottom:14px}.consultation-preview p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#64748b;margin:12px 0 0}.consultation-shell{max-width:980px}.consultation-shell>.panel{margin-top:20px}.consultation-messages{display:flex;flex-direction:column;gap:16px;background:#f7f9fc;padding:20px;border-radius:12px;margin:18px 0;max-height:600px;overflow:auto}.consultation-note{max-width:85%;align-self:flex-start}.consultation-note small{color:#64748b;font-size:12px}.consultation-note p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;background:#fff;border:1px solid #e2e8f0;padding:12px 16px;border-radius:0 12px 12px;margin:6px 0 0}.consultation-note.is-admin{align-self:flex-end}.consultation-note.is-admin p{background:#edf2ff;border-color:#dbe4ff;border-radius:12px 0 12px 12px}

.job-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
}
.job-tools > .panel {
  margin: 0;
  padding: 0 14px;
}
.job-tools > .panel[open] {
  grid-column: 1 / -1;
  padding-bottom: 16px;
}
.job-tools summary { padding: 11px 0; }
.job-tools .filters { margin-bottom: 0; }
@media (max-width: 600px) {
  .job-tools { grid-template-columns: 1fr; gap: 8px; }
}
.job-filters { margin: 0 0 14px; padding: 14px; }
