:root {
  --bg: #fff8f1;
  --panel: #ffffff;
  --panel-2: #fff2e4;
  --ink: #1f2d17;
  --muted: #6f7563;
  --line: #eadbc8;
  --line-strong: #d6c1a7;
  --accent: #ff7a00;
  --accent-2: #34d16f;
  --accent-3: #1ca85b;
  --warn: #c67b10;
  --danger: #b42318;
  --good: #138a49;
  --radius: 7px;
  --shadow: 0 12px 30px rgba(119, 81, 24, 0.08);
  --shadow-soft: 0 6px 18px rgba(119, 81, 24, 0.06);
}

.pm-console .content {
  padding: 20px 24px 32px;
}

.pm-console .kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pm-console .panel {
  box-shadow: 0 8px 22px rgba(20, 35, 31, 0.05);
}

.pm-kpi {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.pm-permission-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 140px minmax(140px, 1fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.pm-permission-form input,
.pm-permission-form select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.task-editor-cell {
  padding: 0;
  background: #f5faf8;
}

.inline-editor {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid #cfe2de;
  background: #f5faf8;
}

.inline-editor h4 {
  margin: 0;
  font-size: 14px;
}

.app-launch-list-panel .panel-body.compact-summary {
  display: flex;
  gap: 8px;
  align-items: stretch;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.app-launch-list-panel .compact-summary .pm-kpi {
  margin: 0;
  font-size: 20px;
}

.app-launch-list-panel .compact-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.app-launch-list-panel table {
  min-width: 980px;
}

.app-launch-list-panel th {
  padding: 6px 10px;
}

.app-launch-list-panel td {
  padding: 0 10px;
}

.app-launch-monitor-row {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) 260px;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
}

.monitor-row-form label {
  display: grid;
  gap: 3px;
}

.monitor-row-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.monitor-link-field {
  grid-column: 1 / -1;
}

.monitor-main,
.monitor-side {
  display: grid;
  gap: 8px;
}

.monitor-main {
  min-width: 0;
}

.monitor-side {
  align-content: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
}

.monitor-identity {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.monitor-package-field small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor-linkline {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.monitor-meta-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(234, 219, 200, 0.92);
  border-radius: 7px;
  background: #fffdfa;
}

.monitor-meta-item span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.monitor-meta-item strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-launch-monitor-row input,
.app-launch-monitor-row select {
  min-height: 30px;
  padding: 5px 8px;
}

.app-launch-monitor-row .monitor-meta {
  gap: 2px;
}

.app-launch-monitor-row .monitor-meta .tag {
  width: fit-content;
  padding: 2px 8px;
}

.app-launch-monitor-row .monitor-meta small {
  font-size: 11px;
  line-height: 1.25;
}

.app-launch-monitor-row .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.app-launch-monitor-row .row-actions .small-btn {
  min-height: 30px;
  padding: 5px 10px;
}

.app-launch-monitor-row .row-actions .small-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.monitor-side-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  align-items: end;
}

.monitor-side-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.monitor-side-stat {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid rgba(234, 219, 200, 0.92);
  border-radius: 7px;
  background: #fff;
}

.monitor-side-stat span {
  color: var(--muted);
  font-size: 10px;
}

.monitor-side-stat strong {
  font-size: 12px;
}

.monitor-chat-field {
  gap: 5px;
}

.monitor-chat-field > label {
  display: grid;
  gap: 5px;
}

.compact-check-grid {
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 6px;
}

.app-launch-monitor-row .compact-check-grid .check-option {
  gap: 6px;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
  line-height: 1.3;
}

.app-launch-monitor-row .compact-check-grid .check-option input {
  transform: scale(0.92);
}

.monitor-row-message {
  margin-top: 2px;
  padding: 7px 9px;
  font-size: 11px;
  line-height: 1.35;
}

.summary-chip {
  display: grid;
  gap: 2px;
  min-width: 92px;
  padding: 6px 10px;
  border: 1px solid rgba(234, 219, 200, 0.92);
  border-radius: 7px;
  background: #fffdfa;
}

.app-launch-top-panel .panel-body {
  padding: 12px 14px;
}

.app-launch-top-panel .check-grid {
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 6px;
}

.app-launch-top-panel .check-option {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
}

.compact-form-grid {
  gap: 8px;
}

@media (max-width: 1280px) {
  .app-launch-monitor-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .monitor-side {
    padding-top: 8px;
  }
}

@media (max-width: 960px) {
  .monitor-identity,
  .monitor-meta-grid,
  .monitor-side-row,
  .monitor-side-summary {
    grid-template-columns: 1fr;
  }
}

.performance-email-action {
  display: inline-grid;
  gap: 4px;
  min-width: 132px;
}

.performance-email-action small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

body.public-share-mode .app-shell {
  display: block;
  min-height: 100vh;
}

body.public-share-mode .sidebar,
body.public-share-mode .topbar {
  display: none;
}

body.public-share-mode .main {
  min-width: 0;
}

body.public-share-mode .content {
  min-height: 100vh;
  padding: 42px 18px 56px;
  background:
    linear-gradient(140deg, rgba(255, 122, 0, 0.08), transparent 34%),
    linear-gradient(155deg, rgba(52, 209, 111, 0.12), rgba(255, 250, 243, 0.94) 58%, rgba(246, 255, 239, 0.92));
}

body.oa-portal-mode .app-shell {
  display: block;
  min-height: 100vh;
}

body.oa-portal-mode .sidebar,
body.oa-portal-mode .topbar {
  display: none;
}

body.oa-portal-mode .main {
  min-width: 0;
}

body.oa-portal-mode .content {
  min-height: 100vh;
  padding: 32px 18px 56px;
  background:
    linear-gradient(140deg, rgba(255, 122, 0, 0.08), transparent 34%),
    linear-gradient(155deg, rgba(52, 209, 111, 0.12), rgba(255, 250, 243, 0.94) 58%, rgba(246, 255, 239, 0.92));
}

.monitor-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.monitor-meta small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.ad-revenue-status-form {
  display: grid;
  grid-template-columns: 120px minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.facebook-group-status-form {
  display: grid;
  grid-template-columns: 120px minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.facebook-group-status-form.compact-row-form {
  grid-template-columns: minmax(150px, 1fr) auto auto;
  gap: 6px;
  min-width: 280px;
}

.compact-row-form select {
  min-height: 60px;
  padding: 4px 7px;
  font-size: 12px;
}

.facebook-chat-editor-form {
  grid-template-columns: minmax(0, 1fr);
}

.facebook-create-form {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  align-items: end;
}

.facebook-create-form .full {
  grid-column: 1 / -1;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 12px;
}

.check-option input {
  width: auto;
}

.product-push-choice-grid {
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffaf5;
}

.product-push-choice-grid .check-option {
  background: #fff;
}

.product-push-choice {
  display: grid;
  gap: 6px;
}

.product-push-choice-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.report-filter-panel .panel-body {
  padding: 10px 16px 12px;
}

.form-grid.report-filter-form {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 7px;
  align-items: end;
}

.report-filter-panel .panel-header {
  padding: 10px 16px;
}

.report-filter-panel .panel-header h3 {
  margin-bottom: 3px;
}

.report-filter-panel .panel-header p {
  font-size: 12px;
}

.report-filter-form .field {
  gap: 3px;
}

.report-filter-form .field label {
  font-size: 10px;
  line-height: 1.1;
}

.report-filter-form input,
.report-filter-form select {
  min-height: 26px;
  padding: 0 7px;
  font-size: 11px;
}

.report-filter-form .report-dimensions {
  padding-top: 4px;
}

.report-filter-form .check-grid {
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 5px;
}

.report-filter-form .check-option {
  min-height: 26px;
  padding: 4px 7px;
  font-size: 11px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.panel-actions select {
  width: auto;
  min-width: 112px;
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.panel-message {
  margin: 0 16px 10px;
}

.readonly-textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border-color: rgba(255, 122, 0, 0.24);
  background: #fffdf8;
  color: #24362a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.58;
}

.codex-query-page {
  min-height: 100vh;
  padding: 28px;
}

.intranet-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px 28px;
  border: 1px solid #d8e5dc;
  border-radius: 8px;
  background: linear-gradient(120deg, #effaf2 0%, #fffdf7 68%, #ffffff 100%);
}

.intranet-hero h2 {
  margin: 4px 0 8px;
  color: #1f302b;
  font-size: 26px;
}

.intranet-hero p:not(.eyebrow) {
  max-width: 650px;
  margin: 0;
  color: #64736e;
  line-height: 1.7;
}

.intranet-hero-meta {
  display: grid;
  min-width: 132px;
  align-content: center;
  justify-items: center;
  padding: 12px 18px;
  border-left: 1px solid #d8e5dc;
  color: #54705f;
}

.intranet-hero-meta strong {
  margin-top: 3px;
  color: #17804d;
  font-size: 30px;
  line-height: 1.1;
}

.intranet-hero-meta small {
  color: #75837d;
}

.intranet-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.intranet-sidebar,
.intranet-main {
  min-width: 0;
}

.intranet-sidebar .panel-header {
  padding-bottom: 10px;
}

.intranet-filter-list {
  display: grid;
  gap: 4px;
}

.intranet-filter-btn,
.intranet-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 10px;
  background: transparent;
  color: #50635c;
  cursor: pointer;
  text-align: left;
}

.intranet-filter-btn strong {
  color: #88958f;
  font-size: 12px;
}

.intranet-filter-btn:hover,
.intranet-filter-btn.active {
  border-color: #c8e0d0;
  background: #effaf2;
  color: #167a4a;
}

.intranet-filter-btn.active strong {
  color: #167a4a;
}

.intranet-sidebar-block {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.intranet-sidebar-block > strong {
  color: #31483d;
  font-size: 12px;
}

.intranet-sidebar-link {
  justify-content: flex-start;
  padding: 5px 0;
  color: #66766e;
  font-size: 12px;
  line-height: 1.4;
}

.intranet-sidebar-link:hover {
  color: #167a4a;
}

.intranet-manage-link {
  width: 100%;
  margin-top: 20px;
}

.intranet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.intranet-search {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  max-width: 620px;
}

.intranet-search input {
  min-width: 0;
  flex: 1 1 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
}

.intranet-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.intranet-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #e0e8e1;
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(42, 83, 56, 0.05);
}

.intranet-card.is-pinned {
  border-color: #b8ddc4;
  box-shadow: 0 7px 20px rgba(30, 126, 75, 0.08);
}

.intranet-card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: #83908a;
  font-size: 11px;
}

.intranet-card-top time {
  margin-left: auto;
}

.intranet-type,
.intranet-pin {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.intranet-type.type-notice {
  background: #fff2df;
  color: #a55b0b;
}

.intranet-type.type-policy {
  background: #edf2ff;
  color: #465eaa;
}

.intranet-type.type-culture {
  background: #eaf8ef;
  color: #267548;
}

.intranet-type.type-knowledge {
  background: #f4edff;
  color: #7250a5;
}

.intranet-pin {
  background: #fff5d9;
  color: #9b6b0a;
}

.intranet-card h3 {
  margin: 0;
  color: #22352c;
  font-size: 17px;
  line-height: 1.4;
}

.intranet-card > p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #64736e;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.intranet-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid #edf1ee;
  color: #84918b;
  font-size: 11px;
}

.intranet-empty {
  grid-column: 1 / -1;
}

.performance-workbench {
  margin: 18px 0 22px;
  padding: 22px;
  border: 1px solid #d9e3e8;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbfc 0%, #eef6f5 100%);
}

.performance-workbench-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.performance-workbench-header h2 {
  margin: 2px 0 6px;
  color: #163c44;
  font-size: 23px;
}

.performance-workbench-header p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: #5d7078;
}

.performance-workbench-role {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #bbd8d3;
  border-radius: 999px;
  color: #17685f;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.performance-workbench-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.performance-workbench-card {
  min-height: 128px;
  padding: 16px;
  border: 1px solid #d9e3e8;
  border-radius: 7px;
  background: #fff;
  color: #17363d;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.performance-workbench-card:hover,
.performance-workbench-card:focus-visible {
  border-color: #75aaa3;
  box-shadow: 0 8px 20px rgba(31, 74, 77, .10);
  transform: translateY(-1px);
  outline: none;
}

.performance-workbench-card span,
.performance-workbench-card strong,
.performance-workbench-card small,
.performance-workbench-card b {
  display: block;
}

.performance-workbench-card span {
  color: #45626a;
  font-size: 14px;
  font-weight: 700;
}

.performance-workbench-card strong {
  margin: 9px 0 4px;
  color: #17363d;
  font-size: 20px;
}

.performance-workbench-card small {
  min-height: 34px;
  color: #718189;
  line-height: 1.5;
}

.performance-workbench-card b {
  margin-top: 9px;
  color: #15766b;
  font-size: 13px;
}

.performance-workbench-card.tone-accent { border-top: 3px solid #d77b38; }
.performance-workbench-card.tone-blue { border-top: 3px solid #3975a8; }
.performance-workbench-card.tone-green { border-top: 3px solid #4d9a71; }
.performance-workbench-card.tone-slate { border-top: 3px solid #82939b; }

.leader-letter-editor {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid #dfe7ea;
  border-radius: 7px;
  background: #f8fafb;
}

.leader-letter-editor h4 {
  margin: 0 0 14px;
  color: #23444b;
}

.leader-letter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.leader-letter-card {
  padding: 18px;
  border: 1px solid #dce6e9;
  border-radius: 7px;
  background: #fff;
}

.leader-letter-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.leader-letter-card-top time,
.leader-letter-recipient {
  color: #728188;
  font-size: 13px;
}

.leader-letter-card h3 {
  margin: 14px 0 4px;
  color: #183d45;
}

.leader-letter-recipient {
  margin: 0 0 14px;
}

.leader-letter-body {
  color: #405a61;
  line-height: 1.75;
  word-break: break-word;
}

.empty-state-block {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed #cbd9dd;
  border-radius: 7px;
}

@media (max-width: 900px) {
  .performance-workbench-grid,
  .leader-letter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .performance-workbench {
    padding: 16px;
  }

  .performance-workbench-header {
    display: block;
  }

  .performance-workbench-role {
    display: inline-block;
    margin-top: 12px;
  }

  .performance-workbench-grid,
  .leader-letter-grid {
    grid-template-columns: 1fr;
  }
}

.intranet-detail {
  padding: 4px 2px;
}

.intranet-detail h2 {
  margin: 16px 0 8px;
  color: #22352c;
  font-size: 23px;
  line-height: 1.4;
}

.intranet-detail-summary {
  margin: 0 0 18px;
  color: #64736e;
  font-size: 14px;
  line-height: 1.7;
}

.intranet-detail-body {
  color: #33463d;
  font-size: 14px;
  line-height: 1.9;
}

.intranet-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #82908a;
  font-size: 11px;
}

.intranet-admin-stats {
  margin-bottom: 16px;
}

.intranet-admin-table table {
  min-width: 980px;
}

.intranet-admin-table td {
  vertical-align: top;
}

.intranet-admin-table small {
  color: var(--muted);
  line-height: 1.5;
}

.intranet-editor-form textarea {
  min-height: 190px;
  resize: vertical;
}

@media (max-width: 900px) {
  .intranet-layout {
    grid-template-columns: 1fr;
  }

  .intranet-filter-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .intranet-sidebar-block,
  .intranet-manage-link {
    display: none;
  }
}

@media (max-width: 640px) {
  .intranet-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }

  .intranet-hero-meta {
    width: 100%;
    grid-template-columns: auto auto auto;
    justify-content: start;
    justify-items: start;
    gap: 8px;
    border-top: 1px solid #d8e5dc;
    border-left: 0;
    padding: 12px 0 0;
  }

  .intranet-hero-meta strong {
    margin: 0;
  }

  .intranet-filter-list,
  .intranet-content-grid {
    grid-template-columns: 1fr;
  }

  .intranet-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .intranet-search {
    max-width: none;
  }
}

.codex-query-shell {
  display: grid;
  max-width: 980px;
  margin: 0 auto;
  gap: 16px;
}

.codex-query-hero {
  padding: 18px 0 4px;
}

.codex-query-panel textarea {
  width: 100%;
  min-height: 110px;
}

.codex-query-form {
  display: grid;
  gap: 12px;
}

.codex-query-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.codex-query-examples button {
  min-height: 30px;
  border: 1px solid rgba(255, 122, 0, 0.24);
  border-radius: 6px;
  background: #fffaf3;
  color: #5b3b14;
  padding: 5px 9px;
}

.codex-query-result-panel pre {
  min-height: 220px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #26352b;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.48;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body,
body.pm-console,
body:not(.pm-console) {
  --bg: #fff8f1;
  --panel-2: #fff2e4;
  --line: #eadbc8;
  --line-strong: #d6c1a7;
  --accent: #ff7a00;
  --accent-2: #34d16f;
  --shadow: 0 14px 34px rgba(140, 88, 19, 0.08);
  --shadow-soft: 0 7px 20px rgba(140, 88, 19, 0.07);
  background: linear-gradient(135deg, #fffaf3 0%, #fff2e1 42%, #f1ffe8 100%);
}

body .sidebar,
body.pm-console .sidebar,
body:not(.pm-console) .sidebar {
  background: linear-gradient(180deg, #fff6ea 0%, #ffecd4 48%, #ecf9de 100%);
  box-shadow: 10px 0 28px rgba(129, 93, 35, 0.12);
  border-right: 1px solid rgba(255, 122, 0, 0.18);
}

body.pm-console .nav-item:hover,
body.pm-console .nav-item.active,
body:not(.pm-console) .nav-item:hover,
body:not(.pm-console) .nav-item.active {
  background: linear-gradient(90deg, rgba(255, 122, 0, 0.14) 0%, rgba(52, 209, 111, 0.16) 100%);
  color: #194022;
}

body.pm-console .topbar,
body:not(.pm-console) .topbar {
  background: rgba(255, 250, 243, 0.94);
  border-bottom-color: rgba(255, 122, 0, 0.18);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  min-height: 100dvh;
  overflow: auto;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #fffaf2 0%, #fff1df 45%, #edffe6 100%);
}

.login-card {
  display: grid;
  width: min(440px, 100%);
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-brand {
  margin-bottom: 0;
}

.login-brand-mark {
  min-width: 128px;
}

.login-brand-kicker {
  margin: 0 0 4px;
  color: #f47b2a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.login-brand p:not(.login-brand-kicker) {
  margin: 4px 0 0;
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ffd3cc;
  border-radius: 6px;
  background: #fff4f2;
  color: var(--danger);
  font-size: 13px;
}

.login-error.success {
  border-color: #bfe6cc;
  background: #edf8f1;
  color: var(--good);
}

.login-debug {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}

.login-debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.login-debug pre {
  max-height: 170px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #33423d;
  font-size: 12px;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input,
select,
textarea,
summary {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 119, 109, 0.12);
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.18s ease;
}

.sidebar {
  background: #10201d;
  color: #f4fbf9;
  padding: 20px 14px;
  max-height: 100vh;
  overflow: hidden auto;
  transition: padding 0.18s ease, opacity 0.18s ease;
}

.sidebar-collapsed .app-shell {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar-collapsed .sidebar {
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.public-share-mode .sidebar,
.public-share-mode .topbar,
.public-share-mode .topbar-actions {
  display: none;
}

.share-status-page {
  display: grid;
  min-height: calc(100vh - 128px);
  place-items: center;
  padding: 24px;
}

.share-status-card {
  display: grid;
  width: min(460px, 100%);
  justify-items: center;
  gap: 12px;
  padding: 36px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.share-status-card h3 {
  margin: 6px 0 0;
  font-size: 24px;
}

.share-status-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.share-status-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: #eef8f5;
  color: var(--accent);
  font-size: 28px;
  font-weight: 800;
}

.share-status-icon.success {
  background: #edf8f1;
  color: var(--good);
}

.share-status-icon.error {
  background: #fff4f2;
  color: var(--danger);
}

.performance-success-card {
  width: min(760px, 100%);
  padding: 28px;
  text-align: left;
}

.performance-success-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 18px;
  border: 1px solid rgba(52, 128, 91, 0.16);
  border-radius: 8px;
  object-fit: cover;
}

.performance-success-card .share-status-icon,
.performance-success-card h3,
.performance-success-card p {
  margin-left: auto;
  margin-right: auto;
  max-width: 620px;
}

.performance-success-card h3 {
  font-size: 24px;
  line-height: 1.25;
}

.performance-success-card p {
  color: #425243;
  font-size: 15px;
  line-height: 1.9;
}

.performance-public-grid {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1280px) minmax(120px, 1fr);
  align-items: start;
  justify-items: center;
  margin: 0 auto;
  width: 100%;
  padding: 24px clamp(20px, 4vw, 56px) 48px;
  gap: clamp(20px, 2.8vw, 40px);
}

.performance-public-panel {
  width: min(1280px, 100%);
  overflow: hidden;
  border: 1px solid rgba(213, 197, 171, 0.72);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 252, 247, 0.98) 100%);
  box-shadow: 0 28px 72px rgba(102, 81, 35, 0.12);
  backdrop-filter: blur(18px);
}

.performance-side-copy {
  position: sticky;
  top: 28px;
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 220px;
  padding-top: 56px;
}

.performance-side-copy p {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(36, 86, 46, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 14px 30px rgba(96, 82, 43, 0.08);
  color: #46604c;
  font-size: 13px;
  line-height: 1.8;
}

.performance-public-heading {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0 auto;
  padding: 28px 40px 18px;
  border-bottom: 1px solid rgba(225, 212, 188, 0.72);
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 0, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(52, 209, 111, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 250, 243, 0.9) 0%, rgba(255, 255, 255, 0.72) 100%);
}

.performance-public-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.performance-public-brand img {
  display: block;
  width: min(360px, 48vw);
  max-width: 100%;
  height: auto;
}

.performance-public-brand-copy {
  display: grid;
  gap: 4px;
  text-align: left;
}

.performance-public-heading p {
  margin: 0;
  color: #2a8b56;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.performance-public-brand-copy span {
  color: #4c5d55;
  font-size: 15px;
  font-weight: 700;
}

.performance-public-heading h1 {
  margin: 0;
  color: #172f23;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.22;
}

.performance-public-panel .panel-header {
  display: none;
}

.performance-public-panel .panel-body {
  padding: 28px clamp(28px, 4vw, 48px) 40px;
}

.performance-self-form {
  max-width: 1120px;
  margin: 0 auto;
  gap: 22px;
}

.public-assessment-submit-message {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #ffd3cc;
  border-radius: 8px;
  background: #fff4f2;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.55;
}

.public-assessment-submit-message.success {
  border-color: #bfe6cc;
  background: #edf8f1;
  color: var(--good);
}

.public-assessment-submit-message.warning {
  border-color: rgba(255, 122, 0, 0.28);
  background: #fff8ec;
  color: #9a4b00;
}

.public-assessment-submit-message[hidden] {
  display: none;
}

.performance-employee-hero,
.performance-ai-card,
.performance-leader-readonly,
.performance-leader-self-summary,
.performance-template-score-card,
.performance-self-review-field {
  grid-column: 1 / -1;
}

.performance-employee-hero {
  display: grid;
  gap: 24px;
  padding: 40px;
  border: 1px solid rgba(36, 86, 46, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.14), transparent 38%),
    linear-gradient(155deg, rgba(52, 209, 111, 0.14), rgba(255, 255, 255, 0.92));
  box-shadow: 0 24px 64px rgba(46, 77, 45, 0.1);
}

.performance-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.performance-hero-logo {
  display: grid;
  width: 140px;
  height: 58px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(36, 86, 46, 0.12);
  border-radius: 12px;
  background: #fff;
}

.performance-hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.performance-hero-brand strong {
  display: block;
  color: #163626;
  font-size: 18px;
}

.performance-hero-brand small,
.performance-hero-meta {
  color: #63705f;
}

.performance-hero-copy {
  display: grid;
  max-width: 860px;
  gap: 14px;
}

.performance-hero-copy .eyebrow {
  margin: 0;
  color: #1b7f4d;
  font-size: 13px;
  font-weight: 800;
}

.performance-hero-copy h2 {
  margin: 0;
  color: #15291f;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.18;
}

.performance-hero-copy p {
  margin: 0;
  color: #3f513f;
  font-size: 16px;
  line-height: 1.85;
}

.performance-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.performance-hero-meta span {
  padding: 7px 10px;
  border: 1px solid rgba(36, 86, 46, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #334a38;
  font-size: 12px;
  font-weight: 700;
}

.performance-score-cards {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.performance-score-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid rgba(36, 86, 46, 0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(87, 80, 49, 0.08);
}

.performance-score-card span,
.performance-score-card small {
  color: var(--muted);
  font-size: 12px;
}

.performance-score-card strong {
  color: #172f23;
  font-size: 32px;
  line-height: 1;
}

.performance-template-summary {
  display: grid;
  max-width: 360px;
  gap: 4px;
}

.performance-template-summary strong,
.performance-template-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.performance-template-summary strong {
  color: #172f23;
  font-size: 13px;
  white-space: nowrap;
}

.performance-template-summary small {
  display: -webkit-box;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.performance-ai-card,
.performance-leader-readonly,
.performance-template-score-card,
.performance-self-review-field {
  padding: 26px;
  border: 1px solid rgba(36, 86, 46, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(87, 80, 49, 0.08);
}

.performance-score-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.performance-score-heading label {
  margin: 0;
}

.performance-score-heading strong {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(36, 86, 46, 0.14);
  border-radius: 6px;
  background: #f7fbf6;
  color: #163626;
  font-size: 13px;
}

.performance-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.performance-section-title span {
  color: #172f23;
  font-size: 16px;
  font-weight: 800;
}

.performance-section-title strong {
  color: #1b7f4d;
  font-size: 18px;
}

.performance-ai-card p,
.performance-leader-readonly p {
  margin: 0;
  color: #425243;
  line-height: 1.8;
}

.performance-leader-self-summary {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(11, 119, 109, 0.18);
  border-radius: 8px;
  background: #f7fbfa;
}

.performance-leader-self-summary p {
  margin: 0;
  color: #334155;
  line-height: 1.75;
}

.performance-leader-preview {
  display: grid;
  gap: 14px;
}

.performance-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.performance-ai-card ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.performance-ai-card li {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(36, 86, 46, 0.06);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdf9 0%, #f6fbf5 100%);
}

.performance-ai-card li span {
  color: #526052;
  line-height: 1.7;
}

.performance-metric-list {
  display: grid;
  gap: 14px;
}

.performance-metric-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.5fr) 120px;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(36, 86, 46, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffefd 0%, #fbfdfb 100%);
}

.performance-metric-card span,
.performance-metric-card label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.performance-score-input span,
.score-cell-label span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.performance-score-input b,
.score-cell-label b {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(27, 127, 77, 0.16);
  border-radius: 999px;
  background: #f0fbf4;
  color: #1b7f4d;
  font-size: 12px;
  font-weight: 800;
}

.score-cell-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.score-cell-label {
  display: grid;
  gap: 5px;
}

.performance-metric-card strong {
  display: block;
  margin-top: 6px;
  color: #172f23;
  font-size: 17px;
}

.performance-metric-card p,
.performance-metric-standard {
  margin: 8px 0 0;
  color: #526052;
  line-height: 1.6;
}

.performance-metric-standard {
  margin: 0;
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7fbf6;
}

.performance-self-review-field textarea {
  min-height: 220px;
  font-size: 15px;
  line-height: 1.8;
}

.performance-textarea-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.performance-textarea-header label {
  margin: 0;
}

@media (max-width: 1280px) {
  .performance-public-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .performance-side-copy {
    position: static;
    grid-row: auto;
    max-width: 1120px;
    width: 100%;
    padding-top: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.loading-dot::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 3px solid #b9ddd5;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.brand-mark {
  flex: 0 0 auto;
  width: 132px;
  min-height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(255, 122, 0, 0.12);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-mark-logo {
  padding: 8px 10px;
}

.brand-mark-logo img {
  object-fit: contain;
}

.brand-mark-text {
  display: grid;
  place-items: center;
  padding: 14px 16px;
  color: #ff7a00;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  background: linear-gradient(135deg, #fffefd 0%, #fff7ea 58%, #f0ffe9 100%);
  border: 1px solid rgba(255, 122, 0, 0.12);
}

.brand h1 {
  margin: 0;
  color: #1d2b15;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.4;
}

.brand p {
  margin: 4px 0 0;
  color: #5f6c55;
  font-size: 12px;
}

.nav-group-title {
  color: #76430d;
}

.nav-item {
  color: #3d3f34;
}

.eyebrow {
  color: #ff7a00;
}

.nav {
  display: grid;
  gap: 10px;
  padding-bottom: 20px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-title {
  width: 100%;
  min-height: 34px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0 11px;
  color: #70400a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: left;
}

.nav-group-title::after {
  content: "▸";
  float: right;
  color: #8a8f7a;
}

.nav-group.open .nav-group-title {
  background: rgba(255, 122, 0, 0.08);
  color: #5a3308;
}

.nav-group.open .nav-group-title::after {
  content: "▾";
}

.nav-group-items {
  display: none;
  gap: 6px;
}

.nav-group.open .nav-group-items {
  display: grid;
}

.nav-item {
  width: 100%;
  min-height: 31px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #49513e;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 0 10px 0 20px;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(90deg, rgba(255, 132, 24, 0.2), rgba(111, 223, 111, 0.18));
  color: #243114;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 0, 0.12);
}

.nav-item.has-subnav {
  position: relative;
  padding-right: 28px;
}

.nav-item.has-subnav::after {
  content: "▾";
  position: absolute;
  top: 50%;
  right: 10px;
  color: #7d8a71;
  transform: translateY(-50%) rotate(-90deg);
  transition: transform 0.15s ease;
}

.nav-item.has-subnav[aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(0deg);
}

.nav-subitems {
  display: grid;
  gap: 4px;
  max-height: min(42vh, 360px);
  margin: 2px 2px 8px 8px;
  padding: 6px;
  overflow: hidden auto;
  border: 1px solid rgba(255, 122, 0, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nav-subitems[hidden] {
  display: none;
}

.nav-subitem {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 0 8px;
  color: #64705a;
  font-size: 12px;
  font-weight: 600;
}

.nav-subitem span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-nav-item {
  color: #9a9f90;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 24px;
  background: rgba(255, 248, 241, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sidebar-toggle {
  min-height: 30px;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 4px;
  color: #bf6a1d;
  font-size: 12px;
  text-transform: uppercase;
}

.topbar h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: end;
}

.role-controls {
  display: flex;
  gap: 10px;
  align-items: end;
  padding-right: 4px;
}

.role-controls label {
  display: grid;
  gap: 4px;
}

.role-controls select {
  min-height: 34px;
  min-width: 132px;
  padding: 0 9px;
}

.content {
  padding: 20px 24px 40px;
}

.permission-note {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #b9ddd5;
  border-radius: var(--radius);
  background: #eef8f5;
  color: #24413c;
}

.permission-note span,
.muted-text {
  color: var(--muted);
  line-height: 1.6;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.small-btn {
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-btn {
  background: var(--accent);
  color: #fff;
}

.ghost-btn,
.small-btn {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

.danger-btn {
  background: #fff4f2;
  color: var(--danger);
  border-color: #ffd3cc;
}

.small-btn {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

.primary-btn:hover {
  background: #e56d00;
}

.ghost-btn:hover,
.small-btn:hover {
  border-color: var(--line-strong);
  background: #fff7f0;
}

.small-btn.accent-btn {
  border-color: #ff7a00;
  background: #ff7a00;
  color: #fff;
}

.small-btn.accent-btn:hover {
  border-color: #e56d00;
  background: #e56d00;
  color: #fff;
}

.warm-btn {
  border-color: #c75b39;
  background: #c75b39;
}

.warm-btn:hover {
  border-color: #a9462a;
  background: #a9462a;
}

.danger-text {
  color: var(--danger);
}

.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.template-editor {
  display: grid;
  gap: 10px;
}

.template-editor-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(150px, 1fr) 96px minmax(220px, 1.2fr) minmax(260px, 1.4fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfc;
}

.template-editor-row label {
  display: grid;
  gap: 6px;
}

.template-editor-row textarea {
  min-height: 42px;
  resize: vertical;
}

.grid {
  display: grid;
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.two-col {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  align-items: start;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header h3,
.form-title {
  margin: 0;
  font-size: 15px;
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.performance-thanks {
  display: grid;
  grid-column: 1 / -1;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 122, 0, 0.24);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff8ed 0%, #f4ffe9 100%);
}

.performance-thanks-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #24562e;
  font-weight: 800;
}

.performance-thanks-logo {
  display: inline-grid;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 122, 0, 0.2);
  border-radius: 7px;
  background: #fff;
}

.performance-thanks-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.performance-thanks-copy {
  display: grid;
  max-width: 880px;
  gap: 10px;
}

.performance-thanks-copy h3 {
  margin: 0;
  color: #1f2d17;
  font-size: 24px;
  line-height: 1.2;
}

.performance-thanks-copy p {
  margin: 0;
  color: #4d5b45;
  font-size: 14px;
  line-height: 1.8;
}

.panel-body {
  padding: 16px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfa;
}

.account-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.account-grid strong {
  overflow-wrap: anywhere;
}

.manual-performance-generate-form {
  gap: 18px;
}

.manual-performance-generate-form [data-manual-performance-employee-picker] {
  display: grid;
  gap: 10px;
}

.manual-performance-preview {
  display: grid;
  gap: 18px;
}

.manual-performance-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 122, 0, 0.2);
  border-radius: var(--radius);
  background: #fffaf2;
}

.manual-performance-summary strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.manual-performance-summary p {
  margin: 0;
  color: var(--muted);
}

.manual-performance-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.manual-performance-people {
  display: grid;
  gap: 10px;
  max-height: min(68vh, 920px);
  overflow: auto;
  padding-right: 6px;
  align-content: start;
}

.manual-performance-person {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.manual-performance-person.active {
  border-color: rgba(255, 122, 0, 0.8);
  background: #fff1e5;
  box-shadow: 0 10px 24px rgba(255, 122, 0, 0.14);
  position: relative;
}

.manual-performance-person.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: #ff7a00;
}

.manual-performance-person-main {
  display: grid;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.manual-performance-person-main strong {
  font-size: 14px;
}

.manual-performance-person.active .manual-performance-person-main strong {
  color: #8a3b00;
}

.manual-performance-person-main span {
  color: var(--muted);
  font-size: 12px;
}

.manual-performance-person.active .manual-performance-person-main span,
.manual-performance-person.active .manual-performance-person-fields label {
  color: #9a5a24;
}

.manual-performance-person-fields {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
}

.manual-performance-person-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.manual-performance-person-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.manual-performance-detail {
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.manual-performance-rule-note {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.manual-performance-generate-form .employee-picker {
  gap: 10px;
}

.manual-performance-generate-form .check-list {
  max-height: min(28vh, 280px);
  overflow: auto;
}

.manual-performance-generate-form .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 4px;
  padding: 14px 0 4px;
  background: linear-gradient(180deg, rgba(250, 245, 238, 0) 0%, rgba(250, 245, 238, 0.94) 32%, rgba(250, 245, 238, 1) 100%);
  border-top: 1px solid rgba(255, 122, 0, 0.12);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 32, 29, 0.42);
}

.modal-panel {
  width: min(720px, 100%);
  max-height: min(720px, calc(100dvh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(16, 32, 29, 0.22);
}

.employee-preview-modal-panel {
  width: min(520px, 100%);
}

.employee-preview-summary {
  display: grid;
  gap: 3px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #c9e2d3;
  border-radius: 6px;
  background: #f3faf5;
  color: #547064;
}

.employee-preview-summary strong {
  color: #1c5c3b;
  font-size: 15px;
}

.employee-preview-summary small {
  color: #7a8b82;
}

.employee-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #e8c989;
  border-radius: 6px;
  background: #fff8e6;
  color: #76510e;
}

.employee-preview-banner > div {
  display: grid;
  gap: 2px;
}

.employee-preview-banner strong {
  color: #9a650b;
}

.employee-preview-banner span {
  color: #856f40;
  line-height: 1.5;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.modal-body {
  padding: 16px;
}

.product-info-modal {
  width: min(980px, 100%);
}

.product-info-modal textarea {
  resize: vertical;
  min-height: 44px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.check-list {
  display: grid;
  max-height: 280px;
  overflow: auto;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfa;
}

.employee-picker {
  display: grid;
  gap: 8px;
}

.manual-performance-editor {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdfa 0%, #fff8f0 100%);
}

.manual-performance-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.template-editor-page {
  max-width: 1100px;
  margin: 0 auto;
}

.employee-search {
  min-height: 34px;
}

.check-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
}

.check-row input {
  width: auto;
  margin-top: 3px;
}

.check-row span {
  display: grid;
  gap: 2px;
}

.check-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.multi-select {
  display: grid;
  gap: 8px;
}

.multi-select summary {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.multi-select[open] summary {
  border-color: var(--accent);
}

.icon-btn {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 19px;
  line-height: 1;
}

.stat {
  padding: 12px 13px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1.1;
}

.stat small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.stats-grid .stat {
  min-height: 104px;
  text-align: left;
}

.stat-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.stat-breakdown span {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  gap: 4px;
  border: 1px solid #dbe9e5;
  border-radius: 999px;
  padding: 0 7px;
  background: #f3faf7;
  color: #3f5a55;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
}

.stat-breakdown b {
  color: #173e37;
  font-weight: 750;
}

.dashboard-action-panel .panel-header {
  padding: 11px 14px;
}

.interview-dashboard {
  margin-bottom: 12px;
  padding: 10px;
}

.interview-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.interview-workspace-table {
  margin-top: 4px;
}

.interview-workspace-table td {
  vertical-align: top;
  line-height: 1.45;
}

.interview-workspace-table td small {
  color: var(--muted);
}

.mini-stat {
  min-height: 78px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #fbfdfc 0%, #f6f9f8 100%);
  box-shadow: none;
}

.mini-stat strong {
  font-size: 20px;
}

.mini-stat small {
  font-size: 11px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.inline-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar input,
.toolbar select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  background: #fff;
}

.employee-filter-bar {
  align-items: flex-end;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.employee-filter-bar label {
  display: grid;
  gap: 6px;
  min-width: 160px;
}

.filter-panel {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdfc 0%, #f3f7f5 100%);
}

.filter-panel-header,
.bulk-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-panel-header strong,
.bulk-panel-title strong {
  color: var(--ink);
  font-size: 14px;
}

.filter-panel-header span,
.bulk-panel-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.filter-fields,
.bulk-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.filter-fields label,
.bulk-fields label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-fields input,
.filter-fields select,
.bulk-fields input,
.bulk-fields select {
  min-height: 34px;
  border-color: #d9e2df;
  background: #fff;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.bulk-panel {
  display: grid;
  gap: 10px;
  margin: 12px 16px 0;
  padding: 12px;
  border: 1px dashed #c7d8d3;
  border-radius: var(--radius);
  background: #fff;
}

.filter-panel .bulk-panel {
  margin: 2px 0 0;
}

.talent-bulk-panel {
  border-color: #efc98d;
  background: linear-gradient(180deg, #fff9ef 0%, #ffffff 88%);
}

.people-table-wrap,
.talent-table-wrap {
  border-radius: 0 0 var(--radius) var(--radius);
  background: #fff;
}

.table-wrap {
  position: relative;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-x: contain;
  border-radius: 0 0 var(--radius) var(--radius);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.table-cell-clip {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-actions table {
  min-width: 1320px;
}

.sticky-action-col {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 96px;
  background: #ffffff;
  box-shadow: -6px 0 14px rgba(20, 35, 31, 0.07);
}

th.sticky-action-col {
  z-index: 4;
  background: #f9fbfa;
}

tr.is-expanded > td {
  border-top: 2px solid #72b9b0;
  background: #eef7f5;
}

.talent-detail-cell {
  padding: 0;
  border-bottom: 2px solid #b8d7d1;
  background: #e9f3f0;
}

.talent-detail-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  padding: 14px 16px 18px;
  border-left: 5px solid #2d8a7f;
  border-bottom: 1px solid #b8d7d1;
  background:
    linear-gradient(90deg, rgba(45, 138, 127, 0.12) 0, rgba(45, 138, 127, 0) 180px),
    linear-gradient(180deg, #e8f4f1 0%, #f6fbfa 100%);
}

.talent-detail-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #b7d8d2;
  border-radius: var(--radius);
  background: #dff0ec;
}

.talent-detail-banner div {
  display: grid;
  gap: 2px;
}

.talent-detail-banner strong {
  font-size: 14px;
  color: #102c28;
}

.talent-detail-banner span:not(.tag) {
  color: #526c67;
  font-size: 12px;
}

.talent-status-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  padding: 8px;
  border: 1px solid #8bc6bd;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(20, 35, 31, 0.08);
}

.talent-status-inline-form label {
  display: grid;
  min-width: 190px;
  gap: 4px;
  color: #23544d;
}

.talent-status-inline-form select {
  min-height: 32px;
  border-color: #78bcb2;
  background: #f5fffc;
}

.interview-flow-btn {
  background: #256f5a;
  border-color: #256f5a;
}

.interview-flow-btn:hover {
  background: #1d5b49;
  border-color: #1d5b49;
}

.interview-assign-btn {
  border-color: #7b9f98;
  background: #f4faf8;
  color: #1f4f47;
}

.talent-detail-quick-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
}

.talent-detail-panel section {
  min-width: 0;
  padding: 14px;
  border: 1px solid #cadbd7;
  border-radius: var(--radius);
  background: #fff;
}

.talent-highlight {
  border-width: 2px;
  box-shadow: 0 10px 24px rgba(20, 35, 31, 0.08);
}

.talent-highlight-hr,
.talent-edit-card-hr {
  border-color: #3ca99c;
  background: linear-gradient(180deg, #ddf4ee 0%, #ffffff 78%);
}

.talent-highlight-bg,
.talent-edit-card-bg {
  border-color: #de9b3c;
  background: linear-gradient(180deg, #fff0d7 0%, #ffffff 78%);
}

.talent-detail-card {
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(20, 35, 31, 0.07);
}

.talent-detail-panel h4 {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 0 10px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf4f2;
  color: #193b36;
  font-size: 14px;
}

.talent-detail-panel p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.65;
}

.talent-inline-form {
  display: grid;
  gap: 10px;
}

.talent-inline-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 650;
}

.talent-inline-form textarea {
  min-height: 118px;
  background: rgba(255, 255, 255, 0.92);
}

.inline-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.compact-actions {
  margin-top: 0;
}

.talent-edit-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.talent-edit-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.talent-edit-card h4 {
  margin: 0;
  font-size: 15px;
}

.compact-grid {
  gap: 10px;
}

th,
td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  background: #f9fbfa;
  white-space: nowrap;
}

td {
  font-size: 12.5px;
  line-height: 1.4;
}

.product-info-query-panel .panel-body {
  padding: 12px 16px 14px;
}

.product-info-filter-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: end;
  gap: 10px 12px;
}

.product-info-filter-form .field {
  gap: 4px;
}

.product-info-filter-form label {
  font-size: 11px;
}

.product-info-filter-form input {
  min-height: 34px;
  padding: 7px 10px;
}

.product-info-filter-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.product-info-filter-actions button {
  min-height: 34px;
}

.product-info-query-panel + .panel .panel-header {
  padding-top: 12px;
  padding-bottom: 10px;
}

.product-info-query-panel + .panel .table-wrap {
  max-height: calc(100vh - 360px);
  min-height: 260px;
}

.product-info-query-panel + .panel table {
  min-width: max(980px, 100%);
}

.people-table th,
.talent-table th {
  background: #f4f8f6;
}

.people-table tbody tr:hover > td,
.talent-table tbody tr:hover > td {
  background: #fbfdfc;
}

.people-table td:nth-child(2) strong,
.talent-table td:nth-child(2) strong {
  font-size: 13px;
}

.talent-table td:nth-child(6) {
  background: #fffdf8;
}

.talent-table {
  table-layout: fixed;
}

.talent-table th:nth-child(1),
.talent-table td:nth-child(1) {
  width: 38px;
}

.talent-table th:nth-child(2),
.talent-table td:nth-child(2) {
  width: 180px;
}

.talent-table th:nth-child(3),
.talent-table td:nth-child(3) {
  width: 118px;
}

.talent-table th:nth-child(4),
.talent-table td:nth-child(4) {
  width: 132px;
}

.talent-table th:nth-child(5),
.talent-table td:nth-child(5) {
  width: 260px;
}

.talent-table th:nth-child(6),
.talent-table td:nth-child(6) {
  width: 170px;
}

.talent-table th:nth-child(7),
.talent-table td:nth-child(7) {
  width: 250px;
}

.talent-table th:nth-child(8),
.talent-table td:nth-child(8) {
  width: 230px;
}

.talent-table th:nth-child(9),
.talent-table td:nth-child(9) {
  width: 142px;
}

.talent-table .tag {
  white-space: nowrap;
}

.talent-candidate-cell,
.talent-profile-cell,
.talent-status-cell {
  line-height: 1.45;
}

.talent-candidate-cell > *,
.talent-profile-cell > *,
.talent-status-cell > * {
  display: block;
  margin-bottom: 5px;
}

.talent-candidate-cell strong {
  color: #142320;
}

.talent-status-cell small,
.talent-profile-cell small,
.talent-summary-cell small,
.talent-review-cell small,
.talent-interview-cell small {
  color: var(--muted);
}

.talent-review-cell small {
  display: block;
  margin-top: 3px;
}

.talent-ai-mini {
  margin-top: 7px;
}

.talent-review-cell b,
.talent-interview-cell b {
  color: #536761;
  font-size: 11px;
}

.talent-interview-cell {
  display: grid;
  gap: 6px;
}

.tag {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.2;
  background: var(--panel-2);
  color: #24413c;
}

.tag.good {
  background: #e9f6ee;
  color: var(--good);
}

.tag.warn {
  background: #fff7e8;
  color: var(--warn);
}

.tag.danger {
  background: #fff1ef;
  color: var(--danger);
}

.tag.blue {
  background: #edf4ff;
  color: var(--accent-3);
}

.resume-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.resume-file-actions a {
  text-decoration: none;
}

.resume-text-preview pre {
  max-height: 70vh;
  overflow: auto;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 5px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  min-height: 34px;
  padding: 8px 10px;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.form-divider {
  grid-column: 1 / -1;
  width: 100%;
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebe9;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.radar {
  display: grid;
  gap: 12px;
}

.radar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.timeline-item strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.rule-box {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfa;
}

.rule-box strong {
  color: var(--ink);
}

.rule-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.talent-global-search {
  position: fixed;
  right: 22px;
  top: 82px;
  z-index: 900;
  width: min(560px, calc(100vw - 44px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(16, 32, 29, 0.16);
  backdrop-filter: blur(12px);
}

.talent-global-search.dragging {
  user-select: none;
}

.talent-global-search-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: #f7fbfa;
  color: var(--muted);
  cursor: grab;
}

.talent-global-search-handle:active {
  cursor: grabbing;
}

.talent-global-search-handle strong {
  color: var(--ink);
  font-size: 13px;
}

.talent-global-search-handle span {
  font-size: 12px;
}

.talent-global-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 10px;
}

.talent-global-search-panel {
  display: none;
  max-height: 480px;
  overflow: auto;
  padding: 0 10px 10px;
  border-top: 1px solid var(--line);
}

.talent-global-search.open .talent-global-search-panel {
  display: grid;
  gap: 10px;
}

.talent-search-results {
  display: grid;
  gap: 8px;
}

.talent-search-result {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.talent-search-result:hover {
  border-color: #a9cac4;
  background: #f6fbfa;
}

.talent-search-result span,
.talent-search-result small {
  color: var(--muted);
}

.empty {
  padding: 34px 16px;
  text-align: center;
  color: var(--muted);
}

.empty h3 {
  margin: 0 0 6px;
  color: var(--ink);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-group {
    align-content: start;
  }

  .two-col,
  .manual-performance-layout,
  .performance-score-cards,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .performance-metric-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .content {
    padding: 18px;
  }

  .form-grid,
  .manual-performance-person-fields,
  .nav,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .talent-global-search {
    right: 12px;
    top: 72px;
    width: calc(100vw - 24px);
  }

  .talent-global-search-form {
    grid-template-columns: 1fr;
  }

  .filter-panel-header,
  .bulk-panel-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .filter-fields,
  .bulk-fields {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions button {
    flex: 1 1 120px;
  }

  .bulk-panel {
    margin-right: 12px;
    margin-left: 12px;
  }
}

.codex-query-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 122, 24, 0.16), transparent 28%),
    linear-gradient(135deg, #fff8f1 0%, #f5fff5 52%, #ffffff 100%);
  color: var(--text-color, #1f2933);
}

.codex-query-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.codex-query-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 24px;
}

.codex-query-hero h1 {
  margin: 0;
  font-size: 24px;
}

.codex-query-hero p {
  margin: 4px 0 0;
  color: var(--muted-color, #667085);
}

.codex-query-status {
  border: 1px solid rgba(255, 122, 24, 0.22);
  border-radius: 999px;
  background: #fff;
  color: #a44d09;
  font-weight: 700;
  padding: 8px 14px;
  white-space: nowrap;
}

.codex-query-status.good {
  border-color: rgba(67, 176, 71, 0.28);
  color: #247a28;
}

.codex-query-status.danger {
  border-color: rgba(220, 38, 38, 0.22);
  color: #b42318;
}

.codex-query-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.codex-query-side,
.codex-query-main {
  display: grid;
  gap: 14px;
}

.compact-panel .panel-header {
  padding-bottom: 8px;
}

.codex-group-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.codex-group-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  font-size: 13px;
}

.codex-group-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.codex-query-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.codex-result-text {
  border: 1px solid rgba(255, 122, 24, 0.16);
  border-radius: 8px;
  background: #fffaf5;
  margin-bottom: 12px;
  padding: 12px;
  white-space: pre-wrap;
  line-height: 1.7;
}

@media (max-width: 920px) {
  .codex-query-layout,
  .codex-query-form {
    grid-template-columns: 1fr;
  }

  .codex-query-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .employee-preview-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .employee-preview-banner .ghost-btn {
    width: 100%;
  }
}
