@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --hint: #94a3b8;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --sky: #0ea5e9;
  --sky-soft: #e0f2fe;
  --green: #10b981;
  --red: #ef4444;
  --orange: #f97316;
  --border: #e2e8f0;
  --border-blue: #bfdbfe;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  --shadow-blue: 0 8px 18px rgba(37, 99, 235, 0.18);
  --radius: 24px;
  --radius-sm: 16px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #f5f7fb 420px);
  color: var(--text);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.025em;
}

button, input, select { font-family: inherit; }
button { cursor: pointer; }

.app {
  max-width: 1640px;
  margin: 0 auto;
  padding: 24px 54px 56px;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand-mark {
  width: 64px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.05em;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

.brand-text {
  color: #2563eb;
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.035);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.12);
}

.refresh,
#healthBtn,
.form button,
.filters button,
.button-row button {
  height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

#healthBtn,
.form button,
.filters button {
  background: var(--blue);
  box-shadow: var(--shadow-blue);
}

.refresh:hover,
#healthBtn:hover,
.form button:hover,
.filters button:hover,
.button-row button:hover {
  transform: translateY(-1px);
  background: var(--blue-dark);
}

.secondary-btn,
.button-row .secondary-btn {
  background: var(--sky-soft);
  color: #075985;
  border: 1px solid #bae6fd;
  box-shadow: none;
}

.secondary-btn:hover,
.button-row .secondary-btn:hover {
  color: #fff;
  border-color: var(--blue);
  box-shadow: var(--shadow-blue);
}

.workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 16px;
  min-height: calc(100vh - 120px);
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.sidebar-title {
  padding: 4px 6px 12px;
  color: var(--hint);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tab {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #475569;
  padding: 0 14px;
  text-align: left;
  font-size: 14px;
  font-weight: 950;
  box-shadow: none;
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.tab:hover {
  background: #f1f5f9;
  color: var(--text);
  transform: none;
}

.tab.active {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-blue);
}

.tab-icon {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  color: transparent;
  background: #cbd5e1;
}

.tab.active .tab-icon {
  background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18);
}

.sidebar-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.sidebar-card-label {
  margin-bottom: 8px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
}

.sidebar-card-text {
  color: #334155;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
}

.content { min-width: 0; }
.panel { display: none; }
.panel.active { display: block; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin: 4px 4px 14px;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.055em;
}

h2 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.section-desc {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.45;
  text-align: right;
}

.toolbar-card,
.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.form {
  padding: 22px;
  border-radius: var(--radius);
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 950;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 0 13px;
  outline: none;
  font-size: 14px;
  font-weight: 850;
  transition: border 0.12s ease, box-shadow 0.12s ease;
}

input:focus,
select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.file-field { grid-column: span 2; }

input[type="file"] {
  height: auto;
  min-height: 42px;
  padding: 8px 10px;
}

input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 8px 11px;
  margin-right: 10px;
  font-weight: 950;
  cursor: pointer;
}

.notice {
  margin: 0 0 16px;
  padding: 13px 16px;
  border: 1px solid var(--border-blue);
  border-radius: 16px;
  background: var(--blue-soft);
  color: #1e40af;
  font-size: 13px;
  font-weight: 900;
}

.notice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.notice-card {
  padding: 16px 18px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.035);
}

.notice-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.notice-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.card,
.list,
pre {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.card,
.list {
  padding: 22px 24px;
}

pre {
  min-height: 54px;
  padding: 18px 20px;
  color: #334155;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.58;
  border-left: 5px solid var(--blue);
}

.muted {
  color: var(--hint);
  font-weight: 850;
}

.item {
  padding: 18px 0;
  border-bottom: 1px solid #edf2f7;
}

.item:first-child { padding-top: 0; }
.item:last-child { padding-bottom: 0; border-bottom: 0; }

.item-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
}

.item-title::before {
  content: "";
  width: 5px;
  height: 18px;
  border-radius: 999px;
  background: var(--blue);
}

.item-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.58;
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: 12px;
  padding: 0 14px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: var(--sky-soft);
  color: #075985;
  font-size: 13px;
  font-weight: 950;
  text-decoration: none;
}

.download:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  text-decoration: none;
}

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

th {
  padding: 15px 18px;
  border-top: 1px solid #dbeafe;
  border-bottom: 2px solid #bfdbfe;
  background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
  text-align: left;
}

td {
  padding: 15px 18px;
  border-bottom: 1px solid #edf2f7;
  color: #1e293b;
  font-size: 14px;
  font-weight: 850;
}

tbody tr:hover { background: #fbfdff; }
pre:not(:empty) { background: #fbfdff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #eef2f7; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

@media (max-width: 1100px) {
  .app { padding: 22px 24px 48px; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { position: static; min-height: auto; }
  .tabs { flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
  .tab { min-width: max-content; width: auto; }
  .sidebar-card { display: none; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .section-desc { text-align: left; }
  .notice-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .app { padding: 18px 16px 36px; }
  .header { align-items: flex-start; flex-direction: column; }
  .brand-text { font-size: 22px; white-space: normal; }
  .header-actions { width: 100%; }
  #healthBtn { flex: 1; }
  .toolbar-card,
  .form { grid-template-columns: 1fr; padding: 16px; }
  .file-field { grid-column: auto; }
  h2 { font-size: 24px; }
}
