/* 書籍販売プラットフォーム 会員マイページ用CSS */

/* 基本設定 */
body {
    background-color: #f8f9fa;
    font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

/* メインコンテンツ */
main {
    min-height: calc(100vh - 200px);
}

/* カード共通スタイル */
.card {
    background: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    color: #333;
}

.card-body {
    padding: 1.5rem;
}

/* 統計カード */
.stats-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stats-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: #033769;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

/* ボタン */
.btn {
    border-radius: 5px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: #033769;
    border-color: #033769;
    color: #fff;
}

.btn-primary:hover {
    background-color: #022549;
    border-color: #022549;
    color: #fff;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-primary {
    color: #033769;
    border-color: #033769;
}

.btn-outline-primary:hover {
    background-color: #033769;
    border-color: #033769;
    color: #fff;
}

/* フォーム */
.form-control {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #033769;
    box-shadow: 0 0 0 0.2rem rgba(3,55,105,.25);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.required {
    color: #dc3545;
    margin-left: 0.25rem;
}

/* テーブル */
.table {
    background-color: #fff;
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 1rem;
}

.table td {
    vertical-align: middle;
    padding: 1rem;
}

/* ステータスバッジ */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

/* 決済ステータス */
.status-paid {
    background-color: #d4edda;
    color: #155724;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
}

.status-refunded {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* 配送ステータス */
.status-unshipped {
    background-color: #e2e3e5;
    color: #383d41;
}

.status-shipped {
    background-color: #cce5ff;
    color: #004085;
}

.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* ランクバッジ */
.badge {
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.bg-primary {
    background-color: #007bff !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.text-dark {
    color: #212529 !important;
}

/* 書籍情報カード */
.book-card {
    border-left: 4px solid #033769;
}

.book-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: #333;
}

.book-author {
    color: #6c757d;
    font-size: 0.9rem;
}

.book-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #033769;
}

/* プロフィール表示 */
.profile-info {
    background-color: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background-color: #033769;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
}

.profile-details dt {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.profile-details dd {
    color: #6c757d;
    margin-bottom: 1rem;
}

/* アフィリエイト関連 */
.affiliate-code-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    font-family: monospace;
    font-size: 1.1rem;
    text-align: center;
    position: relative;
    margin-bottom: 1rem;
}

.copy-indicator {
    position: absolute;
    top: -10px;
    right: 10px;
    background: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    display: none;
}

.copy-indicator.show {
    display: block;
    animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* アラート */
.alert {
    border-radius: 5px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-dismissible .btn-close {
    padding: 1rem 1.25rem;
}

/* 空状態表示 */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 1rem;
    font-weight: 600;
}

.empty-state p {
    color: #999;
    margin-bottom: 2rem;
}

/* ページネーション */
.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
}

.page-link {
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: #666;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #033769;
    color: #fff;
    border-color: #033769;
}

.page-item.active .page-link {
    background: #033769;
    color: #fff;
    border-color: #033769;
}

.page-item.disabled .page-link {
    color: #999;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* モーダル */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    font-weight: 600;
    color: #333;
}

/* 購入詳細 */
.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table th,
.info-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.info-table th {
    width: 35%;
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
}

.info-table td {
    color: #333;
}

/* 価格サマリー */
.price-summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 1rem;
}

.price-row.total {
    border-top: 2px solid #dee2e6;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #033769;
}

/* ローディング */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* アニメーション */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .stats-card {
        margin-bottom: 15px;
        padding: 20px;
    }
    
    .stats-number {
        font-size: 1.75rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .card-header {
        padding: 1rem 1.25rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .info-table th,
    .info-table td {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* ユーティリティクラス */
.w-100 {
    width: 100%;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-success {
    color: #28a745 !important;
}



























/* ========================================
   ヘッダースタイル
======================================== */

/* ヘッダー基本設定 */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* ロゴ */
.site-logo img {
    height: 40px;
    width: auto;
}

/* PC用ナビゲーション */
.pc-nav {
    display: block;
}

.pc-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.pc-nav li {
  text-indent:0;
}

.pc-nav a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pc-nav a:hover {
    background: #f0f0f0;
    color: #033769;
}

.pc-nav a.active {
    background: #033769;
    color: #fff;
}

.pc-nav a.logout:hover {
    background: #dc3545;
    color: #fff;
}

/* モバイルメニュー非表示（デフォルト） */
.mobile-menu-toggle {
    display: none;
}

.mobile-nav {
    display: none;
}

.mobile-overlay {
    display: none;
}

/* ========================================
   モバイル対応（768px以下）
======================================== */
@media (max-width: 768px) {
    /* ヘッダー調整 */
    .header-content {
        padding: 10px 0;
    }
    
    .site-logo img {
        height: 32px;
    }
    
    /* PC用ナビを非表示 */
    .pc-nav {
        display: none;
    }
    
    /* ハンバーガーメニュー表示 */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        padding: 5px;
        cursor: pointer;
        position: relative;
        z-index: 1002;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #333;
        margin: 4px 0;
        transition: all 0.3s ease;
    }
    
    /* ハンバーガーアクティブ時 */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* モバイルナビゲーション */
    .mobile-nav {
        display: block;
        position: fixed;
        top: 0;
        right: -240px;
        width: 240px;
        height: 100vh;
        background: #fff;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
    }
    
    .mobile-nav.active {
        right: 0;
    }
    
    .mobile-nav ul {
        list-style: none;
        padding: 60px 0 20px;
        margin: 0;
    }
    
    .mobile-nav li {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-nav a {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        color: #333;
        text-decoration: none;
        font-size: 14px;
        transition: background 0.2s ease;
    }
    
    .mobile-nav a i {
        width: 20px;
        margin-right: 10px;
        font-size: 16px;
        text-align: center;
        opacity: 0.7;
    }
    
    .mobile-nav a:active {
        background: #f5f5f5;
    }
    
    .mobile-nav a.active {
        background: #033769;
        color: #fff;
    }
    
    .mobile-nav a.active i {
        opacity: 1;
    }
    
    .mobile-nav a.logout {
        color: #dc3545;
    }
    
    /* オーバーレイ */
    .mobile-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}
