*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #eef3f8;
  color: #142033;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 28% -10%, rgba(79, 131, 232, 0.18), transparent 34%), linear-gradient(135deg, #f8fbff 0%, #edf3f8 46%, #e8eef5 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.sidebar {
  position: fixed;
  left: 18px;
  top: 18px;
  bottom: 18px;
  width: 230px;
  padding: 22px 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background: linear-gradient(180deg, #111d35 0%, #0d1729 100%);
  color: #dce8fb;
  box-shadow: 0 24px 70px rgba(14, 29, 55, 0.28);
  overflow: auto;
}

.brand {
  position: relative;
  margin: 0 8px 28px;
  padding: 0 0 22px 48px;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand::before {
  content: ""; /* 清空文字 */
  position: absolute;
  left: 0;
  top: -4px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  /* 替换渐变背景为你的logo图 */
  background: url("https://my.52yhkj.com/assets/mylogo.png") center / contain no-repeat;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(64, 117, 222, 0.38);
}

.sidebar a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: 7px 0;
  padding: 0 14px;
  border-radius: 14px;
  color: #b9c9e5;
  font-weight: 650;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar a::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: rgba(186, 203, 229, 0.45);
}

.sidebar a:hover,
.sidebar a.active {
  background: linear-gradient(135deg, rgba(93, 145, 238, 0.24), rgba(71, 126, 226, 0.14));
  color: #fff;
  transform: translateX(2px);
  box-shadow: inset 0 0 0 1px rgba(117, 164, 255, 0.24);
}

.sidebar a:hover::before,
.sidebar a.active::before {
  background: #75a4ff;
  box-shadow: 0 0 0 4px rgba(117, 164, 255, 0.13);
}

.main {
  margin-left: 274px;
  padding: 28px 30px 44px;
  max-width: 1680px;
}

.login-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: radial-gradient(circle at 20% 20%, rgba(105, 155, 255, 0.25), transparent 32%), linear-gradient(135deg, #0e1b31, #223f73);
}

.login-card {
  width: min(390px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 90px rgba(11, 22, 42, 0.32);
}

h1 {
  margin: 0;
  color: #10213f;
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 16px;
  color: #1c2a3f;
  font-size: 18px;
  font-weight: 800;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  padding: 4px 0 2px;
  gap: 14px;
}

.page-head h1 {
  position: relative;
  padding-left: 16px;
}

.page-head h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 5px;
  width: 5px;
  border-radius: 999px;
  background: #4f83e8;
}

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

.panel {
  position: relative;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(216, 225, 236, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(45, 65, 92, 0.08);
  overflow: auto;
}

.panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.filters,
.grid-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filters {
  padding: 14px;
  border: 1px solid #e4ebf4;
  border-radius: 16px;
  background: #f8fbfe;
}

input,
select {
  height: 38px;
  min-width: 120px;
  border: 1px solid #d9e3ef;
  border-radius: 11px;
  padding: 0 12px;
  background: #fff;
  color: #1d2939;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input::placeholder {
  color: #9aa8ba;
}

input:focus,
select:focus {
  border-color: #6c9bf0;
  box-shadow: 0 0 0 4px rgba(79, 131, 232, 0.12);
}

label {
  display: block;
  margin: 14px 0;
  color: #526173;
  font-weight: 650;
}

label input {
  width: 100%;
  margin-top: 8px;
}

button,
.button {
  height: 38px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #5d91ee, #477ee2);
  color: #fff;
  padding: 0 17px;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(79, 131, 232, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.button {
  line-height: 38px;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(79, 131, 232, 0.28);
}

button:active,
.button:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(79, 131, 232, 0.2);
}

.small {
  height: 31px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 13px;
}

.ok {
  background: linear-gradient(135deg, #22b879, #15975f);
  box-shadow: 0 10px 20px rgba(22, 161, 99, 0.2);
}

.danger {
  background: linear-gradient(135deg, #f06565, #df3d43);
  box-shadow: 0 10px 20px rgba(229, 72, 77, 0.18);
}

.detail {
  background: linear-gradient(135deg, #5d91ee, #477ee2);
}

.link {
  color: #fff;
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
}

.inline input {
  height: 31px;
  min-width: 112px;
  border-radius: 9px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid #edf2f7;
  padding: 13px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbfe;
  color: #687789;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: #f8fbff;
}

td {
  color: #27364b;
}

.muted {
  color: #8a98aa;
  font-size: 12px;
}

.empty {
  text-align: center;
  color: #8a98aa;
  padding: 40px;
}

.error {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #ffd4d4;
  border-radius: 12px;
  background: #fff1f1;
  color: #bd3037;
  font-weight: 650;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pending {
  background: #fff6dc;
  color: #a96800;
}

.approved {
  background: #e8f8ef;
  color: #0f7a48;
}

.rejected {
  background: #fff0f0;
  color: #c73535;
}

.expired {
  background: #eef2f6;
  color: #667085;
}

.detail-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 0 28px;
}

.detail-group {
  grid-column: 1 / -1;
  margin: 22px 0 4px;
  padding: 13px 0 8px;
  border-bottom: 1px solid #e7edf5;
  color: #10213f;
  font-size: 16px;
  font-weight: 850;
}

.detail-group:first-child {
  margin-top: 0;
}

.detail-row {
  padding: 14px 0;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.detail-row span {
  flex: 0 0 98px;
  color: #697789;
  font-weight: 650;
}

.detail-row strong {
  flex: 1;
  color: #18263a;
  font-weight: 750;
  line-height: 1.7;
  white-space: normal;
  word-break: break-all;
}

.grid-form input,
.grid-form select {
  min-width: 150px;
}

.grid-form button {
  margin-left: auto;
}

@media (max-width: 980px) {
  .sidebar {
    position: static;
    width: auto;
    margin: 14px 14px 0;
    display: flex;
    gap: 8px;
    align-items: center;
    overflow: auto;
  }

  .brand {
    flex: 0 0 auto;
    margin: 0 10px 0 0;
    padding: 0 14px 0 46px;
    border-bottom: 0;
  }

  .sidebar a {
    flex: 0 0 auto;
  }

  .main {
    margin-left: 0;
    padding: 18px 14px 36px;
  }

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

  .detail-panel {
    grid-template-columns: 1fr;
  }

  .filters,
  .grid-form {
    align-items: stretch;
  }

  .filters input,
  .filters select,
  .grid-form input,
  .grid-form select,
  .filters button,
  .grid-form button {
    width: 100%;
    margin-left: 0;
  }
}
