@font-face {
  font-family: "Pretendard Variable";
  src: url("./assets/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #eef2f5;
  --panel: #ffffff;
  --ink: #17212b;
  --muted: #657382;
  --line: #d8e2e9;
  --accent: #0f766e;
  --blue: #1d4ed8;
  --shadow: 0 22px 64px rgba(23, 33, 43, 0.12);
  --radius: 8px;
  --font-sans: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.portal-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 48px 20px;
}

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

.portal-title,
.portal-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

h1,
p {
  margin: 0;
}

.portal-header p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

h1 {
  margin-top: 3px;
  font-size: 28px;
  letter-spacing: 0;
}

.ghost-link {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #344557;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.ghost-link:hover {
  border-color: rgba(15, 118, 110, 0.45);
}

.ghost-link.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.portal-status {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 34px rgba(23, 33, 43, 0.08);
}

.portal-server-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 48px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.portal-health {
  color: var(--accent);
}

.portal-health::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.portal-health.warning {
  color: #b45309;
}

.portal-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-metrics article {
  display: grid;
  gap: 4px;
  min-height: 86px;
  align-content: center;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.portal-metrics article:last-child {
  border-right: 0;
}

.portal-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.portal-metrics strong {
  font-size: 25px;
}

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

.menu-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.menu-card:hover {
  border-color: rgba(15, 118, 110, 0.45);
}

.menu-card span {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f4f2;
  color: #0a5d57;
  font-size: 12px;
  font-weight: 900;
}

.menu-card.issue span {
  background: #eaf1ff;
  color: var(--blue);
}

.menu-card strong {
  align-self: end;
  font-size: 24px;
  letter-spacing: 0;
}

.menu-card p {
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 720px) {
  .portal-shell {
    padding: 28px 12px;
  }

  .portal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-actions {
    width: 100%;
    justify-content: stretch;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .portal-actions::-webkit-scrollbar {
    display: none;
  }

  .portal-actions .ghost-link {
    flex: 1;
    min-width: 0;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

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

  .portal-metrics article:nth-child(2) {
    border-right: 0;
  }

  .portal-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .menu-card {
    min-height: 180px;
  }
}
