:root{--bg:#f3f4f6;--surface:#fff;--ink:#0f172a;--muted:#475569;--line:#d6dbe3;--accent:#0f766e;--primary:#2f6f62;--primary-hover:#25584d;--secondary-bg:#eef2f7;--secondary-ink:#334155;--danger:#b91c1c;--danger-soft:#fee2e2}*{box-sizing:border-box}body,html{color:var(--ink);background:#f5f6f8;margin:0;padding:0;font-family:Segoe UI,Helvetica Neue,sans-serif}h1,h2,h3,p{margin:0}h1{font-size:28px}h2{font-size:22px}h3{font-size:18px}button,input,select,textarea{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 10px;font-size:14px}button{background:var(--primary);color:#fff;cursor:pointer;border:0;font-weight:600;transition:background-color .12s,transform .12s}button:hover{transform:translateY(-1px)}button:disabled{opacity:.65;cursor:not-allowed;transform:none}.container{gap:16px;max-width:1600px;margin:0 auto;padding:0 20px 20px;display:grid}.page-stack{gap:16px;display:grid}.menu-bar{background:var(--surface);border:1px solid var(--line);z-index:20;border-radius:0 0 12px 12px;justify-content:flex-start;align-items:center;gap:16px;padding:12px 18px;display:flex;position:sticky;top:0}.brand{align-items:center;gap:10px;min-width:220px;display:flex}.brand-logo{color:#fff;background:#98ad2b;border-radius:11px;justify-content:center;align-items:center;width:42px;height:42px;font-size:26px;font-weight:700;display:inline-flex}.brand-name{font-size:18px;font-weight:600}.menu-nav{align-items:center;gap:6px;margin-left:8px;display:flex}.menu-item{color:#6b7280;border-radius:12px;padding:11px 16px;font-size:15px;font-weight:500;text-decoration:none;transition:background-color .12s,color .12s}.menu-item:hover{color:#1f2937;background:#f3f4f6}.menu-item.active{color:#1e293b;background:#cfd8a2}.menu-settings{color:#6b7280;border-left:1px solid #e2e8f0;padding-left:14px;font-size:15px;font-weight:500;text-decoration:none}.menu-settings.active{color:#1e293b;background:#eef2d0;border-radius:10px;padding:8px 12px}.menu-toggle,.mobile-settings{display:none}.menu-controls{align-items:center;gap:8px;margin-left:auto;display:flex}.menu-item-btn{text-align:left;color:#6b7280;cursor:pointer;background:0 0;border:0;width:100%}.page-header{background:0 0;gap:8px;display:grid}.title-line{background:#96a825;border-radius:3px;width:68px;height:3px}.hint{color:var(--muted);font-size:13px}.hint-inline{color:var(--muted);font-size:12px;display:block}.grid-4{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;display:grid}.panel,.stat-box{background:var(--surface);border:1px solid var(--line);border-radius:16px}.panel{gap:12px;padding:16px;display:grid}.padded{padding:14px}.label{color:var(--muted);text-transform:uppercase;letter-spacing:1px;font-size:12px}.value-sm{margin-top:4px;font-size:24px;font-weight:700}.kpi-card{border-left:4px solid #cbd5e1;gap:4px;display:grid}.kpi-sub{color:#64748b;font-size:12px}.kpi-trend{font-size:12px;font-weight:600}.kpi-positive{border-left-color:#22c55e}.kpi-warning{border-left-color:#f59e0b}.kpi-critical{border-left-color:#ef4444}.kpi-neutral{border-left-color:#94a3b8}.trend-positive{color:#15803d}.trend-warning{color:#b45309}.trend-critical{color:#b91c1c}.trend-neutral{color:#475569}.panel-head{justify-content:space-between;align-items:center;gap:10px;display:flex}.row{align-items:center;display:flex}.split{justify-content:space-between}.gap{gap:8px}.gap-sm{gap:4px}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary-hover)}.btn-secondary{background:var(--secondary-bg);color:var(--secondary-ink);border:1px solid #d7deea}.btn-secondary:hover{background:#e5ecf5}.btn-danger{background:var(--danger-soft);color:var(--danger);border:1px solid #fecaca}.btn-danger:hover{background:#fecaca}.btn-sm{padding:7px 10px;font-size:12px}.btn-ghost{color:#334155;background:#fff;border:1px dashed #cbd5e1}.btn-ghost:hover{background:#f8fafc}.status-inline{align-items:center;gap:6px;display:inline-flex}.status-dot{border-radius:999px;width:8px;height:8px}.status-ok{background:#16a34a}.status-warn{background:#d97706}.store-layout{grid-template-columns:minmax(0,2fr) minmax(320px,1fr);align-items:start;gap:12px;display:grid}.agent-panel{max-height:calc(100vh - 120px);position:sticky;top:82px;overflow-y:auto}.table-wrap{-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:12px;width:100%;overflow:auto hidden}table{border-collapse:collapse;width:100%;min-width:860px}td,th{text-align:left;vertical-align:top;border-bottom:1px solid #eef1f5;padding:10px;font-size:13px}th{color:#334155;letter-spacing:.3px;background:#f8fafc;font-weight:700}tbody tr:nth-child(2n){background:#fafbfc}tbody tr:hover{background:#eef3f8}.col-actions{width:160px}.tag-list{flex-wrap:wrap;gap:4px;margin-bottom:4px;display:flex}.tag{color:#1e293b;background:#e2e8f0;border-radius:999px;padding:2px 8px;font-size:12px}.tag-urgent{color:#991b1b;background:#fee2e2}.tag-refund{color:#5b21b6;background:#ede9fe}.tag-marketing{color:#166534;background:#dcfce7}.tag-fulfillment{color:#1e3a8a;background:#dbeafe}.hint-grid{color:var(--muted);flex-wrap:wrap;gap:16px;font-size:13px;display:flex}.simple-list{gap:8px;display:grid}.simple-list-item{border:1px solid var(--line);border-radius:12px;gap:4px;padding:10px;display:grid}.error{color:#b91c1c;background:#fef2f2;border:1px solid #fecaca;border-radius:10px;padding:10px}.toast-stack{z-index:60;gap:8px;display:grid;position:fixed;bottom:16px;right:16px}.toast{border:1px solid #0000;border-radius:10px;min-width:240px;max-width:360px;padding:10px 12px;font-size:13px;font-weight:600}.toast-success{color:#166534;background:#ecfdf3;border-color:#bbf7d0}.toast-error{color:#b91c1c;background:#fef2f2;border-color:#fecaca}.video-status-panel{border:1px solid var(--line);background:#fff;border-radius:16px;gap:10px;padding:14px;display:grid}.video-status-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.video-status-head strong{margin-top:3px;font-size:18px;display:block}.video-status-bar{background:#eef2f7;border:1px solid #dbe2ec;border-radius:999px;height:14px;display:flex;overflow:hidden}.status-segment{min-width:0;height:100%}.status-completed{background:#22c55e}.status-active{background:#f59e0b}.status-failed{background:#ef4444}.status-other{background:#94a3b8}.video-status-legend{color:#475569;flex-wrap:wrap;align-items:center;gap:14px;font-size:13px;display:flex}.legend-dot{border-radius:999px;width:9px;height:9px;margin-right:6px;display:inline-block}.dot-completed{background:#22c55e}.dot-active{background:#f59e0b}.dot-failed{background:#ef4444}.dot-other{background:#94a3b8}.video-studio-grid{grid-template-columns:minmax(0,1.7fr) minmax(320px,.8fr);align-items:start;gap:12px;display:grid}.video-builder{align-content:start}.video-form{gap:12px;display:grid}.workflow-step{background:#fbfcfe;border:1px solid #e2e8f0;border-radius:14px;grid-template-columns:34px minmax(0,1fr);align-items:start;gap:10px;padding:12px;display:grid}.step-index{color:#fff;background:#0f766e;border-radius:999px;place-items:center;width:28px;height:28px;font-size:13px;font-weight:700;display:grid}.workflow-fields{gap:10px;display:grid}.workflow-fields.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}.fixed-standard{background:#fff;border:1px solid #dbe2ec;border-radius:10px;align-content:center;gap:2px;min-height:42px;padding:8px 10px;display:grid}.fixed-standard strong{color:#0f172a;font-size:14px;line-height:1}.fixed-standard small{color:#64748b;font-size:12px;line-height:1.2}.fixed-standard.compact{align-items:center;min-height:42px;display:flex}.video-prompt textarea{min-height:150px}.video-controls{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;display:grid}.video-controls.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}.reference-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;display:grid}.reference-grid textarea{min-height:92px}.check-row{color:#334155;align-items:center;gap:8px;font-size:13px;font-weight:600;display:inline-flex}.check-row input{width:16px;height:16px;padding:0}.video-preview,.video-preview-large{border:1px solid var(--line);background:#0f172a;border-radius:10px;width:100%}.video-preview-large{aspect-ratio:9/16;object-fit:contain;max-height:520px}.video-output-grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;display:grid}.video-output-card{border:1px solid var(--line);cursor:pointer;background:#fff;border-radius:14px;transition:border-color .12s,transform .12s;display:grid;overflow:hidden}.video-output-card:hover{border-color:#9aa83a;transform:translateY(-1px)}.video-output-card.selected{border-color:#2f6f62;box-shadow:0 0 0 2px #2f6f621f}.video-thumb{aspect-ratio:16/10;object-fit:cover;background:#0f172a;width:100%}.empty-preview{color:#64748b;background:#eef2f7;border:1px dashed #cbd5e1;border-radius:10px;place-items:center;min-height:180px;font-size:13px;display:grid}.video-card-body{gap:8px;padding:12px;display:grid}.selected-output{border-top:1px solid var(--line);gap:10px;padding-top:12px;display:grid}.preset-button{text-align:left;color:#334155;border:1px solid var(--line);background:#fff;border-radius:10px;gap:3px;padding:10px;display:grid}.preset-button:hover{background:#f8fafc}.download-link{color:#334155;align-items:center;text-decoration:none;display:inline-flex}.result-link{color:#0f3c7a;font-weight:600;text-decoration:none}.result-link:hover{text-decoration:underline}.wrap{flex-wrap:wrap}.auth-page{background:radial-gradient(circle at 20% 0,#2f6f622e,#0000 40%),radial-gradient(circle at 100% 100%,#98ad2b33,#0000 42%),#f1f5f9;place-items:center;min-height:100vh;padding:18px;display:grid}.auth-card{border-radius:18px;gap:12px;width:min(100%,420px);padding:24px;box-shadow:0 24px 60px #0f172a24}.eyebrow{color:var(--accent);text-transform:uppercase;letter-spacing:.8px;font-size:12px;font-weight:600}.subtle{color:var(--muted);margin-top:6px}.auth-form{gap:10px;display:grid}.auth-actions{padding-top:6px}.auth-meta{color:#64748b;font-size:12px}.field{gap:6px;display:grid}.field span{color:#334155;font-size:13px;font-weight:600}.assistant-fab{z-index:70;border-radius:999px;padding:12px 16px;position:fixed;bottom:18px;right:18px;box-shadow:0 10px 30px #0f172a33}.assistant-panel{z-index:70;grid-template-rows:auto 1fr auto;gap:10px;width:min(420px,100vw - 24px);max-height:70vh;display:grid;position:fixed;bottom:76px;right:18px}.assistant-messages{gap:8px;padding-right:2px;display:grid;overflow:auto}.assistant-msg{white-space:pre-wrap;border-radius:10px;padding:8px 10px;font-size:13px}.assistant-msg.user{color:#0f172a;background:#e2e8f0}.assistant-msg.bot{color:#14532d;background:#ecfdf3}.prompt-ai-box{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:10px;margin-top:8px;padding:8px}.source-chip{background:#f8fafc;border:1px solid #dbe2ec;border-radius:999px;padding:4px 8px}.simple-list pre{white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;max-width:100%}.memory-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;margin-top:8px}.memory-head{color:#334155;text-transform:uppercase;letter-spacing:.6px;border-bottom:1px solid #e2e8f0;padding:8px 10px;font-size:12px;font-weight:700}.memory-lines{gap:4px;max-height:210px;padding:8px 10px;display:grid;overflow:auto}.memory-lines p{color:#334155;word-break:break-word;margin:0;font-size:13px;line-height:1.35}@media (max-width:1024px){.menu-bar{flex-wrap:wrap;gap:12px}.menu-toggle{color:#334155;background:#fff;border:1px solid #d9dde5;border-radius:10px;justify-content:center;align-items:center;width:40px;height:40px;margin-left:auto;font-size:20px;display:inline-flex}.menu-controls,.menu-nav,.menu-settings{display:none}.menu-nav{border-top:1px solid #e2e8f0;flex-direction:column;align-items:stretch;gap:6px;width:100%;margin-left:0;padding-top:8px}.menu-nav.open{display:flex}.menu-item{padding:10px 12px}.mobile-settings{display:block}}@media (max-width:1000px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.panel-head{flex-direction:column;align-items:flex-start}.brand{min-width:0}.store-layout,.video-studio-grid{grid-template-columns:1fr}.agent-panel{max-height:none;position:static}}@media (max-width:640px){.grid-4,.video-controls,.video-controls.two-col,.reference-grid,.workflow-fields.two-col,.workflow-step{grid-template-columns:1fr}.container,.panel{padding:12px}.page-header h1{font-size:24px}}
