/* 123AI Post - User App Styles */
:root {
  --primary: #6366F1; --primary-dark: #4F46E5; --secondary: #8B5CF6; --accent: #06B6D4;
  --gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #06B6D4 100%);
  --gradient-text: linear-gradient(135deg, #6366F1, #8B5CF6);
  --dark: #0F172A; --dark-2: #1E293B; --dark-3: #334155;
  --gray: #64748B; --gray-light: #94A3B8; --gray-lighter: #CBD5E1; --gray-bg: #F1F5F9;
  --white: #FFFFFF; --success: #10B981; --warning: #F59E0B; --danger: #EF4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05); --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1); --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
  --radius: 10px; --radius-lg: 14px; --radius-xl: 20px; --transition: all 0.25s ease;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif; background:#F1F5F9; color:#0F172A; line-height:1.6; -webkit-font-smoothing:antialiased; }
a { color:inherit; text-decoration:none; }
button { cursor:pointer; font-family:inherit; border:none; background:none; }
input,select,textarea { font-family:inherit; }

/* Layout */
.app-layout { display:flex; min-height:100vh; }
.sidebar { width:240px; background:linear-gradient(180deg,#0F172A 0%,#1E293B 100%); color:white; display:flex; flex-direction:column; position:fixed; top:0; left:0; bottom:0; z-index:50; transition:transform 0.3s ease; }
.sidebar-logo { padding:20px 16px; display:flex; align-items:center; gap:10px; border-bottom:1px solid rgba(255,255,255,0.08); }
.sidebar-logo .icon { width:34px; height:34px; border-radius:9px; background:var(--gradient); display:flex; align-items:center; justify-content:center; font-weight:900; font-size:13px; }
.sidebar-logo .text { font-size:17px; font-weight:800; }
.sidebar-logo .text span { color:#8B5CF6; }
.sidebar-nav { flex:1; padding:12px 8px; overflow-y:auto; }
.nav-section { margin-bottom:16px; }
.nav-section-title { font-size:10px; text-transform:uppercase; letter-spacing:1px; color:#64748B; padding:8px 12px; font-weight:700; }
.nav-item { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:8px; font-size:13.5px; color:#CBD5E1; cursor:pointer; transition:var(--transition); margin-bottom:2px; }
.nav-item:hover { background:rgba(255,255,255,0.06); color:white; }
.nav-item.active { background:linear-gradient(135deg,rgba(99,102,241,0.25),rgba(139,92,246,0.2)); color:white; border-left:3px solid #6366F1; padding-left:9px; }
.nav-item .nav-icon { font-size:17px; width:22px; text-align:center; }
.nav-item .nav-badge { margin-left:auto; background:rgba(255,255,255,0.1); padding:2px 7px; border-radius:9px; font-size:10.5px; font-weight:600; }
.sidebar-footer { padding:14px 16px; border-top:1px solid rgba(255,255,255,0.08); }
.sidebar-plan { background:rgba(99,102,241,0.12); border-radius:10px; padding:12px; text-align:center; }
.sidebar-plan .plan-name { font-size:11px; color:#94A3B8; }
.sidebar-plan .plan-type { font-size:13px; font-weight:700; color:white; margin:2px 0; }
.sidebar-plan a { font-size:11px; color:#8B5CF6; text-decoration:underline; }

/* Main */
.main { flex:1; margin-left:240px; display:flex; flex-direction:column; min-height:100vh; }
.topbar { height:60px; background:white; border-bottom:1px solid #E2E8F0; display:flex; align-items:center; padding:0 20px; gap:14px; position:sticky; top:0; z-index:40; }
.mobile-toggle { display:none; font-size:20px; cursor:pointer; }
.topbar-search { flex:1; max-width:360px; position:relative; }
.topbar-search input { width:100%; padding:8px 14px 8px 36px; border:1px solid #E2E8F0; border-radius:8px; font-size:13px; background:#F8FAFC; transition:var(--transition); }
.topbar-search input:focus { outline:none; border-color:#6366F1; background:white; box-shadow:0 0 0 3px rgba(99,102,241,0.1); }
.topbar-search .si { position:absolute; left:11px; top:50%; transform:translateY(-50%); color:#94A3B8; font-size:14px; }
.topbar-actions { display:flex; align-items:center; gap:10px; margin-left:auto; }
.topbar-btn { position:relative; width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:17px; cursor:pointer; transition:var(--transition); color:#64748B; }
.topbar-btn:hover { background:#F1F5F9; color:#0F172A; }
.topbar-btn .bd { position:absolute; top:7px; right:7px; width:7px; height:7px; background:#EF4444; border-radius:50%; border:2px solid white; }
.user-menu { display:flex; align-items:center; gap:9px; padding:5px 10px 5px 5px; border-radius:8px; cursor:pointer; transition:var(--transition); }
.user-menu:hover { background:#F1F5F9; }
.user-avatar { width:30px; height:30px; border-radius:50%; background:var(--gradient); display:flex; align-items:center; justify-content:center; color:white; font-weight:700; font-size:12px; }
.user-info { font-size:12.5px; }
.user-info .name { font-weight:600; }
.user-info .role { font-size:10.5px; color:#94A3B8; }

/* Content */
.content { padding:20px; flex:1; }
.page-title { font-size:22px; font-weight:800; margin-bottom:3px; }
.page-subtitle { font-size:13px; color:#64748B; margin-bottom:20px; }
.breadcrumb { font-size:12px; color:#94A3B8; margin-bottom:12px; }
.breadcrumb a { color:#6366F1; }

/* Cards */
.card { background:white; border-radius:var(--radius-lg); border:1px solid #E2E8F0; box-shadow:var(--shadow-sm); overflow:hidden; }
.card-body { padding:20px; }
.card-header { padding:16px 20px; border-bottom:1px solid #E2E8F0; display:flex; align-items:center; justify-content:space-between; }
.card-title { font-size:15px; font-weight:700; }

/* Buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:9px 20px; border-radius:8px; font-size:13.5px; font-weight:600; transition:var(--transition); white-space:nowrap; }
.btn-primary { background:var(--gradient); color:white; box-shadow:0 3px 10px rgba(99,102,241,0.35); }
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 5px 16px rgba(99,102,241,0.45); }
.btn-outline { border:1.5px solid #E2E8F0; color:#0F172A; background:white; }
.btn-outline:hover { border-color:#6366F1; color:#6366F1; }
.btn-ghost { color:#64748B; }
.btn-ghost:hover { color:#6366F1; background:#F1F5F9; }
.btn-sm { padding:6px 14px; font-size:12px; }
.btn-lg { padding:12px 28px; font-size:15px; }
.btn-block { width:100%; }
.btn-success { background:#10B981; color:white; }
.btn-danger { background:#EF4444; color:white; }
.btn-warning { background:#F59E0B; color:white; }

/* Badges */
.badge { display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:16px; font-size:11.5px; font-weight:600; }
.badge-primary { background:rgba(99,102,241,0.1); color:#6366F1; }
.badge-success { background:rgba(16,185,129,0.1); color:#10B981; }
.badge-warning { background:rgba(245,158,11,0.1); color:#D97706; }
.badge-danger { background:rgba(239,68,68,0.1); color:#DC2626; }
.badge-gray { background:#F1F5F9; color:#64748B; }
.badge-info { background:rgba(6,182,212,0.1); color:#0891B2; }

/* Stats */
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:18px; }
.stat-card { background:white; border-radius:var(--radius-lg); padding:18px; border:1px solid #E2E8F0; box-shadow:var(--shadow-sm); }
.stat-card .sh { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.stat-card .sicon { width:36px; height:36px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:18px; }
.stat-card .strend { font-size:11.5px; font-weight:600; display:flex; align-items:center; gap:3px; }
.stat-card .svalue { font-size:24px; font-weight:800; letter-spacing:-0.5px; }
.stat-card .slabel { font-size:12px; color:#64748B; margin-top:2px; }

/* Tables */
.data-table { width:100%; border-collapse:collapse; }
.data-table th { text-align:left; padding:10px 14px; font-size:11.5px; font-weight:700; color:#64748B; background:#F8FAFC; border-bottom:1px solid #E2E8F0; text-transform:uppercase; letter-spacing:0.5px; }
.data-table td { padding:12px 14px; font-size:13px; border-bottom:1px solid #F1F5F9; }
.data-table tr:hover td { background:#F8FAFC; }

/* Status */
.status-dot { width:7px; height:7px; border-radius:50%; display:inline-block; }
.status-dot.success { background:#10B981; box-shadow:0 0 0 3px rgba(16,185,129,0.2); }
.status-dot.warning { background:#F59E0B; box-shadow:0 0 0 3px rgba(245,158,11,0.2); }
.status-dot.danger { background:#EF4444; box-shadow:0 0 0 3px rgba(239,68,68,0.2); }
.status-pill { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; }

/* Progress */
.progress-bar { height:5px; background:#F1F5F9; border-radius:3px; overflow:hidden; }
.progress-fill { height:100%; background:var(--gradient); border-radius:3px; transition:width 0.6s ease; }

/* Toggle */
.toggle-switch { position:relative; width:40px; height:22px; display:inline-block; }
.toggle-switch input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; cursor:pointer; inset:0; background:#CBD5E1; border-radius:22px; transition:0.3s; }
.toggle-slider:before { content:''; position:absolute; height:16px; width:16px; left:3px; bottom:3px; background:white; border-radius:50%; transition:0.3s; }
.toggle-switch input:checked + .toggle-slider { background:#6366F1; }
.toggle-switch input:checked + .toggle-slider:before { transform:translateX(18px); }

/* Forms */
.form-group { margin-bottom:14px; }
.form-group label { display:block; font-size:12.5px; font-weight:600; margin-bottom:5px; color:#334155; }
.form-group input,.form-group select,.form-group textarea { width:100%; padding:9px 13px; border:1px solid #E2E8F0; border-radius:8px; font-size:13px; transition:var(--transition); }
.form-group input:focus,.form-group select:focus { outline:none; border-color:#6366F1; box-shadow:0 0 0 3px rgba(99,102,241,0.1); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }

/* Tabs */
.tabs { display:flex; gap:4px; border-bottom:2px solid #E2E8F0; margin-bottom:18px; }
.tab { padding:10px 18px; font-size:13.5px; font-weight:600; color:#64748B; cursor:pointer; transition:var(--transition); border-bottom:2px solid transparent; margin-bottom:-2px; }
.tab:hover { color:#0F172A; }
.tab.active { color:#6366F1; border-bottom-color:#6366F1; }
.tab-content { display:none; }
.tab-content.active { display:block; animation:fadeIn 0.3s ease; }

/* Modal */
.modal-overlay { position:fixed; inset:0; background:rgba(15,23,42,0.5); backdrop-filter:blur(4px); z-index:100; display:none; align-items:center; justify-content:center; padding:20px; }
.modal-overlay.show { display:flex; }
.modal { background:white; border-radius:var(--radius-xl); max-width:520px; width:100%; max-height:90vh; overflow-y:auto; box-shadow:var(--shadow-xl); animation:modalIn 0.3s ease; }
@keyframes modalIn { from{opacity:0;transform:translateY(20px) scale(0.97);} to{opacity:1;transform:translateY(0) scale(1);} }
.modal-header { padding:18px 22px; border-bottom:1px solid #E2E8F0; display:flex; align-items:center; justify-content:space-between; }
.modal-header h3 { font-size:17px; font-weight:700; }
.modal-close { width:30px; height:30px; border-radius:7px; display:flex; align-items:center; justify-content:center; font-size:18px; cursor:pointer; color:#94A3B8; transition:var(--transition); }
.modal-close:hover { background:#F1F5F9; color:#0F172A; }
.modal-body { padding:22px; }
.modal-footer { padding:16px 22px; border-top:1px solid #E2E8F0; display:flex; gap:10px; justify-content:flex-end; }

/* Guide steps */
.guide-step { display:flex; gap:14px; padding:14px; border-radius:10px; background:#F8FAFC; margin-bottom:10px; border:1px solid #E2E8F0; }
.guide-step .gs-num { width:28px; height:28px; border-radius:50%; background:var(--gradient); color:white; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; flex-shrink:0; }
.guide-step .gs-content h4 { font-size:13.5px; font-weight:700; margin-bottom:3px; }
.guide-step .gs-content p { font-size:12px; color:#64748B; line-height:1.6; }
.guide-step .gs-content code { background:#E2E8F0; padding:2px 6px; border-radius:4px; font-size:11px; }

/* Empty state */
.empty-state { text-align:center; padding:40px 20px; color:#94A3B8; }
.empty-state .es-icon { font-size:48px; margin-bottom:12px; opacity:0.5; }
.empty-state h3 { font-size:16px; font-weight:600; color:#64748B; margin-bottom:6px; }
.empty-state p { font-size:13px; }

/* Animations */
@keyframes fadeIn { from{opacity:0;transform:translateY(6px);} to{opacity:1;transform:translateY(0);} }
.gradient-text { background:var(--gradient-text); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }

/* Responsive */
@media (max-width:1024px) { .stats-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:768px) {
  .sidebar { transform:translateX(-100%); }
  .sidebar.open { transform:translateX(0); }
  .main { margin-left:0; }
  .mobile-toggle { display:block; }
  .stats-grid { grid-template-columns:1fr; }
  .form-row { grid-template-columns:1fr; }
  .topbar-search { display:none; }
  .user-info { display:none; }
  .content { padding:14px; }
}
::-webkit-scrollbar { width:7px; height:7px; }
::-webkit-scrollbar-track { background:#F1F5F9; }
::-webkit-scrollbar-thumb { background:#CBD5E1; border-radius:4px; }
::-webkit-scrollbar-thumb:hover { background:#94A3B8; }
/* ========== Professional SVG Icon Styles ========== */
.nav-icon { width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; margin-right:10px; flex-shrink:0; }
.nav-icon svg { width:18px; height:18px; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; fill:none; }
.nav-item.active .nav-icon svg { stroke:var(--brand-primary); }

.topbar-btn svg { width:18px; height:18px; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; fill:none; }

.search-icon { display:inline-flex; align-items:center; justify-content:center; }
.search-icon svg { width:16px; height:16px; stroke:#94A3B8; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; fill:none; }

.upgrade-icon { display:inline-flex; align-items:center; justify-content:center; }
.upgrade-icon svg { width:18px; height:18px; stroke:white; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; fill:none; }

.mobile-toggle { background:none; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:8px; border-radius:8px; color:var(--text-secondary); }
.mobile-toggle svg { width:20px; height:20px; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; fill:none; }
.mobile-toggle:hover { background:var(--bg-active); }

/* 暗色模式下顶部栏按钮 */
[data-theme="dark"] .topbar-btn:hover { background:rgba(255,255,255,0.08); color:white; }
