/* =============================================
   SMD 会員ダッシュボード - フロントエンド スタイル
   ============================================= */

/* ── ベース ── */
.smd-dashboard {
    max-width: 860px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    color: #2d3748;
    line-height: 1.7;
}

/* ── ヘッダー ── */
.smd-header {
    background: linear-gradient(135deg, #4f7fe8 0%, #5b4f9a 100%);
    border-radius: 14px;
    padding: 28px 32px;
    margin-bottom: 24px;
    color: white;
}
.smd-welcome { margin: 0 0 4px; font-size: 0.95em; opacity: 0.85; }
.smd-name    { margin: 0 0 12px; font-size: 1.6em; font-weight: 700; }
.smd-level-badge {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(255,255,255,0.25);
    border-radius: 20px;
    font-size: 0.88em;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ── セクション共通 ── */
.smd-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 26px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.smd-section-title {
    margin: 0 0 16px;
    font-size: 1.05em;
    font-weight: 700;
    color: #2d3748;
    padding-bottom: 12px;
    border-bottom: 2px solid #edf2f7;
}

/* ── お知らせ ── */
.smd-notices {
    border-left: 4px solid #f6ad55;
}
.smd-notice-item {
    background: #fffbf0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 10px;
}
.smd-notice-item:last-child { margin-bottom: 0; }
.smd-notice-title {
    margin: 0 0 6px;
    font-weight: 700;
    color: #744210;
    font-size: 1em;
}
.smd-notice-body { margin: 0; }

/* ── 会員情報テーブル ── */
.smd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.97em;
}
.smd-table th,
.smd-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: middle;
}
.smd-table tr:last-child th,
.smd-table tr:last-child td { border-bottom: none; }
.smd-table th {
    width: 170px;
    color: #718096;
    font-weight: 600;
    background: #f7fafc;
}

/* ── バッジ ── */
.smd-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 0.83em;
    font-weight: 700;
}
.smd-badge-blue  { background: #ebf4ff; color: #2b6cb0; }
.smd-badge-green { background: #f0fff4; color: #276749; }
.smd-badge-red   { background: #fff5f5; color: #c53030; }

.smd-muted { color: #a0aec0; font-size: 0.93em; }
.smd-link  { margin-left: 10px; color: #4299e1; font-size: 0.9em; text-decoration: none; }
.smd-link:hover { text-decoration: underline; }

/* ── 受講開始日フォーム ── */
.smd-form-box {
    margin-top: 18px;
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 10px;
    padding: 18px 22px;
}
.smd-form-box h4 { margin: 0 0 6px; color: #2b6cb0; font-size: 1em; }
.smd-form-desc   { margin: 0 0 14px; color: #4a5568; font-size: 0.92em; }
.smd-form-box input[type="date"] {
    padding: 7px 12px;
    border: 1px solid #bee3f8;
    border-radius: 7px;
    font-size: 0.96em;
    margin-right: 10px;
}
#smd-start-date-result { margin-top: 10px; }

/* ── ボタン ── */
.smd-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 7px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: all 0.18s ease;
    line-height: 1.4;
}
.smd-btn-primary {
    background: #4299e1;
    color: #fff;
    border-color: #4299e1;
}
.smd-btn-primary:hover { background: #2b6cb0; border-color: #2b6cb0; color: #fff; }

.smd-btn-outline {
    background: #fff;
    color: #4a5568;
    border-color: #cbd5e0;
}
.smd-btn-outline:hover { background: #edf2f7; color: #2d3748; text-decoration: none; }

.smd-btn-disabled {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 7px;
    font-size: 0.9em;
    background: #f7fafc;
    color: #a0aec0;
    cursor: not-allowed;
    border: 2px solid #edf2f7;
}

.smd-btn-danger {
    background: #e53e3e;
    color: #fff;
    border-color: #e53e3e;
}
.smd-btn-danger:hover { background: #c53030; border-color: #c53030; }

.smd-btn-danger-outline {
    background: #fff;
    color: #e53e3e;
    border-color: #e53e3e;
}
.smd-btn-danger-outline:hover { background: #fff5f5; }

/* ── イベントリスト ── */
.smd-events-wrapper { }

.smd-events-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.smd-month-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 700;
    color: #2d3748;
}

.smd-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.smd-event-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 14px;
    padding: 13px 0;
    border-bottom: 1px solid #edf2f7;
}
.smd-event-item:last-child { border-bottom: none; }

.smd-event-date {
    min-width: 165px;
    font-weight: 700;
    font-size: 0.94em;
    color: #4a5568;
}
.smd-event-title {
    font-weight: 600;
    color: #3182ce;
    text-decoration: none;
}
.smd-event-title:hover { text-decoration: underline; }
.smd-event-title-plain {
    font-weight: 600;
    color: #2d3748;
}
.smd-event-desc {
    width: 100%;
    padding-left: 179px;
    font-size: 0.88em;
    color: #718096;
}
.smd-no-events { color: #a0aec0; padding: 10px 0; }

/* ── 解約セクション ── */
.smd-cancel-section {
    border-top: 4px solid #fed7d7;
    background: #fff5f5;
}
.smd-cancel-section .smd-section-title { color: #c53030; }

.smd-cancel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* ── メッセージ ── */
.smd-msg-success {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
    padding: 12px 18px;
    margin-top: 10px;
}
.smd-msg-error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 12px 18px;
    margin-top: 10px;
}
.smd-msg-info {
    background: #ebf8ff;
    color: #2b6cb0;
    border-left: 4px solid #4299e1;
    border-radius: 6px;
    padding: 12px 16px;
}

/* ── レスポンシブ ── */
@media (max-width: 600px) {
    .smd-header    { padding: 20px 18px; }
    .smd-section   { padding: 16px 16px; }
    .smd-table th  { display: none; }
    .smd-table td  { display: block; }
    .smd-table tr  { margin-bottom: 12px; }
    .smd-event-desc { padding-left: 0; }
    .smd-events-nav { gap: 8px; }
}

/* ============================================================
   VIP関連スタイル (v1.2追加)
   ============================================================ */

/* アラートバナー */
.smd-alert-banner {
    background: linear-gradient(135deg, #fff3cd, #ffe082);
    border: 2px solid #f6c23e;
    border-radius: 10px;
    margin-bottom: 18px;
    padding: 16px 20px;
}
.smd-alert-expired {
    background: linear-gradient(135deg, #fde8e8, #fca5a5);
    border-color: #e53e3e;
}
.smd-alert-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.smd-alert-icon { font-size: 1.6em; flex-shrink: 0; }
.smd-alert-body { flex: 1; min-width: 200px; font-size: .95em; color: #744210; }
.smd-alert-expired .smd-alert-body { color: #742a2a; }
.smd-btn-alert {
    background: #d97706;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: .88em;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.smd-btn-alert:hover { background: #b45309; color: #fff; }

/* VIPバッジ（ヘッダー用）*/
.smd-vip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: #7c3d00;
    font-size: .85em;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
}

/* バッジカラー追加 */
.smd-badge-gold   { background: linear-gradient(135deg, #f6d365, #fda085); color: #7c3d00; }
.smd-badge-purple { background: #7c3aed; color: #fff; }
.smd-badge-teal   { background: #0d9488; color: #fff; }
.smd-badge-orange { background: #ea580c; color: #fff; }

/* VIPロック表示（[smd_vip_only]の非VIP向け）*/
.smd-vip-locked {
    background: #f0fdf4;
    border: 2px dashed #86efac;
    border-radius: 8px;
    padding: 14px 18px;
    color: #166534;
    font-size: .95em;
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.smd-vip-lock-icon { font-size: 1.2em; }

/* 管理画面 VIPタグ */
.smd-tag-gold {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
    color: #78350f;
    border: 1px solid #f59e0b;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .85em;
    font-weight: 700;
}

/* ボタン追加 */
.smd-btn-sm { padding: 5px 12px; font-size: .82em; }

/* ============================================================
   フェーズ2 追加スタイル
   ============================================================ */

/* 学習済みボタン */
.smd-learned-box { margin: 20px 0; }
.smd-learned-btn {
    font-size: .95em;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
}
.smd-learned-done {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #6ee7b7;
}
.smd-learned-done:hover { background: #a7f3d0; }
.smd-learned-undone {
    background: #fff;
    color: #4a5568;
    border: 2px solid #cbd5e0;
}
.smd-learned-undone:hover { background: #eef2ff; border-color: #818cf8; }
.smd-learned-undo-hint {
    font-size: .78em;
    color: #6b7280;
    opacity: 0;
    transition: opacity .2s;
}
.smd-learned-msg { margin-left: 12px; font-size: .9em; }

/* レポートリスト */
.smd-report-list { list-style: none; margin: 0; padding: 0; }
.smd-report-item {
    border-left: 3px solid #818cf8;
    padding: 8px 12px;
    margin-bottom: 10px;
    background: #f5f3ff;
    border-radius: 0 6px 6px 0;
}
.smd-report-date { font-size: .8em; color: #6b7280; display: block; margin-bottom: 4px; }
.smd-report-content { margin: 0; font-size: .9em; color: #374151; white-space: pre-line; }

/* ログリスト（学習済みログ） */
.smd-log-list { list-style: none; margin: 0; padding: 0; }
.smd-log-item {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 7px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: .9em;
}
.smd-log-item:last-child { border-bottom: none; }
.smd-log-date { color: #6b7280; white-space: nowrap; min-width: 150px; }
.smd-log-title { color: #374151; }

/* ============================================================
   イベント参加登録スタイル
   ============================================================ */
.smd-event-register-box {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 20px 0;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.smd-btn-register {
    background: #4a90d9;
    color: #fff;
    border: 2px solid #4a90d9;
    padding: 10px 22px;
    font-size: .95em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
}
.smd-btn-register:hover { background: #2c6fad; border-color: #2c6fad; }
.smd-btn-registered {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #6ee7b7;
    padding: 10px 22px;
    font-size: .95em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
}
.smd-btn-registered:hover { background: #a7f3d0; }
.smd-cancel-hint {
    font-size: .78em;
    color: #6b7280;
    opacity: 0;
    transition: opacity .2s;
}
.smd-btn-registered:hover .smd-cancel-hint { opacity: 1; }
.smd-btn-pay {
    background: #7c3aed;
    color: #fff;
    border: 2px solid #7c3aed;
    padding: 10px 22px;
    font-size: .95em;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
}
.smd-btn-pay:hover { background: #6d28d9; color: #fff; }
.smd-reg-count {
    font-size: .85em;
    color: #6b7280;
    white-space: nowrap;
}
.smd-reg-count strong { color: #374151; font-size: 1.1em; }
.smd-reg-msg { font-size: .9em; }

/* ダッシュボードのイベントリスト内の人数表示 */
.smd-event-reg-count {
    font-size: .78em;
    color: #6b7280;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

/* 管理画面：取消済み行 */
.smd-row-cancelled td { opacity: .55; text-decoration: line-through; }

/* ============================================================
   レーダーチャート・診断テストスタイル
   ============================================================ */
.smd-radar-box { }
.smd-radar-wrap {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.smd-radar-chart {
    flex: 0 0 260px;
    max-width: 260px;
}
.smd-radar-summary { flex: 1; min-width: 200px; }
.smd-radar-total {
    font-size: 1em;
    color: #4a5568;
    margin-bottom: 12px;
}
.smd-radar-total span {
    font-size: 1.8em;
    font-weight: 800;
    color: #4a90d9;
    margin: 0 4px;
}
.smd-radar-table { width: 100%; border-collapse: collapse; }
.smd-radar-table th {
    text-align: left;
    font-size: .85em;
    color: #4a5568;
    padding: 4px 8px 4px 0;
    white-space: nowrap;
    width: 60px;
}
.smd-radar-bar-wrap {
    background: #e2e8f0;
    border-radius: 4px;
    height: 10px;
    width: 100%;
    overflow: hidden;
}
.smd-radar-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a90d9, #63b3ed);
    border-radius: 4px;
    transition: width .4s ease;
}
.smd-radar-score {
    text-align: right;
    font-weight: 700;
    color: #4a90d9;
    font-size: .9em;
    padding-left: 8px;
    white-space: nowrap;
}

/* 診断テスト */
.smd-diagnosis-box { }
.smd-diagnosis-lead {
    color: #4a5568;
    font-size: .95em;
    margin-bottom: 20px;
    line-height: 1.7;
}
.smd-diag-axis {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.smd-diag-axis-title {
    font-size: 1em;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 12px;
}
.smd-diag-axis-icon { color: #4a90d9; margin-right: 6px; }
.smd-diag-question { margin-bottom: 12px; }
.smd-diag-question label {
    display: block;
    font-size: .9em;
    color: #4a5568;
    margin-bottom: 6px;
}
.smd-diag-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.smd-diag-slider {
    flex: 1;
    accent-color: #4a90d9;
    height: 6px;
}
.smd-diag-min, .smd-diag-max {
    font-size: .78em;
    color: #a0aec0;
    white-space: nowrap;
}
.smd-diag-val {
    font-weight: 700;
    color: #4a90d9;
    min-width: 32px;
    text-align: right;
    font-size: .95em;
}
.smd-diag-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
    .smd-radar-wrap { flex-direction: column; }
    .smd-radar-chart { max-width: 100%; }
}

/* ============================================================
   個人セッション申込・プランスタイル
   ============================================================ */
.smd-session-section { }

.smd-session-apply-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.smd-session-plan-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.smd-session-stat {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 100px;
}
.smd-session-stat-label {
    font-size: .75em;
    color: #718096;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.smd-session-stat-val {
    font-size: 1.1em;
    font-weight: 700;
    color: #2d3748;
}
.smd-session-stat-highlight { color: #4a90d9; font-size: 1.3em; }

.smd-next-session {
    background: #ebf4ff;
    border: 1px solid #bee3f8;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
}
.smd-next-session-empty { background: #f7fafc; border-color: #e2e8f0; }
.smd-next-session-title {
    margin: 0 0 8px;
    font-size: .9em;
    font-weight: 700;
    color: #2c5282;
}
.smd-next-session-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.smd-next-session-date {
    font-size: 1.05em;
    font-weight: 700;
    color: #2d3748;
}

.smd-session-pending { padding: 12px 0; }

@media (max-width:600px) {
    .smd-session-plan-summary { flex-direction: column; }
    .smd-session-stat { flex-direction: row; justify-content: space-between; }
    .smd-session-apply-buttons { flex-direction: column; }
}
