/* ============================================================
 * 摄状元®AI创影 - 用户端样式
 * 品牌色：中国红 #C41E3A / 金色 #D4A017
 * ============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --primary: #C41E3A;
    --primary-dark: #9B1730;
    --primary-light: #E8475F;
    --gold: #D4A017;
    --gold-light: #F0C040;
    --gold-dark: #B8860B;
    --bg: #F5F5F7;
    --bg-dark: #1A1A2E;
    --card-bg: #FFFFFF;
    --text: #1D1D1F;
    --text-secondary: #6E6E73;
    --text-muted: #999;
    --border: #E5E5EA;
    --success: #34C759;
    --warning: #FF9500;
    --danger: #FF3B30;
    --info: #007AFF;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 24px; border: none; border-radius: var(--radius-sm); font-size: 0.9375rem; font-weight: 500; cursor: pointer; transition: all var(--transition); text-decoration: none; gap: 6px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(196,30,58,0.3); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: #fff; font-weight: 600; }
.btn-gold:hover { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: #fff; transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 32px; font-size: 1.0625rem; border-radius: var(--radius); }
.btn-sm { padding: 6px 14px; font-size: 0.8125rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

/* ---- Header ---- */
.user-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.user-header .header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.user-header .logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.user-header .logo-text { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.user-header .logo-sub { font-size: 0.75rem; color: var(--text-secondary); background: var(--bg); padding: 2px 8px; border-radius: 20px; }
.user-nav { display: flex; align-items: center; gap: 16px; }
.user-nav .nav-list { display: flex; list-style: none; gap: 4px; }
.user-nav .nav-item a { display: flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--text); transition: all var(--transition); }
.user-nav .nav-item a:hover, .user-nav .nav-item.active a { background: rgba(196,30,58,0.06); color: var(--primary); }
.user-area { display: flex; align-items: center; gap: 16px; }
.user-balance { display: flex; align-items: center; gap: 4px; background: linear-gradient(135deg, rgba(212,160,23,0.08), rgba(212,160,23,0.15)); padding: 6px 12px; border-radius: 20px; font-size: 0.8125rem; }
.user-balance span { font-weight: 700; color: var(--gold-dark); }
.user-balance small { color: var(--text-muted); margin-left: 2px; }
.user-dropdown { position: relative; }
.user-avatar-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.user-avatar-placeholder { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 600; }
.user-nick { font-size: 0.875rem; font-weight: 500; }
.dropdown-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 160px; padding: 8px 0; z-index: 200; }
.user-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 10px 16px; font-size: 0.875rem; color: var(--text); }
.dropdown-menu a:hover { background: var(--bg); color: var(--primary); }
.dropdown-menu .divider { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-menu .logout-link { color: var(--danger); }
.btn-login, .btn-register { padding: 6px 16px; border-radius: 20px; font-size: 0.875rem; }
.btn-login { color: var(--primary); border: 1px solid var(--primary); }
.btn-register { background: var(--primary); color: #fff; }

/* ---- Main ---- */
.user-main { min-height: calc(100vh - 200px); padding: 24px 0; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; }
.page-header p { color: var(--text-secondary); margin-top: 4px; }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.875rem; }
.alert a { text-decoration: underline; }
.alert-error { background: #FFF0F0; color: var(--danger); border: 1px solid #FFD0D0; }
.alert-success { background: #F0FFF4; color: var(--success); border: 1px solid #B7F5C8; }
.alert-info { background: #F0F7FF; color: var(--info); border: 1px solid #C5DDFF; }

/* ---- Auth Pages ---- */
.auth-page { min-height: 100vh; }
.auth-wrapper { display: flex; min-height: 100vh; }
.auth-left { flex: 1; background: linear-gradient(135deg, #1A1A2E 0%, #2D1B3D 50%, #4A1942 100%); display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-brand { text-align: center; color: #fff; max-width: 380px; }
.auth-brand h1 { font-size: 2.5rem; font-weight: 900; margin-bottom: 8px; }
.auth-brand .reg { color: var(--gold); font-size: 1.5rem; vertical-align: super; }
.auth-brand .slogan { font-size: 1.125rem; color: rgba(255,255,255,0.7); margin-bottom: 40px; }
.features { text-align: left; }
.feature-item { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.feature-item:last-child { border-bottom: none; }
.feature-icon { font-size: 2rem; }
.feature-item strong { display: block; color: #fff; font-size: 0.9375rem; }
.feature-item small { color: rgba(255,255,255,0.5); font-size: 0.75rem; }
.back-home { display: inline-block; margin-top: 32px; color: rgba(255,255,255,0.5); font-size: 0.875rem; }
.back-home:hover { color: #fff; }
.auth-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; max-width: 520px; min-width: 400px; }
.auth-form-wrapper { width: 100%; max-width: 380px; }
.auth-form-wrapper h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; }
.auth-subtitle { color: var(--text-secondary); margin-bottom: 28px; font-size: 0.9375rem; }
.auth-form .form-group { margin-bottom: 20px; }
.auth-form label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.auth-form label small { color: var(--text-muted); font-weight: 400; }
.auth-form label .required { color: var(--danger); }
.input-with-icon { position: relative; }
.input-with-icon input { width: 100%; padding: 12px 16px 12px 42px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9375rem; transition: border-color var(--transition); background: #FAFAFA; }
.input-with-icon input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(196,30,58,0.08); }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 1rem; }
.toggle-pw { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1rem; opacity: 0.5; }
.form-actions { margin-top: 24px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.875rem; color: var(--text-secondary); }
.auth-switch a { color: var(--primary); font-weight: 500; }
.auth-footer-note { text-align: center; margin-top: 16px; font-size: 0.75rem; color: var(--text-muted); }

/* ---- Dashboard ---- */
.dashboard-header { margin-bottom: 28px; }
.welcome-text h1 { font-size: 1.5rem; }
.welcome-text p { color: var(--text-secondary); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); transition: transform var(--transition); }
.stat-card:hover { transform: translateY(-2px); }
.stat-icon { font-size: 2rem; }
.stat-info { flex: 1; }
.stat-value { display: block; font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 0.8125rem; color: var(--text-secondary); }
.stat-action { font-size: 0.8125rem; color: var(--primary); font-weight: 500; white-space: nowrap; }
.stat-balance { border-left: 3px solid var(--gold); }
.stat-works { border-left: 3px solid var(--primary); }
.stat-tasks { border-left: 3px solid var(--info); }
.stat-pending { border-left: 3px solid var(--warning); }

.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.dash-section { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-header h2 { font-size: 1.125rem; font-weight: 600; }
.section-more { font-size: 0.8125rem; color: var(--primary); }

.quick-create { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.create-card { display: block; padding: 24px; border-radius: var(--radius); border: 2px solid var(--border); transition: all var(--transition); text-align: center; text-decoration: none; color: var(--text); }
.create-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--text); }
.create-card-icon { font-size: 2.5rem; margin-bottom: 12px; }
.create-card h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 6px; }
.create-card p { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 10px; }
.create-engine { display: inline-block; font-size: 0.6875rem; color: var(--text-muted); background: var(--bg); padding: 3px 10px; border-radius: 20px; }

.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.works-grid-list { grid-template-columns: repeat(4, 1fr); }
.work-card { background: #fff; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); transition: all var(--transition); }
.work-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.work-cover { height: 140px; background: var(--bg) center/cover no-repeat; position: relative; }
.work-cover-link { display: block; }
.work-type-badge { position: absolute; top: 8px; left: 8px; font-size: 0.6875rem; padding: 2px 8px; border-radius: 4px; background: rgba(0,0,0,0.6); color: #fff; text-transform: uppercase; }
.work-info { padding: 12px; }
.work-info h4 { font-size: 0.875rem; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-info h4 a { color: var(--text); }
.work-date, .work-meta { font-size: 0.75rem; color: var(--text-muted); }
.work-cost { font-size: 0.75rem; color: var(--gold-dark); margin-left: 8px; }

/* ---- Empty State ---- */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { font-size: 1.125rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 20px; }

/* ---- Create Pages ---- */
.create-breadcrumb { margin-bottom: 20px; font-size: 0.875rem; color: var(--text-secondary); }
.create-breadcrumb a { color: var(--primary); }

.create-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.create-main { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.create-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.create-icon { font-size: 2.5rem; }
.create-header h1 { font-size: 1.375rem; font-weight: 700; }
.create-engine-tag { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.create-form .form-group { margin-bottom: 20px; }
.create-form label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 6px; }
.create-form textarea, .create-form select, .create-form input[type="text"], .create-form input[type="number"] { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9375rem; font-family: var(--font); resize: vertical; transition: border-color var(--transition); }
.create-form textarea:focus, .create-form select:focus, .create-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196,30,58,0.08); }
.form-select { background: #fff; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.char-counter { text-align: right; font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.cost-preview { background: var(--bg); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; }
.cost-preview strong { color: var(--primary); font-size: 1.25rem; }
.cost-note { color: var(--text-muted); font-size: 0.8125rem; margin-left: auto; }
.btn-create { width: 100%; }

.create-sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.sidebar-card h3 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 12px; }
.tips-list { list-style: none; }
.tips-list li { padding: 8px 0; font-size: 0.8125rem; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.tips-list li:last-child { border-bottom: none; }
.tips-list li::before { content: "✓ "; color: var(--success); font-weight: 700; }
.cost-table { }
.cost-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.8125rem; border-bottom: 1px solid var(--border); }
.cost-row:last-child { border-bottom: none; }
.prompt-examples { display: flex; flex-wrap: wrap; gap: 8px; }
.example-btn { padding: 6px 12px; border: 1px solid var(--border); border-radius: 20px; font-size: 0.75rem; background: #fff; cursor: pointer; transition: all var(--transition); }
.example-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(196,30,58,0.04); }

/* ---- Tools Grid (create/index) ---- */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tool-card { display: block; background: #fff; border-radius: var(--radius-lg); padding: 32px 24px; box-shadow: var(--shadow); transition: all var(--transition); border: 2px solid transparent; text-decoration: none; color: var(--text); }
.tool-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--text); }
.tool-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.tool-icon-lg { font-size: 3rem; }
.tool-badge { background: var(--primary); color: #fff; padding: 4px 10px; border-radius: 20px; font-size: 0.6875rem; font-weight: 600; }
.tool-card h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.tool-desc { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.7; }
.tool-features { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tool-features span { font-size: 0.75rem; color: var(--success); background: rgba(52,199,89,0.08); padding: 4px 10px; border-radius: 4px; }
.tool-engine { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.engine-label { font-size: 0.75rem; color: var(--text-muted); }
.engine-name { font-size: 0.75rem; color: var(--primary); font-weight: 500; }
.tool-go { font-size: 0.875rem; font-weight: 600; color: var(--primary); }

/* ---- Wallet ---- */
.wallet-top { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.balance-card { background: linear-gradient(135deg, #1A1A2E, #2D1B3D); border-radius: var(--radius-lg); padding: 32px; color: #fff; position: relative; overflow: hidden; }
.balance-card::after { content: "⚡"; position: absolute; right: -20px; bottom: -20px; font-size: 8rem; opacity: 0.05; }
.balance-label { font-size: 0.875rem; color: rgba(255,255,255,0.6); }
.balance-amount { margin: 12px 0; }
.balance-number { font-size: 3rem; font-weight: 900; }
.balance-unit { font-size: 1rem; color: rgba(255,255,255,0.5); margin-left: 8px; }
.balance-value { font-size: 0.875rem; color: var(--gold-light); margin-bottom: 4px; }
.balance-rate { font-size: 0.75rem; color: rgba(255,255,255,0.4); margin-bottom: 20px; }
.btn-recharge-top { position: relative; z-index: 2; }

.packages-preview { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.packages-preview h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 16px; }
.packages-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.package-mini { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 12px; text-align: center; transition: border-color var(--transition); }
.package-mini.hot { border-color: var(--primary); background: rgba(196,30,58,0.02); }
.package-mini strong { display: block; font-size: 0.8125rem; margin-bottom: 4px; }
.pkg-points { display: block; font-size: 0.875rem; color: var(--primary); font-weight: 600; }
.pkg-price { display: block; font-size: 0.75rem; color: var(--text-muted); }

.wallet-section { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.filter-tabs { display: flex; gap: 8px; }
.filter-tab { padding: 6px 14px; border-radius: 20px; font-size: 0.8125rem; color: var(--text-secondary); border: 1px solid var(--border); }
.filter-tab.active, .filter-tab:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; }

.bill-table-wrapper { overflow-x: auto; }
.bill-table, .tasks-table { width: 100%; border-collapse: collapse; }
.bill-table th, .tasks-table th { text-align: left; padding: 12px 16px; font-size: 0.8125rem; color: var(--text-secondary); background: var(--bg); font-weight: 500; }
.bill-table td, .tasks-table td { padding: 12px 16px; font-size: 0.875rem; border-bottom: 1px solid var(--border); }
.cell-time { color: var(--text-muted); font-size: 0.8125rem; }
.cell-points.positive { color: var(--success); font-weight: 600; }
.cell-points.negative { color: var(--danger); font-weight: 600; }
.cell-balance { color: var(--text-secondary); }
.cell-prompt { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 500; }
.badge-recharge { background: rgba(52,199,89,0.1); color: var(--success); }
.badge-consume { background: rgba(255,59,48,0.1); color: var(--danger); }
.badge-bonus { background: rgba(212,160,23,0.1); color: var(--gold-dark); }
.badge-refund { background: rgba(0,122,255,0.1); color: var(--info); }
.badge-admin_adjust { background: rgba(142,142,147,0.1); color: var(--text-secondary); }
.badge-type-video { background: rgba(196,30,58,0.1); color: var(--primary); }
.badge-type-image { background: rgba(0,122,255,0.1); color: var(--info); }
.badge-type-text { background: rgba(52,199,89,0.1); color: var(--success); }

.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.status-pending::before { background: var(--warning); }
.status-processing::before { background: var(--info); animation: pulse 1.5s infinite; }
.status-done::before { background: var(--success); }
.status-error::before { background: var(--danger); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---- Recharge Packages ---- */
.recharge-notice { background: rgba(212,160,23,0.06); border: 1px solid rgba(212,160,23,0.2); border-radius: var(--radius-sm); padding: 12px 18px; margin-bottom: 24px; font-size: 0.875rem; color: var(--gold-dark); }
.packages-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.package-card { background: #fff; border-radius: var(--radius-lg); padding: 28px 20px; text-align: center; border: 2px solid var(--border); transition: all var(--transition); position: relative; }
.package-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.package-hot { border-color: var(--primary); }
.package-pro { border-color: var(--gold); }
.package-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 4px 16px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.package-badge.badge-pro { background: linear-gradient(135deg, var(--gold), var(--gold-light)); }
.package-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 16px; }
.package-points { margin-bottom: 8px; }
.points-number { font-size: 2.5rem; font-weight: 900; color: var(--primary); }
.points-unit { font-size: 0.875rem; color: var(--text-secondary); margin-left: 4px; }
.package-bonus { font-size: 0.875rem; color: var(--gold-dark); margin-bottom: 12px; min-height: 22px; }
.package-bonus.empty { color: var(--text-muted); }
.package-price { margin-bottom: 12px; }
.price-symbol { font-size: 1.25rem; color: var(--text); vertical-align: top; }
.price-number { font-size: 2rem; font-weight: 900; color: var(--text); }
.package-desc { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 12px; }
.package-total { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 16px; }
.package-total strong { color: var(--primary); }
.package-form { margin-top: 12px; }

.recharge-tips { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.recharge-tips h3 { font-size: 1rem; font-weight: 600; margin-bottom: 12px; }
.recharge-tips ul { list-style: none; }
.recharge-tips li { padding: 8px 0; font-size: 0.875rem; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.recharge-tips li::before { content: "• "; color: var(--primary); font-weight: 700; }

/* ---- Profile ---- */
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.profile-card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.profile-avatar-section { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.profile-avatar-lg { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.profile-info-card h2 { font-size: 1.125rem; margin-bottom: 4px; }
.profile-phone { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 8px; }
.profile-role { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 500; }
.role-user { background: var(--bg); color: var(--text-secondary); }
.role-vip { background: rgba(212,160,23,0.1); color: var(--gold-dark); }
.role-partner { background: rgba(196,30,58,0.1); color: var(--primary); }
.profile-stats-mini { display: flex; justify-content: space-around; text-align: center; }
.profile-stats-mini strong { display: block; font-size: 1.25rem; color: var(--primary); }
.profile-stats-mini small { font-size: 0.75rem; color: var(--text-muted); }
.profile-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.profile-form .form-group { margin-bottom: 16px; }
.profile-form label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 4px; }
.profile-form input { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9375rem; }
.profile-form input:focus { outline: none; border-color: var(--primary); }
.profile-form input.disabled { background: var(--bg); color: var(--text-muted); }
.form-hint { font-size: 0.75rem; color: var(--text-muted); }
.info-list { }
.info-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 0.875rem; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.text-primary { color: var(--primary) !important; }
.profile-actions-bottom { display: flex; gap: 12px; margin-top: 16px; }

/* ---- Works Detail ---- */
.work-detail-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; }
.work-preview { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; min-height: 400px; }
.work-media { max-width: 100%; max-height: 500px; border-radius: var(--radius-sm); }
.work-preview-placeholder { text-align: center; color: var(--text-muted); }
.preview-icon { font-size: 4rem; margin-bottom: 12px; opacity: 0.3; }
.text-result { text-align: left; width: 100%; max-height: 500px; overflow-y: auto; }
.text-result h3 { margin-bottom: 16px; }
.text-content { white-space: pre-wrap; line-height: 1.8; font-size: 0.9375rem; }
.work-info-panel { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.work-info-panel h1 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; }
.work-info-list { margin-bottom: 20px; }
.info-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.info-label { color: var(--text-secondary); }
.work-prompt-section, .work-params-section { margin-bottom: 20px; }
.work-prompt-section h3, .work-params-section h3 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 10px; }
.work-prompt-section p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; background: var(--bg); padding: 12px 16px; border-radius: var(--radius-sm); }
.params-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.param-tag { padding: 4px 12px; background: var(--bg); border-radius: 20px; font-size: 0.75rem; color: var(--text-secondary); }
.work-actions { display: flex; gap: 12px; margin-top: 20px; }

/* ---- Tasks Table ---- */
.recent-tasks { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-top: 28px; }
.tasks-table-wrapper { overflow-x: auto; }

/* ---- Pagination ---- */
.pagination, .admin-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.page-link { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.8125rem; color: var(--text-secondary); }
.page-link.active, .page-link:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Footer ---- */
.user-footer { background: #1A1A2E; color: rgba(255,255,255,0.7); padding: 40px 0 20px; margin-top: 40px; }
.footer-top { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; margin-bottom: 32px; }
.footer-brand h3 { color: #fff; font-size: 1.25rem; margin-bottom: 8px; }
.footer-slogan { font-size: 0.875rem; color: var(--gold); margin-bottom: 8px; }
.footer-engine { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.link-group h4 { color: #fff; font-size: 0.875rem; margin-bottom: 12px; }
.link-group a { display: block; font-size: 0.8125rem; color: rgba(255,255,255,0.5); padding: 4px 0; }
.link-group a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; text-align: center; }
.footer-bottom p { font-size: 0.75rem; color: rgba(255,255,255,0.3); margin-bottom: 4px; }

/* ---- Mobile Responsive ---- */
@media (max-width: 1024px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .tools-grid { grid-template-columns: 1fr; }
    .create-layout { grid-template-columns: 1fr; }
    .create-sidebar { order: -1; }
    .packages-grid { grid-template-columns: repeat(2, 1fr); }
    .wallet-top { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .work-detail-layout { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .works-grid-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .auth-wrapper { flex-direction: column; }
    .auth-left { display: none; }
    .auth-right { max-width: 100%; min-width: auto; padding: 24px; }
    .user-nav .nav-list { display: none; }
    .user-nav.open .nav-list { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: #fff; padding: 16px; box-shadow: var(--shadow-lg); z-index: 100; }
    .mobile-menu-toggle { display: flex !important; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .quick-create { grid-template-columns: 1fr; }
    .works-grid, .works-grid-list { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .packages-grid { grid-template-columns: 1fr; }
    .footer-links { grid-template-columns: 1fr; }
    .user-balance small { display: none; }
    .user-nick { display: none; }
    .filter-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .stats-row { grid-template-columns: 1fr; }
    .works-grid, .works-grid-list { grid-template-columns: 1fr; }
    .balance-number { font-size: 2rem; }
}

/* ---- Admin Extension Styles ---- */
.admin-content { padding: 24px; }
.admin-page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.admin-page-header h1 { font-size: 1.375rem; font-weight: 700; }
.total-badge { background: var(--bg); padding: 4px 12px; border-radius: 20px; font-size: 0.8125rem; color: var(--text-secondary); }
.admin-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.admin-stat-card { background: #fff; border-radius: var(--radius-sm); padding: 16px; box-shadow: var(--shadow); }
.stat-label { display: block; font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 4px; }
.admin-stat-card .stat-value { font-size: 1.375rem; font-weight: 700; color: var(--primary); }
.admin-filter-bar { margin-bottom: 16px; }
.admin-search-form { display: flex; gap: 8px; }
.admin-search-input { padding: 8px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; min-width: 200px; }
.admin-filter-select { padding: 8px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; }
.admin-table-wrapper { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: var(--bg); padding: 12px 14px; text-align: left; font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }
.admin-table td { padding: 12px 14px; font-size: 0.875rem; border-bottom: 1px solid var(--border); }
.action-cell { white-space: nowrap; }
.status-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 500; }
.status-1, .status-success { background: rgba(52,199,89,0.1); color: var(--success); }
.status-0, .status-pending { background: rgba(255,149,0,0.1); color: var(--warning); }
.status-muted { background: rgba(142,142,147,0.1); color: var(--text-muted); }
.status-warning { background: rgba(255,59,48,0.1); color: var(--danger); }
.mono { font-family: monospace; font-size: 0.8125rem; }
.mini-table { font-size: 0.8125rem; }
.admin-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.admin-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.admin-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.empty-text { color: var(--text-muted); text-align: center; padding: 20px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: #fff; border-radius: var(--radius); padding: 28px; width: 100%; max-width: 420px; }
.modal-content h3 { margin-bottom: 16px; }
.modal-content .form-group { margin-bottom: 14px; }
.modal-content label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 4px; }
.modal-content input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

@media (max-width: 768px) {
    .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
    .admin-grid-2col { grid-template-columns: 1fr; }
    .admin-search-form { flex-direction: column; }
}

/* Mobile menu toggle (default hidden on desktop) */
.mobile-menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.mobile-menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
