/* 마이페이지 공통 스타일 */
.mypage-container {
    display: flex;
    min-height: calc(100vh - 80px);
    background: #f8f9fa;
}

/* 사이드바 */
.mypage-sidebar {
    width: 280px;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    padding: 2rem 0;
}

.sidebar-profile {
    text-align: center;
    padding: 0 2rem 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar i {
    font-size: 3rem;
    color: white;
}

.sidebar-profile h3 {
    margin: 0.5rem 0 0.3rem;
    font-size: 1.2rem;
    color: #333;
}

.sidebar-profile p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.sidebar-menu {
    padding: 1rem 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item i {
    margin-right: 0.8rem;
    font-size: 1.1rem;
    width: 20px;
}

.menu-item:hover {
    background: #f8f9fa;
    color: #667eea;
}

.menu-item.active {
    background: #f0f4ff;
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;
}

/* 메인 컨텐츠 */
.mypage-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 0;
}

.section-header h2 i {
    margin-right: 0.5rem;
    color: #667eea;
}

/* 필터 탭 */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-tab {
    padding: 0.7rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-tab:hover {
    background: #f8f9fa;
    color: #667eea;
}

.filter-tab.active {
    background: #667eea;
    color: white;
}

/* 신청 카드 */
.applications-list {
    display: grid;
    gap: 1.5rem;
}

.application-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.application-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.case-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-right: 1rem;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

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

.status-completed {
    background: #d4edda;
    color: #155724;
}

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

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

.bid-date {
    color: #666;
    font-size: 0.9rem;
}

.card-body {
    margin-bottom: 1rem;
}

.address {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1rem;
}

.address i {
    color: #667eea;
    margin-right: 0.5rem;
}

.price-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.price-info .label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.price-info .value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.price-info .value.highlight {
    color: #667eea;
}

.expert-info {
    margin: 0;
    padding: 0.8rem;
    background: #f0f4ff;
    border-radius: 8px;
    color: #333;
    font-weight: 500;
}

.expert-info i {
    color: #667eea;
    margin-right: 0.5rem;
}

.card-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* 버튼 스타일 */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-outline {
    background-color: white;
    color: #1550E8;
    border: 2px solid #1550E8;
}

.btn-outline:hover {
    background-color: #1550E8;
    color: white;
}

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

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #10B981;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #059669;
}

/* 프로필 폼 */
.profile-form-container {
    max-width: 600px;
}

.profile-form-container .form-group {
    margin-bottom: 1.2rem;
}

.profile-form-container label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.profile-form-container input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.profile-form-container input:focus {
    outline: none;
    border-color: #667eea;
}

.profile-form-container input:disabled {
    background: #f8f9fa;
    color: #888;
    cursor: not-allowed;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: #ccc;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.7;
}

.empty-state a {
    color: #667eea;
    font-weight: 600;
}

/* ============================================
   통계 카드 (stats-grid)
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.8rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.15);
}

.stat-card > i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.8rem;
    display: block;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.4rem;
}

/* ============================================
   테이블 스타일 (payments-table)
   ============================================ */
.payments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.payments-table thead th {
    background: #f8f9fa;
    padding: 0.9rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.payments-table tbody td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    vertical-align: middle;
}

.payments-table tbody tr:hover {
    background: #fafbff;
}

.payments-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   타이머 배지
   ============================================ */
.timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.8rem;
    background: #e8f4fd;
    color: #1a73e8;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
}

.timer-badge.urgent {
    background: #fdecea;
    color: #d93025;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================================
   요청 카드 (request-card) - 강조 테두리
   ============================================ */
.request-card {
    border-left: 4px solid #667eea;
}

.request-card:hover {
    border-left-color: #764ba2;
}

/* ============================================
   빈 상태 (empty-state)
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #aaa;
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    color: #ddd;
}

.empty-state p {
    font-size: 1rem;
    color: #999;
}

/* ============================================
   프로필 폼
   ============================================ */
.profile-form-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input:disabled {
    background: #f8f9fa;
    color: #999;
    cursor: not-allowed;
}

/* ============================================
   btn-success
   ============================================ */
.btn-success {
    background: #28a745;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #218838;
    color: white;
}

/* ============================================
   반응형
   ============================================ */
@media (max-width: 768px) {
    .mypage-container {
        flex-direction: column;
    }

    .mypage-sidebar {
        width: 100%;
        padding: 1.5rem 0;
    }

    /* 모바일에서 사이드바 메뉴 가로 스크롤 */
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
        gap: 0.3rem;
        border-top: 1px solid #eee;
    }

    .menu-item {
        flex-shrink: 0;
        padding: 0.7rem 1.2rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 8px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .menu-item.active {
        border-left: none;
        border-bottom-color: #667eea;
        background: #f0f4ff;
    }

    .menu-item i {
        margin-right: 0.4rem;
    }

    .mypage-content {
        padding: 1rem;
    }

    .price-info {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .payments-table {
        font-size: 0.82rem;
    }

    .payments-table thead th,
    .payments-table tbody td {
        padding: 0.7rem 0.6rem;
    }

    /* 모바일 테이블 스크롤 */
    .payments-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .filter-tabs {
        flex-wrap: wrap;
    }
}
