:root {
  --bg: #f2f4f8;
  --bg-strong: #dde5f2;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: #ffffff;
  --text: #0c1730;
  --muted: #66748b;
  --line: rgba(12, 23, 48, 0.14);
  --primary: #0e3a8a;
  --accent: #c56b12;
  --pending: #74674a;
  --pending-bg: #f4ecd8;
  --success: #0c8f61;
  --danger: #b8612f;
  --shadow: 0 14px 38px rgba(12, 23, 48, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, #dce8ff 0%, transparent 32%),
    radial-gradient(circle at 95% 5%, #ffe4cf 0%, transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef2f7 100%);
  min-height: 100vh;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.45;
  pointer-events: none;
}

.orb-1 {
  width: 280px;
  height: 280px;
  background: #a7c5ff;
  top: -110px;
  left: -80px;
}

.orb-2 {
  width: 240px;
  height: 240px;
  background: #ffd2a4;
  top: -70px;
  right: -60px;
}

.layout {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 56px;
}

.sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(7, 17, 40, 0.95);
  color: #f5f7fb;
  padding: 22px 18px;
  box-shadow: var(--shadow);
}

.sidebar-kicker,
.kicker {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}

.sidebar-head h1 {
  margin: 8px 0 0;
  font-size: 34px;
  line-height: 0.95;
}

.task-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 26px;
}

.task-menu button {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
}

.task-menu button.active {
  background: linear-gradient(135deg, #fcf7eb 0%, #dfeaff 100%);
  color: var(--text);
  border-color: transparent;
}

.task-menu .menu-label {
  display: block;
  font-weight: 700;
}

.task-menu .menu-meta {
  display: block;
  margin-top: 4px;
  color: inherit;
  opacity: 0.72;
  font-size: 12px;
}

.content {
  min-width: 0;
}

.hero {
  margin-bottom: 20px;
}

.hero-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  text-align: center;
}

.hero-topline > div {
  flex: 1;
}

.hero h2 {
  margin: 8px 0 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
}

.submit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  flex-shrink: 0;
  cursor: pointer;
}

.submit-link img {
  display: block;
  width: 82px;
  height: auto;
}

button.submit-link {
  appearance: none;
}

.desc {
  margin: 0 auto;
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.control-panel {
  padding: 18px;
  margin-bottom: 18px;
}

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

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

.field span {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select,
.task-filters select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font: inherit;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="file"] {
  display: none;
}

.file-btn,
.ghost-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

.status-text {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hidden,
.view.hidden {
  display: none;
}

.section-card {
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h3,
.task-title {
  margin: 0;
  font-size: 28px;
  font-family: "Space Grotesk", sans-serif;
}

.section-head p,
.task-subtitle,
.section-meta {
  margin: 0;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(135deg, #fff 0%, #edf3fe 100%);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  font-family: "Space Grotesk", sans-serif;
}

.rank-strip-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.rank-pill {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff 0%, var(--bg-strong) 100%);
}

.rank-badge-wrap {
  min-height: 28px;
}

.rank-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}

.rank-badge-image {
  display: block;
  width: auto;
  height: 28px;
}

.rank-name {
  display: block;
  margin-top: 8px;
  font-weight: 700;
}

.task-filters {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

#taskTableMount {
  margin-top: 18px;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.task-performance-table {
  table-layout: fixed;
}

thead th {
  background: #e8edf6;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

thead tr:first-child th.grouped {
  text-align: center;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #edf1f6;
  font-size: 14px;
}

tbody tr:hover {
  background: #f8fbff;
}

.rank-col {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  width: 72px;
}

.col-rank {
  width: 96px;
}

.col-rankname {
  width: 240px;
}

.col-model {
  width: 320px;
}

.url-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.url-link img {
  display: block;
  width: 18px;
  height: 18px;
}

.metric-good {
  color: var(--success);
  font-weight: 700;
}

.metric-bad {
  color: var(--danger);
  font-weight: 700;
}

.pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--pending);
  background: var(--pending-bg);
  font-size: 12px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .task-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .control-grid,
  .stats-grid,
  .rank-strip-list,
  .task-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .layout {
    padding: 16px 14px 40px;
  }

  .hero-topline {
    flex-direction: column;
    align-items: center;
  }

  .hero h2 {
    font-size: 40px;
  }

  .task-menu,
  .control-grid,
  .stats-grid,
  .rank-strip-list,
  .task-filters {
    grid-template-columns: 1fr;
  }

  .control-row {
    flex-wrap: wrap;
  }
}
