/* pulse.css — Pulse Marketing Intelligence */

:root {
    --bg: #2a1c6a;
    --surface: #2e2661;
    --surface2: #1a2540;
    --surface3: #213055;
    --border: #5243ad;
    --accent: #00d4aa;
    --accent2: #3b82f6;
    --accent3: #f59e0b;
    --danger: #ef4444;
    --text: #e2e8f0;
    --muted: #64748b;
    --muted2: #94a3b8;
    --font: 'DM Sans', sans-serif;
    --font-head: 'Sora', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 10px;
    --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html,body { height:100%; overflow:hidden; }
body { font-family:var(--font); background:var(--bg); color:var(--text); display:flex; font-size:14px; line-height:1.6; }

::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--surface3); border-radius:99px; }

#app-root { display:flex; width:100%; height:100%; }

/* SIDEBAR */
.sidebar { width:220px; min-width:220px; background:var(--surface); border-right:1px solid var(--border); display:flex; flex-direction:column; z-index:10; }
.sidebar-logo { padding:22px 20px 18px; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:10px; }
.logo-icon { width:32px; height:32px; background:linear-gradient(135deg,var(--accent),var(--accent2)); border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:16px; }
.logo-text { font-family:var(--font-head); font-weight:700; font-size:17px; letter-spacing:-0.3px; color:#fff; }
.logo-text span { color:var(--accent); }
.sidebar-section { padding:18px 12px 8px; font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:1.2px; color:var(--muted); }
.nav-item { display:flex; align-items:center; gap:10px; padding:9px 14px; margin:1px 8px; border-radius:var(--radius); cursor:pointer; transition:all var(--transition); color:var(--muted2); font-size:13.5px; font-weight:500; }
.nav-item:hover { background:var(--surface2); color:var(--text); }
.nav-item.active { background:rgba(0,212,170,0.12); color:var(--accent); }
.nav-icon { font-size:16px; width:20px; text-align:center; flex-shrink:0; }
.nav-badge { margin-left:auto; background:var(--accent); color:#000; font-size:10px; font-weight:700; padding:1px 6px; border-radius:99px; }
.sidebar-footer { margin-top:auto; padding:14px 12px; border-top:1px solid var(--border); }
.user-card { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:var(--radius); cursor:pointer; transition:background var(--transition); }
.user-card:hover { background:var(--surface2); }
.user-avatar { width:32px; height:32px; background:linear-gradient(135deg,#667eea,#764ba2); border-radius:8px; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12px; color:#fff; flex-shrink:0; }
.user-info { flex:1; min-width:0; }
.user-name { font-size:12.5px; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-tier { font-size:11px; color:var(--accent); font-weight:500; }

/* MAIN */
.main { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.topbar { height:58px; min-height:58px; background:var(--surface); border-bottom:1px solid var(--border); display:flex; align-items:center; padding:0 28px; gap:16px; }
.topbar-title { font-family:var(--font-head); font-size:16px; font-weight:600; color:#fff; flex:1; }
.topbar-title span { color:var(--muted2); font-weight:400; font-size:13px; margin-left:8px; }
.content { flex:1; overflow-y:auto; padding:28px; }

/* BUTTONS */
.btn { display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border-radius:8px; font-family:var(--font); font-size:13px; font-weight:500; cursor:pointer; border:none; transition:all var(--transition); }
.btn-primary { background:var(--accent); color:#000; }
.btn-primary:hover { background:#00ebb9; transform:translateY(-1px); box-shadow:0 4px 20px rgba(0,212,170,0.3); }
.btn-secondary { background:var(--surface2); color:var(--text); border:1px solid var(--border); }
.btn-secondary:hover { background:var(--surface3); }
.btn-ghost { background:transparent; color:var(--muted2); }
.btn-ghost:hover { color:var(--text); background:var(--surface2); }
.btn-sm { padding:5px 10px; font-size:12px; }
.btn:disabled { opacity:0.5; cursor:not-allowed; transform:none !important; }

/* LOADING */
.loading-screen { display:flex; align-items:center; justify-content:center; height:200px; }
.spinner { width:16px; height:16px; border-radius:50%; border:2px solid rgba(0,212,170,0.2); border-top-color:var(--accent); animation:spin 0.7s linear infinite; display:inline-block; }
@keyframes spin { to { transform:rotate(360deg); } }

/* CARDS */
.card { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:20px; position:relative; overflow:hidden; }
.card-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.card-title { font-family:var(--font-head); font-size:13px; font-weight:600; color:var(--muted2); text-transform:uppercase; letter-spacing:0.5px; }

/* GRID */
.grid { display:grid; gap:16px; }
.grid-2 { grid-template-columns:repeat(2,1fr); }
.grid-3 { grid-template-columns:repeat(3,1fr); }
.grid-4 { grid-template-columns:repeat(4,1fr); }
.two-col { display:grid; grid-template-columns:1fr 380px; gap:20px; }
.two-col-equal { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.flex { display:flex; }
.flex-between { display:flex; align-items:center; justify-content:space-between; }
.gap-8 { gap:8px; }

/* STATS */
.stat-value { font-family:var(--font-head); font-size:28px; font-weight:700; color:#fff; line-height:1.1; margin-bottom:4px; }
.stat-label { font-size:12.5px; color:var(--muted2); }
.stat-delta { display:inline-flex; align-items:center; gap:3px; font-size:11.5px; font-weight:600; padding:2px 7px; border-radius:99px; margin-top:6px; }
.stat-delta.up { background:rgba(0,212,170,0.12); color:var(--accent); }
.stat-delta.down { background:rgba(239,68,68,0.12); color:var(--danger); }
.stat-accent-bar { position:absolute; top:0; left:0; right:0; height:3px; border-radius:12px 12px 0 0; }
.glow-teal::after { content:''; position:absolute; inset:0; border-radius:12px; background:radial-gradient(circle at top left,rgba(0,212,170,0.04) 0%,transparent 60%); pointer-events:none; }
.glow-blue::after { content:''; position:absolute; inset:0; border-radius:12px; background:radial-gradient(circle at top right,rgba(59,130,246,0.06) 0%,transparent 60%); pointer-events:none; }

/* INSIGHTS */
.insight-item { display:flex; gap:12px; padding:12px; background:var(--surface2); border-radius:10px; margin-bottom:8px; border:1px solid var(--border); transition:all var(--transition); }
.insight-item:hover { border-color:rgba(0,212,170,0.25); }
.insight-icon { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.insight-icon.teal { background:rgba(0,212,170,0.12); }
.insight-icon.blue { background:rgba(59,130,246,0.12); }
.insight-icon.amber { background:rgba(245,158,11,0.12); }
.insight-text { flex:1; }
.insight-title { font-size:13px; font-weight:600; color:var(--text); margin-bottom:2px; }
.insight-desc { font-size:12px; color:var(--muted2); line-height:1.5; }
.insight-metric { font-family:var(--font-mono); font-size:11px; font-weight:500; color:var(--accent); background:rgba(0,212,170,0.08); padding:2px 7px; border-radius:4px; align-self:flex-start; flex-shrink:0; margin-top:2px; }

/* CAMPAIGNS */
.campaign-row { display:flex; align-items:center; gap:14px; padding:12px 0; border-bottom:1px solid var(--border); transition:all var(--transition); }
.campaign-row:last-child { border-bottom:none; }
.campaign-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.campaign-dot.sent { background:var(--accent); }
.campaign-dot.draft { background:var(--muted); }
.campaign-dot.scheduled { background:var(--accent3); }
.campaign-name { flex:1; font-size:13.5px; font-weight:500; color:var(--text); }
.campaign-meta { font-size:12px; color:var(--muted2); }
.tag { display:inline-flex; align-items:center; padding:2px 8px; border-radius:99px; font-size:11px; font-weight:600; }
.tag-sent { background:rgba(0,212,170,0.1); color:var(--accent); }
.tag-draft { background:rgba(100,116,139,0.15); color:var(--muted2); }
.tag-scheduled { background:rgba(245,158,11,0.1); color:var(--accent3); }

/* FORMS */
.form-group { margin-bottom:18px; }
.form-label { display:block; font-size:12.5px; font-weight:600; color:var(--muted2); margin-bottom:6px; }
.form-input,.form-textarea,.form-select { width:100%; background:var(--surface2); border:1px solid var(--border); color:var(--text); font-family:var(--font); font-size:13.5px; padding:9px 13px; border-radius:8px; outline:none; transition:border-color var(--transition); -webkit-appearance:none; }
.form-input:focus,.form-textarea:focus,.form-select:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(0,212,170,0.08); }
.form-textarea { resize:vertical; min-height:120px; line-height:1.6; }
.form-select option { background:var(--surface2); }
.form-hint { font-size:11.5px; color:var(--muted); margin-top:5px; }
.input-with-btn { display:flex; gap:8px; align-items:flex-start; }
.input-with-btn .form-input { flex:1; }
.char-count { font-family:var(--font-mono); font-size:11px; color:var(--muted); text-align:right; margin-top:4px; }

/* SCORE BAR */
.score-bar-wrap { background:var(--surface2); border:1px solid var(--border); border-radius:10px; padding:14px 16px; margin-bottom:16px; }
.score-bar-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.score-label { font-size:12.5px; font-weight:600; color:var(--muted2); }
.score-number { font-family:var(--font-mono); font-size:22px; font-weight:500; color:#fff; }
.score-bar-track { height:6px; background:var(--surface3); border-radius:99px; overflow:hidden; margin-bottom:10px; }
.score-bar-fill { height:100%; border-radius:99px; background:linear-gradient(90deg,var(--accent2),var(--accent)); transition:width 0.6s cubic-bezier(0.4,0,0.2,1); }
.score-details { font-size:12px; color:var(--muted2); line-height:1.6; }

/* SUGGESTIONS */
.suggestion-list { display:flex; flex-direction:column; gap:8px; }
.suggestion-item { background:var(--surface2); border:1px solid var(--border); border-radius:8px; padding:10px 12px; display:flex; align-items:center; justify-content:space-between; cursor:pointer; transition:all var(--transition); }
.suggestion-item:hover { border-color:var(--accent); background:rgba(0,212,170,0.05); }
.suggestion-text { font-size:13px; color:var(--text); flex:1; }
.suggestion-score { font-family:var(--font-mono); font-size:11px; color:var(--accent); background:rgba(0,212,170,0.1); padding:2px 7px; border-radius:4px; margin-left:10px; }

/* AI PANEL */
.ai-panel { background:linear-gradient(135deg,rgba(0,212,170,0.06),rgba(59,130,246,0.06)); border:1px solid rgba(0,212,170,0.2); border-radius:10px; padding:16px; margin-top:12px; }
.ai-panel-header { display:flex; align-items:center; gap:8px; margin-bottom:10px; font-size:12px; font-weight:600; color:var(--accent); text-transform:uppercase; letter-spacing:0.5px; }
.ai-panel-header::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--accent); animation:pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.8)} }
.ai-panel-content { font-size:13px; color:var(--text); line-height:1.7; white-space:pre-wrap; }
.ai-loading { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted2); }

/* ALERTS */
.alert { display:flex; gap:10px; padding:12px 14px; border-radius:8px; font-size:13px; margin-bottom:16px; border:1px solid; }
.alert-info { background:rgba(59,130,246,0.08); border-color:rgba(59,130,246,0.2); color:#93c5fd; }
.alert-success { background:rgba(0,212,170,0.08); border-color:rgba(0,212,170,0.2); color:var(--accent); }
.alert-warning { background:rgba(245,158,11,0.08); border-color:rgba(245,158,11,0.2); color:var(--accent3); }

/* CHECKLIST */
.toggle-wrap { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--border); }
.toggle-label { font-size:13.5px; color:var(--text); font-weight:500; }

/* EMPTY STATE */
.empty-state { text-align:center; padding:40px 20px; color:var(--muted2); }
.empty-icon { font-size:36px; margin-bottom:12px; opacity:0.4; }
.empty-title { font-size:14px; font-weight:600; margin-bottom:6px; color:var(--muted2); }
.empty-desc { font-size:13px; color:var(--muted); }

/* SECTION */
.section-title { font-family:var(--font-head); font-size:18px; font-weight:700; color:#fff; margin-bottom:6px; }
.section-sub { font-size:13px; color:var(--muted2); margin-bottom:20px; }

/* UTILS */
.mb-8 { margin-bottom:8px; }
.mb-12 { margin-bottom:12px; }
.mb-16 { margin-bottom:16px; }
.mb-20 { margin-bottom:20px; }
.mt-4 { margin-top:4px; }
.mt-8 { margin-top:8px; }
.mt-12 { margin-top:12px; }
.text-muted { color:var(--muted2); }
.text-accent { color:var(--accent); }
.text-sm { font-size:12px; }
.font-mono { font-family:var(--font-mono); }
