/* FANY 履歴ビューワー スタイル */

:root {
  --color-bg:       #f5f5f5;
  --color-surface:  #ffffff;
  --color-border:   #e0e0e0;
  --color-text:     #333333;
  --color-sub:      #666666;
  --color-accent:   #e84424;
  --color-paid:     #27ae60;
  --color-won:      #3498db;
  --color-unt:      #e67e22;
  --color-lost:     #95a5a6;
  --color-other:    #7f8c8d;
  --radius:         8px;
  --shadow:         0 1px 4px rgba(0,0,0,0.10);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
               'Noto Sans JP', sans-serif;
  font-size: 14px;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-text-size-adjust: 100%;
}

/* ---- ヘッダー ---- */
.header {
  background: var(--color-accent);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.header h1 {
  font-size: 16px;
  font-weight: bold;
  margin: 0;
  flex: 1;
}
.header-sub {
  font-size: 12px;
  opacity: 0.85;
}

/* ---- 受信バナー ---- */
.received-banner {
  background: var(--color-won);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: bold;
}

/* ---- フィルタパネル ---- */
.filter-panel {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 16px;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.filter-row:last-child { margin-bottom: 0; }

.filter-label {
  font-size: 12px;
  color: var(--color-sub);
  white-space: nowrap;
  min-width: 48px;
}

input[type="text"],
input[type="date"],
select {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 14px;
  background: var(--color-bg);
  color: var(--color-text);
  appearance: none;
  -webkit-appearance: none;
}
input[type="text"]   { flex: 1; min-width: 0; max-width: 400px; }
input[type="date"]   { width: 140px; }
select               { max-width: 220px; flex: 1; }

.filter-status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.status-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.status-check input { margin: 0; accent-color: var(--color-accent); }

.filter-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.result-count {
  font-size: 13px;
  color: var(--color-sub);
  font-weight: bold;
}
.btn-clear {
  border: none;
  background: transparent;
  color: var(--color-sub);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.btn-clear:hover { color: var(--color-accent); }

/* ---- コンテンツ ---- */
.main {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 12px 32px;
}

.scraped-at {
  font-size: 11px;
  color: var(--color-sub);
  margin-bottom: 8px;
  text-align: right;
}

/* ---- エンプティステート ---- */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--color-sub);
}
.empty-state p { margin: 8px 0; }
.empty-state a { color: var(--color-accent); }
.empty-state .empty-icon { font-size: 40px; }

/* ---- カード ---- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 10px;
  border-left: 4px solid var(--color-other);
  position: relative;
}
.card.status-paid       { border-left-color: var(--color-paid); }
.card.status-won        { border-left-color: var(--color-won); }
.card.status-unticketed { border-left-color: var(--color-unt); }
.card.status-lost       { border-left-color: var(--color-lost); opacity: 0.65; }
.card.status-other      { border-left-color: var(--color-other); }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  padding: 2px 7px;
  border-radius: 10px;
  margin-bottom: 6px;
}

.card-date {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.card-date-main {
  font-size: 15px;
  font-weight: bold;
}
.card-time {
  font-size: 12px;
  color: var(--color-sub);
}

.card-title {
  font-size: 14px;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 4px;
  word-break: break-all;
}

.card-venue {
  font-size: 13px;
  color: var(--color-sub);
  margin-bottom: 6px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--color-sub);
  flex-wrap: wrap;
}
.card-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: bold;
  margin-left: auto;
}
.card-link:hover { text-decoration: underline; }

.card-reserved {
  font-size: 11px;
  color: #aaa;
  margin-top: 6px;
}

/* ---- 導入案内リンク ---- */
.setup-link {
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: var(--color-sub);
}
.setup-link a { color: var(--color-accent); }

/* ---- レスポンシブ ---- */
@media (max-width: 480px) {
  .header { padding: 10px 12px; }
  .filter-panel { padding: 10px 12px; }
  .main { padding: 10px 8px 32px; }
  input[type="date"] { width: 130px; font-size: 13px; }
  select { font-size: 13px; }
}
