/* 三角洲报单系统 - 主样式 */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --success: #34a853;
    --warning: #fbbc04;
    --danger: #ea4335;
    --info: #4285f4;
    --dark: #202124;
    --gray: #5f6368;
    --gray-light: #dadce0;
    --gray-lighter: #f1f3f4;
    --white: #ffffff;
    --bg: #f5f7fa;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-dark);
}

/* 登录注册页面 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 40px 40px 20px;
}

.auth-logo {
    font-size: 48px;
    margin-bottom: 12px;
}

.auth-header h1 {
    font-size: 24px;
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray);
    font-size: 14px;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-lighter);
    margin: 0 40px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-body {
    padding: 30px 40px 40px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    background: var(--white);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.form-input::placeholder {
    color: #aaa;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,115,232,0.3);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}
.btn-success:hover {
    background: #2d9249;
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover {
    background: #d33426;
    color: var(--white);
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}
.btn-warning:hover {
    background: #e5a800;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-light);
    color: var(--gray);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

/* 布局 */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 24px;
    min-height: 100vh;
}

/* 顶部栏 */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.top-bar h1 {
    font-size: 24px;
    color: var(--dark);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.stat-card .stat-icon.blue { background: #e8f0fe; }
.stat-card .stat-icon.green { background: #e6f4ea; }
.stat-card .stat-icon.orange { background: #fef7e0; }
.stat-card .stat-icon.red { background: #fce8e6; }
.stat-card .stat-icon.purple { background: #f3e8fd; }

.stat-card .stat-label {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 4px;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

/* 卡片 */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-lighter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
}

/* 表格 */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-lighter);
}

table th {
    background: var(--gray-lighter);
    font-weight: 600;
    color: var(--gray);
    white-space: nowrap;
}

table tr:hover {
    background: var(--gray-lighter);
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #e6f4ea; color: #1e7e34; }
.badge-warning { background: #fef7e0; color: #b06d00; }
.badge-danger { background: #fce8e6; color: #c5221f; }
.badge-info { background: #e8f0fe; color: #1a73e8; }
.badge-gray { background: var(--gray-lighter); color: var(--gray); }

/* 告警消息 */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: #e6f4ea; color: #1e7e34; border-left: 4px solid #34a853; }
.alert-error { background: #fce8e6; color: #c5221f; border-left: 4px solid #ea4335; }
.alert-warning { background: #fef7e0; color: #b06d00; border-left: 4px solid #fbbc04; }
.alert-info { background: #e8f0fe; color: #1a73e8; border-left: 4px solid #4285f4; }

/* 用户信息卡片 */
.user-profile-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.user-profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 24px;
    color: var(--white);
    text-align: center;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    margin: 0 auto 12px;
    object-fit: cover;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.user-profile-body {
    padding: 20px 24px;
}

.user-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-lighter);
    font-size: 14px;
}

.user-info-row:last-child {
    border-bottom: none;
}

.user-info-label {
    color: var(--gray);
}

.user-info-value {
    font-weight: 600;
    color: var(--dark);
}

/* 快捷操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 8px;
}

.quick-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* 公告 */
.announcement-item {
    padding: 16px;
    border-left: 4px solid var(--warning);
    background: #fef7e0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 12px;
}

.announcement-item .ann-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.announcement-item .ann-content {
    font-size: 14px;
    color: var(--gray);
}

/* 任务卡片 */
.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.task-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.task-card-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.task-card-header h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.task-card-body {
    padding: 20px;
}

.task-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-lighter);
}

.task-info-row:last-child {
    border-bottom: none;
}

.task-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-lighter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.task-price small {
    font-size: 13px;
    color: var(--gray);
    font-weight: 400;
}

/* 教程卡片 */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.guide-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.guide-card-icon {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.guide-card-body {
    padding: 20px;
}

.guide-card-body h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--dark);
}

.guide-card-body p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 16px;
}

/* 表单 */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    background: var(--white);
    cursor: pointer;
}

.form-group select:focus {
    border-color: var(--primary);
}

.form-hint {
    font-size: 12px;
    color: var(--gray);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* 文件上传 */
.file-upload {
    border: 2px dashed var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    font-size: 14px;
}

.file-upload-label .upload-icon {
    font-size: 36px;
}

/* 截图预览 */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.screenshot-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--gray-light);
}

.screenshot-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    border: 1px solid var(--gray-light);
    color: var(--gray);
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

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

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-bar .form-input {
    flex: 1;
    min-width: 200px;
}

.search-bar select {
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    background: var(--white);
}

/* 响应式 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .task-grid {
        grid-template-columns: 1fr;
    }
    .guide-grid {
        grid-template-columns: 1fr;
    }
    .screenshot-grid {
        grid-template-columns: 1fr;
    }
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* 管理后台专用 */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.admin-stat-card .stat-info h4 {
    font-size: 13px;
    color: var(--gray);
    font-weight: 400;
    margin-bottom: 4px;
}

.admin-stat-card .stat-info .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

/* 订单详情 */
.order-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.order-info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-lighter);
    font-size: 14px;
}

.order-screenshots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.order-screenshots img {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-light);
    cursor: pointer;
}

/* 标签页 */
.tab-nav {
    display: flex;
    border-bottom: 2px solid var(--gray-lighter);
    margin-bottom: 24px;
    gap: 4px;
}

.tab-nav a {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab-nav a:hover {
    color: var(--primary);
}

.tab-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* 积分充值页面 */
.recharge-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.recharge-info-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.recharge-info-item .icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.recharge-info-item h4 {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 4px;
}

.recharge-info-item p {
    font-size: 13px;
    color: var(--gray);
}

/* 提现页面 */
.withdraw-balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius);
    padding: 30px;
    color: var(--white);
    text-align: center;
    margin-bottom: 24px;
}

.withdraw-balance-card .balance-label {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.withdraw-balance-card .balance-value {
    font-size: 36px;
    font-weight: 700;
}

.withdraw-balance-card .balance-sub {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 8px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

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