
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f6f8;
  color: #20242c;
  font-family:
    Arial,
    "Noto Sans JP",
    sans-serif;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: #202b3c;
  color: white;
}

header h1 {
  margin: 0;
  font-size: 21px;
}

.connection-status {
  font-size: 13px;
  color: #a8e6bd;
}

main {
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 24px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 4px #0000000d;
}

.summary-label {
  display: block;
  color: #747b87;
  font-size: 12px;
  font-weight: bold;
}

.summary-value {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  font-weight: bold;
}

.hit {
  color: #16834a;
}

.miss {
  color: #d58a18;
}

.refresh {
  color: #3579c7;
}

.error {
  color: #d63e3e;
}

.panel {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 4px #0000000d;
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.panel-header h2 {
  margin: 0;
  font-size: 17px;
}

#last-updated {
  color: #858b95;
  font-size: 12px;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-top: 1px solid #edf0f3;
  font-size: 13px;
}

th {
  background: #fafbfc;
  color: #747b87;
  font-weight: bold;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #858b95;
}

.status {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
}

.status-hit {
  color: #16834a;
  background: #e6f5ec;
}

.status-miss {
  color: #a96b0b;
  background: #fff3dc;
}

.status-refresh {
  color: #2867a9;
  background: #e8f1fc;
}

.status-error {
  color: #c83232;
  background: #fdeaea;
}

.status-unknown {
  color: #666;
  background: #eee;
}

button {
  padding: 7px 14px;
  border: none;
  border-radius: 5px;
  background: #2563eb;
  color: white;
  font-size: 12px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #174dbb;
}

button:disabled {
  background: #c7cbd2;
  cursor: not-allowed;
}

footer {
  padding: 24px;
  text-align: center;
  color: #999;
  font-size: 12px;
}

@media (max-width: 700px) {
  header {
    padding: 18px;
  }

  header h1 {
    font-size: 17px;
  }

  main {
    padding: 0 12px;
  }

  .summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .summary-card {
    padding: 14px;
  }

  .summary-value {
    font-size: 24px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
