@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d0d0d; --sidebar-bg: #111111; --card-bg: #1a1a1a;
  --card-border: #2a2a2a; --input-bg: #111111; --input-border: #2d2d2d;
  --text-primary: #ffffff; --text-secondary: #888888; --text-muted: #555555;
  --accent-purple: #7c3aed; --accent-orange: #f59e0b; --accent-red: #ef4444;
  --accent-teal: #0d9488; --accent-pink: #c026d3;
  --sidebar-active: #1e1e1e; --sidebar-hover: #181818;
  --sidebar-width: 200px; --radius: 10px; --radius-sm: 6px;
}
body { font-family: 'Noto Sans Thai', 'Inter', sans-serif; background: var(--bg); color: var(--text-primary); min-height: 100vh; display: flex; font-size: 14px; line-height: 1.5; }
.app-layout { display: flex; width: 100%; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: var(--sidebar-bg); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 100; border-right: 1px solid #1a1a1a; }
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 16px 14px; border-bottom: 1px solid #1a1a1a; }
.logo-icon { width: 32px; height: 32px; background: var(--accent-purple); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #fff; flex-shrink: 0; }
.logo-icon-img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 15px rgba(124, 58, 237, 0.2); }
.logo-text { font-size: 13px; font-weight: 700; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid #1a1a1a; }
.profile-avatar { width: 36px; height: 36px; background: var(--accent-purple); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.profile-name { font-size: 13px; font-weight: 600; }
.profile-email { font-size: 11px; color: var(--text-secondary); }
.sidebar-nav { flex: 1; padding: 8px 0; }
.nav-section-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; padding: 12px 14px 4px; font-weight: 500; }
.nav-divider { height: 1px; background: #1a1a1a; margin: 6px 0; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; color: var(--text-secondary); font-size: 13px; font-weight: 400; transition: all 0.15s; text-decoration: none; position: relative; }
.nav-item:hover { background: var(--accent-soft); color: var(--text-primary); }
.nav-item.active { background: var(--sidebar-active); color: var(--text-primary); font-weight: 500; }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent-purple); }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; }
.nav-arrow { margin-left: auto; font-size: 11px; opacity: 0.5; }
.sidebar-bottom { padding: 8px 0; border-top: 1px solid #1a1a1a; }
.upgrade-btn { display: flex; align-items: center; gap: 10px; margin: 6px 10px; padding: 9px 12px; background: #1a1a1a; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s; }
.upgrade-btn:hover { background: #222; }
.upgrade-icon { width: 24px; height: 24px; background: var(--accent-orange); border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.upgrade-text { font-size: 12px; font-weight: 600; }
.upgrade-sub { font-size: 10px; color: var(--text-secondary); }
.sidebar-user { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; }
.avatar-sm { width: 28px; height: 28px; background: var(--accent-purple); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0; }
.user-name { font-size: 12px; font-weight: 500; }
.user-sub { font-size: 10px; color: var(--text-secondary); }
.settings-icon { margin-left: auto; color: var(--text-muted); }
.sidebar-footer { padding: 10px 14px; font-size: 10px; color: var(--text-muted); line-height: 1.6; }
.main-content { margin-left: var(--sidebar-width); flex: 1; min-height: 100vh; background: var(--bg); padding: 40px 48px; }
.page-header { margin-bottom: 28px; }
.page-title { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.page-subtitle { font-size: 14px; color: var(--text-secondary); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 13px; cursor: pointer; margin-bottom: 20px; text-decoration: none; }
.back-link:hover { color: var(--text-primary); }
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 24px; }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.card-title { font-size: 15px; font-weight: 600; }
.card-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.tool-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: border-color 0.2s, background 0.2s; position: relative; text-decoration: none; display: block; }
.tool-card:hover { border-color: var(--accent-hover); background: var(--accent-soft); box-shadow: 0 0 15px var(--accent-soft); }
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.tool-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.tool-badge { background: #1e1900; border: 1px solid #2a2200; border-radius: 4px; padding: 2px 7px; font-size: 11px; color: #f59e0b; font-weight: 500; }
.tool-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tool-name { font-size: 14px; font-weight: 600; }
.tool-lock { font-size: 12px; color: var(--text-muted); }
.tool-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.tool-link { font-size: 12px; color: var(--text-muted); }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.form-input, .form-select, .form-textarea { width: 100%; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text-primary); font-size: 13px; font-family: inherit; outline: none; transition: border-color 0.15s; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: #444; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select option { background: #1a1a1a; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.15s; font-family: inherit; text-decoration: none; }
.btn-primary { background: var(--accent-purple); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-orange { background: var(--accent-orange); color: #fff; }
.btn-orange:hover { background: #d97706; }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--card-border); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--text-primary); border-color: var(--accent-hover); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--card-border); margin-bottom: 20px; }
.tab { padding: 10px 16px; font-size: 13px; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; display: flex; align-items: center; gap: 6px; transition: all 0.15s; }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--text-primary); border-bottom-color: var(--accent-purple); }
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.pill-tab { padding: 7px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; cursor: pointer; background: var(--input-bg); border: 1px solid var(--input-border); color: var(--text-secondary); transition: all 0.15s; display: flex; align-items: center; gap: 6px; }
.pill-tab:hover { border-color: #444; color: var(--text-primary); }
.pill-tab.active { background: var(--accent-purple); border-color: var(--accent-purple); color: #fff; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 16px; }
.stat-label { font-size: 11px; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 22px; font-weight: 700; }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.badge-pending { background: #1a1400; color: #f59e0b; border: 1px solid #2a2200; }
.badge-processing { background: #001428; color: #3b82f6; border: 1px solid #001f38; }
.badge-done { background: #001a0e; color: #22c55e; border: 1px solid #00240f; }
.badge-error { background: #1a0000; color: #ef4444; border: 1px solid #2a0000; }
.table { width: 100%; border-collapse: collapse; }
.table th { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--card-border); }
.table td { padding: 12px; font-size: 13px; color: var(--text-secondary); border-bottom: 1px solid #1a1a1a; }
.table tr:hover td { background: var(--sidebar-hover); }
.table td:first-child { color: var(--text-primary); }
.progress-bar { height: 4px; background: #1a1a1a; border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent-purple); border-radius: 2px; transition: width 0.5s ease; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; }
.alert-info { background: #001428; border: 1px solid #002448; color: #93c5fd; }
.alert-warning { background: #1a1000; border: 1px solid #2a1c00; color: #fbbf24; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.video-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; }
.video-thumb { width: 100%; aspect-ratio: 16/9; background: #111; display: flex; align-items: center; justify-content: center; font-size: 32px; cursor: pointer; }
.video-card-body { padding: 12px; }
.video-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-meta { font-size: 11px; color: var(--text-muted); }
.platform-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 500; border: 1px solid transparent; cursor: pointer; transition: opacity 0.15s; }
.platform-pill:hover { opacity: 0.8; }
.platform-tiktok { background: #001a0a; border-color: #003010; color: #69e89a; }
.platform-facebook { background: #001428; border-color: #002448; color: #93c5fd; }
.platform-youtube { background: #1a0000; border-color: #2a0000; color: #f87171; }
.platform-instagram { background: #1a001a; border-color: #280028; color: #e879f9; }
.platform-shopee { background: #1a0800; border-color: #280e00; color: #fb923c; }
.row { display: flex; gap: 16px; }
.col-6 { flex: 1; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.font-600 { font-weight: 600; }
@media (max-width: 900px) {
  .main-content { padding: 20px; }
  .tools-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .row { flex-direction: column; }
}
