/**
 * portal/static/styles.css — VPS 대시보드 허브 스타일
 *
 * Gov Data Explorer(dashboard/)와 동일한 다크 슬레이트 + 금색 악센트 톤.
 */
:root {
  --bg: #0c1117;
  --bg-card: #141b24;
  --bg-card-hover: #1a2430;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6eaf0;
  --text-muted: #8b96a5;
  --accent: #d4a017;
  --accent-dim: rgba(212, 160, 23, 0.14);
  --success: #3d9a6a;
  --warn: #c4841d;
  --danger: #c45c5c;
  --radius: 10px;
  --font-display: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

body {
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -15%, rgba(212, 160, 23, 0.1), transparent),
    linear-gradient(180deg, #0c1117 0%, #080b10 100%);
}

.hub-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* ── Header ── */
.hub-header {
  margin-bottom: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.brand-glyph {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(212, 160, 23, 0.35);
  color: var(--accent);
  font-size: 1.4rem;
}

.brand-eyebrow {
  margin: 0 0 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text);
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.filter-btn:hover {
  background: var(--bg-card);
  color: var(--text);
}

.filter-btn.is-active {
  background: var(--accent-dim);
  border-color: rgba(212, 160, 23, 0.45);
  color: var(--accent);
}

/* ── Card grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.15rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, background 0.18s, border-color 0.18s, box-shadow 0.18s;
  animation: fadeUp 0.45s ease both;
  animation-delay: var(--delay, 0ms);
}

.service-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: rgba(212, 160, 23, 0.3);
  box-shadow: var(--shadow);
}

.service-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.card-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.card-status.is-up::before {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.card-status.is-down::before {
  background: var(--danger);
}

.card-status.is-checking::before {
  background: var(--warn);
  animation: pulse 1s infinite;
}

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.card-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex: 1;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.tag {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.tag--gov { color: #7eb8da; background: rgba(126, 184, 218, 0.12); }
.tag--ai { color: #b39ddb; background: rgba(179, 157, 219, 0.12); }
.tag--content { color: #81c784; background: rgba(129, 199, 132, 0.12); }
.tag--analytics { color: #ffb74d; background: rgba(255, 183, 77, 0.12); }

.card-port {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
}

/* ── Footer ── */
.hub-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.hub-footer code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--text);
}

.sep {
  margin: 0 0.5rem;
  opacity: 0.4;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 600px) {
  .hub-shell {
    padding: 1.25rem 1rem 2rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}
