/* ===== Dashboard Responsive ===== */
@media (max-width: 900px) {
    .dash-kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .dash-rankings-row { grid-template-columns: 1fr; }
    .dash-fin-grid { flex-direction: column; align-items: stretch; }
    .dash-fin-op { text-align: center; }
    .dash-profit-row { flex-direction: column; }
    .dash-opp-grid { flex-direction: column; }
    .dash-opp-arrow { transform: rotate(90deg); }
}

@media (max-width: 600px) {
    .dash-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-kpi-value { font-size: 28px; }
    .dash-container { padding: 14px 14px 30px; }
    .tab-btn { padding: 12px 16px; font-size: 13px; }
    .dash-top-bar { flex-direction: column; gap: 10px; align-items: flex-start; }
    .dash-clinic-grid { grid-template-columns: 1fr; }
}

/* Inline editing */
.editable-cell { cursor: pointer; position: relative; }
.editable-cell:hover { background: #e8f4fd !important; }
.inline-input {
    width: 100%; padding: 4px 6px; font-size: 13px;
    border: 2px solid var(--primary-light); border-radius: 4px;
    outline: none; box-sizing: border-box;
}
.inline-select {
    width: 100%; padding: 4px 2px; font-size: 13px;
    border: 2px solid var(--primary-light); border-radius: 4px;
    outline: none; background: #fff; box-sizing: border-box;
}

/* Action buttons: デスクトップではmobile非表示、モバイルでは@media内で逆転 */
.mobile-actions { display: none; }

/* Edit field */
.edit-field { margin-bottom: 14px; }
.edit-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-light); margin-bottom: 4px; }

/* Clickable row */
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #f0f7ff !important; }

/* Staff trend cells */
.trend-cell { text-align: center; vertical-align: bottom; padding: 6px 8px !important; min-width: 60px; }
.trend-cell.trend-total { background: #f8fafc; border-left: 2px solid var(--border); }
.trend-bar-wrap { display: flex; align-items: flex-end; justify-content: center; height: 40px; margin-bottom: 2px; }
.trend-bar { width: 24px; border-radius: 3px 3px 0 0; min-height: 4px; transition: height 0.3s; }
.trend-rate { font-size: 13px; font-weight: 700; line-height: 1.2; }
.trend-detail { font-size: 11px; color: var(--text-light); }
.trend-na { color: var(--text-light); font-size: 13px; }
.trend-row-me { background: #eff6ff !important; }
.trend-row-me td { border-top: 2px solid var(--primary-light) !important; border-bottom: 2px solid var(--primary-light) !important; }
.trend-me-badge { font-size: 10px; background: var(--primary-light); color: #fff; padding: 1px 6px; border-radius: 8px; vertical-align: middle; margin-left: 4px; }
.dash-trend-note { font-size: 12px; color: var(--text-light); margin: 4px 0 10px; padding: 6px 12px; background: #f8fafc; border-left: 3px solid var(--border); border-radius: 0 4px 4px 0; }

/* === My Analytics (staff TOP) === */
.my-analytics-container { padding: 16px; max-width: 600px; margin: 0 auto; }

.my-score-hero {
    text-align: center;
    padding: 24px 16px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}
.my-score-number { font-size: 56px; font-weight: 800; line-height: 1; }
.my-score-label { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.my-score-sessions { font-size: 12px; color: var(--text-light); margin-top: 8px; }

.my-contract-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.my-contract-item {
    text-align: center;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 10px 4px;
    box-shadow: var(--shadow-sm);
}
.my-contract-num { display: block; font-size: 22px; font-weight: 700; }
.my-contract-lbl { font-size: 10px; color: var(--text-light); }
.my-rate { color: var(--primary) !important; }

.my-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.my-section h3 { font-size: 14px; margin-bottom: 12px; color: var(--primary-dark); }

.my-score-bar { display: flex; align-items: center; margin-bottom: 8px; }
.my-bar-label { width: 100px; font-size: 12px; flex-shrink: 0; }
.my-bar-track { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.my-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.my-bar-val { width: 36px; text-align: right; font-size: 14px; font-weight: 700; flex-shrink: 0; }

.my-cards-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.my-card { background: var(--card-bg); border-radius: 10px; padding: 12px; box-shadow: var(--shadow-sm); }
.my-card h4 { font-size: 13px; margin-bottom: 8px; }
.my-card-good { border-left: 3px solid var(--success); }
.my-card-improve { border-left: 3px solid var(--warning); }
.my-card-item { font-size: 12px; padding: 3px 0; color: var(--text); }

/* 次の1件シミュレーター */
.my-sim { background: var(--card-bg); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.my-sim-title { font-size: 12px; color: var(--text-light); margin-bottom: 8px; font-weight: 600; }
.my-sim-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 4px 0; }
.my-sim-arrow { color: var(--text-light); margin: 0 4px; }
.my-sim-diff { font-weight: 700; margin-left: 4px; }
.my-sim-tierup { background: var(--success-light); border: 1px solid var(--success); border-radius: 4px; padding: 2px 8px; font-size: 11px; color: var(--success); font-weight: 700; display: inline-block; margin-left: 8px; }

/* 今月のチャレンジ */
.my-challenge { background: var(--card-bg); border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); border-left: 4px solid var(--primary); }
.my-challenge-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.my-challenge-title { font-size: 15px; font-weight: 700; color: var(--primary-dark); }
.my-challenge-score { font-size: 13px; color: var(--text-light); }
.my-challenge-target { font-weight: 700; color: var(--primary); }
.my-challenge-reason { background: var(--warning-light); border-radius: 8px; padding: 12px; margin-bottom: 14px; font-size: 13px; line-height: 1.6; }
.my-challenge-reason-quote { font-style: italic; color: #666; border-left: 3px solid var(--warning); padding-left: 10px; margin: 8px 0; font-size: 13px; }
.my-peer-section-title { font-size: 13px; font-weight: 700; color: var(--primary-dark); margin-bottom: 10px; }
.my-peer-tip { background: #f8fafc; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--border); }
.my-peer-tip-header { font-size: 11px; color: var(--text-light); margin-bottom: 6px; }
.my-peer-tip-score { font-weight: 700; color: var(--success); }
.my-peer-tip-quote { font-size: 14px; font-weight: 600; line-height: 1.5; margin-bottom: 6px; color: var(--text); }
.my-peer-tip-desc { font-size: 12px; color: var(--text-light); line-height: 1.4; }

/* セッションフィルタ */
.my-filter-bar { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.my-filter-btn { padding: 4px 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--card-bg); font-size: 12px; cursor: pointer; color: var(--text); }
.my-filter-btn:active { opacity: 0.7; }
.my-filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.my-recent {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.my-recent:active { background: #f0f7ff; }
.my-recent-score { font-size: 20px; font-weight: 700; width: 44px; text-align: center; flex-shrink: 0; }
.my-recent-info { flex: 1; margin-left: 10px; }
.my-recent-name { font-size: 14px; font-weight: 600; }
.my-recent-date { font-size: 11px; color: var(--text-light); }
.my-recent-arrow { color: var(--text-light); font-size: 16px; }

.my-growth-hero { text-align: center; font-size: 16px; margin-bottom: 12px; }
.my-growth-item { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.my-growth-label { color: var(--text-light); }

.my-trend { display: flex; justify-content: center; gap: 12px; align-items: flex-end; padding: 8px 0; }
.my-trend-col { text-align: center; }
.my-trend-bar { width: 28px; border-radius: 4px 4px 0 0; margin: 0 auto 4px; min-height: 20px; }
.my-trend-score { font-size: 14px; font-weight: 700; }
.my-trend-month { font-size: 11px; color: var(--text-light); }
.my-trend-count { font-size: 10px; color: var(--text-light); }

/* Login map */
.login-map-clinic { margin-bottom: 20px; }
.login-map-clinic-name { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 8px; border: none; padding: 0; }
.login-map-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.login-map-table th { background: var(--primary-dark); color: #fff; padding: 6px 8px; font-weight: 600; text-align: center; font-size: 12px; }
.login-map-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: center; }
.login-map-cell { min-width: 56px; border-radius: 4px; }
.login-map-cell.fresh { background: #d1fae5; }
.login-map-cell.recent { background: #fef3c7; }
.login-map-cell.stale { background: #fee2e2; }
.login-map-cell.old { background: #f3f4f6; }
.login-map-cell.empty { color: var(--text-light); }
.login-map-date { font-weight: 700; font-size: 13px; line-height: 1.3; }
.login-map-time { font-size: 11px; color: var(--text-light); }
.login-map-empty { color: var(--text-light); font-style: italic; text-align: center; }
.login-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.login-status.active { background: #d1fae5; color: #065f46; }
.login-status.offline { background: #f3f4f6; color: #6b7280; }
.login-status.never { background: #fee2e2; color: #991b1b; }

/* === Score Guide UI === */
.score-label-wrap {
    position: relative;
}
.score-guide-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--info);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1;
    transition: background 0.2s;
}
.score-guide-icon:hover {
    background: var(--primary-light);
}
.score-guide-panel {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 100;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 14px 16px;
    width: 340px;
    max-width: 90vw;
    font-size: 12px;
    line-height: 1.6;
}
.score-guide-panel.open {
    display: block;
}
.score-guide-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary-light);
}
.score-guide-section {
    margin-bottom: 8px;
}
.score-guide-section-label {
    font-weight: 700;
    font-size: 11px;
    margin-bottom: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}
.score-guide-section-label.good-label {
    background: var(--success-light);
    color: #065f46;
}
.score-guide-section-label.improve-label {
    background: var(--danger-light);
    color: #991b1b;
}
.score-guide-item {
    padding: 3px 0 3px 16px;
    position: relative;
    color: var(--text);
}
.score-guide-item::before {
    position: absolute;
    left: 0;
    font-size: 12px;
}
.score-guide-good::before {
    content: "\2713";
    color: var(--success);
}
.score-guide-bad::before {
    content: "\2717";
    color: var(--danger);
}

/* ============================================================
   AI個別レビュー (Claude生成のパーソナライズド分析)
   ============================================================ */

.ai-review-container {
    margin: 20px 0 24px 0;
}

.ai-review-loading, .ai-review-error, .ai-review-empty {
    padding: 32px 24px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 12px;
    text-align: center;
    color: var(--text);
}
.ai-review-loading .spinner { margin: 0 auto 12px; }
.ai-review-loading-text {
    font-size: 13px;
    color: var(--text-light);
}
.ai-review-empty-icon { font-size: 40px; margin-bottom: 8px; }
.ai-review-empty-text { font-size: 13px; color: var(--text-light); }
.ai-review-error { background: #fee2e2; color: #991b1b; }

.ai-review-card {
    padding: 22px 24px;
    background: linear-gradient(135deg, #f8faff 0%, #eef2ff 55%, #fef3ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
    position: relative;
}

.ai-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(99,102,241,0.2);
}
.ai-review-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-dark);
}
.ai-review-icon { margin-right: 6px; }
.ai-review-session-count {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
    margin-left: 6px;
}
.ai-review-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 11px;
    color: var(--text-light);
}
.ai-review-freshness { white-space: nowrap; }
.ai-review-refresh-btn {
    background: white;
    border: 1px solid #c7d2fe;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.ai-review-refresh-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ai-review-summary {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text);
    background: rgba(255,255,255,0.7);
    padding: 14px 16px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-light);
    margin-bottom: 18px;
}

.ai-review-patterns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}
.ai-pattern {
    background: white;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ai-pattern-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 6px;
}
.ai-pattern-winning .ai-pattern-title { color: var(--success); }
.ai-pattern-losing .ai-pattern-title { color: var(--danger); }

.ai-pattern-summary {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.5;
}

.ai-pattern-points {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ai-pattern-point {
    padding: 8px 10px;
    border-left: 3px solid transparent;
    border-radius: 4px;
    margin-bottom: 6px;
    background: #f9fafb;
    transition: background 0.15s, transform 0.1s;
}
.ai-pattern-point[onclick] { cursor: pointer; }
.ai-pattern-point[onclick]:hover { background: #eef2ff; transform: translateX(2px); }
.ai-pattern-winning .ai-pattern-point { border-left-color: var(--success); }
.ai-pattern-losing .ai-pattern-point { border-left-color: var(--danger); }

.ai-point-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.ai-point-quote {
    font-size: 12px;
    color: var(--text-light);
    background: white;
    padding: 5px 8px;
    border-radius: 4px;
    line-height: 1.55;
}

.phrase-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    margin-right: 6px;
    vertical-align: middle;
}
.phrase-badge.verified {
    background: #d1fae5;
    color: #065f46;
}
.phrase-badge.generic {
    background: #fef3c7;
    color: #78350f;
}

/* Monthly actions */
.ai-review-actions {
    background: white;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ai-review-section-head {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 10px;
}
.ai-action-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: ai-act-counter;
}
.ai-action-item {
    counter-increment: ai-act-counter;
    position: relative;
    padding: 10px 10px 10px 38px;
    margin-bottom: 8px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}
.ai-action-item::before {
    content: counter(ai-act-counter);
    position: absolute;
    left: 10px;
    top: 10px;
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-action-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.ai-action-why, .ai-action-how {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.55;
}
.ai-action-kw {
    font-weight: 700;
    color: var(--primary);
    margin-right: 4px;
}

/* Phrase swaps */
.ai-review-phrases {
    background: white;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ai-phrase-swap {
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.15s;
}
.ai-phrase-swap[onclick] { cursor: pointer; }
.ai-phrase-swap[onclick]:hover { background: #eef2ff; }
.ai-phrase-scene {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}
.ai-phrase-bad, .ai-phrase-better {
    font-size: 13px;
    line-height: 1.55;
    padding: 4px 0;
}
.ai-phrase-bad {
    color: #b91c1c;
}
.ai-phrase-better {
    color: #047857;
    font-weight: 600;
}
.ai-phrase-arrow {
    display: inline-block;
    margin-right: 6px;
}

/* モバイル */
@media (max-width: 640px) {
    .ai-review-patterns {
        grid-template-columns: 1fr;
    }
    .ai-review-card { padding: 16px 14px; }
    .ai-review-summary { font-size: 13px; }
}

/* AIレビュー: ピア比較セクション */
.ai-peer-comparison {
    background: white;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ai-peer-meta {
    font-weight: 400;
    font-size: 12px;
    color: var(--text-light);
}
.ai-peer-summary {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
    background: #f9fafb;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}
.ai-peer-deltas {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-peer-delta-row {
    display: grid;
    grid-template-columns: 130px 1fr 140px;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}
.ai-peer-axis {
    font-weight: 600;
    color: var(--text);
}
.ai-peer-bar {
    position: relative;
    display: block;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: visible;
}
.ai-peer-bar-mine {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 6px;
    max-width: 100%;
}
.ai-peer-bar-marker {
    position: absolute;
    top: -2px;
    width: 2px;
    height: 16px;
    background: var(--accent);
    transform: translateX(-50%);
    z-index: 2;
}
.ai-peer-bar-marker::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid var(--accent);
}
.ai-peer-numbers {
    display: flex;
    gap: 6px;
    align-items: baseline;
    justify-content: flex-end;
    font-size: 11px;
}
.ai-peer-mine { font-weight: 700; color: var(--primary); }
.ai-peer-vs { color: var(--text-light); font-size: 10px; }
.ai-peer-other { color: var(--accent); font-weight: 600; }
.ai-peer-gap { font-weight: 700; }

@media (max-width: 640px) {
    .ai-peer-delta-row {
        grid-template-columns: 100px 1fr 110px;
        font-size: 11px;
    }
}

.ai-warmup-btn {
    margin-left: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15,76,117,0.25);
    transition: transform 0.1s;
}
.ai-warmup-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(15,76,117,0.35); }

/* AIレビュー履歴 */
.ai-history-badge {
    display: inline-block;
    padding: 1px 8px;
    margin-left: 8px;
    background: #fef3c7;
    color: #78350f;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    vertical-align: middle;
}
.ai-history-list { display: flex; flex-direction: column; gap: 8px; }
.ai-history-empty { text-align: center; padding: 24px; color: var(--text-light); font-size: 13px; }
.ai-history-item {
    padding: 12px 14px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid var(--primary-light);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.1s;
}
.ai-history-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); transform: translateX(2px); }
.ai-history-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}
.ai-history-sessions { font-weight: 400; color: var(--text-light); font-size: 11px; }
.ai-history-summary {
    font-size: 13px;
    color: var(--text);
    line-height: 1.55;
    margin-bottom: 4px;
}
.ai-history-arrow { font-size: 11px; color: var(--primary-light); text-align: right; }

/* ============================================================
   全セッション一覧（スタッフ分析内）
   ============================================================ */
.all-sessions-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-light);
    margin-left: 8px;
}
.all-sessions-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 14px 0;
    align-items: center;
}
.cat-chip {
    padding: 4px 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
}
.cat-chip:hover { background: var(--bg); }
.cat-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 700;
}
.cat-chip-other { border-left: 3px solid var(--warning); }
.cat-chip-unknown { border-left: 3px solid var(--text-light); opacity: 0.85; }
.all-sessions-group-toggle {
    margin-left: auto;
    padding: 4px 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-light);
}
.all-sessions-group-toggle.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 700;
}

.all-sessions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 8px 0 16px 0;
}
.all-sessions-table th,
.all-sessions-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}
.all-sessions-table th {
    background: #f9fafb;
    font-weight: 700;
    color: #374151;
    font-size: 12px;
}
.all-sessions-table th.sortable { cursor: pointer; user-select: none; }
.all-sessions-table th.sortable:hover { background: #f0f3f7; }
.all-sessions-table tbody tr:hover { background: #f9fafb; }
.all-sessions-table .sess-date { white-space: nowrap; font-family: monospace; font-size: 12px; }
.all-sessions-table .sess-score { text-align: right; font-weight: 700; }
.all-sessions-table .sess-link { color: var(--primary-light); font-weight: 700; }

.cat-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.cat-tag.cat-normal { background: #e0f2fe; color: #075985; }
.cat-tag.cat-other { background: #fef3c7; color: #78350f; }

.month-group {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    background: white;
}
.month-summary {
    cursor: pointer;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}
.month-summary::-webkit-details-marker { display: none; }
.month-summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.15s;
    font-size: 10px;
    color: var(--text-light);
}
.month-group[open] .month-summary::before { transform: rotate(90deg); }
.month-label { color: var(--primary); font-size: 14px; }
.month-stats { font-size: 12px; color: var(--text-light); font-weight: 400; }

@media (max-width: 640px) {
    .all-sessions-table { font-size: 11px; }
    .all-sessions-table th, .all-sessions-table td { padding: 4px 6px; }
    .all-sessions-filters { font-size: 11px; }
}
