/* ============================
   case-mypage.css
   サイドバー＋メインエリアレイアウト
   最小フォントサイズ: 1rem
   ============================ */

.ca-mypage {
    font-size: 1rem;
    margin: 0 0 3rem;
}

/* ===== ログイン誘導 ===== */
.ca-mypage-login {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 1rem;
    color: #6b7280;
}
.ca-mypage-login a {
    color: #2563eb;
    text-decoration: underline;
}

/* ===== 全体レイアウト ===== */
.ca-mypage-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}

/* ===== サイドバー ===== */
.ca-mypage-sidebar {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 20px;
}

/* ユーザー情報 */
.ca-sidebar-user {
    padding: 20px 16px;
    border-bottom: 1px solid #f3f4f6;
    text-align: center;
}
.ca-sidebar-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}
.ca-sidebar-name {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
    word-break: break-all;
}
.ca-sidebar-email {
    font-size: 1rem;
    color: #9ca3af;
    word-break: break-all;
    margin-bottom: 8px;
}
.ca-member-badge {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 99px;
}
.ca-member-official {
    background: #dcfce7;
    color: #15803d;
    border: 1.5px solid #86efac;
}
.ca-member-general {
    background: #f3f4f6;
    color: #6b7280;
    border: 1.5px solid #e5e7eb;
}

/* ナビメニュー */
.ca-sidebar-nav {
    padding: 8px 0;
}
.ca-sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background .15s, color .15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    border-left: 3px solid transparent;
}
.ca-sidebar-nav-item:hover {
    background: #f9fafb;
    color: #2563eb;
}
.ca-sidebar-nav-item.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
    border-left-color: #2563eb;
}
.ca-sidebar-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: .6;
}
.ca-sidebar-nav-item.active .ca-sidebar-nav-icon {
    opacity: 1;
}
.ca-sidebar-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 6px 0;
}
.ca-sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color .15s, background .15s;
    border-left: 3px solid transparent;
}
.ca-sidebar-logout:hover {
    background: #fef2f2;
    color: #dc2626;
    text-decoration: none;
}

/* ===== メインエリア ===== */
.ca-mypage-main {
    min-width: 0;
}

/* パネルタイトル */
.ca-panel-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 1.5rem;
    padding-bottom: .75rem;
    border-bottom: 3px solid #2563eb;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ca-panel-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 1.4em;
    background: #2563eb;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ===== ダッシュボード（TOPグリッド） ===== */
.ca-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 1.5rem;
}
.ca-dashboard-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.ca-dashboard-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 12px rgba(37,99,235,.08);
}
.ca-dashboard-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.5rem;
}
.ca-dashboard-card-icon.blue   { background: #dbeafe; }
.ca-dashboard-card-icon.green  { background: #dcfce7; }
.ca-dashboard-card-icon.purple { background: #ede9fe; }
.ca-dashboard-card-icon.amber  { background: #fef3c7; }
.ca-dashboard-card-icon.coral  { background: #fee2e2; }
.ca-dashboard-card-label {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
}
.ca-dashboard-card-sub {
    font-size: 1rem;
    color: #9ca3af;
    line-height: 1.5;
}

/* ===== タブパネル ===== */
.ca-tab-panel {
    display: none;
}
.ca-tab-panel.active {
    display: block;
}

/* ===== 空メッセージ ===== */
.ca-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #9ca3af;
    font-size: 1rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1.5px dashed #e5e7eb;
}
.ca-empty a { color: #2563eb; text-decoration: underline; }

/* ===== ステータスバッジ ===== */
.ca-status-badge {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 99px;
    white-space: nowrap;
}
.ca-status-pending   { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.ca-status-contacted { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.ca-status-done      { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.ca-status-rejected  { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* ===== 申し込み履歴 ===== */
.ca-app-list { display: flex; flex-direction: column; gap: 10px; }
.ca-app-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    transition: border-color .15s;
}
.ca-app-card:hover { border-color: #93c5fd; }
.ca-app-card-main { flex: 1; min-width: 0; }
.ca-app-title a {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}
.ca-app-title a:hover { color: #2563eb; text-decoration: underline; }
.ca-app-meta { font-size: 1rem; color: #9ca3af; }

/* ===== 口コミ履歴 ===== */
.ca-review-list { display: flex; flex-direction: column; gap: 10px; }
.ca-review-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
}
.ca-review-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.ca-review-offer { font-size: 1rem; font-weight: 600; color: #111; }
.ca-review-stars { color: #f59e0b; font-size: 1.1rem; letter-spacing: 2px; margin-bottom: 8px; }
.ca-review-body { font-size: 1rem; color: #374151; line-height: 1.7; margin-bottom: 8px; }
.ca-review-date { font-size: 1rem; color: #9ca3af; }

/* ===== フォームセクション ===== */
.ca-form-section { max-width: 520px; }
.ca-mp-field { margin-bottom: 1.5rem; }
.ca-mp-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}
.ca-mp-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    color: #111;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.ca-mp-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}
.ca-mp-textarea { min-height: 100px; resize: vertical; }
.ca-mp-file { width: 100%; padding: 10px 0; font-size: 1rem; color: #374151; }
.ca-mp-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 28px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.ca-mp-btn:hover { background: #1d4ed8; }
.ca-mp-btn:disabled { background: #bfdbfe; cursor: not-allowed; }
.ca-mp-btn-danger { background: #dc2626; }
.ca-mp-btn-danger:hover { background: #b91c1c; }

/* ===== メッセージ ===== */
.ca-mp-msg {
    font-size: 1rem;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}
.ca-mp-msg.show { display: block; }
.ca-mp-msg-success { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }
.ca-mp-msg-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; }
.ca-mp-msg-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; display: block; }

/* ===== オフィシャル申請 ===== */
.ca-official-done {
    text-align: center;
    padding: 2rem 1rem;
    background: #f0fdf4;
    border-radius: 12px;
    border: 1.5px solid #86efac;
    margin-bottom: 2rem;
}
.ca-official-done-icon {
    width: 56px;
    height: 56px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.ca-official-done p { font-size: 1rem; color: #15803d; font-weight: 600; }
.ca-official-info p { font-size: 1rem; color: #374151; line-height: 1.7; margin-bottom: 1rem; }
.ca-official-list { font-size: 1rem; color: #6b7280; padding-left: 1.5rem; margin-bottom: 1.5rem; line-height: 1.8; }

/* ===== 退会申請 ===== */
.ca-withdraw-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}
.ca-withdraw-toggle {
    background: none;
    border: none;
    font-size: 1rem;
    color: #9ca3af;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.ca-withdraw-toggle:hover { color: #dc2626; }
.ca-withdraw-form {
    margin-top: 1rem;
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    border-radius: 12px;
    padding: 1.5rem;
}
.ca-withdraw-note {
    font-size: 1rem;
    color: #b91c1c;
    font-weight: 600;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .ca-mypage-layout {
        grid-template-columns: 1fr;
    }
    .ca-mypage-sidebar {
        position: static;
    }
    .ca-sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0;
        scrollbar-width: none;
    }
    .ca-sidebar-nav::-webkit-scrollbar { display: none; }
    .ca-sidebar-nav-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 12px 14px;
        flex-shrink: 0;
    }
    .ca-sidebar-nav-item.active {
        border-left-color: transparent;
        border-bottom-color: #2563eb;
        background: #eff6ff;
    }
    .ca-sidebar-divider { display: none; }
    .ca-sidebar-logout {
        white-space: nowrap;
        border-left: none;
        flex-shrink: 0;
    }
    .ca-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .ca-dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ca-app-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
