:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #172033;
  background: #f4f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 8%, rgba(64, 137, 255, 0.22), transparent 28rem),
    radial-gradient(circle at 82% 0%, rgba(11, 205, 147, 0.18), transparent 24rem),
    #f4f7fb;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero > div,
.panel {
  border: 1px solid rgba(25, 77, 140, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 60px rgba(36, 69, 110, 0.12);
  backdrop-filter: blur(18px);
}

.hero > div:first-child {
  padding: clamp(26px, 5vw, 52px);
}

.eyebrow {
  margin: 0 0 10px;
  color: #1677ff;
  font-weight: 800;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.title-row .eyebrow {
  margin: 0;
}

.domain-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #b8d8ff;
  border-radius: 999px;
  padding: 0 12px;
  color: #155eef;
  background: #eaf3ff;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1;
}

.hero p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 18px;
  color: #5c667a;
  font-size: 18px;
  line-height: 1.65;
}

.login-select {
  max-width: 360px;
  margin-top: 22px;
}

.employee-login,
.password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  max-width: 560px;
  margin-top: 14px;
}

.password-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.employee-login p,
.password-form p {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  color: #d92d20;
  font-weight: 800;
}

.total-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 24px;
  color: #172033;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.92)),
    radial-gradient(circle at 92% 8%, rgba(22, 119, 255, 0.16), transparent 9rem);
}

.summary-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.total-card span,
.total-card em,
.summary-rank {
  color: #5c667a;
  font-style: normal;
}

.total-card strong {
  color: #1677ff;
  font-size: 40px;
  line-height: 1;
}

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

.summary-grid div {
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  padding: 10px;
  background: #f7faff;
}

.summary-grid span,
.summary-grid b {
  display: block;
}

.summary-grid b {
  margin-top: 6px;
  color: #172033;
  font-size: 18px;
}

.summary-rank {
  display: grid;
  gap: 8px;
}

.rank-list {
  display: grid;
  gap: 6px;
  color: #172033;
  font-size: 13px;
}

.rank-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #d8e0ec;
  padding-top: 6px;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  color: #4e5b70;
  font-weight: 700;
}

input {
  width: 100%;
  height: 44px;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  padding: 0 12px;
  color: #172033;
  background: #fff;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select {
  width: 100%;
  height: 44px;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  padding: 0 12px;
  color: #172033;
  background: #fff;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12);
}

select:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12);
}

input[readonly] {
  color: #1677ff;
  font-weight: 800;
  background: #f7faff;
}

.ratio-input {
  position: relative;
}

.ratio-input b {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: #8390a4;
}

.ratio-input input {
  padding-right: 34px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

button {
  height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: #1677ff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(22, 119, 255, 0.24);
}

.ghost {
  color: #1677ff;
  background: #eaf3ff;
}

.danger {
  color: #ff3b30;
  background: #fff0ef;
}

.table-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.table-head span {
  color: #8390a4;
}

.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

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

.compare-grid div {
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  padding: 14px;
  background: #f7faff;
}

.compare-grid span,
.compare-grid b {
  display: block;
}

.compare-grid b {
  margin-top: 8px;
  color: #1677ff;
  font-size: 24px;
}

.year-summary {
  margin-top: 18px;
}

.month-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  align-items: end;
}

.month-bar {
  display: grid;
  gap: 6px;
  min-height: 130px;
  align-content: end;
  text-align: center;
  color: #5c667a;
  font-size: 12px;
}

.month-bar i {
  display: block;
  min-height: 4px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #1677ff, #0bcd93);
}

.month-bar b {
  color: #172033;
}

.month-bar em {
  color: #5c667a;
  font-style: normal;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
}

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

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
}

th {
  color: #111827;
  background: #f7faff;
}

td:nth-child(5),
td:nth-child(8) {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.thumb {
  width: 70px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #d8e0ec;
}

.thumb-button {
  width: 70px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.thumb-button:hover {
  transform: none;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.14);
}

.empty {
  color: #8390a4;
  text-align: center;
}

.delete {
  height: 34px;
  color: #ff3b30;
  background: #fff0ef;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.badge-new {
  color: #b45309;
  background: #fff7ed;
}

.badge-old {
  color: #047857;
  background: #ecfdf5;
}

.badge-pending {
  color: #b42318;
  background: #fff0ef;
}

.badge-approved {
  color: #155eef;
  background: #eaf3ff;
}

.approve {
  height: 34px;
  color: #047857;
  background: #ecfdf5;
}

.image-dialog {
  width: min(920px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(23, 32, 51, 0.26);
}

.image-dialog::backdrop {
  background: rgba(15, 23, 42, 0.56);
}

.image-dialog button {
  display: block;
  margin: 0 0 12px auto;
}

.image-dialog img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  background: #f4f7fb;
}

@media (max-width: 980px) {
  .hero,
  .employee-login,
  .password-form,
  .form-grid,
  .filters,
  .compare-grid,
  .month-bars {
    grid-template-columns: 1fr;
  }

  .actions {
    justify-content: stretch;
  }

  button {
    flex: 1;
  }
}
