/* ============================================
   Cue - My Page CSS
   ============================================ */

.mypage-main {
    padding-top: 60px;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.mypage-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

/* Sidebar */
.mypage-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.profile-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-email {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* Account Info Card */
.account-info-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.account-info-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-info-title i {
    color: var(--accent);
}

.account-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-info-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-info-value {
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
}

.account-info-value.password-hidden {
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-dots {
    font-family: monospace;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.btn-edit-password {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-tertiary);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-edit-password:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-secondary);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Navigation */
.mypage-nav {
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: var(--shadow-sm);
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.nav-item .badge {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 10px;
}

.nav-item.active .badge {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Content Area */
.mypage-content {
    min-height: calc(100vh - 108px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.tab-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: -16px;
    margin-bottom: 24px;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.earnings {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon.tasks {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.stat-icon.match {
    background: rgba(139, 92, 246, 0.1);
    color: var(--mission);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Section Card */
.section-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.view-all {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 16px;
}

.empty-hint {
    font-size: 13px;
    color: var(--text-tertiary);
}

.loading-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-tertiary);
}

.loading-state i {
    font-size: 24px;
    margin-bottom: 12px;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.activity-icon.applied {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.activity-icon.accepted {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.activity-icon.completed {
    background: rgba(139, 92, 246, 0.1);
    color: var(--mission);
}

.activity-icon.paid {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.activity-info {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.activity-meta {
    font-size: 12px;
    color: var(--text-tertiary);
}

.activity-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Task Grid */
.task-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.task-card-mini {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.task-card-mini:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.task-card-mini h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.task-card-mini .task-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.task-card-mini .task-reward {
    font-weight: 600;
    color: var(--success);
}

.task-card-mini .task-match {
    color: var(--accent);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--text-tertiary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Applications List */
.applications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.application-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.application-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.application-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.application-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.application-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.application-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.application-status.accepted {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.application-status.rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Active Tasks */
.active-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.active-task-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.active-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.active-task-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.active-task-reward {
    font-size: 18px;
    font-weight: 700;
    color: var(--success);
}

.active-task-progress {
    margin-bottom: 16px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.active-task-actions {
    display: flex;
    gap: 12px;
}

/* Earnings */
.earnings-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.earnings-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.earnings-card.available {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.earnings-label {
    display: block;
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.earnings-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.earnings-card.pending .earnings-value {
    color: var(--text-primary);
}

.earnings-hint {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
}

.earnings-card .btn {
    margin-top: 8px;
}

.earnings-card.available .btn {
    background: white;
    color: var(--success);
}

/* Transactions */
.transactions-list {
    display: flex;
    flex-direction: column;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transaction-icon.income {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.transaction-icon.withdrawal {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.transaction-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.transaction-date {
    font-size: 12px;
    color: var(--text-tertiary);
}

.transaction-amount {
    font-size: 15px;
    font-weight: 600;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--text-primary);
}

/* Skills */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-primary);
}

.skill-tag .remove-skill {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    color: var(--text-tertiary);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.skill-tag .remove-skill:hover {
    background: var(--danger);
    color: white;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-btn:hover {
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-btn i {
    font-size: 10px;
    color: var(--text-tertiary);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    display: none;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.user-dropdown a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.user-dropdown hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid var(--border-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .task-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mypage-container {
        grid-template-columns: 1fr;
    }

    .mypage-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 8px 16px;
        border-top: 1px solid var(--border-color);
        z-index: 100;
        flex-direction: row;
        overflow-x: auto;
    }

    .profile-card {
        display: none;
    }

    .account-info-card {
        display: none;
    }

    .mypage-nav {
        display: flex;
        gap: 8px;
        padding: 0;
        background: none;
        box-shadow: none;
    }

    .nav-item {
        flex-direction: column;
        padding: 8px 16px;
        font-size: 11px;
        gap: 4px;
        white-space: nowrap;
    }

    .nav-item .badge {
        display: none;
    }

    .mypage-content {
        padding-bottom: 80px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .earnings-summary {
        grid-template-columns: 1fr;
    }
}
