:root {
  --bg: #eff2f8;
  --panel: #ffffff;
  --card: #ffffff;
  --line: #d8e1ef;
  --text: #223149;
  --muted: #70809c;
  --primary: #3b5998;
  --primary-hover: #304c8c;
  --accent: #ed89ab;
  --ok: #1f9f65;
  --warn: #ac7a05;
  --bad: #be2f3a;
  --shadow: 0 14px 40px rgba(38, 58, 97, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(59, 89, 152, 0.12), transparent 34%),
    radial-gradient(circle at 90% 14%, rgba(237, 137, 171, 0.18), transparent 30%),
    var(--bg);
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.side-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 16px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8faff);
}

.brand-panel h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0.5px;
}

.brand-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.menu-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.menu-item {
  text-decoration: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.menu-item:hover {
  background: #ebf0ff;
}

.menu-item.active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(59, 89, 152, 0.25);
}

.main-panel {
  padding: 22px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.page-name {
  font-size: 24px;
  font-weight: 700;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #c9d3e7;
  box-shadow: 0 0 0 3px rgba(201, 211, 231, 0.28);
  flex: 0 0 auto;
}

.status-dot.status-ok {
  background: #1f9f65;
  box-shadow: 0 0 0 3px rgba(31, 159, 101, 0.2);
}

.status-dot.status-bad {
  background: #be2f3a;
  box-shadow: 0 0 0 3px rgba(190, 47, 58, 0.2);
}

.status-dot.status-unknown {
  background: #ac7a05;
  box-shadow: 0 0 0 3px rgba(172, 122, 5, 0.2);
}

.query-total {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(206, 219, 244, 0.9);
  background: rgba(240, 245, 255, 0.9);
  color: #2b4480;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1px;
}

.announcement-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  padding: 20px;
  margin-bottom: 16px;
  color: #ffffff;
  box-shadow: var(--shadow);
  background-image:
    linear-gradient(105deg, rgba(28, 43, 74, 0.35), rgba(59, 89, 152, 0.45)),
    url("https://www.dmoe.cc/random.php");
  background-size: cover;
  background-position: center center;
}

.announcement-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 700;
}

.announcement-meta {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.announcement-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(210, 220, 238, 0.9);
  backdrop-filter: blur(8px);
}

.announcement-status span {
  color: #1f2f4f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.announcement-card h2 {
  margin: 10px 0 6px;
  font-size: 24px;
}

.announcement-card p {
  margin: 0;
  opacity: 0.92;
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.shortcut-card {
  color: #ffffff;
  background: linear-gradient(145deg, #3b5998, #4365ac);
}

.shortcut-card h3 {
  margin-bottom: 14px;
}

.shortcut-item {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.shortcut-item:last-child {
  border-bottom: 0;
}

.shortcut-item span {
  font-size: 12px;
  opacity: 0.9;
}

.query-card,
.info-card {
  min-height: 220px;
}

.result-card {
  grid-column: 1 / -1;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.light-tip {
  font-size: 12px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field {
  display: grid;
  gap: 5px;
}

.field span {
  font-size: 13px;
  color: var(--muted);
}

input {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 89, 152, 0.14);
}

.primary-btn {
  margin-top: 12px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn:hover {
  background: var(--primary-hover);
}

.primary-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed #dce5f2;
}

.kv:last-child {
  border-bottom: 0;
}

.kv span {
  font-size: 13px;
  color: var(--muted);
}

.kv b {
  font-size: 13px;
  color: var(--text);
}

.empty-state {
  color: var(--muted);
  font-size: 14px;
}

.egg-detail-line {
  display: grid;
  gap: 8px;
}

.egg-detail-line > b {
  font-size: 14px;
}

.egg-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.egg-chip {
  border-radius: 999px;
  border: 1px solid #c8d5ee;
  background: #ecf2ff;
  color: #314f90;
  padding: 6px 10px;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    grid-column: auto;
  }
}

@media (max-width: 960px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .menu-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

}

@media (max-width: 640px) {
  .main-panel {
    padding: 14px;
  }

  .page-name {
    font-size: 22px;
  }

  .announcement-card h2 {
    font-size: 19px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .announcement-meta {
    position: static;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 0 10px;
    gap: 8px;
  }

}
