@import url("https://fonts.googleapis.com/css2?family=K2D:wght@200;300;400;500;600;700&display=swap");

:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d8dee9;
  --primary: #1769aa;
  --primary-dark: #0f4f82;
  --accent: #2d8f74;
  --warn: #b7791f;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --font-ui: "K2D", "Segoe UI", "Segoe UI Variable", "Leelawadee UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.08), transparent 28%),
    linear-gradient(135deg, #f8fafc 0%, #eef6ff 52%, #f5f7fb 100%);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 20px 32px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.topbar-brand {
  min-width: 260px;
}

.topbar h1,
.auth-panel h1 {
  margin: 2px 0 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin: 6px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fafc;
  padding: 8px 10px;
}

.user-chip span { color: var(--text); font-weight: 500; }
.user-chip small { padding: 2px 8px; border-radius: 999px; background: #e7f0f8; color: var(--primary-dark); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.topbar-icon-button:hover,
.topbar-icon-button:focus-visible {
  border-color: #bae6fd;
  background: #f8fafc;
  color: #0369a1;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.12);
}

.management-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 0;
}

.help-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: 0;
}

.management-nav.hidden + .help-nav {
  margin-left: auto;
}

.workflow-label {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.management-dropdown {
  position: relative;
}

.management-dropdown summary {
  display: inline-flex;
  align-items: center;
  list-style: none;
  user-select: none;
}

.management-dropdown summary::-webkit-details-marker {
  display: none;
}

.management-dropdown summary::after {
  display: none;
}

.management-dropdown[open] summary::after {
  display: none;
}

.management-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 95;
  display: grid;
  min-width: 190px;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.management-dropdown-menu .tab-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.manual-dropdown-menu {
  min-width: 240px;
}

.manual-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.82);
  padding: 9px 11px;
  text-align: left;
}

.manual-menu-link:hover,
.manual-menu-link:focus-visible {
  background: rgba(233, 98, 49, 0.18);
  color: #ffffff;
  outline: none;
}

.manual-menu-link .icon {
  width: 17px;
  height: 17px;
  color: currentColor;
  opacity: 0.86;
}

.management-dropdown-menu .icon {
  width: 17px;
  height: 17px;
  color: #64748b;
}

.management-dropdown-menu .tab-button.active .icon {
  color: currentColor;
}

.top-menu-button {
  padding: 9px 11px !important;
  font-size: 13px !important;
}

.app-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.stat-card:hover {
  border-color: #bae6fd;
  box-shadow: 0 12px 28px rgba(14, 116, 144, 0.10);
  transform: translateY(-1px);
}

.stat-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
}

.dashboard-synthesis {
  margin-bottom: 20px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.dashboard-heading h2 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.2;
}

.dashboard-health-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 7px 11px;
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-health-badge.attention {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.dashboard-health-badge.good {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.dashboard-grid,
.dashboard-lower-grid {
  display: grid;
  gap: 12px;
}

.dashboard-grid {
  grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(0, 1fr));
}

.dashboard-lower-grid {
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.4fr);
  margin-top: 12px;
}

.dashboard-card {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 14px;
}

.dashboard-priority {
  background: linear-gradient(135deg, #f0f9ff 0%, #ecfeff 55%, #f8fafc 100%);
  border-color: #bae6fd;
}

.dashboard-card > span,
.dashboard-card-head span,
.dashboard-metric span,
.dashboard-status-row span {
  color: #64748b;
  display: block;
  font-size: 12px;
}

.dashboard-card > strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.3;
}

.dashboard-card p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 13px;
}

.dashboard-metric-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.dashboard-metric {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.dashboard-metric strong,
.dashboard-status-row strong,
.dashboard-alert strong {
  color: #0f172a;
  font-size: 14px;
}

.dashboard-meter {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.dashboard-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0284c7, #10b981);
}

.dashboard-alert-list,
.dashboard-status-bars {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.dashboard-alert {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font: inherit;
  padding: 10px 12px;
  text-align: left;
}

.dashboard-alert:hover {
  border-color: #7dd3fc;
  background: #f0f9ff;
}

.dashboard-alert.blue { border-left: 4px solid #0284c7; }
.dashboard-alert.orange { border-left: 4px solid #f97316; }
.dashboard-alert.cyan { border-left: 4px solid #06b6d4; }
.dashboard-alert.yellow { border-left: 4px solid #eab308; }
.dashboard-alert.gray { border-left: 4px solid #94a3b8; }

.dashboard-status-row {
  display: grid;
  gap: 6px;
}

.dashboard-status-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
  padding: 14px;
  text-align: center;
}

.report-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.report-toolbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.report-summary-card,
.report-card {
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(30, 38, 42, 0.06);
}

.report-summary-card {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 14px;
  border-left: 4px solid #1e262a;
}

.report-summary-card.green { border-left-color: #689e61; }
.report-summary-card.orange { border-left-color: #e96231; }
.report-summary-card.blue { border-left-color: #437fc7; }
.report-summary-card.gray { border-left-color: #a2a6a7; }
.report-summary-card.dark { border-left-color: #1e262a; }

.report-summary-card span,
.report-card-head span {
  color: #5b5e61;
  font-size: 12px;
}

.report-summary-card strong {
  color: #1e262a;
  font-size: 26px;
  font-weight: 500 !important;
  line-height: 1.1;
}

.report-summary-card small {
  color: #5b5e61;
  line-height: 1.4;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.report-grid-quad {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-card {
  min-width: 0;
  overflow: hidden;
}

.report-card-wide {
  min-width: 0;
}

.report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #dfe4e4;
  background: #fbfcfc;
}

.report-card-head h3 {
  margin: 0;
  color: #1e262a;
  font-size: 15px;
  font-weight: 500 !important;
}

.report-card-title {
  display: grid;
  gap: 3px;
}

.report-card-head .report-print-button {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.report-card-head .report-print-button:hover {
  border-color: rgba(233, 98, 49, 0.78);
  background: rgba(233, 98, 49, 0.18);
  color: #ffffff;
}

.report-action-list,
.report-bars,
.report-scope-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.report-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid #dfe4e4;
  border-left: 4px solid #a2a6a7;
  border-radius: 8px;
  background: #fff;
  color: #1e262a;
  cursor: pointer;
  text-align: left;
}

.report-action:hover {
  border-color: #ffd3c4;
  border-left-color: #e96231;
  background: #fff8f4;
}

.report-action span {
  font-weight: 500 !important;
}

.report-action strong {
  color: #1e262a;
  font-size: 20px;
  font-weight: 500 !important;
}

.report-action small {
  grid-column: 1 / -1;
  color: #5b5e61;
}

.report-action.green { border-left-color: #689e61; }
.report-action.orange { border-left-color: #e96231; }
.report-action.blue { border-left-color: #437fc7; }
.report-action.yellow { border-left-color: #d6a02a; }
.report-action.red { border-left-color: #c6372b; }
.report-action.gray { border-left-color: #a2a6a7; }

.report-bar-row,
.report-scope-row {
  display: grid;
  gap: 6px;
}

.report-bar-row > div:first-child,
.report-scope-row {
  color: #5b5e61;
  font-size: 12px;
}

.report-bar-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.report-scope-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.report-scope-row .dashboard-meter {
  grid-column: 1 / -1;
}

.report-bar-row strong,
.report-scope-row strong {
  color: #1e262a;
  font-weight: 500 !important;
}

.report-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4f6f6;
  color: #1e262a;
  font-size: 12px;
  white-space: nowrap;
}

.report-status.green { background: #edf7eb; color: #477941; }
.report-status.orange { background: #fff3ee; color: #b94921; }
.report-status.blue { background: #eef6ff; color: #2d62a3; }
.report-status.yellow { background: #fff8dc; color: #8a6400; }
.report-status.red { background: #ffecea; color: #c6372b; }
.report-status.gray { background: #f4f6f6; color: #5b5e61; }

.report-panel .report-toolbar {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px 8px 0 0;
  background: #1e262a;
  box-shadow: none;
}

.report-panel .report-toolbar h2,
.report-panel .report-toolbar p {
  color: #ffffff;
}

.report-panel .report-toolbar p {
  opacity: 0.72;
}

.report-panel .report-toolbar .badge {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.report-card-head {
  border-bottom: 1px solid #1e262a;
  background: #1e262a;
}

.report-card-head h3,
.report-card-head span {
  color: #ffffff;
}

.report-card-head span {
  opacity: 0.68;
}

.finance-workflow-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 14px 18px;
}

.finance-stage {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.finance-stage span {
  align-items: center;
  background: #e0f2fe;
  border-radius: 999px;
  color: #075985;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  margin-bottom: 7px;
  width: 24px;
}

.finance-stage strong,
.finance-stage small {
  display: block;
}

.finance-stage strong {
  color: #0f172a;
  font-size: 14px;
}

.finance-stage small {
  color: #64748b;
  font-size: 12px;
}

.finance-stage.done {
  border-color: #bae6fd;
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}

.finance-stage.annual {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.finance-stage.annual span {
  background: #dcfce7;
  color: #166534;
}

.finance-stage.external {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
}

.finance-stage.external span {
  background: #ffedd5;
  color: #9a3412;
}

.finance-batch-section {
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 18px;
}

.section-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-heading h3 {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
  margin: 2px 0 0;
}

.section-heading small {
  color: #64748b;
}

.admin-center {
  display: grid;
  gap: 18px;
  padding: 20px;
  background: #f8fafc;
  border-bottom: 1px solid #dfe4e4;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.admin-metric-grid article,
.admin-control-card {
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(30, 38, 42, 0.06);
}

.admin-metric-grid article {
  padding: 14px 15px;
}

.admin-metric-grid span,
.admin-control-card > span {
  display: block;
  color: #5b5e61;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-metric-grid strong {
  display: block;
  margin-top: 6px;
  color: #1e262a;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.admin-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-control-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
}

.admin-control-card h3 {
  margin: 0;
  color: #1e262a;
  font-size: 18px;
  font-weight: 500;
}

.admin-control-card p {
  margin: 0;
  color: #5b5e61;
}

.admin-flow {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.admin-flow b {
  color: #1e262a;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.admin-flow i {
  display: block;
  height: 1px;
  min-width: 18px;
  background: #cbd5e1;
}

.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.admin-role-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-role-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfcfc;
}

.admin-role-list b {
  font-weight: 500;
}

.admin-role-list em {
  color: #5b5e61;
  font-style: normal;
  text-align: right;
}

#tab-admin .panel-toolbar p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

#tab-admin .panel-toolbar .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.admin-section-toolbar {
  border-radius: 0 !important;
}

.manual-body {
  min-height: 100vh;
  background: #eef1f1;
  color: #1e262a;
}

.manual-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 32px;
  background: #1e262a;
  color: #fff;
  box-shadow: 0 10px 28px rgba(30, 38, 42, 0.18);
}

.manual-topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
}

.manual-topbar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.manual-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.manual-topbar .button {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.manual-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.manual-hero,
.manual-section,
.manual-card {
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 38, 42, 0.08);
}

.manual-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.manual-hero h2 {
  margin: 6px 0 10px;
  color: #1e262a;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
}

.manual-hero p {
  margin: 0;
  color: #5b5e61;
  font-size: 16px;
}

.manual-hero img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #eef1f1;
}

.manual-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #fff3ee;
  color: #b94921;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.manual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.manual-card {
  padding: 18px;
}

.manual-card h3,
.manual-section h3 {
  margin: 0 0 10px;
  color: #1e262a;
  font-size: 20px;
  font-weight: 500;
}

.manual-card p,
.manual-section p,
.manual-section li {
  color: #5b5e61;
}

.manual-card p {
  margin: 0;
}

.manual-section {
  margin-top: 16px;
  padding: 22px;
}

.manual-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: manual-step;
}

.manual-steps li {
  position: relative;
  min-height: 54px;
  padding: 12px 14px 12px 60px;
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #fbfcfc;
  counter-increment: manual-step;
}

.manual-steps li::before {
  content: counter(manual-step);
  position: absolute;
  left: 14px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #1e262a;
  color: #fff;
  font-weight: 600;
}

.manual-steps strong {
  display: block;
  margin-bottom: 2px;
  color: #1e262a;
  font-weight: 500;
}

.manual-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.manual-checklist li {
  padding: 10px 12px;
  border: 1px solid #dfe4e4;
  border-left: 4px solid #689e61;
  border-radius: 8px;
  background: #fbfcfc;
}

.manual-warning {
  margin-top: 14px;
  border: 1px solid #ffd3c4;
  border-radius: 8px;
  background: #fff3ee;
  color: #8a3b18;
  padding: 12px 14px;
}

.manual-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.payment-public-body {
  min-height: 100vh;
  background: #eef1f1;
  color: #1e262a;
}

.payment-public-shell {
  width: min(960px, calc(100% - 24px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.payment-public-card {
  overflow: hidden;
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(30, 38, 42, 0.12);
}

.payment-language-switch {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 12px 16px;
  background: #1e262a;
}

.payment-language-switch a {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 400;
  padding: 5px 10px;
  text-decoration: none;
}

.payment-language-switch a:hover,
.payment-language-switch a.active {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.payment-public-head {
  padding: 24px;
  background: #1e262a;
  color: #fff;
}

.payment-public-head h1 {
  margin: 4px 0 8px;
  font-size: 30px;
  font-weight: 500;
}

.payment-public-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.payment-author-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 20px 0;
  border: 1px solid #dce5e5;
  border-radius: 12px;
  background: #f8fbfb;
  padding: 12px 14px;
}

.payment-author-session div {
  display: grid;
  gap: 2px;
}

.payment-author-session span,
.payment-author-session small {
  color: #5b5e61;
  font-size: 12px;
}

.payment-author-session strong {
  color: #1e262a;
  font-size: 16px;
  font-weight: 500;
}

.payment-login-gate {
  display: grid;
  gap: 14px;
  margin: 20px;
  border: 1px solid #e3e8e8;
  border-radius: 14px;
  background: #fbfcfc;
  padding: 20px;
}

.payment-login-gate h2 {
  margin: 0;
  color: #1e262a;
  font-size: 22px;
  font-weight: 500;
}

.payment-login-gate p {
  margin: 0;
  color: #5b5e61;
}

.google-login-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.google-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: #1a73e8;
  font-weight: 700;
}

.payment-public-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.payment-form-section {
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 16px;
}

.payment-form-section h2 {
  margin: 0 0 12px;
  color: #1e262a;
  font-size: 18px;
  font-weight: 500;
}

.payment-transfer-account {
  display: grid;
  gap: 5px;
  margin: 0 0 16px;
  border: 1px solid #d8c6ec;
  border-radius: 14px;
  background: #fbf7ff;
  color: #37204d;
  padding: 13px 15px;
}

.payment-transfer-account > span {
  color: #6b3a93;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.payment-transfer-account strong {
  color: #1e262a;
  font-weight: 600;
}

.payment-article-preview {
  display: grid;
  gap: 4px;
  border: 1px solid #dfe4e4;
  border-left: 4px solid #e96231;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.payment-article-preview span {
  color: #5b5e61;
}

.payment-alert {
  display: grid;
  gap: 4px;
  margin: 20px 20px 0;
  border-radius: 8px;
  padding: 12px 14px;
}

.payment-alert.success {
  border: 1px solid #cbe7c7;
  background: #edf7eb;
  color: #477941;
}

.payment-alert.error {
  border: 1px solid #f4c3bf;
  background: #ffecea;
  color: #c6372b;
}

.payment-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 20px 20px;
}

.payment-submission-section {
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 18px;
}

.payment-dashboard-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.payment-dashboard-head h3 {
  margin: 2px 0 0;
  color: #1e262a;
  font-size: 18px;
  font-weight: 500;
}

.payment-dashboard-head small {
  color: #5b5e61;
}

.payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.payment-summary-card {
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.payment-summary-card span {
  display: block;
  color: #5b5e61;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.payment-summary-card strong {
  display: block;
  margin-top: 6px;
  color: #1e262a;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.payment-export-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #e3e8e8;
  border-radius: 10px;
  background: #fbfcfc;
}

.payment-export-panel label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5b5e61;
  font-size: 13px;
  font-weight: 600;
}

.payment-export-panel input {
  min-height: 34px;
  border: 1px solid #d7dddd;
  border-radius: 8px;
  background: #fff;
  color: #1e262a;
  font: inherit;
  padding: 5px 8px;
}

.payment-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.payment-filter-button {
  border: 1px solid #dfe4e4;
  border-radius: 999px;
  background: #fff;
  color: #5b5e61;
  cursor: pointer;
  font: inherit;
  padding: 6px 11px;
}

.payment-filter-button:hover,
.payment-filter-button.active {
  border-color: #1e262a;
  background: #1e262a;
  color: #fff;
}

.payment-copy-grid {
  display: grid;
  gap: 5px;
}

/* Payment work queue: wrap content instead of forcing a wide nested scroller. */
.payment-submission-section { min-width: 0; }
.payment-list-wrap { width: 100%; min-width: 0; border: 1px solid #e2e8f0; border-radius: 12px; }
.payment-list-table { width: 100%; min-width: 0 !important; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.payment-list-table th, .payment-list-table td { padding: 10px 8px; white-space: normal !important; overflow-wrap: anywhere; vertical-align: top; border-bottom: 1px solid #edf0f4; }
.payment-list-table th { background: #f6f8fa; font-size: 12px; text-align: left; }
.payment-list-table th:nth-child(1) { width: 4%; }
.payment-list-table th:nth-child(2) { width: 16%; }
.payment-list-table th:nth-child(3) { width: 36%; }
.payment-list-table th:nth-child(4) { width: 12%; }
.payment-list-table th:nth-child(5) { width: 18%; }
.payment-list-table th:nth-child(6) { width: 14%; }
.payment-list-table .copy-inline { display: flex; min-width: 0; padding: 4px 6px; gap: 6px; }
.payment-list-table .copy-inline span { white-space: normal; overflow: visible; overflow-wrap: anywhere; font-size: 12px; }
.payment-list-table .copy-inline button { flex-shrink: 0; font-size: 11px; }
.payment-list-table .row-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.payment-list-table .button { white-space: normal !important; min-width: 0; padding: 6px 8px; font-size: 12px; }
.payment-list-table .badge { white-space: normal; }
.payment-document-check { display: flex; align-items: flex-start; gap: 6px; margin-top: 9px; font-size: 12px; cursor: pointer; }
.payment-document-check input { flex: 0 0 auto; margin-top: 3px; width: 15px; height: 15px; }
.payment-printed-section { margin-top: 20px; }
.payment-printed-section summary { padding: 12px 0; font-weight: 700; cursor: pointer; color: #17634b; }
@media (max-width: 1000px) {
  .payment-list-table, .payment-list-table tbody { display: block; }
  .payment-list-table thead { display: none; }
  .payment-list-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 2px solid #e2e8f0; padding: 8px; }
  .payment-list-table td { display: block; min-width: 0; border: 0; }
  .payment-list-table td:nth-child(1) { grid-column: 1 / -1; }
  .payment-list-table td:nth-child(3) { grid-column: 1 / -1; }
  .payment-list-table td[data-label]::before { content: attr(data-label); display: block; font-weight: 700; color: #64748b; margin-bottom: 4px; }
}
@media (max-width: 540px) {
  .payment-list-table tr { grid-template-columns: minmax(0, 1fr); }
}

.copy-inline {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 100%;
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #fbfcfc;
  color: #1e262a;
  padding: 5px 7px;
  text-align: left;
}

.copy-inline span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-inline button {
  border: 0;
  border-radius: 6px;
  background: #eef1f1;
  color: #1e262a;
  cursor: pointer;
  font: inherit;
  padding: 2px 6px;
}

.payment-slip-preview {
  display: grid;
  gap: 12px;
  min-height: 420px;
}

.payment-slip-preview img,
.payment-slip-preview iframe {
  width: 100%;
  height: min(72vh, 720px);
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #f8fafc;
  object-fit: contain;
}

.payment-status-note {
  display: block;
  color: #5b5e61;
  font-size: 12px;
  margin-top: 4px;
}

@media (max-width: 980px) {
  .manual-hero,
  .manual-grid,
  .manual-checklist,
  .payment-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .manual-topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 16px;
  }

  .manual-main {
    width: min(100% - 20px, 1120px);
    padding-top: 16px;
  }

  .manual-hero,
  .manual-section,
  .manual-card {
    padding: 16px;
  }

  .manual-hero h2 {
    font-size: 26px;
  }

  .payment-dashboard-head,
  .payment-author-session,
  .payment-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-login-gate,
  .payment-author-session {
    margin-inline: 14px;
  }
}

.finance-list-heading {
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 18px 12px;
}

.table-wrap.compact {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  max-height: 360px;
  overflow: auto;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.90);
  padding: 6px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.workflow-tabs {
  gap: 8px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #475569;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.tab-button .icon {
  width: 17px;
  height: 17px;
}

.tab-button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tab-button.active {
  background: #0369a1;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(3, 105, 161, 0.22);
}

.tab-panel {
  display: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tab-panel.active { display: block; }

.panel-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(90deg, #ffffff 0%, #f8fafc 100%);
}

.panel-toolbar h2 {
  margin: 0;
  font-size: 18px;
  color: #0f172a;
  font-weight: 600;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-input,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  min-height: 44px;
  padding: 11px 15px;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, outline-color 0.16s ease;
}

.search-input:focus,
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: #0284c7;
  outline: 2px solid rgba(14, 165, 233, 0.16);
  outline-offset: 0;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
}

.search-input {
  width: min(340px, 48vw);
  max-width: 100%;
}

select {
  padding-right: 38px;
}

textarea {
  min-height: 96px;
  padding-top: 12px;
  resize: vertical;
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
  background: #fff;
}

.muted,
small {
  color: var(--muted);
}

.strong-cell {
  font-weight: 700;
}

.reviewer-person {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.reviewer-person strong {
  display: block;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.35;
}

.reviewer-person small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.reviewer-avatar,
.reviewer-photo-preview {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
}

.reviewer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
}

.reviewer-avatar img,
.reviewer-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#rp-avatar,
.reviewer-profile-avatar {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px !important;
  min-height: 76px !important;
  max-width: 76px !important;
  max-height: 76px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#rp-avatar img,
.reviewer-profile-avatar img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center 20% !important;
  display: block !important;
}

.reviewer-photo-field {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.reviewer-photo-preview {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  font-size: 22px;
}

.reviewer-photo-preview.empty,
.reviewer-avatar.empty {
  background: linear-gradient(135deg, #eef6ff, #f8fafc);
}

.reviewer-photo-field input[type="file"] {
  width: 100%;
}

.reviewer-photo-field small {
  font-weight: 400;
}

.empty-cell {
  color: var(--muted);
  padding: 28px 14px;
  text-align: center !important;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f5;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

td:last-child,
th:last-child { text-align: right; }

tr:hover td { background: #f8fbff; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.button.primary {
  background: #0369a1;
  border-color: #0369a1;
  color: white;
  box-shadow: 0 8px 18px rgba(3, 105, 161, 0.18);
}

.button.primary:hover {
  background: #075985;
  border-color: #075985;
}

.button.ghost {
  background: #fff;
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.button.ghost:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.button.danger {
  background: #fff5f5;
  border-color: #f3b3ad;
  color: var(--danger);
}

.button.danger:hover {
  background: #ffe4e0;
  border-color: #f97066;
}

.button.small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.button.full { width: 100%; }

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
  text-align: left;
}

.link-button:hover { color: var(--primary-dark); text-decoration: underline; }
.title-link { color: var(--text); }

.article-title-cell,
.article-title-cell .title-link {
  font-weight: 300;
}

.article-title-cell .title-link {
  line-height: 1.35;
}

.article-title-cell small {
  font-weight: 400;
}

.article-process-row td {
  border-top: 0;
  padding-top: 0;
}

.article-process-row > td:first-child {
  width: 1%;
}

.article-process-cell {
  padding-bottom: 14px;
}

.article-process-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px 12px;
  margin-top: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding: 8px 0 8px;
  border-top: 1px solid #eef2f7;
}

.article-process-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: max-content;
}

.article-process-label {
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.modal-panel.wide.article-tracking-panel {
  width: min(1080px, calc(100vw - 32px));
  max-height: min(90vh, 920px);
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 0;
  border-radius: 18px;
}

.article-tracking-panel .tracking-summary {
  align-items: flex-start;
  border-color: #e2e8f0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef8ff 100%);
  padding: 16px;
}

.article-tracking-panel .tracking-check-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.article-tracking-panel .tracking-check {
  grid-template-columns: auto max-content 1fr;
  min-height: 52px;
  font-weight: inherit !important;
}

.article-tracking-panel .tracking-check-done {
  border-color: #67e8f9;
  background: linear-gradient(135deg, #ecfeff 0%, #f0fdf4 100%);
}

.article-tracking-panel .reviewer-status-row {
  grid-template-columns: minmax(220px, 1fr) 240px;
}

.process-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
}

.process-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 30px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 5px;
  background: #f8fafc;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.process-dot[data-tooltip]::after {
  display: none;
}

.process-dot[data-tooltip]::before {
  display: none;
}

.process-dot[data-tooltip]:hover::after,
.process-dot[data-tooltip]:focus-visible::after {
  display: none;
}

.process-dot[data-tooltip]:hover::before,
.process-dot[data-tooltip]:focus-visible::before {
  display: none;
}

.floating-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 360px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.28);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  pointer-events: none;
  white-space: normal;
}

.process-dot.done {
  border-color: #a8ddb9;
  background: #ddf8ea;
  color: #087443;
}

.process-summary {
  align-self: center;
  display: inline-flex;
  margin-top: 0;
  color: #64748b;
  white-space: nowrap;
}

.tracking-section-title {
  margin: 4px 0 10px;
  font-size: 15px;
}

.tracking-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tracking-group-heading {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}

.tracking-check {
  display: grid !important;
  grid-template-columns: auto 58px 1fr;
  align-items: center;
  gap: 8px !important;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff;
  font-weight: 700 !important;
}

.tracking-check input { width: auto; }

.tracking-check-code {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.reviewer-status-panel {
  display: grid;
  gap: 10px;
}

.reviewer-status-list {
  display: grid;
  gap: 8px;
}

.reviewer-status-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.yellow { background: #fff7d6; color: #8a5a00; }
.badge.blue { background: #e4f1ff; color: #175cd3; }
.badge.green { background: #ddf8ea; color: #087443; }
.badge.orange { background: #fff0df; color: #a04b00; }
.badge.red { background: #ffe4e0; color: #b42318; }
.badge.gray { background: #eef1f5; color: #475467; }

.progress {
  height: 8px;
  border-radius: 999px;
  background: #e6eaf0;
  overflow: hidden;
  min-width: 120px;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}

.hidden { display: none !important; }

.modal-panel {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: min(90vh, 920px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 0;
}

.modal-panel.wide { width: min(1080px, calc(100vw - 32px)); }

.modal:not(#article-tracking-modal) .modal-panel > h3 {
  margin: 0;
  padding: 20px 64px 20px 24px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #0369a1 0%, #0e7490 48%, #047857 100%);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #64748b;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.modal-close:hover {
  background: #fff;
  color: #0f172a;
}

.stacked-form {
  display: grid;
  gap: 16px;
}

.modal:not(#article-tracking-modal) .modal-panel > .stacked-form {
  padding: 24px;
}

.stacked-form label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 600;
}

.stacked-form label.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #f8fafc;
}

.stacked-form label.checkbox-row input {
  width: 18px;
  height: 18px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.modal:not(#article-tracking-modal) .form-actions {
  border-top: 1px solid #e2e8f0;
  margin-top: 6px;
  padding-top: 16px;
}

.form-actions .button.danger:first-child {
  margin-right: auto;
}

.tracking-panel {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.integration-panel {
  padding: 16px;
  display: grid;
  gap: 18px;
}

.template-editor-panel {
  padding: 24px;
}

.template-token-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
  color: #475569;
  font-size: 12px;
}

.template-token-help strong {
  color: #0f172a;
}

.template-token-help code {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  padding: 3px 8px;
  color: #0369a1;
  font-size: 12px;
}

.integration-result {
  display: grid;
  gap: 12px;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-strip span {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: #344054;
  font-weight: 700;
}

.compact-table table {
  min-width: 980px;
}

.thaijo-select-cell {
  width: 48px;
  min-width: 48px;
  text-align: center;
}

.thaijo-import-check {
  width: 18px;
  height: 18px;
  accent-color: #0369a1;
  cursor: pointer;
}

.tracking-detail {
  display: grid;
  gap: 10px;
}

.tracking-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.tracking-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 220px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.reviewer-list {
  display: grid;
  gap: 6px;
}

.reviewer-pill {
  display: inline-flex;
  margin: 0 5px 5px 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6f1;
  color: #155d3b;
  font-size: 12px;
  font-weight: 700;
}

.budget-meta {
  display: grid;
  gap: 4px;
}

.budget-path {
  display: block;
  max-width: 260px;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.finance-evidence-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 16px;
}

.finance-evidence-context div,
.finance-evidence-item {
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 10px 12px;
}

.finance-evidence-context span,
.finance-evidence-item small {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.finance-evidence-context strong,
.finance-evidence-item strong {
  color: #1e262a;
  font-weight: 500;
}

.finance-evidence-list-wrap {
  margin-top: 16px;
}

.finance-evidence-list-wrap h4 {
  margin: 0 0 8px;
  color: #1e262a;
  font-size: 16px;
  font-weight: 500;
}

.finance-evidence-list {
  display: grid;
  gap: 8px;
}

.finance-evidence-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.honorarium-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dfe4e4;
  border-radius: 14px;
  background: #f8fafc;
  padding: 10px 12px;
}

.honorarium-picker-toolbar strong {
  color: #1e262a;
  font-weight: 500;
}

.honorarium-picker-list {
  display: grid;
  gap: 10px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 4px;
}

.honorarium-picker-item {
  display: grid;
  grid-template-columns: auto minmax(76px, 110px) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #dfe4e4;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
}

.honorarium-picker-item.existing {
  background: #f8fafc;
}

.honorarium-picker-item input {
  width: 18px;
  height: 18px;
}

.honorarium-picker-main {
  min-width: 0;
}

.honorarium-picker-main strong,
.honorarium-picker-main small {
  display: block;
}

.honorarium-picker-main strong {
  color: #1e262a;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.honorarium-picker-main small {
  margin-top: 3px;
  color: #64748b;
}

.honorarium-picker-item .money {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.screening-criteria-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.screening-admin-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #bae6fd;
  border-radius: 16px;
  background: #f0f9ff;
}

.screening-admin-card h4 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 300 !important;
}

.screening-admin-card p {
  margin: 4px 0 0;
  color: #0369a1;
  font-size: 13px;
}

.screening-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

.screening-card.wide,
.screening-final-card {
  grid-column: 1 / -1;
}

.screening-card h4 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 300 !important;
  line-height: 1.35;
}

.screening-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.screening-checklist {
  display: grid;
  gap: 8px;
}

.field-label {
  color: #344054;
  font-weight: 300 !important;
}

.screening-scope-field {
  display: grid;
  gap: 8px;
}

.screening-scope-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.screening-scope-group {
  display: grid;
  gap: 7px;
  align-content: start;
  padding: 12px;
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #fff;
}

.screening-scope-group strong {
  color: #1e262a;
  font-size: 13px;
  font-weight: 500 !important;
}

.screening-scope-decision {
  grid-column: 1 / -1;
}

.screening-checklist-score {
  margin-top: 6px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 600;
}

.screening-template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.screening-template-type-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px 6px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
}

.screening-template-type-toggle .type-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  padding-left: 6px;
}

.template-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 9999px;
  cursor: pointer;
  background: transparent;
  color: #334155;
  transition: all 0.15s ease;
  user-select: none;
}

.template-radio-label:has(input:checked) {
  background: #0284c7;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.template-radio-label input {
  display: none;
}

.screening-structure-container {
  margin: 10px 0 14px;
}

.screening-structure-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.structure-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.structure-box-header strong {
  font-size: 13px;
  color: #0f172a;
}

.structure-box-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.screening-checklist-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.structure-item-card {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  gap: 6px;
  transition: all 0.15s ease-in-out;
}

.structure-item-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.structure-item-card:focus-within {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.structure-item-card .check-row {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #1e293b;
  cursor: pointer;
}

.structure-item-card .check-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

.structure-item-comment-box {
  width: 100%;
}

.structure-item-comment {
  width: 100%;
  box-sizing: border-box;
  font-size: 12px;
  line-height: 1.4;
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  color: #1e293b;
  resize: vertical;
  min-height: 34px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.structure-item-comment::placeholder {
  color: #94a3b8;
  font-size: 11.5px;
}

.structure-item-comment:focus {
  border-color: #0284c7;
  outline: none;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.screening-review-structure-notes {
  margin-top: 8px;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
}

.screening-review-structure-notes strong {
  color: #334155;
}

.screening-review-structure-notes ul {
  margin: 4px 0 0 0;
  padding-left: 18px;
  color: #475569;
}

.screening-review-structure-notes li {
  margin-bottom: 2px;
}

@media (max-width: 768px) {
  .screening-checklist-compact {
    grid-template-columns: 1fr;
  }
}

.structure-status-row {
  margin-top: 10px;
  padding: 8px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
}

.screening-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .screening-rules-grid {
    grid-template-columns: 1fr;
  }
}

.screening-prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.screening-prompt-header h4 {
  margin: 0;
}

.screening-prompt-box {
  min-height: 260px;
  padding: 12px;
  border-color: #dbe4ee;
  background: #fff;
  color: #172033;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.6;
}

#screening-board-member-select {
  min-height: 150px;
}

.screening-admin-card small {
  color: #64748b;
  font-size: 12px;
}

.screening-mini-status {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
  max-width: 320px;
}

.screening-scope-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  max-width: 360px;
}

.screening-scope-badge {
  display: inline-flex;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  color: #075985;
  padding: 4px 7px;
  font-size: 11px;
}

.screening-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.screening-pill.yellow { background: #fff7d6; color: #8a5a00; }
.screening-pill.green { background: #ddf8ea; color: #087443; }
.screening-pill.orange { background: #fff0df; color: #a04b00; }
.screening-pill.red { background: #ffe4e0; color: #b42318; }
.screening-pill.gray { background: #eef1f5; color: #475467; }

.screening-pdf-card {
  background: #fff;
}

.screening-pdf-current {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
}

.screening-pdf-current.has-file {
  border-style: solid;
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

.screening-pdf-current a,
.screening-pdf-badge {
  color: #0369a1;
  font-weight: 600;
  text-decoration: none;
}

.screening-pdf-current a:hover,
.screening-pdf-badge:hover {
  color: #075985;
  text-decoration: underline;
}

.screening-pdf-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #f0f9ff;
  font-size: 12px;
  white-space: nowrap;
}

.screening-pdf-badge.missing {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
  font-weight: 400;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 0;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}

.notification-panel {
  width: min(640px, calc(100vw - 32px));
}

.notification-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 24px 64px 0 24px;
}

.notification-modal-head h3 {
  margin: 0;
}

.notification-modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.notification-list {
  display: grid;
  gap: 10px;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding: 0 24px 24px;
}

.notification-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.notification-item.unread {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.notification-item strong {
  color: #0f172a;
  font-weight: 500;
}

.notification-item p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.notification-meta {
  color: #64748b;
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 110;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #172033;
  color: #fff;
  box-shadow: var(--shadow);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #edf2f7;
}

.auth-shell,
.install-shell {
  width: min(520px, 100%);
}

.install-shell { width: min(760px, 100%); }

.auth-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-panel { max-width: 440px; margin: 0 auto; }

.notice {
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 14px 0;
  font-weight: 700;
}

.notice.success { background: #ddf8ea; color: #087443; }
.notice.danger { background: #ffe4e0; color: var(--danger); }

.check-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
  font-weight: 400 !important;
}

.check-row input { width: auto; }

.config-preview {
  width: 100%;
  min-height: 180px;
  margin-top: 14px;
  font-family: Consolas, monospace;
  font-size: 12px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  width: 100%;
}

body,
button,
input,
select,
textarea,
.topbar h1,
.auth-panel h1,
.eyebrow,
.user-chip span,
.stat-card span,
.stat-card strong,
.tab-button,
.panel-toolbar h2,
.button,
.link-button,
.strong-cell,
th,
td,
.badge,
.stacked-form label,
.modal:not(#article-tracking-modal) .modal-panel > h3,
.tracking-section-title,
.tracking-group-heading,
.tracking-check,
.reviewer-status-row,
.reviewer-pill,
.summary-strip span,
.notice,
strong {
  font-weight: 300 !important;
}

.code-cell,
.code-cell *,
.code-cell-inline,
thead th:first-child,
tbody td:first-child,
tbody td:first-child *,
.process-dot,
.tracking-check-code {
  font-weight: 600 !important;
}

.empty-cell {
  font-weight: 300 !important;
}

@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-lower-grid { grid-template-columns: 1fr; }
  .report-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-grid,
  .report-grid-quad { grid-template-columns: 1fr; }
  .admin-control-grid { grid-template-columns: 1fr; }
  .finance-workflow-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .topbar,
  .panel-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell { padding: 16px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-heading { flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .report-summary-grid { grid-template-columns: 1fr; }
  .report-shell { padding: 12px; }
  .admin-center { padding: 12px; }
  .admin-flow {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .admin-flow i { display: none; }
  .admin-role-list li {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-role-list em { text-align: left; }
  .finance-workflow-panel { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { align-items: stretch; flex-direction: column; }
  .search-input { width: 100%; max-width: none; }
  .topbar-brand,
  .management-nav,
  .help-nav,
  .user-chip {
    width: 100%;
  }
  .management-nav {
    justify-content: flex-start;
  }
  .help-nav {
    justify-content: flex-start;
    margin-left: 0 !important;
  }
  .management-dropdown {
    width: auto;
  }
  .management-dropdown summary {
    width: 40px;
    justify-content: center;
  }
  .management-dropdown-menu {
    left: 0;
    right: auto;
    width: min(240px, calc(100vw - 32px));
  }
  .form-grid.two,
  .tracking-row,
  .tracking-check-grid,
  .reviewer-status-row,
  .reviewer-photo-field,
  .screening-scope-options,
  .screening-criteria-grid { grid-template-columns: 1fr; }
  .article-tracking-panel .tracking-check-grid,
  .article-tracking-panel .reviewer-status-row,
  .article-tracking-panel .form-grid.two { grid-template-columns: 1fr; }
  .user-chip { flex-wrap: wrap; }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  html,
  body {
    width: 190mm !important;
    min-width: 0 !important;
    background: #fff !important;
    color: #111827 !important;
    font-size: 10.5pt;
    line-height: 1.35;
    overflow: visible !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .topbar,
  .stat-grid,
  .dashboard-synthesis,
  .workflow-tabs,
  .tab-panel:not(#tab-reports),
  .modal,
  .toast,
  .report-toolbar .toolbar-actions,
  .report-print-button {
    display: none !important;
  }

  .app-shell {
    width: 190mm !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #tab-reports {
    display: block !important;
    width: 190mm !important;
    max-width: 190mm !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    overflow: visible !important;
  }

  .report-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .report-panel .report-toolbar {
    display: flex !important;
    margin-bottom: 10mm;
    border: 1px solid #1e262a !important;
    border-radius: 0 !important;
    background: #1e262a !important;
    color: #fff !important;
    break-after: avoid;
  }

  .report-summary-card,
  .report-card {
    width: 100% !important;
    max-width: 100% !important;
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #9ca3af !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .report-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4mm !important;
    margin-bottom: 8mm !important;
    break-after: page;
  }

  .report-summary-section {
    margin-bottom: 0 !important;
  }

  .report-summary-section .report-card-head {
    margin-bottom: 4mm;
  }

  .report-summary-card {
    min-height: auto !important;
    padding: 4mm !important;
  }

  .report-summary-card strong {
    font-size: 18pt !important;
  }

  .report-grid,
  .report-grid-quad {
    display: block !important;
    width: 100% !important;
  }

  .report-card {
    margin: 0 0 8mm !important;
  }

  .report-card-wide {
    break-after: page;
  }

  .report-grid > .report-card:first-child {
    break-after: page;
  }

  .report-grid-quad > .report-card {
    break-after: page;
  }

  .report-grid-quad > .report-card:last-child,
  .report-shell > .report-card:last-child {
    break-after: auto;
  }

  .report-card-head {
    border-bottom: 1px solid #1e262a !important;
    background: #1e262a !important;
    color: #fff !important;
    padding: 4mm 5mm !important;
  }

  .report-action-list,
  .report-bars,
  .report-scope-list {
    padding: 5mm !important;
  }

  .report-action {
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 3mm !important;
  }

  .compact-table {
    max-height: none !important;
    overflow: visible !important;
  }

  table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    page-break-inside: auto;
  }

  th,
  td {
    padding: 2.2mm 2.5mm !important;
    font-size: 9.5pt !important;
    line-height: 1.32 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  thead {
    display: table-header-group;
  }

  body[data-print-section] .report-panel .report-toolbar {
    display: none !important;
  }

  body[data-print-section] .report-print-section {
    display: none !important;
  }

  body[data-print-section="report-summary-section"] #report-summary-section,
  body[data-print-section="report-functions-section"] #report-functions-section,
  body[data-print-section="report-actions-section"] #report-actions-section,
  body[data-print-section="report-submission-section"] #report-submission-section,
  body[data-print-section="report-desk-review-section"] #report-desk-review-section,
  body[data-print-section="report-finance-section"] #report-finance-section,
  body[data-print-section="report-letters-section"] #report-letters-section,
  body[data-print-section="report-scope-section"] #report-scope-section {
    display: block !important;
    width: 190mm !important;
    max-width: 190mm !important;
    margin: 0 !important;
    break-after: auto !important;
    page-break-after: auto !important;
  }

  body[data-print-section] .report-grid,
  body[data-print-section] .report-grid-quad {
    display: block !important;
  }

  body[data-print-section] .report-summary-grid {
    break-after: auto !important;
    page-break-after: auto !important;
    margin-bottom: 0 !important;
  }
}

/* Empire Admin inspired visual refresh */
:root {
  --bg: #eef1f1;
  --panel: #ffffff;
  --text: #1e262a;
  --muted: #5b5e61;
  --line: #dfe4e4;
  --primary: #e96231;
  --primary-dark: #1e262a;
  --accent: #689e61;
  --warn: #e96231;
  --danger: #c6372b;
  --radius: 8px;
  --shadow: 0 10px 28px rgba(30, 38, 42, 0.08);
}

body {
  background: #eef1f1;
  color: #1e262a;
}

.topbar {
  background: #1e262a;
  border-bottom: 0;
  box-shadow: 0 10px 28px rgba(30, 38, 42, 0.18);
}

.topbar h1,
.topbar .eyebrow,
.topbar .user-chip span {
  color: #ffffff;
}

.topbar .eyebrow,
.topbar .user-chip small {
  color: rgba(255, 255, 255, 0.68);
}

.topbar-icon-button,
.management-dropdown summary,
.user-chip {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.topbar-icon-button:hover,
.topbar-icon-button:focus-visible,
.management-dropdown summary:hover,
.management-dropdown[open] summary {
  border-color: rgba(233, 98, 49, 0.78);
  background: rgba(233, 98, 49, 0.14);
  color: #ffffff;
}

.management-dropdown-menu {
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(30, 38, 42, 0.16);
}

.management-dropdown-menu a:hover,
.management-dropdown-menu button:hover {
  background: #fff3ee;
  color: #e96231;
}

.app-shell {
  background: #eef1f1;
}

.stat-card,
.dashboard-synthesis,
.dashboard-card,
.tab-panel,
.finance-stage,
.finance-batch-section,
.budget-summary-card,
.screening-card,
.modal-panel,
.auth-panel {
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(30, 38, 42, 0.08);
}

.stat-card {
  position: relative;
  overflow: hidden;
  border-left: 4px solid #e96231;
}

.stat-card strong,
.dashboard-card > strong,
.dashboard-synthesis h2,
.panel-toolbar h2,
.modal-panel h3,
.auth-panel h1 {
  color: #1e262a;
}

.stat-card span,
.dashboard-card > span,
.dashboard-card-head span,
.dashboard-metric span,
.dashboard-status-row span,
.dashboard-empty-state,
.section-heading p,
.panel-toolbar p,
.muted-text {
  color: #5b5e61;
}

.dashboard-card-head {
  border-bottom: 1px solid #dfe4e4;
}

.dashboard-priority {
  border-color: #ffd3c4;
  background: #fff3ee;
  color: #b94921;
}

.dashboard-health-badge.good,
.dashboard-health-badge.solid,
.dashboard-status-ok {
  background: #edf7eb;
  color: #477941;
}

.dashboard-health-badge.watch,
.dashboard-status-warn {
  background: #fff3ee;
  color: #b94921;
}

.dashboard-health-badge.risk,
.dashboard-status-danger {
  background: #ffecea;
  color: #c6372b;
}

.dashboard-meter-fill {
  background: linear-gradient(90deg, #e96231, #689e61);
}

.dashboard-alert-item {
  border-color: #dfe4e4;
  background: #fbfcfc;
}

.dashboard-alert-item.urgent,
.dashboard-alert-item.warn {
  border-color: #ffd3c4;
  background: #fff7f3;
}

.workflow-tabs {
  border-color: #dfe4e4;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(30, 38, 42, 0.06);
}

.tab-button {
  color: #5b5e61;
}

.tab-button:hover {
  background: #f4f6f6;
  color: #1e262a;
}

.tab-button.active {
  background: #1e262a;
  color: #ffffff;
  box-shadow: none;
}

.panel-toolbar {
  border: 1px solid #dfe4e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(30, 38, 42, 0.06);
}

input,
select,
textarea,
.search-input {
  border-color: #ccd3d4;
  border-radius: 8px;
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus,
.search-input:focus {
  border-color: #e96231;
  box-shadow: 0 0 0 3px rgba(233, 98, 49, 0.14);
  outline: none;
}

thead th {
  background: #f4f6f6;
  color: #5b5e61;
}

tbody tr:hover {
  background: #fff8f4;
}

.button.primary,
button.primary {
  border-color: #e96231;
  background: #e96231;
  color: #ffffff;
}

.button.primary:hover,
button.primary:hover {
  border-color: #d14f22;
  background: #d14f22;
}

.button.ghost,
button.ghost,
.link-button {
  color: #1e262a;
}

.button.ghost:hover,
button.ghost:hover,
.link-button:hover {
  border-color: #ffd3c4;
  background: #fff3ee;
  color: #e96231;
}

.badge {
  border-radius: 999px;
  border-color: #dfe4e4;
  background: #f4f6f6;
  color: #1e262a;
}

.badge.success,
.status-chip.success {
  border-color: #cbe7c7;
  background: #edf7eb;
  color: #477941;
}

.badge.warning,
.status-chip.warning {
  border-color: #ffd3c4;
  background: #fff3ee;
  color: #b94921;
}

.badge.danger,
.status-chip.danger {
  border-color: #f4c3bf;
  background: #ffecea;
  color: #c6372b;
}

.code-cell,
.code-cell-inline,
.process-dot {
  color: #1e262a;
}

#tab-admin > .panel-toolbar,
#tab-letter-templates > .panel-toolbar,
#tab-thaijo > .panel-toolbar {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px 8px 0 0;
  background: #1e262a;
  box-shadow: none;
}

#tab-admin > .panel-toolbar h2,
#tab-letter-templates > .panel-toolbar h2,
#tab-thaijo > .panel-toolbar h2 {
  color: #ffffff;
}

#tab-admin > .panel-toolbar .search-input,
#tab-thaijo > .panel-toolbar .search-input {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.96);
}

#tab-admin > .panel-toolbar .button.ghost,
#tab-letter-templates > .panel-toolbar .button.ghost,
#tab-thaijo > .panel-toolbar .button.ghost {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

#tab-admin > .panel-toolbar .button.ghost:hover,
#tab-letter-templates > .panel-toolbar .button.ghost:hover,
#tab-thaijo > .panel-toolbar .button.ghost:hover {
  border-color: rgba(233, 98, 49, 0.78);
  background: rgba(233, 98, 49, 0.16);
  color: #ffffff;
}

.management-dropdown-menu {
  border-color: rgba(255, 255, 255, 0.14);
  background: #1e262a;
  box-shadow: 0 18px 42px rgba(30, 38, 42, 0.24);
}

.management-dropdown-menu .tab-button {
  color: rgba(255, 255, 255, 0.82);
}

.management-dropdown-menu .icon {
  color: currentColor;
  opacity: 0.86;
}

.management-dropdown-menu .tab-button:hover,
.management-dropdown-menu .tab-button.active {
  background: rgba(233, 98, 49, 0.18);
  color: #ffffff;
}

#tab-reviewers > .panel-toolbar,
#tab-letters > .panel-toolbar,
#tab-budget > .panel-toolbar,
#tab-admin > .panel-toolbar,
#tab-letter-templates > .panel-toolbar,
#tab-thaijo > .panel-toolbar {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px 8px 0 0;
  background: #1e262a;
  box-shadow: none;
}

#tab-reviewers > .panel-toolbar h2,
#tab-letters > .panel-toolbar h2,
#tab-budget > .panel-toolbar h2,
#tab-admin > .panel-toolbar h2,
#tab-letter-templates > .panel-toolbar h2,
#tab-thaijo > .panel-toolbar h2 {
  color: #ffffff;
}

#tab-reviewers > .panel-toolbar .search-input,
#tab-letters > .panel-toolbar .search-input,
#tab-budget > .panel-toolbar .search-input,
#tab-admin > .panel-toolbar .search-input,
#tab-thaijo > .panel-toolbar .search-input {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.96);
}

#tab-reviewers > .panel-toolbar .button.ghost,
#tab-letters > .panel-toolbar .button.ghost,
#tab-budget > .panel-toolbar .button.ghost,
#tab-admin > .panel-toolbar .button.ghost,
#tab-letter-templates > .panel-toolbar .button.ghost,
#tab-thaijo > .panel-toolbar .button.ghost {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

#tab-reviewers > .panel-toolbar .button.ghost:hover,
#tab-letters > .panel-toolbar .button.ghost:hover,
#tab-budget > .panel-toolbar .button.ghost:hover,
#tab-admin > .panel-toolbar .button.ghost:hover,
#tab-letter-templates > .panel-toolbar .button.ghost:hover,
#tab-thaijo > .panel-toolbar .button.ghost:hover {
  border-color: rgba(233, 98, 49, 0.78);
  background: rgba(233, 98, 49, 0.16);
  color: #ffffff;
}

body .topbar {
  background: #1e262a !important;
  border-bottom: 0 !important;
  box-shadow: 0 10px 28px rgba(30, 38, 42, 0.18) !important;
}

body .topbar .eyebrow,
body .topbar h1,
body .topbar .user-chip span,
body .topbar .user-chip small {
  color: #ffffff !important;
}

body .topbar .eyebrow,
body .topbar .user-chip small {
  opacity: 0.72;
}

body .topbar .user-chip,
body .topbar .topbar-icon-button,
body .topbar .management-dropdown summary {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

body .topbar .topbar-icon-button:hover,
body .topbar .topbar-icon-button:focus-visible,
body .topbar .management-dropdown summary:hover,
body .topbar .management-dropdown[open] summary {
  border-color: rgba(233, 98, 49, 0.78) !important;
  background: rgba(233, 98, 49, 0.14) !important;
  color: #ffffff !important;
}

/* Layout proportion pass: denser admin dashboard first viewport */
body .topbar {
  min-height: 68px !important;
  gap: 16px !important;
  padding: 12px 32px !important;
}

body .topbar-brand {
  min-width: 300px;
}

body .topbar h1 {
  margin-top: 0 !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
  font-weight: 400 !important;
}

body .topbar .eyebrow {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

body .topbar .user-chip {
  min-height: 38px !important;
  gap: 7px !important;
  padding: 4px 6px 4px 10px !important;
  border-radius: 10px !important;
}

body .topbar .topbar-icon-button,
body .topbar .management-dropdown summary {
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 10px !important;
}

body .topbar .user-chip span {
  font-size: 14px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
}

body .topbar .user-chip small {
  padding: 2px 8px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  background: #eef1f1 !important;
  color: #1e262a !important;
  opacity: 1 !important;
  font-weight: 500 !important;
}

body .topbar .icon {
  width: 17px !important;
  height: 17px !important;
}

body .app-shell {
  max-width: 1480px !important;
  padding: 18px 32px 40px !important;
}

body .stat-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-bottom: 16px !important;
}

body .stat-grid .stat-card:nth-child(n+5) {
  display: none !important;
}

body .stat-card {
  min-height: 84px !important;
  padding: 14px 16px !important;
  border-radius: 8px !important;
}

body .stat-card span {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

body .stat-card strong {
  margin-top: 8px !important;
  font-size: 26px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
}

body .dashboard-synthesis {
  margin-bottom: 16px !important;
  padding: 16px !important;
  border-radius: 8px !important;
}

body .dashboard-heading {
  align-items: center !important;
  margin-bottom: 12px !important;
}

body .dashboard-heading h2 {
  margin-top: 2px !important;
  font-size: 20px !important;
  line-height: 1.2 !important;
}

body .dashboard-health-badge {
  padding: 6px 10px !important;
}

body .dashboard-grid {
  grid-template-columns: minmax(300px, 1.08fr) repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body .dashboard-lower-grid {
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.45fr) !important;
  gap: 12px !important;
  margin-top: 12px !important;
}

body .dashboard-card {
  padding: 12px !important;
  border-radius: 8px !important;
}

body .dashboard-card > strong {
  margin-top: 5px !important;
  font-size: 20px !important;
  line-height: 1.25 !important;
  font-weight: 400 !important;
}

body .dashboard-card p {
  margin-top: 6px !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

body .dashboard-metric-list,
body .dashboard-alert-list,
body .dashboard-status-bars {
  gap: 7px !important;
  margin-top: 8px !important;
}

body .dashboard-metric {
  gap: 6px 8px !important;
}

body .dashboard-meter {
  height: 5px !important;
}

body .dashboard-alert {
  padding: 8px 10px !important;
  border-radius: 8px !important;
}

body .dashboard-empty {
  padding: 10px 12px !important;
  border-radius: 8px !important;
}

body .workflow-tabs {
  margin-bottom: 14px !important;
  padding: 5px !important;
  border-radius: 8px !important;
}

body .workflow-label {
  padding: 0 4px !important;
  font-size: 12px !important;
}

body .workflow-tabs .tab-button {
  min-height: 40px !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
}

body .tab-panel {
  border-radius: 8px !important;
}

body .panel-toolbar {
  min-height: 56px !important;
  padding: 12px 18px !important;
  border-radius: 8px 8px 0 0 !important;
}

body .panel-toolbar h2 {
  font-size: 17px !important;
  line-height: 1.2 !important;
}

@media (max-width: 1180px) {
  body .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body .dashboard-grid,
  body .dashboard-lower-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 720px) {
  body .topbar {
    padding: 12px 16px !important;
  }

  body .app-shell {
    padding: 14px 16px 32px !important;
  }

  body .stat-grid,
  body .dashboard-grid,
  body .dashboard-lower-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Role-based and modal visibility must override all layout declarations. */
body .hidden {
  display: none !important;
}
.topbar-action-form {
  margin: 0;
}

/* Searchable Reviewer Combobox Styles */
.reviewer-combobox {
  position: relative;
  width: 100%;
  z-index: 20;
}

.reviewer-combobox:focus-within {
  z-index: 100;
}

.reviewer-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 34px 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background-color: #fff;
  font-size: 13.5px;
  font-weight: 400;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.reviewer-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.reviewer-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reviewer-clear-btn:hover {
  color: #475569;
  background-color: #f1f5f9;
}

.reviewer-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  z-index: 999;
}

.reviewer-option {
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.1s;
}

.reviewer-option:last-child {
  border-bottom: none;
}

.reviewer-option:hover,
.reviewer-option.highlighted {
  background-color: #f0f9ff;
}

.reviewer-option.selected {
  background-color: #e0f2fe;
}

.reviewer-code-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  background-color: #e0f2fe;
  color: #0369a1;
  border-radius: 4px;
  margin-right: 6px;
}

/* ============================================================
   ARTICLE TRACKING MODAL - REVAMPED NEAT LAYOUT
   ============================================================ */

.modal-panel.wide.article-tracking-panel {
  width: min(1060px, calc(100vw - 32px));
  height: min(90vh, 880px);
  max-height: min(90vh, 880px);
  overflow: hidden !important;
  padding: 0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
  border: 1px solid #cbd5e1;
  display: flex !important;
  flex-direction: column !important;
}

/* Modal Top Header - Fixed at Top */
.article-tracking-header {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #0d9488 100%);
  padding: 16px 24px;
  color: #ffffff;
  position: relative;
  flex-shrink: 0;
}

.tracking-header-journal {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

/* Modal Form Container */
#article-tracking-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.article-tracking-form-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-tracking-form-body > * {
  flex-shrink: 0 !important;
}

.article-tracking-panel svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  flex-shrink: 0 !important;
}

/* Article Summary & Status Row */
.tracking-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
  border: 1px solid #cbd5e1;
  border-radius: 14px;
}

.tracking-header-info {
  min-width: 0;
  flex: 1 1 300px;
}

.tracking-header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Cards (Article box & Reviewer cards) */
.tracking-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: border-color 0.2s;
  flex-shrink: 0 !important;
}


.tracking-card:hover {
  border-color: #94a3b8;
}

.tracking-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.tracking-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Badges */
.tracking-badge-rev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff !important;
  background: #0284c7;
  letter-spacing: 0.02em;
}

.tracking-badge-rev.rev-2 {
  background: #0f766e;
}

.tracking-badge-rev.rev-3 {
  background: #d97706;
}

.tracking-badge-rev.rev-4 {
  background: #7c3aed;
}

.tracking-badge-rev.rev-5 {
  background: #db2777;
}

.tracking-badge-rev.rev-6 {
  background: #475569;
}

.tracking-badge-unassigned {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  font-style: italic;
}

.tracking-code-pill {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  border-radius: 4px;
}

/* Workflow Checkbox Pills */
.tracking-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tracking-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.tracking-pill:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.tracking-pill input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: #0284c7;
}

.tracking-pill .pill-code {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.04em;
}

.tracking-pill.active {
  background: #f0f9ff;
  border-color: #0284c7;
  color: #0369a1;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15);
}

.tracking-pill.active .pill-code {
  background: #bae6fd;
  color: #0369a1;
}

/* Special styling for Pay-R and Paid */
.tracking-pill.pill-paid.active {
  background: #ecfdf5;
  border-color: #059669;
  color: #065f46;
}

.tracking-pill.pill-paid.active .pill-code {
  background: #a7f3d0;
  color: #065f46;
}

/* Special styling for CERT (Certificate) */
.tracking-pill.pill-cert.active {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #15803d;
}

.tracking-pill.pill-cert.active .pill-code {
  background: #bbf7d0;
  color: #15803d;
}

/* Special styling for DEC (Declined) */
.tracking-pill.pill-declined.active {
  background: #fff1f2;
  border-color: #e11d48;
  color: #9f1239;
}

.tracking-pill.pill-declined.active .pill-code {
  background: #fecdd3;
  color: #9f1239;
}

/* Special styling for CAN (Cancelled) */
.tracking-pill.pill-cancelled.active {
  background: #f8fafc;
  border-color: #64748b;
  color: #334155;
}

.tracking-pill.pill-cancelled.active .pill-code {
  background: #e2e8f0;
  color: #334155;
}

/* Evaluation and Payment Fields Container */
.tracking-fields-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}

.tracking-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: flex-start;
}

.tracking-input-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tracking-input-label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tracking-input-control {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tracking-input-control:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.tracking-bank-hint {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tracking-bank-hint strong {
  color: #334155;
}

.tracking-bank-hint button {
  background: none;
  border: none;
  color: #0284c7;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.tracking-bank-hint button:hover {
  color: #0369a1;
}

/* Action Footer - Fixed at Bottom */
.tracking-modal-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 24px;
  background: #ffffff;
  border-top: 1px solid #cbd5e1;
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.04);
  z-index: 10;
}

/* ==========================================================================
   Reviewer Academic Badges (Scholar, Scopus, ORCID)
   ========================================================================== */
.reviewer-academic-badges {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px !important;
  margin-top: 3px !important;
  max-width: 100% !important;
}

.reviewer-academic-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3.5px !important;
  padding: 1px 5px !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  height: 18px !important;
  border-radius: 3px !important;
  border-width: 1px !important;
  border-style: solid !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: all 0.15s ease-in-out !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.reviewer-academic-badge svg {
  width: 11px !important;
  height: 11px !important;
  min-width: 11px !important;
  max-width: 11px !important;
  min-height: 11px !important;
  max-height: 11px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

.reviewer-academic-badge .badge-icon-text {
  font-size: 9.5px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.5px !important;
}

.reviewer-academic-badge span {
  display: inline-block !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

/* Scholar Badge */
.reviewer-academic-badge.scholar-badge {
  background-color: #f0f9ff !important;
  border-color: #bae6fd !important;
  color: #0369a1 !important;
}
.reviewer-academic-badge.scholar-badge svg {
  color: #0284c7 !important;
  fill: #0284c7 !important;
}
.reviewer-academic-badge.scholar-badge:hover {
  background-color: #e0f2fe !important;
  color: #0c4a6e !important;
  border-color: #7dd3fc !important;
}

/* Scopus Badge */
.reviewer-academic-badge.scopus-badge {
  background-color: #fffbeb !important;
  border-color: #fde68a !important;
  color: #b45309 !important;
}
.reviewer-academic-badge.scopus-badge .badge-icon-text {
  color: #d97706 !important;
}
.reviewer-academic-badge.scopus-badge:hover {
  background-color: #fef3c7 !important;
  color: #78350f !important;
  border-color: #fcd34d !important;
}

/* ORCID Badge */
.reviewer-academic-badge.orcid-badge {
  background-color: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
  color: #15803d !important;
}
.reviewer-academic-badge.orcid-badge svg {
  color: #a6ce39 !important;
  fill: #a6ce39 !important;
}
.reviewer-academic-badge.orcid-badge:hover {
  background-color: #dcfce7 !important;
  color: #14532d !important;
  border-color: #86efac !important;
}

#payment-batch-toolbar {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
#payment-batch-toolbar.hidden {
  display: none !important;
}
