* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080d1a;
  color: #e8eefc;
}

.container {
  max-width: 960px;
  margin: 40px auto;
  padding: 0 16px 40px;
}

/* ---- ダッシュボードヘッダー ---- */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dash-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #9aa8d0;
}

.dash-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ---- 統計グリッド ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-box {
  background: #111827;
  border: 1px solid #1e2a4a;
  border-radius: 10px;
  padding: 16px;
}

.stat-label {
  margin: 0 0 8px;
  font-size: 12px;
  color: #9aa8d0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-number {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

/* ---- カード ---- */
.card {
  background: #0f1629;
  border: 1px solid #1e2a4a;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.card h2 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #b8c5ed;
}

/* ---- テーブル ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 8px 12px;
  color: #7a8ab0;
  border-bottom: 1px solid #1e2a4a;
  font-weight: 500;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #141d35;
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.td-muted {
  color: #7a8ab0;
}

.url-code {
  font-family: monospace;
  font-size: 11px;
  background: #080d1a;
  border: 1px solid #1e2a4a;
  border-radius: 4px;
  padding: 3px 6px;
  word-break: break-all;
  display: inline-block;
}

/* ---- ログイン / プレビュー認証画面 ---- */
h1,
h2,
h3 {
  margin-top: 0;
}

label {
  display: block;
  margin: 14px 0 8px;
  color: #b8c5ed;
  font-size: 14px;
}

input,
button {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #1e2a4a;
  padding: 10px 12px;
  font-size: 14px;
}

input {
  background: #080d1a;
  color: #e8eefc;
}

button {
  margin-top: 14px;
  background: #4f7cff;
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

button.secondary {
  width: auto;
  margin: 0;
  background: #1e2a4a;
}

button.danger {
  width: auto;
  margin: 0;
  background: #7a1f38;
}

/* ---- ボタン / リンク ---- */
.link-button {
  display: inline-block;
  background: #4f7cff;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 8px;
}

.secondary-link {
  background: #1e2a4a;
}

/* ---- ユーザー管理画面 ---- */
.space-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.share-item {
  border-top: 1px solid #1e2a4a;
  padding: 12px 0;
}

.share-item:first-of-type {
  border-top: none;
}

code {
  display: inline-block;
  margin-top: 6px;
  background: #080d1a;
  border: 1px solid #1e2a4a;
  border-radius: 6px;
  padding: 6px 8px;
  word-break: break-all;
  font-size: 12px;
}

.muted {
  color: #7a8ab0;
}

.small-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  background: #080d1a;
  border: 1px solid #1e2a4a;
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
}

/* ---- アラート ---- */
.error {
  background: #3d1422;
  border: 1px solid #7a1f38;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 12px 0;
}

.success {
  background: #0f2e20;
  border: 1px solid #1a6040;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 12px 0;
}
