/* マイページ共通 */
.mypage-main { padding: 48px 0; min-height: 60vh; }

/* ログインフォーム */
.mypage-login-wrap { max-width: 400px; margin: 0 auto; }
.mypage-login-wrap h1 { font-size: 22px; margin-bottom: 24px; text-align: center; }
.mypage-form { display: flex; flex-direction: column; gap: 16px; }
.mypage-field { display: flex; flex-direction: column; gap: 6px; }
.mypage-field label { font-size: 13px; font-weight: 600; }
.mypage-field input { padding: 10px 12px; border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 6px; font-size: 15px; }
.mypage-error { background: #fde; border: 1px solid #e74c3c; border-radius: 6px;
    padding: 10px 14px; color: #c0392b; font-size: 13px; margin-bottom: 16px; }
.mypage-success { background: #dfd; border: 1px solid #27ae60; border-radius: 6px;
    padding: 10px 14px; color: #1e8449; font-size: 13px; margin-bottom: 16px; }
.mypage-forgot { text-align: center; font-size: 13px; margin-top: 12px; }
.mypage-reset-form { margin-top: 32px; padding-top: 24px;
    border-top: 1px solid var(--color-border, #e2e8f0); }

/* ダッシュボード */
.mypage-header { display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 32px; }
.mypage-header h1 { font-size: 20px; margin: 0; }
.mypage-logout { font-size: 13px; color: #999; text-decoration: none; }
.mypage-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 600px) { .mypage-cards { grid-template-columns: 1fr; } }
.mypage-card { background: var(--color-background-primary, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px; padding: 20px; text-decoration: none; color: inherit;
    transition: box-shadow 0.2s; }
.mypage-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.mypage-card-label { font-size: 12px; color: #718096; margin: 0 0 8px; }
.mypage-card-value { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.mypage-card-sub { font-size: 12px; color: #718096; margin: 0; }

/* ライセンス */
.mypage-table { width: 100%; border-collapse: collapse; }
.mypage-table th { text-align: left; padding: 10px 12px; background: #f8f9fa;
    font-size: 13px; font-weight: 600; border-bottom: 1px solid #e2e8f0; }
.mypage-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.mypage-note { font-size: 12px; color: #718096; margin-top: 8px; }

/* プラグインカード */
.mypage-plugin-card { display: flex; align-items: center;
    justify-content: space-between; padding: 16px;
    border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 12px; }
.mypage-plugin-card--unavailable { background: #f9f9f9; opacity: .75; }
.mypage-plugin-name { font-weight: 600; margin: 0 0 4px; }
.mypage-plugin-version { font-size: 12px; color: #718096; margin: 0; }
.mypage-plugin-status-badge { display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 7px; border-radius: 4px; margin-left: 8px; vertical-align: middle; }
.mypage-plugin-status-badge--preparing { background: #fff3cd; color: #856404; }
.mypage-plugin-status-badge--suspended { background: #f8d7da; color: #721c24; }
.btn--disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.mypage-upgrade { background: #f0f7ff; border: 1px solid #bcd; border-radius: 8px; padding: 20px; margin-top: 24px; }
.mypage-upgrade h2 { font-size: 16px; margin: 0 0 8px; }
.mypage-upgrade p { font-size: 13px; color: #555; margin: 0 0 12px; }
.mypage-upgrade-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.mypage-plugin-locked { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mypage-plugin-locked-note { font-size: 12px; color: var(--color-primary, #3b82f6); text-decoration: underline; white-space: nowrap; }

/* 2カラムカード */
.mypage-cards--2col {
    grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 600px) {
    .mypage-cards--2col {
        grid-template-columns: 1fr;
    }
}

/* Stripe Portal リンク */
.mypage-stripe-portal {
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--color-background-secondary, #f8f9fa);
    border-radius: 8px;
}

/* ボタン（テーマ側にない場合のフォールバック） */
/* 戻るリンク */
.mypage-back {
    margin: 0 0 16px;
    font-size: 13px;
}
.mypage-back a {
    color: #718096;
    text-decoration: none;
}
.mypage-back a:hover {
    color: var(--color-accent, #3498db);
    text-decoration: underline;
}

/* お試し通知 */
.mypage-trial-notice {
    background: #fff8e1;
    border: 1px solid #f9a825;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #6d4c00;
    margin-bottom: 16px;
}

/* ボタン（テーマ側にない場合のフォールバック） */
.btn-small { padding: 5px 12px; font-size: 12px; }
.btn-full { width: 100%; text-align: center; }
.btn-secondary { background: #f8f9fa; color: #333; border: 1px solid #ddd;
    display: inline-block; padding: 10px 20px; border-radius: 6px;
    font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }

/* ドメイン一覧のスクロールBOX（件数が多いときに高さを抑える） */
.mypage-table-box {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
}
.mypage-table-box .mypage-table { margin: 0; border: none; }
.mypage-table--sticky thead th {
    position: sticky;
    top: 0;
    background: #f6f7f7;
    z-index: 1;
    box-shadow: inset 0 -1px 0 #dcdcde;
}
