/* 대시보드 전용 스타일 */

:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

body {
    background: var(--gray-50);
    margin: 0;
    padding: 0;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 */
.dashboard-header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.user-info h2 {
    font-size: 24px;
    color: var(--gray-800);
    margin: 0 0 5px 0;
}

.user-info p {
    color: var(--gray-500);
    font-size: 14px;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(30, 64, 175, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(30, 64, 175, 0.3);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

/* 통계 카드 그리드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-title {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.blue { background: #ebf8ff; }
.stat-icon.green { background: #f0fff4; }
.stat-icon.orange { background: #fffaf0; }
.stat-icon.purple { background: #faf5ff; }

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.stat-change {
    font-size: 13px;
    color: var(--gray-500);
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

/* 콘텐츠 섹션 */
.content-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-100);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

/* 거래 내역 테이블 */
.transaction-table {
    width: 100%;
    border-collapse: collapse;
}

.transaction-table th {
    background: var(--gray-50);
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 2px solid var(--gray-200);
}

.transaction-table td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-700);
}

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

.transaction-table tr:hover {
    background: var(--gray-50);
}

.transaction-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.type-purchase { background: #ebf8ff; color: #3182ce; }
.type-usage { background: #fff5f5; color: #e53e3e; }
.type-bonus { background: #f0fff4; color: #38a169; }
.type-free-trial { background: #faf5ff; color: #805ad5; }

.amount-positive {
    color: var(--success-color);
    font-weight: 600;
}

.amount-negative {
    color: var(--danger-color);
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 14px;
}

/* 로딩 스피너 */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* 빠른 액션 버튼 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.quick-action-btn {
    padding: 20px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
}

.quick-action-btn:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-action-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.quick-action-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 5px;
}

.quick-action-desc {
    font-size: 12px;
    color: var(--gray-500);
}

/* 반응형 */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        margin-top: 15px;
        width: 100%;
    }

    .header-actions .btn {
        flex: 1;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .transaction-table {
        font-size: 13px;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 10px 8px;
    }
}

/* 배지 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: #ebf8ff;
    color: #3182ce;
}

.badge-success {
    background: #f0fff4;
    color: #38a169;
}

.badge-warning {
    background: #fffaf0;
    color: #dd6b20;
}

.badge-danger {
    background: #fff5f5;
    color: #e53e3e;
}

/* 알림 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-info {
    background: #ebf8ff;
    color: #2c5282;
    border-left: 4px solid #3182ce;
}

.alert-warning {
    background: #fffaf0;
    color: #744210;
    border-left: 4px solid #dd6b20;
}

.alert-success {
    background: #f0fff4;
    color: #22543d;
    border-left: 4px solid #38a169;
}
