:root {
  --bg: #ffffff;
  --ink: #162033;
  --muted: #627084;
  --line: #d8dee8;
  --soft: #f5f7fa;
  --soft-strong: #eef2f6;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --green: #15803d;
  --green-soft: #eaf7ef;
  --amber: #b45309;
  --amber-soft: #fff3df;
  --teal: #0f766e;
  --teal-soft: #e6fffb;
  --steel: #475569;
  --steel-soft: #f1f5f9;
  --red: #b42318;
  --red-soft: #fff0ee;
  --shadow: 0 18px 45px rgba(22, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, "Noto Sans KR", "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

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

.brand-logo {
  width: 150px;
  height: 52px;
  flex: 0 0 150px;
  object-fit: contain;
}

.eyebrow,
.section-kicker {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

.language-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(84px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.lang-button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.lang-button.active {
  background: var(--bg);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(22, 32, 51, 0.1);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.summary-item {
  min-height: 104px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 10px 25px rgba(22, 32, 51, 0.05);
}

.summary-item span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.summary-item strong {
  display: block;
  font-size: 32px;
  line-height: 1;
}

.connection-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--bg);
}

.connection-panel[data-status="connected"] {
  border-left-color: var(--green);
}

.connection-panel[data-status="config"],
.connection-panel[data-status="file"] {
  border-left-color: var(--amber);
}

.connection-panel[data-status="error"] {
  border-left-color: var(--red);
}

.connection-label {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.connection-panel strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.connection-panel span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.refresh-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(160px, 220px));
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.search-field,
.select-field {
  display: grid;
  gap: 8px;
}

.search-field span,
.select-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: var(--bg);
  color: var(--ink);
  outline: none;
}

input {
  padding: 0 12px;
}

select {
  padding: 0 36px 0 12px;
}

input:focus,
select:focus,
.lang-button:focus-visible,
.refresh-button:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.table-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.last-sync {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

th,
td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

td {
  font-size: 15px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.ticket-key {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

a.ticket-key:hover {
  color: var(--blue);
}

.ticket-title {
  min-width: 260px;
  font-weight: 750;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status-open {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-progress {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-test {
  background: var(--teal-soft);
  color: var(--teal);
}

.status-merged {
  background: var(--steel-soft);
  color: var(--steel);
}

.status-review,
.priority-medium {
  background: var(--soft-strong);
  color: var(--muted);
}

.status-done,
.priority-low {
  background: var(--green-soft);
  color: var(--green);
}

.priority-high {
  background: var(--red-soft);
  color: var(--red);
}

.empty-state {
  margin: 0;
  padding: 34px 20px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 22px;
  }

  .topbar,
  .table-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-switch {
    width: 100%;
  }

  .summary-grid,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .connection-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-item {
    min-height: 88px;
  }

  .last-sync {
    white-space: normal;
  }
}
