:root {
  --blue: #2468f2;
  --blue-dark: #164cc7;
  --ink: #172033;
  --muted: #6a7890;
  --line: #dbe4f2;
  --panel: #ffffff;
  --danger: #d93025;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 1100px;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fbff 0%, #eef4ff 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-panel {
  width: 420px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(30, 79, 160, 0.16);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), #67a4ff);
}

.login-panel h1,
.topbar h1,
.panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.login-panel h1 {
  margin-top: 18px;
  font-size: 28px;
}

.login-panel p,
.topbar p,
.panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.login-form {
  margin-top: 28px;
  display: grid;
  gap: 18px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

input,
select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 104, 242, 0.12);
}

button[type="submit"] {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}

button[type="submit"]:hover {
  background: var(--blue-dark);
}

.form-error {
  min-height: 20px;
  color: var(--danger);
}

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

.sidebar {
  min-height: 100vh;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.sidebar-brand span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.ghost-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 14px;
  text-align: left;
  color: #344057;
  background: transparent;
}

.nav-item.active {
  color: var(--blue);
  border-color: #cfe0ff;
  background: #edf4ff;
  font-weight: 700;
}

.ghost-button {
  margin-top: auto;
  border-color: var(--line);
  text-align: center;
  background: #fff;
}

.content {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

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

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 150px);
  gap: 12px;
}

.summary-card {
  min-height: 80px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 28px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 50px rgba(35, 83, 150, 0.08);
  overflow: hidden;
}

.panel-head {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.panel h2 {
  color: var(--blue);
  font-size: 22px;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  height: 54px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th {
  color: #31405a;
  background: #f4f7fc;
  font-weight: 700;
}

.empty-row {
  height: 120px;
  text-align: center;
  color: var(--muted);
}

.copy-link {
  color: var(--blue);
  background: transparent;
  border: 0;
  padding: 0;
}

.danger-button {
  min-height: 32px;
  border: 1px solid #ffd4d0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--danger);
  background: #fff7f6;
}

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

.status.ok {
  color: #11743a;
  background: #e9f8ef;
}

.status.fail {
  color: var(--danger);
  background: #fff0ef;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: rgba(23, 32, 51, 0.92);
}
