:root {
  --ui-bg: #f5f7fb;
  --ui-panel: #ffffff;
  --ui-text: #1f2937;
  --ui-muted: #6b7280;
  --ui-border: #e4e7ed;
  --ui-primary: #409eff;
  --ui-sidebar: #101828;
  --ui-sidebar-hover: #1f2a44;
  --ui-shadow: 0 8px 24px rgba(31, 41, 55, .06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ui-text);
  background: var(--ui-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
}

a {
  color: var(--ui-primary);
  text-decoration: none;
}

a:hover {
  color: #337ecc;
}

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  width: 232px;
  height: 100vh;
  flex: 0 0 232px;
  padding: 22px 16px;
  color: #fff;
  background: var(--ui-sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin-bottom: 22px;
  padding: 0 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .02em;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.sidebar a {
  display: block;
  padding: 11px 12px;
  color: #d0d5dd;
  border-radius: 8px;
  line-height: 1.35;
}

.sidebar a:hover,
.sidebar a.active {
  color: #fff;
  background: var(--ui-sidebar-hover);
}

.main {
  min-width: 0;
  flex: 1;
}

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

.page-title {
  color: #182230;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  color: #182230;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(16, 24, 40, .06);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
}

.topbar-back span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin-top: 0;
  line-height: 1;
}

.topbar-back:hover {
  color: #111827;
  border-color: #d0d5dd;
  background: #fff;
  text-decoration: none;
}

.topbar-back-text {
  color: #182230;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.topbar-back-text:hover {
  color: #111827;
  text-decoration: none;
}

.topbar-divider {
  width: 1px;
  height: 18px;
  background: #d8dde8;
}

.user-panel,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.loading-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--ui-primary);
  font-size: 14px;
  white-space: nowrap;
}

.loading-status.is-active {
  color: var(--ui-primary);
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.page-heading {
  justify-content: space-between;
  margin-bottom: 16px;
}

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

.user-panel {
  color: var(--ui-muted);
}

.content {
  width: min(100%, 1360px);
  padding: 24px 28px 36px;
}

.card,
.stat {
  background: var(--ui-panel);
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  box-shadow: var(--ui-shadow);
}

.card {
  padding: 22px;
  margin-bottom: 18px;
}

.card h2,
.card h3 {
  margin: 0 0 18px;
  color: #111827;
  font-weight: 700;
}

.card p {
  margin: 0 0 16px;
  color: var(--ui-muted);
}

.password-card {
  max-width: 720px;
}

.region-picker {
  width: 100%;
}

.region-picker-hint {
  margin-bottom: 10px;
  color: var(--ui-muted);
  font-size: 13px;
}

.region-city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 8px 10px;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: #fbfcff;
}

.region-province {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 8px;
  color: #111827;
  border-top: 1px solid #edf1f6;
  font-weight: 700;
}

.region-province:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.region-city-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: #344054;
}

.region-city-option input {
  width: auto;
  min-height: 0;
  box-shadow: none;
}

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

.stat {
  padding: 18px;
}

.stat strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.form-row label {
  padding-top: 8px;
  color: #475467;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  color: #303133;
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  outline: none;
  font: inherit;
  box-shadow: 0 0 0 1px #dcdfe6 inset;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

input.el-input__inner,
select.el-input__inner,
textarea.el-input__inner {
  display: block;
  width: 100%;
  min-height: 38px;
  height: auto;
  padding: 8px 11px;
  color: #303133;
  line-height: 1.5;
  background: #fff;
  border: 1px solid #dcdfe6 !important;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #dcdfe6 inset !important;
  appearance: auto;
}

textarea.el-input__inner {
  min-height: 116px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ui-primary) !important;
  box-shadow: 0 0 0 1px var(--ui-primary) inset, 0 0 0 2px rgba(64, 158, 255, .12) !important;
}

input[type="file"] {
  padding: 6px 10px;
}

input[type="checkbox"],
input[type="radio"],
input[type="checkbox"].el-input__inner,
input[type="radio"].el-input__inner {
  display: inline-block;
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 1px solid #b9c1ce !important;
  border-radius: 3px;
  box-shadow: none !important;
  vertical-align: middle;
  appearance: auto;
}

th input[type="checkbox"],
td input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

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

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
}

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

.btn.danger,
button.danger {
  background: #f56c6c;
  border-color: #f56c6c;
}

.btn.light {
  color: #606266;
  background: #fff;
  border-color: #dcdfe6;
}

.search {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.search input,
.search select {
  height: 38px;
  min-height: 38px;
  background-color: #fff;
}

.search input[type="date"] {
  color-scheme: light;
}

.search input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: .72;
  cursor: pointer;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
}

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

th,
td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ui-border);
}

th {
  color: #606266;
  background: #f5f7fa;
  font-weight: 700;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover,
table tr:hover td {
  background: #f9fbff;
}

.candidate-table {
  min-width: 1040px;
  table-layout: auto;
}

.candidate-table th,
.candidate-table td {
  white-space: nowrap;
}

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

.candidate-table .candidate-actions {
  flex-wrap: nowrap;
  min-width: 150px;
}

.alert {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 6px;
  border: 1px solid;
}

.alert-success {
  color: #529b2e;
  background: #f0f9eb;
  border-color: #e1f3d8;
}

.alert-error {
  color: #c45656;
  background: #fef0f0;
  border-color: #fde2e2;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: #409eff;
  background: #ecf5ff;
  border: 1px solid #d9ecff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pagination .btn.active {
  color: #fff;
  background: var(--ui-primary);
  border-color: var(--ui-primary);
}

.pagination .btn.disabled {
  color: #a8abb2;
  background: #f5f7fa;
  border-color: #e4e7ed;
  cursor: not-allowed;
  pointer-events: none;
}

.stage-form {
  align-items: center;
}

.stage-cell-value {
  margin-bottom: 8px;
  color: #303133;
  font-weight: 600;
}

.stage-form select {
  width: 150px;
}

td > select[form] {
  width: 150px;
}

.stage-editor {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stage-editor input[data-stage-interviewer] {
  width: 150px;
  min-width: 150px;
}

.element-datetime-picker {
  width: 220px;
}

.stage-form .element-datetime-picker {
  flex: 0 0 220px;
}

.el-picker-panel table,
.el-date-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
}

.el-picker-panel th,
.el-picker-panel td {
  padding: 0;
  text-align: center;
  vertical-align: middle;
  border-bottom: 0;
}

.el-picker-panel th {
  color: var(--el-text-color-regular);
  background: transparent;
  font-weight: 400;
  white-space: normal;
}

.el-date-table td {
  height: 30px;
  padding: 4px 0;
}

.el-date-table td .el-date-table-cell {
  width: 100%;
  height: 30px;
  padding: 3px 0;
}

.stage-progress {
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.stage-progress-head,
.stage-progress-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, .8fr) minmax(140px, .6fr);
  align-items: center;
  gap: 32px;
  min-height: 60px;
  padding: 0 16px;
}

.stage-progress-head {
  min-height: 52px;
  color: #667085;
  background: linear-gradient(180deg, #f8fafc 0%, #f3f6fa 100%);
  font-weight: 700;
  font-size: 15px;
}

.stage-progress-row {
  border-top: 1px solid #edf1f6;
  background: #fff;
}

.stage-progress-row:hover {
  background: #fbfdff;
}

.stage-name,
.stage-result {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.stage-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: #24364f;
  background: linear-gradient(180deg, #ffffff 0%, #f3f7fb 100%);
  border: 1px solid #dfe7f0;
  border-radius: 9px;
  box-shadow: 0 5px 12px rgba(16, 24, 40, .12);
  font-size: 18px;
  font-weight: 700;
}

.stage-result {
  width: fit-content;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 13px;
  background: #f1f9ee;
  color: #182230;
  font-weight: 600;
}

.stage-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: #fff;
  background: #67c23a;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.stage-result.is-danger .stage-check {
  background: #f56c6c;
  font-size: 16px;
  line-height: 1;
}

.stage-result.is-danger {
  color: #5f1d1d;
  background: #fff0f0;
}

.stage-result.is-pending {
  min-width: 0;
  padding: 0;
  background: transparent;
}

.login-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(24px, 4vw, 56px);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 10%, rgba(87, 222, 223, .24), transparent 26%),
    radial-gradient(circle at 90% 90%, rgba(48, 116, 137, .14), transparent 28%),
    linear-gradient(135deg, #f5fbfb 0%, #eaf3f5 100%);
}

.login-page::before,
.login-page::after {
  position: fixed;
  content: "";
  border: 1px solid rgba(37, 190, 194, .15);
  border-radius: 50%;
  pointer-events: none;
}

.login-page::before {
  top: -240px;
  left: -210px;
  width: 520px;
  height: 520px;
}

.login-page::after {
  right: -140px;
  bottom: -180px;
  width: 420px;
  height: 420px;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(460px, 1.1fr);
  width: min(100%, 1080px);
  min-height: 620px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(27, 65, 76, .16);
}

.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 58px 54px 48px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(126, 246, 240, .35), transparent 34%),
    linear-gradient(145deg, #183e4c 0%, #176d7b 52%, #27c2c5 100%);
}

.login-intro::before,
.login-intro::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 50%;
}

.login-intro::before {
  right: -190px;
  bottom: 35px;
  width: 380px;
  height: 380px;
}

.login-intro::after {
  right: -105px;
  bottom: 120px;
  width: 210px;
  height: 210px;
  background: rgba(255, 255, 255, .05);
}

.login-intro-content,
.login-feature-list {
  position: relative;
  z-index: 1;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 13px;
  color: #d8ffff;
  border: 1px solid rgba(211, 255, 253, .35);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
}

.login-intro h1 {
  margin: 30px 0 20px;
  color: #fff;
  font-size: clamp(34px, 3.2vw, 46px);
  line-height: 1.28;
  letter-spacing: -.03em;
}

.login-intro p {
  max-width: 370px;
  margin: 0;
  color: rgba(236, 255, 255, .78);
  font-size: 15px;
  line-height: 1.9;
}

.login-feature-list {
  display: grid;
  gap: 2px;
}

.login-feature-list div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .13);
}

.login-feature-list div:last-child {
  border-bottom: 0;
}

.login-feature-list span {
  color: #91f2ee;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.login-feature-list strong {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
}

.login-panel {
  display: flex;
  align-items: center;
  padding: 52px clamp(42px, 6vw, 76px);
}

.login-panel-inner {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.login-logo {
  margin-bottom: 42px;
}

.login-logo img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
}

.login-heading > span {
  color: #17aeb3;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
}

.login-heading h2 {
  margin: 10px 0 9px;
  color: #1c3139;
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.login-heading p {
  margin: 0 0 30px;
  color: #829299;
  font-size: 14px;
}

.login-form .form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-bottom: 20px;
}

.login-form .form-row label {
  padding: 0;
  color: #344d56;
  font-size: 14px;
  font-weight: 600;
}

.login-form input {
  height: 50px;
  padding: 0 16px;
  border: 1px solid #d9e4e6;
  border-radius: 11px;
  box-shadow: none;
  font-size: 15px;
}

.login-form input::placeholder {
  color: #a8b4b8;
}

.login-form input:focus {
  border-color: #22b8bd !important;
  box-shadow: 0 0 0 3px rgba(34, 184, 189, .12) !important;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 14px;
  color: #475467;
  font-size: 14px;
}

.login-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.login-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #159ba6;
}

.login-form button {
  width: 100%;
  min-height: 52px;
  margin-top: 5px;
  color: #fff;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(100deg, #159ba6 0%, #27c5c6 100%);
  box-shadow: 0 12px 24px rgba(27, 180, 184, .24);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  transition: transform .2s, box-shadow .2s, filter .2s;
}

.login-form button:hover {
  filter: brightness(1.03);
  box-shadow: 0 15px 30px rgba(27, 180, 184, .3);
  transform: translateY(-1px);
}

.login-form button:active {
  transform: translateY(0);
}

.login-panel .alert {
  margin-bottom: 20px;
}

.login-footer {
  margin: 32px 0 0;
  color: #a0adb2;
  text-align: center;
  font-size: 12px;
  letter-spacing: .05em;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px;
  color: #303133;
  background: #f5f7fa;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
}

.el-message-box__btns .el-button {
  min-height: 32px;
}

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

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

@media (max-width: 760px) {
  .login-page {
    align-items: flex-start;
    padding: 18px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 22px;
  }

  .login-intro {
    display: none;
  }

  .login-panel {
    min-height: calc(100vh - 36px);
    padding: 38px 24px 30px;
  }

  .login-logo {
    margin-bottom: 38px;
  }

  .login-heading h2 {
    font-size: 25px;
  }

  .app {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-basis: auto;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
    padding: 16px;
  }

  .topbar-back {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 16px;
    font-size: 40px;
  }

  .topbar-back-text {
    font-size: 24px;
  }

  .topbar-divider {
    height: 30px;
  }

  .page-title {
    font-size: 28px;
  }

  .content {
    padding: 16px;
  }

  .grid,
  .search,
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row label {
    padding-top: 0;
  }
}
