:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f9fbfc;
  --line: #e1e7eb;
  --line-strong: #cbd5dc;
  --text: #17212b;
  --muted: #6b7885;
  --green: #16734f;
  --green-soft: #e8f4ef;
  --blue: #275fbd;
  --blue-soft: #eaf1fb;
  --amber: #a86400;
  --amber-soft: #fff3dc;
  --red: #b42318;
  --red-soft: #ffe9e7;
  --ink: #26323c;
  --accent: #16734f;
  --accent-strong: #0f5c3f;
  --sidebar: #132027;
  --sidebar-soft: #1d2d35;
  --shadow: 0 14px 32px rgba(29, 44, 55, 0.08);
  --shadow-soft: 0 8px 18px rgba(29, 44, 55, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: #10191e;
}

.login-screen.hidden {
  display: none;
}

.login-card {
  width: min(380px, calc(100% - 32px));
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.login-card p {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}

.login-brand {
  color: var(--text);
  margin-bottom: 6px;
}

.app-locked {
  filter: blur(2px);
  pointer-events: none;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar);
  color: #ecf2f4;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e8a63, #275fbd);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.sidebar-footer span {
  color: #9fb0b7;
  font-size: 12px;
  margin-top: 3px;
}

.nav {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding-right: 2px;
}

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

.nav-label {
  color: #8da1ad;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 0 12px 3px;
}

.nav-item {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #c9d5d9;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
}

.nav-item span {
  width: 22px;
  text-align: center;
  color: #8fb2a5;
}

.nav-item.active,
.nav-item:hover {
  background: var(--sidebar-soft);
  color: #fff;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 #36b37e;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main {
  min-width: 0;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.top-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-search-btn,
.talent-action-btn {
  position: relative;
  isolation: isolate;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  white-space: nowrap;
  overflow: hidden;
  text-align: center;
}

.top-search-btn span,
.talent-action-btn span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  line-height: 1;
}

.top-search-btn {
  min-width: 112px;
  padding: 0 18px;
  border-radius: 999px;
  border-color: rgba(14, 165, 233, 0.3);
  background:
    radial-gradient(circle at 16% 12%, rgba(14, 165, 233, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 255, 0.94));
  color: #0f4f6b;
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.top-search-btn::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 999px;
  opacity: 0.86;
}

.top-search-btn::after {
  content: "";
  position: absolute;
  left: 31px;
  top: 22px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  opacity: 0.86;
}

.top-search-btn:hover {
  border-color: rgba(14, 165, 233, 0.52);
  background:
    radial-gradient(circle at 16% 12%, rgba(14, 165, 233, 0.28), transparent 34%),
    linear-gradient(135deg, #fff, #e9f7ff);
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.talent-action-btn {
  min-width: 106px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 14px 30px rgba(7, 19, 29, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.36);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.talent-action-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.34), transparent 42%, rgba(255, 255, 255, 0.14));
  pointer-events: none;
}

.talent-action-btn::after {
  content: "";
  position: absolute;
  inset: auto 12px 5px;
  z-index: 0;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  opacity: 0.8;
}

.talent-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(7, 19, 29, 0.16), 0 0 22px rgba(14, 165, 233, 0.13);
}

.talent-action-parse {
  border-color: rgba(14, 165, 233, 0.42);
  background: linear-gradient(135deg, #effaff, #dff4ff 44%, #eef8ff);
  color: #075985;
}

.talent-action-parse:hover {
  border-color: rgba(14, 165, 233, 0.68);
  background: linear-gradient(135deg, #ffffff, #d8f2ff 48%, #ecf8ff);
}

.talent-action-batch {
  border-color: rgba(79, 70, 229, 0.34);
  background: linear-gradient(135deg, #f6f4ff, #ebe8ff 48%, #f5fbff);
  color: #3730a3;
}

.talent-action-batch:hover {
  border-color: rgba(79, 70, 229, 0.58);
  background: linear-gradient(135deg, #ffffff, #e5e1ff 48%, #f1f7ff);
}

.talent-action-add {
  border-color: rgba(0, 168, 120, 0.38);
  background: linear-gradient(135deg, #10b981, #0ea5e9 58%, #2563eb);
  color: #fff;
}

.talent-action-add:hover {
  border-color: rgba(14, 165, 233, 0.62);
  background: linear-gradient(135deg, #059669, #0ea5e9 58%, #1d4ed8);
}

.user-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 12px;
}

.primary-btn,
.icon-btn,
.danger-btn,
.ghost-btn {
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 36px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

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

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

.icon-btn {
  width: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border-color: var(--line);
  font-size: 18px;
}

.danger-btn {
  color: var(--red);
  border-color: #f2b8b5;
}

.table-action-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.offer-action-cell {
  display: inline-grid;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.offer-action-cell.pending {
  padding: 4px 6px;
  border: 1px solid rgba(180, 35, 24, 0.22);
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 700;
}

.offer-action-cell.pending span {
  font-size: 12px;
  white-space: nowrap;
}

.offer-send-btn {
  background: #fff;
  border-color: rgba(180, 35, 24, 0.38);
}

.offer-send-btn:hover {
  background: #fff7f6;
  border-color: rgba(180, 35, 24, 0.62);
}

.ghost-btn {
  border-color: var(--line);
}

.ghost-btn:hover,
.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

.workspace {
  padding: 22px 28px 36px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

#dashboardView .metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

#dashboardView .metric {
  min-height: 64px;
  padding: 10px 12px;
  justify-content: center;
  gap: 8px;
}

#dashboardView .metric span {
  font-size: 11px;
  white-space: nowrap;
}

#dashboardView .metric strong {
  font-size: 21px;
  line-height: 1;
}

.dashboard-top-filters {
  margin-bottom: 14px;
  padding-bottom: 8px;
}

.dashboard-top-filters .panel-head {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.dashboard-top-filters .hr-daily-filters {
  margin-bottom: 0;
}

@media (max-width: 1180px) {
  #dashboardView .metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  }
}

@media (max-width: 640px) {
  #dashboardView .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.metric,
.panel,
.table-panel,
.toolbar,
.map-card,
.position-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.metric {
  min-height: 96px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}

.detail-click {
  cursor: pointer;
}

.detail-click:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.metric span,
.panel-head span,
.tiny,
td small {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.metric:hover {
  transform: translateY(-1px);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 16px;
}

.panel-head {
  min-height: 32px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.funnel {
  display: grid;
  gap: 10px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 6px;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.funnel-row:hover,
.bar-chart-row:hover {
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: #edf1f3;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #2d8bd4);
  border-radius: inherit;
}

.compact-list,
.followup-list {
  display: grid;
  gap: 10px;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  display: grid;
  gap: 7px;
  background: var(--panel-soft);
}

.list-item:hover,
.ledger-item:hover,
.finance-card:hover,
.account-item:hover,
.submission-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.list-item button {
  justify-self: start;
}

.position-strip,
.board,
.map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.position-card,
.map-card {
  padding: 14px;
  min-height: 146px;
}

.position-card header,
.map-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
}

.position-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.position-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(185, 201, 215, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(228, 243, 255, 0.92), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at top right, rgba(46, 125, 163, 0.18), transparent 34%);
  box-shadow: var(--shadow-soft);
}

.position-hero h2 {
  margin: 2px 0 6px;
  font-size: 22px;
}

.position-hero span {
  color: var(--muted);
  font-size: 13px;
}

.position-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 10px;
}

.position-hero-metrics span {
  display: grid;
  gap: 2px;
  min-width: 88px;
  padding: 10px 12px;
  border: 1px solid rgba(185, 201, 215, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.position-hero-metrics strong {
  color: var(--ink);
  font-size: 22px;
}

.position-form {
  align-items: start;
}

.position-form textarea {
  min-height: 150px;
}

.position-import-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(185, 201, 215, 0.72);
}

.position-import-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.position-import-head strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.position-import-head span {
  color: var(--muted);
  font-size: 12px;
}

.template-link {
  text-decoration: none;
}

.position-import-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) 140px;
  gap: 12px;
  align-items: stretch;
}

.position-import-file {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px dashed rgba(122, 143, 159, 0.42);
  border-radius: 8px;
  background: rgba(246, 250, 253, 0.88);
  color: var(--text);
  font-size: 12px;
}

.position-import-file input {
  width: 100%;
}

.position-import-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
}

.position-import-status.error {
  color: var(--red);
}

.position-list {
  display: grid;
  gap: 12px;
}

.position-list-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(185, 201, 215, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.position-list-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.position-list-title strong {
  font-size: 15px;
}

.position-list-main p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.position-list-side,
.position-stats,
.position-card-actions {
  display: grid;
  gap: 8px;
}

.position-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.position-stats span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  background: #f4f8fb;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.position-stats strong {
  color: var(--ink);
  font-size: 16px;
}

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

.pill {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: #edf1f3;
  color: var(--ink);
  font-size: 11px;
  white-space: nowrap;
}

.pill.hot {
  color: var(--red);
  background: var(--red-soft);
}

.pill.good {
  color: var(--green);
  background: var(--green-soft);
}

.pill.warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.toolbar {
  min-height: 58px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 150px 150px 150px;
  gap: 10px;
  margin-bottom: 14px;
}

.search-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: #fff;
}

.search-box input {
  border: 0;
  outline: 0;
  width: 100%;
  min-height: 38px;
}

.candidate-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(185, 201, 215, 0.72);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(236, 247, 255, 0.94), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.16), transparent 34%);
  box-shadow: var(--shadow-soft);
}

.candidate-hero h2 {
  margin: 2px 0 6px;
  font-size: 22px;
}

.candidate-hero span {
  color: var(--muted);
  font-size: 13px;
}

.candidate-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  gap: 10px;
}

.candidate-metrics button {
  border: 1px solid rgba(185, 201, 215, 0.72);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.candidate-metrics button strong {
  font-size: 22px;
  color: var(--ink);
}

.candidate-metrics button span {
  color: var(--muted);
  font-size: 12px;
}

.candidate-metrics button.active,
.candidate-metrics button:hover {
  border-color: rgba(14, 165, 233, 0.34);
  background: rgba(235, 247, 255, 0.96);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.candidate-toolbar {
  grid-template-columns: minmax(300px, 1.3fr) repeat(4, minmax(110px, 134px)) auto;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(185, 201, 215, 0.72);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.candidate-toolbar .search-box {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
}

.candidate-toolbar select {
  min-height: 38px;
  border-radius: 999px;
  background: #fff;
}

.candidate-filter-count {
  justify-self: end;
  min-width: 64px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef4f8;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.candidate-list-panel {
  padding: 10px 12px 14px;
  border: 1px solid rgba(185, 201, 215, 0.72);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(248, 251, 253, 0.94), rgba(255, 255, 255, 0.98));
  box-shadow: var(--shadow-soft);
}

.global-search-panel {
  width: min(760px, calc(100% - 28px));
}

.onboarding-panel {
  width: min(900px, calc(100% - 28px));
  padding: 0;
}

.offer-record-panel {
  width: min(920px, calc(100% - 28px));
  padding: 0;
}

.offer-email-panel {
  width: min(880px, calc(100% - 28px));
  padding: 0;
}

.employee-edit-panel {
  width: min(980px, calc(100% - 28px));
  padding: 0;
}

.onboarding-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px 22px 22px;
}

.employee-edit-form {
  grid-template-columns: 1fr;
  padding: 18px 22px 22px;
}

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

.onboarding-form .form-actions {
  margin-bottom: -22px;
}

.offer-record-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 22px;
  background: #f7f9fa;
}

.offer-record-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.offer-record-person {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.offer-record-person strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.offer-record-person span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.offer-record-person small,
.offer-record-status small,
.offer-record-section-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.offer-record-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  max-width: 320px;
}

.offer-record-status small {
  flex-basis: 100%;
  text-align: right;
}

.offer-record-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.offer-record-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.offer-record-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.offer-record-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.offer-record-field {
  min-width: 0;
  border: 1px solid #eef1f3;
  border-radius: 6px;
  padding: 9px 10px;
  background: var(--panel-soft);
}

.offer-record-field span,
.offer-file-line span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.offer-record-field strong,
.offer-file-line strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-all;
}

.offer-record-files {
  display: grid;
  gap: 10px;
}

.offer-file-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.offer-file-line.empty {
  display: block;
  color: var(--muted);
}

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

.offer-file-line img {
  grid-column: 1 / -1;
  width: min(360px, 100%);
  max-height: 240px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.offer-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.offer-send-sticky {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 2px -2px -2px;
  border-color: rgba(185, 201, 215, 0.95);
  box-shadow: 0 -14px 28px rgba(23, 33, 43, 0.12);
}

.offer-send-sticky::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(247, 249, 250, 0), #f7f9fa);
}

.offer-send-sticky [data-send-offer-email]:disabled,
.offer-send-disabled {
  cursor: not-allowed;
  background: #d7dde3;
  border-color: #c7d0d8;
  color: #7a8794;
  box-shadow: none;
  opacity: 1;
}

.offer-email-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px 22px 22px;
}

.offer-email-form textarea {
  min-height: 260px;
  line-height: 1.65;
  resize: vertical;
}

.global-search-box {
  margin: 12px 0 14px;
}

.global-search-results {
  max-height: 560px;
  overflow: auto;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  min-height: 36px;
  padding: 7px 10px;
  color: var(--text);
  font-size: 13px;
}

select:focus,
input:focus,
textarea:focus {
  outline: 0;
  border-color: #8bb7a5;
  box-shadow: 0 0 0 3px rgba(22, 115, 79, 0.1);
}

textarea {
  resize: vertical;
}

.table-panel {
  overflow: auto;
  max-height: calc(100vh - 190px);
}

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

.candidate-table {
  min-width: 1640px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 8px;
  background: transparent;
}

.candidate-table th,
.candidate-table td {
  word-break: keep-all;
}

.candidate-table th {
  white-space: nowrap;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  color: #64748b;
  font-size: 11px;
  letter-spacing: 0;
}

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

.candidate-table th:nth-child(2),
.candidate-table td:nth-child(2),
.candidate-table th:nth-child(8),
.candidate-table td:nth-child(8),
.candidate-table th:nth-child(9),
.candidate-table td:nth-child(9),
.candidate-table th:nth-child(10),
.candidate-table td:nth-child(10),
.candidate-table th:nth-child(11),
.candidate-table td:nth-child(11),
.candidate-table th:nth-child(12),
.candidate-table td:nth-child(12),
.candidate-table th:nth-child(13),
.candidate-table td:nth-child(13),
.candidate-table th:nth-child(14),
.candidate-table td:nth-child(14) {
  width: 110px;
  white-space: nowrap;
}

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

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

.candidate-table th:nth-child(5),
.candidate-table td:nth-child(5),
.candidate-table th:nth-child(6),
.candidate-table td:nth-child(6),
.candidate-table th:nth-child(7),
.candidate-table td:nth-child(7) {
  width: 120px;
}

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

.candidate-table th:nth-child(6),
.candidate-table td:nth-child(6),
.candidate-table th:nth-child(7),
.candidate-table td:nth-child(7) {
  width: 112px;
}

.candidate-table tbody tr {
  transform: translateZ(0);
}

.candidate-table tbody td {
  border-top: 1px solid rgba(226, 232, 240, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.94);
  padding-top: 10px;
  padding-bottom: 10px;
}

.candidate-table tbody td:first-child {
  border-left: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 10px 0 0 10px;
}

.candidate-table tbody td:last-child {
  border-right: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 0 10px 10px 0;
}

.candidate-table tbody tr:hover td {
  background: #f8fbff;
  border-color: rgba(14, 165, 233, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.candidate-table .name-cell {
  min-width: 0;
}

.candidate-table .name-cell strong,
.candidate-table .name-cell small,
.candidate-table td:nth-child(5),
.candidate-table td:nth-child(6),
.candidate-table td:nth-child(7) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-table th:nth-child(5),
.candidate-table td:nth-child(5) {
  padding-right: 8px;
}

.candidate-table td:nth-child(5) {
  text-align: left;
}

.candidate-table td:nth-child(5) .status-select {
  width: fit-content !important;
  max-width: 100%;
}

.candidate-ai-cell {
  display: grid;
  gap: 5px;
  align-items: start;
  justify-items: start;
}

.candidate-table td:nth-child(6) .table-action-btn,
.candidate-table td:nth-child(7) .candidate-ai-score-btn,
.candidate-table td:nth-child(6) .offer-action-cell {
  width: fit-content;
  max-width: 100%;
}

.candidate-ai-score-btn {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #b9d8ca;
  border-radius: 999px;
  background: #f2faf6;
  color: #21634a;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.candidate-ai-score-btn span {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
}

.candidate-ai-score-btn:hover {
  border-color: var(--accent);
  background: #e9f6f0;
}

.candidate-ai-score-pill {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.candidate-ai-score-pill.strong {
  background: #e8f6ef;
  color: #24704f;
}

.candidate-ai-score-pill.medium {
  background: #fff8e7;
  color: #946700;
}

.candidate-ai-score-pill.low {
  background: #fff0f0;
  color: #a33a3a;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  background: var(--panel-soft);
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: inset 0 -1px 0 var(--line);
}

tr:hover td {
  background: #f8fbfa;
}

.name-cell {
  display: grid;
  gap: 3px;
  min-width: 160px;
}

.skill-line {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.keyword-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 260px;
}

.keyword-pill {
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  padding: 3px 8px;
  line-height: 1.35;
  white-space: nowrap;
}

.status-select {
  min-width: 0;
  max-width: 100%;
  min-height: 26px;
  padding: 2px 20px 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  background: var(--panel-soft);
  white-space: nowrap;
}

.link-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.link-btn:hover strong {
  color: var(--green);
}

.table-panel .keyword-pills {
  gap: 4px;
}

.table-panel .keyword-pill {
  padding: 2px 7px;
  font-size: 11px;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mini-metrics span {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.mini-metrics strong {
  color: var(--text);
  font-size: 20px;
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 20;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 25;
}

.modal.open {
  display: block;
}

.drawer.open {
  display: block;
}

.drawer-backdrop,
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 22, 0.46);
  backdrop-filter: blur(2px);
}

.modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(860px, calc(100% - 28px));
  max-height: min(780px, calc(100vh - 28px));
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  overflow: auto;
}

.candidate-ai-score-panel {
  width: min(780px, calc(100% - 28px));
}

.candidate-ai-score-form {
  margin-top: 14px;
}

.candidate-ai-context {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.candidate-ai-context strong {
  font-size: 16px;
}

.candidate-ai-context span,
.candidate-ai-context small {
  color: var(--muted);
}

.candidate-ai-score-result {
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
}

.candidate-ai-result-card {
  display: grid;
  gap: 10px;
}

.candidate-ai-result-card > div:first-child {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 3px 12px;
  align-items: center;
}

.candidate-ai-result-card strong {
  grid-row: span 2;
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.candidate-ai-result-card span {
  color: var(--text);
  font-weight: 800;
}

.candidate-ai-result-card small,
.candidate-ai-result-card p,
.candidate-ai-result-card em {
  color: var(--muted);
  font-style: normal;
}

.candidate-ai-result-card p {
  margin: 0;
}

.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(920px, 100%);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 0;
  overflow: auto;
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 0;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.candidate-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 22px 22px;
}

.candidate-form label {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
  color: var(--muted);
  font-size: 11px;
}

.candidate-form label input,
.candidate-form label select,
.candidate-form label textarea {
  color: var(--text);
  font-size: 13px;
  background: #fff;
}

.field-error {
  display: none;
  margin-top: -2px;
  color: var(--red);
  font-size: 11px;
  line-height: 1.4;
}

.field-error.show {
  display: block;
}

input.input-invalid,
textarea.input-invalid,
select.input-invalid {
  border-color: rgba(194, 65, 53, 0.72);
  background: #fff8f7;
  box-shadow: 0 0 0 3px rgba(194, 65, 53, 0.08);
}

.resume-field-invalid {
  border-color: rgba(194, 65, 53, 0.44);
  background: #fff8f7;
}

.resume-field .field-error {
  margin-top: 6px;
}

.resume-status.status-error {
  border-color: rgba(194, 65, 53, 0.38);
  background: #fff8f7;
  color: var(--red);
}

.span-2 {
  grid-column: 1 / -1;
}

.form-actions {
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 4px -22px -22px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.resume-import {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.file-drop {
  min-height: 184px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
}

.file-drop input {
  width: 100%;
}

.file-drop strong {
  color: var(--text);
}

.resume-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.resume-status {
  min-height: 36px;
  border-radius: 6px;
  background: #f7f9fa;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
}

.resume-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.resume-field {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  min-height: 70px;
}

.resume-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.resume-field strong {
  word-break: break-word;
}

.batch-modal-panel {
  width: min(1080px, calc(100% - 28px));
}

.batch-import {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
}

.batch-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.batch-list {
  display: grid;
  gap: 12px;
}

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

.batch-item.parsing {
  border-color: #9bb8c7;
  background: #f5fafc;
}

.batch-item.error {
  border-color: #e2aaa3;
  background: #fff7f5;
}

.batch-item.imported {
  background: #f6fbf8;
}

.batch-item-head,
.batch-actions,
.batch-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.batch-status {
  min-width: 74px;
  text-align: center;
  border-radius: 999px;
  background: #eef4f1;
  color: #315d4e;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

.batch-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.batch-grid input,
.batch-grid select {
  min-width: 0;
}

.batch-summary {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 12px;
}

.batch-error {
  border-radius: 6px;
  background: #fff;
  color: #a33a2b;
  padding: 10px 12px;
  font-size: 13px;
}

.batch-text pre {
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.dashboard-detail-panel {
  width: min(1180px, calc(100% - 28px));
}

.detail-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px 130px 130px 150px 150px auto;
  gap: 10px;
  margin-bottom: 14px;
}

.office-detail-filters {
  grid-template-columns: minmax(260px, 1fr) 150px 150px auto;
}

.detail-table-wrap {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-table {
  min-width: 940px;
}

.detail-table th {
  position: sticky;
  top: 0;
  background: #f7f9fa;
  z-index: 1;
}

.office-detail-table {
  min-width: 980px;
}

.office-detail-table td strong,
.office-detail-table td small {
  display: block;
}

.office-detail-table td small {
  margin-top: 4px;
  max-width: 360px;
  white-space: normal;
  line-height: 1.45;
}

.resume-attachment {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: var(--panel-soft);
}

.attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.resume-link {
  justify-self: start;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.resume-upload-label {
  display: inline-flex;
  align-items: center;
}

.resume-attachment pre {
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.hr-stats,
.account-list,
.submission-list {
  display: grid;
  gap: 10px;
}

.hr-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 150px 150px 150px 150px auto;
  gap: 10px;
  margin-bottom: 14px;
}

#myDataView .hr-filters {
  grid-template-columns: minmax(240px, 1fr) 150px 150px 150px auto;
}

.stats-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 150px 150px auto;
  gap: 10px;
  margin-bottom: 14px;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-chart-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(160px, 1.4fr) 42px;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 8px;
  text-align: left;
}

.bar-chart-label {
  display: grid;
  gap: 4px;
}

.bar-chart-label span {
  color: var(--muted);
  font-size: 12px;
}

.bar-chart-track {
  height: 16px;
  background: #edf1f3;
  border-radius: 999px;
  overflow: hidden;
}

.bar-chart-track span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.account-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-account-form {
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) 140px auto;
  align-items: center;
}

.admin-account-filters {
  grid-template-columns: minmax(220px, 1fr) 150px;
}

.admin-account-panel {
  margin-bottom: 14px;
}

.admin-governance-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.account-item,
.submission-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(170px, 0.8fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.account-item span,
.submission-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.admin-account-item {
  grid-template-columns: minmax(220px, 1.2fr) minmax(190px, 1fr) minmax(180px, 0.8fr) minmax(220px, auto);
}

.account-main,
.account-status,
.account-role-editor,
.account-actions {
  display: grid;
  gap: 5px;
}

.account-status small,
.account-role-editor span {
  color: var(--muted);
  font-size: 12px;
}

.account-actions {
  grid-template-columns: repeat(2, max-content);
  justify-content: end;
  gap: 8px;
}

.account-role-editor select {
  min-height: 34px;
  font-size: 12px;
}

.submission-main,
.submission-progress,
.submission-actions {
  display: grid;
  gap: 5px;
}

.submission-actions {
  justify-items: end;
}

.submission-actions a {
  font-size: 12px;
}

.mini-table {
  min-width: 0;
}

.payroll-detail-table {
  min-width: 3600px;
}

.employee-roster-table {
  --roster-min-width: clamp(2200px, 178vw, 2550px);
  --roster-id-width: 44px;
  --roster-name-width: 104px;
  --roster-action-width: 62px;
  --roster-main-width: 102px;
  --roster-tiny-width: 56px;
  --roster-money-width: 78px;
  --roster-long-width: 118px;
  --roster-date-width: 82px;
  --roster-code-width: 108px;
  min-width: max(100%, var(--roster-min-width));
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.employee-roster-panel {
  overflow: hidden;
}

.employee-roster-panel .panel-head {
  align-items: center;
}

.employee-roster-filters {
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.employee-roster-actions {
  justify-content: space-between;
  margin: 12px 0 8px;
}

.employee-roster-wrap {
  max-height: calc(100vh - 330px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.employee-roster-table th {
  height: 32px;
  padding: 6px 6px;
  color: #52606d;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  border-bottom: 1px solid var(--line-strong);
  background: #f5f8fa;
}

.employee-roster-table td {
  height: 42px;
  padding: 6px 6px;
  background: #fff;
  vertical-align: middle;
}

.employee-roster-table tbody tr:nth-child(even) td {
  background: #fbfcfd;
}

.employee-roster-table tbody tr:hover td {
  background: #f3f8f6;
}

.employee-roster-table th:nth-child(1),
.employee-roster-table td:nth-child(1) {
  width: var(--roster-name-width);
  min-width: var(--roster-name-width);
  position: sticky;
  left: 0;
  z-index: 3;
}

.employee-roster-table th:nth-child(2),
.employee-roster-table td:nth-child(2) {
  width: var(--roster-date-width);
  min-width: var(--roster-date-width);
  position: sticky;
  left: var(--roster-name-width);
  z-index: 3;
  box-shadow: 1px 0 0 var(--line);
}

.employee-roster-table th:nth-child(36),
.employee-roster-table td:nth-child(36) {
  width: var(--roster-action-width);
  min-width: var(--roster-action-width);
  position: sticky;
  right: 0;
  z-index: 3;
  box-shadow: -1px 0 0 var(--line);
}

.employee-roster-table th:nth-child(1),
.employee-roster-table th:nth-child(2),
.employee-roster-table th:nth-child(36) {
  z-index: 5;
}

.employee-roster-table th:nth-child(10),
.employee-roster-table td:nth-child(10),
.employee-roster-table th:nth-child(14),
.employee-roster-table td:nth-child(14),
.employee-roster-table th:nth-child(15),
.employee-roster-table td:nth-child(15),
.employee-roster-table th:nth-child(23),
.employee-roster-table td:nth-child(23),
.employee-roster-table th:nth-child(25),
.employee-roster-table td:nth-child(25),
.employee-roster-table th:nth-child(29),
.employee-roster-table td:nth-child(29),
.employee-roster-table th:nth-child(30),
.employee-roster-table td:nth-child(30),
.employee-roster-table th:nth-child(31),
.employee-roster-table td:nth-child(31) {
  width: var(--roster-main-width);
}

.employee-roster-table th:nth-child(7),
.employee-roster-table td:nth-child(7),
.employee-roster-table th:nth-child(21),
.employee-roster-table td:nth-child(21),
.employee-roster-table th:nth-child(22),
.employee-roster-table td:nth-child(22),
.employee-roster-table th:nth-child(33),
.employee-roster-table td:nth-child(33),
.employee-roster-table th:nth-child(35),
.employee-roster-table td:nth-child(35) {
  width: var(--roster-tiny-width);
}

.employee-roster-table th:nth-child(6),
.employee-roster-table td:nth-child(6),
.employee-roster-table th:nth-child(16),
.employee-roster-table td:nth-child(16),
.employee-roster-table th:nth-child(17),
.employee-roster-table td:nth-child(17),
.employee-roster-table th:nth-child(18),
.employee-roster-table td:nth-child(18),
.employee-roster-table th:nth-child(19),
.employee-roster-table td:nth-child(19),
.employee-roster-table th:nth-child(20),
.employee-roster-table td:nth-child(20),
.employee-roster-table th:nth-child(20),
.employee-roster-table td:nth-child(20) {
  width: var(--roster-money-width);
}

.employee-roster-table th:nth-child(8),
.employee-roster-table td:nth-child(8),
.employee-roster-table th:nth-child(9),
.employee-roster-table td:nth-child(9),
.employee-roster-table th:nth-child(26),
.employee-roster-table td:nth-child(26),
.employee-roster-table th:nth-child(27),
.employee-roster-table td:nth-child(27) {
  width: var(--roster-long-width);
}

.employee-roster-table th:nth-child(11),
.employee-roster-table td:nth-child(11),
.employee-roster-table th:nth-child(12),
.employee-roster-table td:nth-child(12),
.employee-roster-table th:nth-child(13),
.employee-roster-table td:nth-child(13),
.employee-roster-table th:nth-child(24),
.employee-roster-table td:nth-child(24),
.employee-roster-table th:nth-child(32),
.employee-roster-table td:nth-child(32),
.employee-roster-table th:nth-child(34),
.employee-roster-table td:nth-child(34) {
  width: var(--roster-date-width);
}

.employee-roster-table th:nth-child(3),
.employee-roster-table td:nth-child(3),
.employee-roster-table th:nth-child(4),
.employee-roster-table td:nth-child(4),
.employee-roster-table th:nth-child(5),
.employee-roster-table td:nth-child(5),
.employee-roster-table th:nth-child(28),
.employee-roster-table td:nth-child(28) {
  width: var(--roster-code-width);
}

.mini-table th,
.mini-table td {
  padding: 8px 9px;
}

.employee-roster-table th,
.employee-roster-table td {
  padding: 5px 6px;
  font-size: 12px;
}

.employee-roster-table .roster-cell {
  color: var(--text);
  line-height: 1.45;
}

.roster-id {
  display: inline-flex;
  max-width: 42px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 6px;
  background: #edf2f5;
  color: #52606d;
  font-weight: 700;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-person {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.roster-avatar {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
}

.roster-person strong,
.roster-role {
  display: block;
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-person small {
  margin-top: 1px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-tag,
.roster-date,
.roster-money,
.roster-mono,
.roster-muted {
  display: inline-flex;
  max-width: 100%;
  min-height: 22px;
  align-items: center;
  border-radius: 6px;
  padding: 2px 6px;
  white-space: nowrap;
}

.roster-tag {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.roster-date {
  background: #eef2f4;
  color: #394854;
  font-variant-numeric: tabular-nums;
}

.roster-money {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.roster-mono {
  padding-left: 0;
  background: transparent;
  color: #34424f;
  font-family: "Consolas", "Menlo", monospace;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-muted {
  color: var(--muted);
}

.roster-long-text {
  display: -webkit-box;
  max-height: 42px;
  overflow: hidden;
  color: #34424f;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  word-break: break-word;
}

.mini-table td strong,
.mini-table td small {
  display: block;
}

.table-link-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  white-space: nowrap;
}

.table-link-group a {
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}

.table-link-group small {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-table-wrap {
  overflow-x: auto;
}

@media (max-width: 1440px) {
  .employee-roster-table {
    --roster-min-width: 2240px;
    --roster-id-width: 44px;
    --roster-name-width: 104px;
    --roster-action-width: 62px;
    --roster-main-width: 102px;
    --roster-tiny-width: 56px;
    --roster-money-width: 78px;
    --roster-long-width: 118px;
    --roster-date-width: 82px;
    --roster-code-width: 108px;
  }
}

@media (max-width: 1180px) {
  .employee-roster-table {
    --roster-min-width: 2120px;
    --roster-id-width: 42px;
    --roster-name-width: 98px;
    --roster-action-width: 60px;
    --roster-main-width: 96px;
    --roster-tiny-width: 54px;
    --roster-money-width: 74px;
    --roster-long-width: 110px;
    --roster-date-width: 78px;
    --roster-code-width: 102px;
  }

  .employee-roster-table th,
  .employee-roster-table td {
    padding: 6px 7px;
  }
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
}

.pagination-summary strong {
  color: var(--text);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pagination-controls select {
  min-height: 30px;
  width: auto;
  padding: 0 28px 0 8px;
  border-radius: 12px;
  font-size: 12px;
}

.finance-filters,
.expense-filters {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.finance-filters {
  grid-template-columns: minmax(220px, 1fr) 150px 150px auto;
}

.hr-daily-filters {
  grid-template-columns: minmax(180px, 0.9fr) 128px 142px 142px auto;
  align-items: center;
}

.hr-daily-filters #dashboardHrSearch {
  min-width: 0;
}

.ai-history-filters {
  grid-template-columns: minmax(260px, 1fr) 160px 160px auto;
}

.ai-history-layout {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  margin-bottom: 0;
}

.ai-history-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ledger-item.active-history {
  border-color: #8bb7a5;
  background: #f4fbf8;
  box-shadow: inset 3px 0 0 var(--accent);
}

.hr-daily-table {
  min-width: 960px;
}

.expense-filters {
  grid-template-columns: minmax(220px, 1fr) 130px 130px 150px 150px auto;
}

.my-payroll-filters {
  grid-template-columns: minmax(240px, 1fr) 160px auto;
}

.social-security-controls {
  display: grid;
  grid-template-columns: 160px repeat(2, minmax(180px, 1fr)) 170px;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.social-security-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.social-security-table {
  min-width: 980px;
}

.social-security-table td strong,
.social-security-table td small {
  display: block;
}

.social-security-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.social-security-table .social-total-row td {
  background: #f6f8fb;
  font-weight: 700;
}

.social-security-table .social-section-row td {
  background: #eef3f8;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.rate-input {
  width: 86px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 12px;
  text-align: right;
}

.social-security-note {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.social-security-note strong,
.social-security-note span {
  display: block;
}

.social-security-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.annual-leave-filters {
  grid-template-columns: minmax(260px, 1fr) 130px 140px auto;
}

.my-payroll-table {
  min-width: 1120px;
}

.annual-leave-table {
  min-width: 1220px;
}

.my-payroll-table th,
.my-payroll-table td,
.annual-leave-table th,
.annual-leave-table td {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
}

.my-payroll-table td:nth-child(10) {
  max-width: 220px;
}

.annual-leave-table td:first-child {
  min-width: 140px;
}

.annual-leave-table td:first-child small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.annual-leave-rule {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 10px 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.annual-leave-rule strong {
  color: var(--text);
  white-space: nowrap;
}

.annual-leave-action {
  display: grid;
  grid-template-columns: 72px minmax(120px, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 260px;
}

.annual-leave-action input {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

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

.finance-form button {
  grid-column: 1 / -1;
}

.ai-config-form {
  align-items: start;
}

.config-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 254, 0.92);
}

.config-field span {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.config-field input {
  width: 100%;
  min-width: 0;
}

.config-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.config-field-wide {
  grid-column: 1 / -1;
}

.secret-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.secret-input-row .mini-btn {
  grid-column: auto;
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.payroll-template-box {
  display: grid;
  gap: 12px;
}

.payroll-template-hint {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.payroll-template-hint strong,
.payroll-template-hint span {
  display: block;
}

.payroll-template-hint span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.app-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 14px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  min-height: 132px;
}

.app-card:hover {
  border-color: var(--accent);
  background: #ffffff;
}

.app-card span {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eaf4f0;
  color: var(--accent-strong);
  font-weight: 800;
}

.app-card strong {
  font-size: 15px;
}

.assistant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
}

.assistant-panel {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  background: #fff;
}

.assistant-chat {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 360px;
  max-height: calc(100vh - 330px);
  overflow: auto;
  padding: 18px 18px 8px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.assistant-message {
  width: min(82%, 760px);
  border: 1px solid rgba(185, 201, 215, 0.68);
  border-radius: 16px;
  padding: 10px 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(25, 36, 48, 0.06);
}

.assistant-message-user {
  justify-self: end;
  background: #f7fbff;
  border-color: rgba(14, 165, 233, 0.24);
}

.assistant-message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.assistant-message p {
  margin: 0;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
}

.assistant-message-streaming p::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: -0.16em;
  border-radius: 999px;
  background: #2563eb;
  animation: assistant-cursor-blink 0.9s steps(1) infinite;
}

@keyframes assistant-cursor-blink {
  50% {
    opacity: 0;
  }
}

.assistant-message-images,
.assistant-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assistant-message-images {
  margin-top: 10px;
}

.assistant-message-images img,
.assistant-attachment img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.assistant-file-thumb {
  width: 96px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, #eef8ff, #f1fbf7);
  color: #087ea4;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.assistant-attachments {
  margin: 0 18px 10px;
}

.assistant-attachment {
  display: grid;
  gap: 4px;
  width: 112px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.assistant-attachment:hover .assistant-file-thumb,
.assistant-attachment:hover img,
.assistant-message-file:hover .assistant-file-thumb,
.assistant-message-file:hover img {
  border-color: rgba(14, 165, 233, 0.58);
  box-shadow: 0 10px 26px rgba(14, 165, 233, 0.16);
}

.assistant-attachment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-attachment small {
  color: #087ea4;
  font-size: 10px;
}

.assistant-message-file {
  display: grid;
  gap: 5px;
  width: 112px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  text-align: left;
  cursor: pointer;
}

.assistant-message-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-preview-panel {
  width: min(1040px, calc(100vw - 34px));
  max-height: calc(100vh - 46px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.assistant-preview-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.assistant-preview-body {
  min-height: 360px;
  overflow: auto;
  padding: 16px;
  background: #f8fbff;
}

.assistant-preview-image {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.assistant-preview-frame {
  width: 100%;
  height: min(68vh, 720px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.assistant-preview-text {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.assistant-preview-doc + .assistant-preview-doc {
  margin-top: 14px;
}

.assistant-preview-doc h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.assistant-preview-doc pre {
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(185, 201, 215, 0.72);
  border-radius: 8px;
  background: #f6f9fc;
  color: var(--text);
  line-height: 1.65;
  font-size: 12px;
}

.danger-text {
  color: #b42318;
}

.assistant-compose {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 8px;
  margin: 8px 18px 14px;
  padding: 10px;
  border: 1px solid rgba(185, 201, 215, 0.82);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(25, 36, 48, 0.12);
}

.assistant-prompt-hints {
  padding: 2px 8px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.assistant-compose textarea {
  min-height: 56px;
  max-height: 180px;
  padding: 8px 10px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  line-height: 1.55;
  box-shadow: none;
  resize: vertical;
}

.assistant-compose textarea:focus {
  box-shadow: none;
}

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

.assistant-compose .resume-status {
  min-height: auto;
  margin: 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.assistant-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.assistant-guide .ledger-item {
  min-height: 42px;
  padding: 8px;
}

.assistant-guide .panel-head {
  gap: 2px;
  margin-bottom: 8px;
}

.assistant-guide .panel-head h2 {
  font-size: 14px;
}

.assistant-guide .panel-head span,
.assistant-guide .ledger-item span {
  font-size: 10px;
  line-height: 1.35;
}

.assistant-guide .ledger-item strong {
  font-size: 12px;
}

.knowledge-form {
  align-items: stretch;
}

.knowledge-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.knowledge-item {
  align-items: center;
}

.knowledge-item > div {
  min-width: 0;
}

.app-card p,
.app-card em,
.ledger-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.app-card em {
  font-style: normal;
}

.finance-form textarea {
  min-height: 92px;
  resize: vertical;
}

.ai-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: start;
}

#aiToolsView .finance-form {
  grid-template-columns: minmax(0, 1fr) 180px;
}

#aiToolsView .finance-form textarea {
  grid-column: 1 / -1;
  min-height: 180px;
  font-size: 13px;
  line-height: 1.65;
}

#aiToolsView .ai-control-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 0.9fr);
  gap: 10px;
  align-items: center;
}

#aiToolsView .ai-inline-field {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

#aiToolsView .ai-inline-field select {
  flex: 1;
  min-width: 0;
  background: #fff;
}

#aiToolsView .file-line {
  border-style: dashed;
  background: var(--panel-soft);
}

.sms-template-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.sms-template-list {
  display: grid;
  gap: 8px;
}

.sms-template-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) 96px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.sms-template-item div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sms-template-item strong {
  font-size: 13px;
}

.sms-template-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

#aiToolsView .resume-actions {
  align-items: center;
}

#aiToolsView .resume-status {
  border: 1px solid var(--line);
  background: #f8fbfa;
}

.ai-result-table {
  min-width: 1180px;
  font-size: 12px;
  border-collapse: separate;
  border-spacing: 0 8px;
  background: transparent;
}

.ai-result-table th {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  background: #f5f7f9;
  border-bottom: 0;
}

.ai-result-table td {
  padding: 12px;
  font-size: 12px;
  line-height: 1.45;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.ai-result-row td:first-child {
  border-left: 4px solid #c8d2dc;
  border-radius: 8px 0 0 8px;
}

.ai-result-row td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
}

.ai-result-row.ai-score-strong td:first-child {
  border-left-color: var(--accent);
}

.ai-result-row.ai-score-medium td:first-child {
  border-left-color: #d6a100;
}

.ai-result-row.ai-score-low td:first-child {
  border-left-color: #c45151;
}

.ai-result-row:hover td {
  background: #fbfdfc;
  box-shadow: 0 8px 22px rgba(30, 45, 60, 0.06);
}

.ai-candidate-cell {
  min-width: 220px;
}

.ai-candidate-main {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.ai-candidate-cell strong {
  font-size: 14px;
  line-height: 1.35;
}

.ai-candidate-cell small {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-file-name {
  margin-top: 3px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.ai-score-cell {
  min-width: 190px;
}

.ai-score-badge {
  display: inline-grid;
  min-width: 74px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
}

.ai-score-badge strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.ai-score-badge span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.ai-score-edit {
  display: grid;
  grid-template-columns: 58px auto;
  gap: 6px;
  align-items: center;
}

.ai-score-edit input {
  width: 58px;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 12px;
  text-align: center;
}

.tiny-btn {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
}

.ai-result-table .keyword-pill {
  margin: 2px 3px 2px 0;
  padding: 2px 6px;
  font-size: 11px;
}

.ai-chip-cell {
  min-width: 210px;
  max-width: 270px;
}

.ai-risk-cell {
  min-width: 160px;
  max-width: 220px;
}

.ai-risk-cell span {
  display: inline-block;
  margin: 2px 3px 2px 0;
  padding: 3px 7px;
  border: 1px solid #f0d2d2;
  border-radius: 999px;
  background: #fff8f8;
  color: #9a3a3a;
  font-size: 11px;
}

.ai-summary-cell {
  max-width: 320px;
}

.ai-summary-cell strong,
.ai-summary-cell span {
  display: block;
}

.ai-summary-cell strong {
  margin-bottom: 4px;
  color: var(--text);
}

.ai-summary-cell span,
.ai-muted {
  color: var(--muted);
}

.ai-action-cell {
  min-width: 88px;
  text-align: right;
}

.ai-result-summary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #d8e6df;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #f7fbf9;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ai-result-summary strong {
  color: var(--text);
  font-size: 14px;
}

.ai-result-summary span {
  display: block;
}

.report-grid.compact {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 14px;
}

.payroll-batch-item {
  align-items: flex-start;
}

.payroll-batch-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.payroll-batch-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 180px;
}

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

.payroll-batch-actions .primary-btn,
.payroll-batch-actions .ghost-btn {
  min-height: 32px;
  padding: 6px 10px;
}

.file-line {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
}

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

.finance-card,
.ledger-item,
.expense-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.finance-card {
  display: grid;
  gap: 6px;
}

.finance-card span,
.finance-card em,
.ledger-item span,
.expense-item span,
.expense-meta {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.finance-card strong {
  font-size: 22px;
}

.finance-card p,
.expense-item p {
  margin: 0;
}

.finance-list,
.expense-list {
  display: grid;
  gap: 10px;
}

.ledger-item,
.expense-item header,
.expense-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ledger-item > div,
.expense-item header > div {
  display: grid;
  gap: 4px;
}

.ledger-item.detail-click:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

.expense-item {
  display: grid;
  gap: 10px;
}

.expense-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.expense-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.expense-flow span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  display: grid;
  gap: 3px;
  color: var(--muted);
}

.expense-flow span.done {
  border-color: #b7d8c8;
  background: #f4fbf8;
}

.expense-flow span.failed {
  border-color: #f0b8b2;
  background: #fff6f4;
}

.expense-flow b {
  color: var(--text);
  font-size: 12px;
}

.expense-flow small {
  color: var(--muted);
}

.stat-link {
  border: 0;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  min-width: 34px;
  min-height: 28px;
  padding: 3px 8px;
  font-weight: 700;
}

.stat-link:hover {
  background: #dce7ff;
}

.hr-stat-row:hover td {
  background: #fbfdfc;
}

.section-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin: 2px 0 8px;
}

.experience-list {
  display: grid;
  gap: 8px;
}

.experience-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 12px 12px 16px;
  background: var(--panel-soft);
  position: relative;
}

.experience-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.experience-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.experience-card strong,
.experience-card span,
.experience-card em {
  display: block;
}

.experience-card span,
.experience-card em {
  min-width: max-content;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 2px 8px;
}

.experience-card p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}

.experience-card span,
.experience-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.experience-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
  font-size: 13px;
}

.compact-empty {
  min-height: 52px;
}

.empty {
  min-height: 86px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 12px;
  }

  .nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
  }

  .sidebar-footer {
    display: none;
  }

  .topbar,
  .workspace {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .split-layout,
  .position-strip,
  .board,
  .map-grid,
  .toolbar,
  .hr-filters,
  .stats-filters,
  .detail-filters,
  .finance-filters,
  .expense-filters,
  .finance-form,
  .expense-form,
  .app-grid,
  .report-grid,
  .bar-chart-row,
  .submission-item,
  .candidate-form,
  .resume-import,
  .batch-import,
  .batch-grid,
  .resume-preview,
  .ai-history-layout,
  .hr-daily-filters,
  .ai-history-filters,
  .my-payroll-filters,
  .annual-leave-filters,
  .social-security-controls,
  .admin-account-form,
  .admin-account-filters,
  #myDataView .hr-filters,
  .office-detail-filters {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .employee-roster-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .employee-roster-wrap {
    max-height: none;
  }

  .employee-roster-table {
    --roster-min-width: 1980px;
    --roster-id-width: 46px;
    --roster-name-width: 104px;
    --roster-action-width: 66px;
    --roster-main-width: 96px;
    --roster-tiny-width: 54px;
    --roster-money-width: 74px;
    --roster-long-width: 108px;
    --roster-date-width: 78px;
    --roster-code-width: 100px;
  }

  .employee-roster-table th:nth-child(1),
  .employee-roster-table td:nth-child(1),
  .employee-roster-table th:nth-child(2),
  .employee-roster-table td:nth-child(2),
  .employee-roster-table th:nth-child(36),
  .employee-roster-table td:nth-child(36) {
    position: static;
    box-shadow: none;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-controls {
    justify-content: space-between;
  }

  .my-payroll-table {
    min-width: 960px;
  }

  .annual-leave-table {
    min-width: 1080px;
  }

  .annual-leave-action {
    grid-template-columns: 68px minmax(110px, 1fr);
    min-width: 220px;
  }

  .annual-leave-action button {
    grid-column: 1 / -1;
  }

  .expense-flow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    gap: 10px;
    padding: 10px;
  }

  .brand {
    min-width: 148px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    font-size: 13px;
  }

  .brand span,
  .nav-label {
    display: none;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-group {
    display: flex;
    gap: 8px;
  }

  .nav-item {
    width: auto;
    min-width: max-content;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    font-size: 12px;
  }

  .nav-item span {
    width: auto;
  }

  .nav-item.active {
    box-shadow: inset 0 -3px 0 #36b37e;
  }

  .topbar {
    position: static;
    min-height: auto;
    padding: 12px;
    gap: 10px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .eyebrow {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .top-actions .icon-btn {
    width: 100%;
  }

  .top-actions .user-chip,
  .top-actions #logoutBtn {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .primary-btn,
  .ghost-btn,
  .danger-btn,
  .icon-btn {
    min-height: 40px;
  }

  .table-action-btn {
    min-height: 32px;
  }

  .workspace {
    padding: 12px;
  }

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

  .metric {
    min-height: 82px;
    padding: 12px;
  }

  .metric strong {
    font-size: 24px;
  }

  .panel,
  .table-panel,
  .toolbar {
    border-radius: 8px;
    box-shadow: none;
  }

  .panel {
    padding: 12px;
  }

  .panel-head {
    display: grid;
    gap: 4px;
    padding-bottom: 8px;
  }

  .panel-head h2 {
    font-size: 16px;
  }

  .toolbar,
  .finance-filters,
  .expense-filters,
  .my-payroll-filters,
  .annual-leave-filters,
  .admin-account-form,
  .admin-account-filters,
  .hr-filters,
  .stats-filters,
  .detail-filters {
    gap: 8px;
  }

  .social-security-controls {
    grid-template-columns: 1fr;
  }

  select,
  input,
  textarea {
    min-height: 40px;
    font-size: 13px;
  }

  .table-panel,
  .mini-table-wrap,
  .detail-table-wrap {
    max-height: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 860px;
  }

  .my-payroll-table {
    min-width: 880px;
  }

  .annual-leave-table {
    min-width: 980px;
  }

  .offer-record-grid,
  .offer-file-line,
  .offer-email-form,
  .email-config-form {
    grid-template-columns: 1fr;
  }

  .offer-record-summary {
    grid-template-columns: 1fr;
  }

  .offer-record-status {
    justify-content: flex-start;
    max-width: none;
  }

  .offer-record-status small {
    text-align: left;
  }

  .offer-record-section-head {
    display: grid;
    gap: 2px;
  }

  .offer-file-actions {
    justify-content: flex-start;
  }

  .offer-record-actions {
    justify-content: flex-start;
  }

  .annual-leave-rule {
    display: grid;
    gap: 4px;
    padding: 9px 10px;
  }

  .annual-leave-action {
    grid-template-columns: 1fr;
    min-width: 150px;
  }

  .annual-leave-action input,
  .annual-leave-action button {
    width: 100%;
  }

  .expense-flow {
    gap: 6px;
  }

  .expense-flow span {
    padding: 7px;
  }

  .admin-account-item {
    grid-template-columns: 1fr;
  }

  .account-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .account-actions .primary-btn,
  .account-actions .ghost-btn,
  .account-actions .danger-btn {
    width: 100%;
  }

  th,
  td {
    padding: 9px 10px;
    font-size: 12px;
  }

  .drawer-panel,
  .modal-panel,
  .batch-modal-panel,
  .dashboard-detail-panel,
  .global-search-panel {
    width: 100%;
    max-height: 100%;
    inset: 0;
    left: auto;
    top: auto;
    transform: none;
    border-radius: 0;
  }

  .drawer-head {
    padding: 12px;
  }

  .candidate-form {
    padding: 12px;
    gap: 8px;
  }

  .candidate-form label {
    padding: 8px;
  }

  .form-actions {
    margin: 4px -12px -12px;
    padding: 10px 12px;
  }

  .resume-preview,
  .report-grid,
  .app-grid,
  .assistant-layout {
    grid-template-columns: 1fr;
  }

  .assistant-panel {
    min-height: auto;
  }

  .assistant-message {
    width: 100%;
  }

  .assistant-message p {
    font-size: 14px;
  }

  .assistant-message strong {
    font-size: 13px;
  }

  .assistant-compose-actions {
    justify-content: stretch;
  }

  .assistant-compose-actions .primary-btn,
  .assistant-compose-actions .ghost-btn {
    flex: 1 1 140px;
  }

  .ledger-item,
  .account-item,
  .submission-item,
  .sms-template-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bar-chart-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ai-layout,
  .ai-history-layout {
    grid-template-columns: 1fr;
  }

  #aiToolsView .finance-form {
    grid-template-columns: 1fr;
  }

  #aiToolsView .ai-control-row {
    grid-template-columns: 1fr;
  }

  #aiToolsView .finance-form textarea {
    min-height: 150px;
  }

  .ai-result-table,
  .hr-daily-table {
    min-width: 920px;
  }
}

/* Tech SaaS visual refresh */
:root {
  --bg: #edf3f8;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-soft: #f6f9fc;
  --line: #dce6ee;
  --line-strong: #b9c9d7;
  --text: #102033;
  --muted: #647386;
  --green: #00a878;
  --green-soft: #e6f8f2;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --amber: #b7791f;
  --amber-soft: #fff6df;
  --red: #c24135;
  --red-soft: #fff0ee;
  --ink: #1d2b3a;
  --accent: #00a878;
  --accent-strong: #047857;
  --cyan: #0ea5e9;
  --violet: #6750e8;
  --sidebar: #07131d;
  --sidebar-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 42px rgba(16, 32, 51, 0.13);
  --shadow-soft: 0 10px 24px rgba(16, 32, 51, 0.08);
}

body {
  background:
    linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, #f7fbff 0%, #edf3f8 46%, #f4f7fb 100%);
  background-size: 32px 32px, 32px 32px, auto;
  color: var(--text);
}

.login-screen {
  background:
    linear-gradient(90deg, rgba(14, 165, 233, 0.11) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 168, 120, 0.09) 1px, transparent 1px),
    linear-gradient(135deg, #07131d 0%, #0d2130 54%, #101827 100%);
  background-size: 36px 36px, 36px 36px, auto;
}

.login-card {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.login-brand strong {
  font-size: 22px;
}

.app-shell {
  background: transparent;
}

.sidebar {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #07131d 0%, #0b1824 48%, #0f1725 100%);
  background-size: 26px 26px, 26px 26px, auto;
  border-right: 1px solid rgba(90, 214, 255, 0.2);
  box-shadow: 16px 0 42px rgba(8, 19, 29, 0.22);
}

.brand-mark {
  background: linear-gradient(135deg, var(--accent), var(--cyan) 58%, var(--violet));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 26px rgba(14, 165, 233, 0.24);
}

.brand strong {
  font-size: 16px;
}

.nav-label {
  color: #8fb7c8;
  text-transform: uppercase;
}

.nav-item {
  border: 1px solid transparent;
  color: #b9c9d7;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item span {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
}

.nav-item:hover {
  transform: translateX(2px);
  border-color: rgba(125, 211, 252, 0.18);
}

.nav-item.active,
.nav-item:hover {
  background: linear-gradient(90deg, rgba(0, 168, 120, 0.22), rgba(14, 165, 233, 0.12));
  color: #fff;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 #22d3ee, 0 10px 22px rgba(0, 0, 0, 0.18);
}

.nav-item.active span {
  background: rgba(34, 211, 238, 0.18);
  color: #e0fbff;
}

.sidebar-footer {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(125, 211, 252, 0.18);
}

.topbar {
  min-height: 74px;
  background: rgba(247, 251, 255, 0.86);
  border-bottom: 1px solid rgba(185, 201, 215, 0.7);
  box-shadow: 0 10px 28px rgba(16, 32, 51, 0.07);
}

.eyebrow {
  color: #587188;
  font-weight: 700;
}

h1 {
  color: #0f1f33;
  font-weight: 800;
}

h2,
h3 {
  color: #12253a;
  font-weight: 800;
}

.user-chip {
  border-color: rgba(14, 165, 233, 0.24);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.primary-btn,
.ghost-btn,
.danger-btn,
.icon-btn,
.link-btn,
.table-action-btn {
  border-radius: 7px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.2);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #059669, #0284c7);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(14, 165, 233, 0.25);
}

.ghost-btn,
.icon-btn {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--line);
}

.ghost-btn:hover,
.icon-btn:hover {
  background: #fff;
  border-color: rgba(14, 165, 233, 0.42);
  box-shadow: 0 8px 18px rgba(16, 32, 51, 0.08);
}

.top-actions .top-search-btn {
  border-radius: 999px;
  background:
    radial-gradient(circle at 16% 12%, rgba(14, 165, 233, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 255, 0.94));
  border-color: rgba(14, 165, 233, 0.34);
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.top-actions .top-search-btn:hover {
  background:
    radial-gradient(circle at 16% 12%, rgba(14, 165, 233, 0.3), transparent 34%),
    linear-gradient(135deg, #fff, #e9f7ff);
  border-color: rgba(14, 165, 233, 0.56);
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.top-actions .talent-action-btn {
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.top-actions .talent-action-parse {
  background: linear-gradient(135deg, #effaff, #dff4ff 44%, #eef8ff);
  border-color: rgba(14, 165, 233, 0.42);
  color: #075985;
}

.top-actions .talent-action-batch {
  background: linear-gradient(135deg, #f6f4ff, #ebe8ff 48%, #f5fbff);
  border-color: rgba(79, 70, 229, 0.34);
  color: #3730a3;
}

.top-actions .talent-action-add {
  background: linear-gradient(135deg, #10b981, #0ea5e9 58%, #2563eb);
  border-color: rgba(0, 168, 120, 0.38);
  color: #fff;
}

.danger-btn:hover {
  background: var(--red-soft);
  box-shadow: 0 8px 18px rgba(194, 65, 53, 0.12);
}

.workspace {
  padding: 24px 30px 40px;
}

.metric,
.panel,
.table-panel,
.toolbar,
.map-card,
.position-card,
.finance-card,
.ledger-item,
.account-item,
.submission-item,
.list-item {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(185, 201, 215, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.metric,
.panel,
.table-panel,
.toolbar,
.map-card,
.position-card {
  border-radius: 8px;
}

.panel,
.table-panel,
.toolbar {
  position: relative;
}

.panel::before,
.table-panel::before,
.toolbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--cyan), var(--violet));
  opacity: 0.75;
  pointer-events: none;
}

.panel-head {
  border-bottom-color: rgba(185, 201, 215, 0.78);
}

.panel-head span,
.metric span,
.tiny,
td small {
  color: var(--muted);
}

.metric {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 252, 0.9));
}

.metric::before {
  width: 100%;
  height: 3px;
  bottom: auto;
  right: 0;
  background: linear-gradient(90deg, var(--accent), var(--cyan), var(--violet));
}

.metric:hover,
.position-card:hover,
.map-card:hover,
.finance-card:hover,
.ledger-item:hover,
.account-item:hover,
.submission-item:hover,
.list-item:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, 0.38);
  box-shadow: var(--shadow);
}

.metric strong {
  color: #0b2238;
  font-weight: 850;
}

.toolbar,
.finance-filters,
.expense-filters,
.hr-filters,
.stats-filters,
.detail-filters,
.my-payroll-filters,
.annual-leave-filters,
.admin-account-filters,
.office-detail-filters,
.ai-history-filters {
  background: rgba(255, 255, 255, 0.86);
}

.search-box {
  border-color: rgba(185, 201, 215, 0.86);
  background: rgba(255, 255, 255, 0.9);
}

select,
input,
textarea {
  border-color: rgba(185, 201, 215, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.candidate-form label,
.batch-grid label,
.social-security-controls label,
.sms-template-panel,
.offer-record-field,
.offer-record-section,
.offer-file-line,
.offer-record-actions {
  border-color: rgba(185, 201, 215, 0.82);
  background: rgba(246, 249, 252, 0.88);
}

.pill {
  background: #edf4f8;
  color: #2e4052;
  border: 1px solid rgba(185, 201, 215, 0.78);
}

.pill.good {
  color: #047857;
  background: #e6f8f2;
  border-color: rgba(0, 168, 120, 0.22);
}

.pill.warn {
  color: #9a5b00;
  background: #fff4d8;
  border-color: rgba(183, 121, 31, 0.22);
}

.pill.hot {
  color: #b42318;
  background: #fff0ee;
  border-color: rgba(194, 65, 53, 0.22);
}

.bar {
  background: #e6edf3;
  box-shadow: inset 0 1px 2px rgba(16, 32, 51, 0.06);
}

.bar span {
  background: linear-gradient(90deg, var(--accent), var(--cyan), var(--violet));
}

.table-panel,
.mini-table-wrap,
.detail-table-wrap {
  border-color: rgba(185, 201, 215, 0.72);
}

table {
  background: #fff;
}

th {
  color: #4d6074;
  background: linear-gradient(180deg, #f6f9fc, #edf3f8);
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

td {
  border-bottom-color: #e8eef3;
}

tbody tr:hover td {
  background: #f7fbff;
}

.employee-roster-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.employee-roster-table tbody tr:hover td {
  background: #eef8ff;
}

.modal-backdrop {
  background: rgba(7, 19, 29, 0.52);
  backdrop-filter: blur(5px);
}

.modal-panel,
.drawer-panel,
.batch-modal-panel,
.dashboard-detail-panel,
.global-search-panel {
  border: 1px solid rgba(185, 201, 215, 0.72);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 28px 80px rgba(7, 19, 29, 0.28);
}

.drawer-head {
  background: linear-gradient(180deg, #f8fbff, #f1f6fa);
  border-bottom-color: rgba(185, 201, 215, 0.78);
}

.app-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(185, 201, 215, 0.72);
  box-shadow: var(--shadow-soft);
}

.app-card:hover {
  border-color: rgba(14, 165, 233, 0.38);
  box-shadow: var(--shadow);
}

.app-card span {
  background: linear-gradient(135deg, rgba(0, 168, 120, 0.13), rgba(14, 165, 233, 0.16));
  color: #047c92;
}

.sms-template-item,
.ai-result-table td {
  background: rgba(255, 255, 255, 0.94);
}

.ai-result-table th {
  background: linear-gradient(180deg, #f6f9fc, #edf3f8);
}

@media (max-width: 980px) {
  .sidebar {
    box-shadow: 0 10px 28px rgba(8, 19, 29, 0.2);
  }

  .topbar {
    background: rgba(247, 251, 255, 0.94);
  }
}

@media (max-width: 640px) {
  body {
    background:
      linear-gradient(90deg, rgba(14, 165, 233, 0.045) 1px, transparent 1px),
      linear-gradient(0deg, rgba(14, 165, 233, 0.045) 1px, transparent 1px),
      #f3f7fb;
    background-size: 28px 28px, 28px 28px, auto;
  }

  .workspace {
    padding: 14px;
  }

  .top-actions {
    display: flex;
    width: calc(100vw - 28px);
    max-width: 100%;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .top-actions .primary-btn,
  .top-actions .ghost-btn,
  .top-actions .icon-btn,
  .top-actions .user-chip {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  .position-hero,
  .position-list-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .position-hero {
    align-items: stretch;
  }

  .position-import-head,
  .position-import-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .position-hero-metrics,
  .position-stats,
  .position-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .position-card-actions .danger-btn {
    grid-column: 1 / -1;
  }

  .candidate-hero {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .candidate-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .candidate-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .candidate-filter-count {
    justify-self: start;
  }

  .candidate-toolbar .search-box,
  .candidate-toolbar select,
  .candidate-filter-count {
    grid-column: 1 / -1;
  }

  .top-search-btn {
    min-width: 104px;
  }

  .talent-action-btn {
    min-width: 100px;
    padding-inline: 14px;
  }

  .top-actions .user-chip,
  .top-actions #logoutBtn {
    grid-column: auto;
  }

  .metric:hover,
  .position-card:hover,
  .map-card:hover,
  .finance-card:hover,
  .ledger-item:hover,
  .account-item:hover,
  .submission-item:hover,
  .list-item:hover {
    transform: none;
  }
}
