:root{--brown:#4a2b1c;--brown2:#6f3a1d;--orange:#f28c28;--orange2:#ff7a1a;--cream:#fff8ef;--line:#eadfd2;--text:#2b211c;--muted:#7c7068;--green:#1f9d62;--shadow:0 8px 24px rgba(74,43,28,.08)}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:#f7f1e9;color:var(--text)}a{text-decoration:none;color:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:236px;background:linear-gradient(180deg,#3c2216,#5a311c 65%,#311c13);color:#fff;position:fixed;inset:0 auto 0 0;padding:18px 12px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;gap:10px;align-items:center;padding:6px 8px 18px}.brand-icon{width:46px;height:46px;border:2px solid #ffbd45;border-radius:50%;display:grid;place-items:center;background:#6a3a1c}.brand b{display:block}.brand small{display:block;color:#e8cbb8;margin-top:4px;font-size:11px}.sidebar nav{display:grid;gap:5px}.sidebar nav a{padding:12px 13px;border-radius:11px;display:flex;align-items:center;gap:12px;color:#f8eee8;font-size:14px}.sidebar nav a span{width:24px;text-align:center;font-size:18px}.sidebar nav a:hover,.sidebar nav a.active{background:linear-gradient(90deg,#a95b1c,#c87524);box-shadow:0 4px 15px rgba(0,0,0,.15)}.sidebar-art{margin-top:auto;border-top:1px solid rgba(255,255,255,.12);padding:18px 12px;color:#f8dfc9}.sidebar-art .factory{font-size:42px}.sidebar-art b{display:block;font-family:Georgia,serif;font-style:italic;font-weight:500;line-height:1.5}.sidebar-art small{display:block;margin-top:8px;color:#e8c2a4}.main{margin-left:236px;width:calc(100% - 236px)}.topbar{min-height:86px;background:#fffaf4;border-bottom:1px solid var(--line);padding:15px 22px;display:flex;justify-content:space-between;gap:20px;align-items:center;position:sticky;top:0;z-index:10}.topbar h1{margin:0;font-size:25px}.topbar p{margin:5px 0 0;color:var(--muted);font-size:13px}.top-actions{display:flex;gap:10px;align-items:center}.user-chip{background:white;border:1px solid var(--line);padding:10px 12px;border-radius:12px}.content{padding:18px 20px 40px;max-width:1700px;margin:auto}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--line);background:#fff;padding:10px 14px;border-radius:10px;font-weight:700;cursor:pointer}.btn.primary{background:linear-gradient(135deg,var(--orange),var(--orange2));color:white;border-color:transparent}.btn.secondary{background:#fff7eb;color:#8a451f;border-color:#f1cfa8}.btn.danger{background:#fff1ef;color:#a92c1d;border-color:#f1c7c1}.btn.small{padding:7px 10px;font-size:12px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.stat{background:white;border:1px solid var(--line);border-radius:15px;padding:16px;box-shadow:var(--shadow);display:flex;gap:12px;align-items:center}.stat .icon{width:50px;height:50px;border-radius:13px;background:#fff0d7;display:grid;place-items:center;font-size:24px}.stat h3{margin:0;font-size:24px}.stat p{margin:3px 0;color:var(--muted);font-size:12px}.grid{display:grid;gap:14px}.grid-2{grid-template-columns:1fr 1fr}.grid-3{grid-template-columns:repeat(3,1fr)}.grid-4{grid-template-columns:repeat(4,1fr)}.card{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:16px}.card h2,.card h3{margin:0 0 8px}.card .sub{color:var(--muted);font-size:12px;margin-bottom:12px}.step-title{display:flex;align-items:center;gap:9px;font-weight:800}.step-no{width:34px;height:34px;border-radius:50%;background:var(--brown2);color:#fff;display:grid;place-items:center}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.field{display:grid;gap:6px}.field.full{grid-column:1/-1}label{font-size:12px;font-weight:800;color:#5e5148}input,select,textarea{width:100%;border:1px solid #d9d0c8;border-radius:9px;padding:10px 11px;background:#fff;font:inherit;color:var(--text)}textarea{min-height:88px;resize:vertical}.upload-zone{border:2px dashed #d9c9b9;background:#fffaf3;border-radius:14px;padding:24px;text-align:center}.preview-row,.media-grid{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.thumb{width:78px;height:62px;object-fit:cover;border-radius:9px;border:1px solid var(--line)}.choice-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.choice{border:1px solid var(--line);padding:10px;border-radius:12px;background:#fff;cursor:pointer}.choice:has(input:checked){border:2px solid var(--orange);background:#fff7ec}.choice input{width:auto}.template-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.template-card{border:1px solid var(--line);border-radius:14px;padding:13px;background:#fff;display:grid;gap:8px}.pill{display:inline-block;padding:5px 8px;border-radius:999px;background:#fff0db;color:#8a451f;font-size:11px;font-weight:800}.storyboard{display:flex;gap:10px;overflow:auto;padding-bottom:8px}.scene-card{min-width:220px;border:1px solid var(--line);border-radius:14px;background:white;overflow:hidden}.scene-visual{height:128px;background:linear-gradient(135deg,#f0dcc5,#fff7ed);display:flex;align-items:center;justify-content:center;font-size:48px;position:relative}.scene-number{position:absolute;left:9px;top:9px;width:28px;height:28px;border-radius:50%;background:white;display:grid;place-items:center;font-weight:900}.scene-time{position:absolute;right:8px;bottom:8px;background:#2e251f;color:#fff;padding:4px 7px;border-radius:7px;font-size:11px}.scene-body{padding:11px}.scene-body h4{margin:0 0 6px}.scene-body p{font-size:12px;color:var(--muted);margin:0;white-space:pre-line}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px}th,td{padding:10px;border-bottom:1px solid #eee3d9;vertical-align:top;text-align:left}th{background:#fbf6ef;position:sticky;top:0}.alert{padding:11px 13px;border-radius:10px;margin-bottom:12px}.alert.success{background:#eaf8f1;color:#176f49}.alert.error{background:#fff0ee;color:#9b2f24}.toolbar{display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:12px}.filters{display:flex;gap:8px;flex-wrap:wrap}.pagination{display:flex;gap:5px;justify-content:center;margin-top:18px}.pagination a{width:34px;height:34px;border-radius:8px;border:1px solid var(--line);display:grid;place-items:center;background:white}.pagination a.active{background:var(--orange);color:white;border-color:var(--orange)}.media-card img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:10px}.media-gallery{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.character-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.char-avatar{width:72px;height:72px;border-radius:50%;object-fit:cover;background:#f3e7d9;display:grid;place-items:center;font-size:34px}.muted{color:var(--muted)}.hidden{display:none!important}.codebox{white-space:pre-wrap;background:#2c251f;color:#fff8ed;border-radius:10px;padding:12px;font-size:12px;max-height:260px;overflow:auto}.scene-edit{border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:12px;background:#fff}.scene-edit summary{cursor:pointer;font-weight:800}.sticky-actions{position:sticky;bottom:12px;background:rgba(255,248,239,.95);border:1px solid var(--line);padding:10px;border-radius:14px;display:flex;gap:8px;justify-content:flex-end;backdrop-filter:blur(10px)}@media(max-width:1200px){.grid-4{grid-template-columns:repeat(2,1fr)}.template-grid{grid-template-columns:repeat(2,1fr)}.media-gallery{grid-template-columns:repeat(3,1fr)}.character-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:800px){.sidebar{width:76px}.brand div:not(.brand-icon),.sidebar nav a{font-size:0}.sidebar nav a span{font-size:20px}.sidebar-art{display:none}.main{margin-left:76px;width:calc(100% - 76px)}.topbar{align-items:flex-start}.topbar p,.user-chip{display:none}.stats,.grid-2,.grid-3,.grid-4,.form-grid,.template-grid{grid-template-columns:1fr}.media-gallery,.character-grid{grid-template-columns:repeat(2,1fr)}.choice-grid{grid-template-columns:1fr}.content{padding:12px}.topbar h1{font-size:18px}.btn{padding:9px 10px}}
/* ===== V1.3: media manager, prompt library, scene workspaces, API mode ===== */
.alert.info{background:#eef6ff;color:#255f91;border:1px solid #cfe4f7}.alert.info a{text-decoration:underline}.api-ready{background:#e9f8ef;color:#187447}.api-off{background:#f3eee9;color:#78675d}.api-warning{display:block;color:#a74b22;margin-top:6px}.generation-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.generation-choice{display:flex;gap:10px;align-items:flex-start;padding:15px}.generation-choice input{margin-top:3px}.generation-choice b,.generation-choice small{display:block}.generation-choice small{margin-top:5px}.btn.disabled-look{border-style:dashed}.project-toolbar{align-items:flex-start}.project-toolbar .filters{justify-content:flex-end}.media-image-wrap{position:relative;aspect-ratio:4/3;background:#f4eadf;border-radius:11px;overflow:hidden}.media-image-wrap img{width:100%;height:100%;object-fit:cover}.media-id{position:absolute;left:7px;top:7px;background:rgba(38,29,24,.82);color:#fff;padding:4px 7px;border-radius:7px;font-size:11px}.image-missing{width:100%;height:100%;display:grid;place-items:center;align-content:center;gap:6px;color:#9d6d50;background:linear-gradient(135deg,#f7eee3,#fffaf4);text-align:center;padding:10px;font-size:30px}.image-missing small{font-size:11px}.managed-media-card{position:relative;display:flex;flex-direction:column;gap:10px}.media-edit-form{display:grid;gap:8px}.media-meta{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:10px}.toolbar.compact{margin:0;justify-content:flex-start}.media-delete{width:100%}.prompt-library{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.prompt-card{display:grid;gap:12px}.prompt-card-head{display:flex;gap:12px;align-items:center}.prompt-thumb{width:110px;height:78px;object-fit:cover;border-radius:11px;border:1px solid var(--line);flex:0 0 auto}.prompt-thumb.placeholder{display:grid;place-items:center;background:#f5eadc;font-size:28px}.prompt-card-head h3{margin:6px 0 3px}.prompt-block{border:1px solid var(--line);border-radius:12px;overflow:hidden}.prompt-block.image-prompt{background:#fff9ef}.prompt-block.video-prompt{background:#f7f8ff}.prompt-label{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 11px;font-size:12px;font-weight:800;border-bottom:1px solid var(--line)}.prompt-block pre{margin:0;padding:11px;white-space:pre-wrap;font:12px/1.55 Inter,Segoe UI,Arial,sans-serif;max-height:160px;overflow:auto}.scene-visual img{width:100%;height:100%;object-fit:cover}.scene-placeholder{display:grid;place-items:center;align-content:center;gap:5px;color:#9e735a;font-size:36px}.scene-placeholder small{font-size:11px}.scene-placeholder.large{min-height:210px}.rich-scene-card{min-width:245px}.scene-copy-row{display:flex;gap:6px;margin-top:10px}.scene-detail-section{padding:18px}.scene-workspace{border:1px solid var(--line);border-radius:16px;background:#fff;margin:16px 0;overflow:hidden;box-shadow:0 6px 20px rgba(74,43,28,.05);scroll-margin-top:105px}.scene-workspace-head{display:flex;gap:12px;align-items:center;padding:13px 15px;background:linear-gradient(90deg,#fff7eb,#fff);border-bottom:1px solid var(--line)}.scene-workspace-head h3{margin:0 0 3px}.scene-index{background:var(--brown2);color:#fff;font-weight:900;border-radius:10px;padding:8px 10px;white-space:nowrap}.scene-head-actions{margin-left:auto}.scene-workspace form{padding:15px}.scene-workspace-grid{display:grid;grid-template-columns:320px 1fr;gap:14px}.scene-reference-panel{display:grid;gap:10px}.scene-reference-image{background:#f6ecdf;border:1px solid var(--line);border-radius:14px;overflow:hidden;min-height:210px}.scene-reference-image img{width:100%;height:240px;object-fit:cover;display:block}.scene-content-panel textarea{min-height:100px}.prompt-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.prompt-editor{border:1px solid var(--line);border-radius:14px;padding:12px}.prompt-editor.image-editor{background:#fffaf1}.prompt-editor.video-editor{background:#f8f8ff}.prompt-editor-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:9px}.prompt-textarea{min-height:180px;line-height:1.5;background:#fff}.prompt-editor small{display:block;color:var(--muted);margin-top:6px}.scene-tech{margin-top:14px}.scene-save-row{display:flex;justify-content:flex-end;margin-top:12px}.template-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.template-tabs a{padding:8px 10px;border:1px solid var(--line);border-radius:999px;background:#fff;font-size:12px;font-weight:800}.template-tabs a.active{background:var(--orange);border-color:var(--orange);color:#fff}.template-card details{border-top:1px solid #f0e6db;padding-top:8px}.template-card summary{cursor:pointer;font-weight:800;font-size:12px}.template-blueprint{margin-top:8px;background:#fff8ef;border-radius:9px;padding:9px;font-size:12px;line-height:1.5}.template-actions{display:flex;gap:8px;align-items:center;justify-content:space-between}.template-count{font-size:11px;color:var(--muted)}
@media(max-width:1100px){.prompt-library{grid-template-columns:1fr}.scene-workspace-grid{grid-template-columns:1fr}.prompt-pair{grid-template-columns:1fr}.generation-options{grid-template-columns:1fr}}
@media(max-width:700px){.project-toolbar .filters{justify-content:flex-start}.scene-workspace-head{align-items:flex-start;flex-wrap:wrap}.scene-head-actions{margin-left:0;width:100%}.scene-reference-image img{height:210px}.prompt-card-head{align-items:flex-start}.prompt-thumb{width:90px;height:68px}}
.dashboard-steps{grid-template-columns:repeat(5,1fr)}
@media(max-width:1200px){.dashboard-steps{grid-template-columns:repeat(2,1fr)}}
@media(max-width:800px){.dashboard-steps{grid-template-columns:1fr}}
/* ===== V1.4 - Kho mẫu kịch bản tuyển dụng ===== */
.template-hero{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:14px;background:linear-gradient(135deg,#fff,#fff6e9)}
.template-hero h2{font-size:30px;margin:8px 0 5px}.hero-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.template-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}.template-tabs a{padding:8px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;font-size:12px}.template-tabs a.active{background:var(--brown2);color:#fff;border-color:var(--brown2)}.template-tabs a b{font-size:10px;opacity:.75;margin-left:4px}.template-filter-grid{display:grid;grid-template-columns:2fr 1fr .75fr .9fr auto auto;gap:9px;align-items:end}.check-row{display:flex;align-items:center;gap:7px;white-space:nowrap;padding:10px 0}.check-row input{width:auto}.filter-actions{display:flex;gap:6px}.template-grid-v14{grid-template-columns:repeat(4,1fr)}.template-card-v14{min-height:350px;align-content:start}.template-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.featured-badge{font-size:10px;font-weight:800;color:#a55c00;background:#fff4cf;border:1px solid #f7d888;border-radius:999px;padding:5px 7px}.template-desc{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5}.template-meta{display:flex;gap:5px;flex-wrap:wrap}.template-meta span{font-size:10px;background:#faf5ef;border:1px solid #efe0d0;border-radius:999px;padding:5px 7px}.template-mini-blueprint{font-size:11px;line-height:1.55;padding:9px;background:#fffaf3;border:1px dashed #e9d5bf;border-radius:10px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.template-card-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:auto}.template-detail-hero{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:14px}.detail-list{display:grid;gap:0}.detail-list>div{display:grid;grid-template-columns:150px 1fr;gap:12px;padding:10px 0;border-bottom:1px solid #f0e5da}.prompt-panel{border:1px solid var(--line);background:#fffaf3;border-radius:12px;padding:12px;margin-top:10px}.prompt-panel p{line-height:1.6}.blueprint-flow{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.blueprint-step{position:relative;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fffaf3;min-height:72px;display:flex;gap:9px;align-items:center}.blueprint-step span{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--brown2);color:#fff;font-weight:900;flex:0 0 30px}.blueprint-step b{font-size:12px;line-height:1.35}.light-code{background:#fffaf3;color:var(--text);border:1px solid var(--line);margin-bottom:9px}.template-admin-actions{display:flex;gap:7px;flex-wrap:wrap}.checkbox-stack{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.checkbox-stack label{display:flex;gap:6px;align-items:center}.checkbox-stack input{width:auto}.api-ready{background:#e8f8ef;color:#16704a}.api-off{background:#fff0ee;color:#a02a21}
@media(max-width:1450px){.template-grid-v14{grid-template-columns:repeat(3,1fr)}.template-filter-grid{grid-template-columns:2fr 1fr 1fr 1fr}.filter-actions{grid-column:auto}.blueprint-flow{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1050px){.template-grid-v14{grid-template-columns:repeat(2,1fr)}.template-filter-grid{grid-template-columns:1fr 1fr}.template-hero,.template-detail-hero{align-items:flex-start;flex-direction:column}.blueprint-flow{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.template-grid-v14,.template-filter-grid,.blueprint-flow{grid-template-columns:1fr}.template-hero h2{font-size:22px}.detail-list>div{grid-template-columns:1fr;gap:3px}.template-card-actions .btn{flex:1}.hero-actions{justify-content:flex-start}}
/* ===== V1.4.1 - Làm rõ luồng Chọn mẫu -> Tạo MV ===== */
.selected-template-banner{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:12px;border:2px solid #f2b45b;background:linear-gradient(135deg,#fff9ef,#fff2dd);box-shadow:0 10px 28px rgba(173,91,24,.12)}
.selected-template-main{min-width:0;flex:1}.selected-template-kicker{display:inline-flex;padding:6px 9px;border-radius:999px;background:#e8f8ef;color:#16704a;font-size:11px;font-weight:900;letter-spacing:.25px}.selected-template-banner h2{font-size:24px;margin:9px 0 6px;color:#532d18}.selected-template-banner p{margin:0;color:var(--muted);line-height:1.55}.selected-template-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.selected-template-tags span{background:#fff;border:1px solid #ead4ba;border-radius:999px;padding:6px 8px;font-size:11px;font-weight:800}.selected-template-flow{margin-top:10px;padding:9px 11px;border:1px dashed #e4bf91;border-radius:10px;background:rgba(255,255,255,.65);font-size:12px;line-height:1.5}.selected-template-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end;max-width:380px}.template-use-help{font-size:13px;line-height:1.55}.selected-template-inline{display:block;margin-top:6px;color:#16704a;font-size:11px}.create-mv-submit{min-width:220px;box-shadow:0 7px 18px rgba(242,140,40,.24)}
.template-card-actions .btn.primary{box-shadow:0 5px 12px rgba(242,140,40,.16)}
@media(max-width:900px){.selected-template-banner{flex-direction:column}.selected-template-actions{justify-content:flex-start;max-width:none}}

/* ===== V1.4.2: Prompt quản lý theo dự án + danh sách gọn ===== */
.project-prompt-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.project-prompt-card{padding:0;overflow:hidden;display:flex;flex-direction:column;min-height:340px}
.project-prompt-cover{height:150px;background:linear-gradient(135deg,#fff4e8,#f6dfc7);overflow:hidden;display:grid;place-items:center;border-bottom:1px solid #ead8c7}
.project-prompt-cover img{width:100%;height:100%;object-fit:cover;display:block}
.project-cover-placeholder{font-size:54px;filter:drop-shadow(0 6px 10px rgba(83,40,18,.12))}
.project-prompt-body{padding:16px;display:flex;flex-direction:column;gap:9px;flex:1}
.project-prompt-body h3{margin:0;font-size:19px;line-height:1.25}
.prompt-project-stats{display:flex;gap:7px;flex-wrap:wrap}
.prompt-project-stats span{font-size:12px;padding:6px 8px;border-radius:999px;background:#fff7ef;border:1px solid #f2dfcc;color:#6b361c;font-weight:700}
.prompt-project-actions{margin-top:auto;align-items:center}
.prompt-project-actions form,.template-card-actions form,.toolbar form{margin:0}
.small-text{font-size:12px}
.prompt-project-header{margin-bottom:14px}
.prompt-project-library{grid-template-columns:repeat(2,minmax(0,1fr))}
.character-managed-grid{margin-top:14px}
.character-managed-card{position:relative;min-width:0}
.character-managed-card form{margin-top:auto}
@media(max-width:1250px){.project-prompt-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.project-prompt-grid,.prompt-project-library{grid-template-columns:1fr}.project-prompt-cover{height:190px}}

/* ===== V1.5: User, quyền lợi, brand style, API cost ===== */
.auth-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(135deg,#3a2116,#8a451f 55%,#f28c28)}.auth-card{width:min(520px,100%);padding:28px}.auth-logo{font-size:44px}.auth-card h1{margin:8px 0}.auth-card .field{margin-top:12px}.auth-submit{width:100%;margin-top:16px}.auth-links{text-align:center;margin-top:14px;font-size:13px}.user-menu{display:flex;gap:8px;align-items:center}.user-chip{display:flex;align-items:center;gap:8px}.user-chip span{display:grid}.user-chip small{font-size:10px;color:var(--muted);font-weight:500;margin-top:2px}.status-badge{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:800;background:#f3eee8}.status-active,.status-success{background:#e6f8ee;color:#147148}.status-pending{background:#fff5d6;color:#8c6500}.status-locked,.status-fallback{background:#fff0ed;color:#a33225}.status-resigned{background:#eef0f4;color:#5d6570}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.permission-item{display:flex;gap:9px;align-items:flex-start;padding:11px;border:1px solid var(--line);border-radius:12px;background:#fffaf4}.permission-item input{width:auto;margin-top:3px}.permission-item span{display:grid;gap:2px}.permission-item small{font-size:10px;color:var(--muted);font-weight:500}
.v15-builder-row .card{min-height:440px}.item-builder{display:grid;gap:12px}.item-list{display:grid;gap:9px}.benefit-item{display:grid;grid-template-columns:36px 1fr 38px;gap:8px;align-items:center}.benefit-icon{width:36px;height:36px;border-radius:11px;background:#0d1930;color:#fff;display:grid;place-items:center;border:1px solid #263852;font-size:17px}.benefit-text{font-weight:700;background:#fff}.icon-delete{width:38px;height:36px;border:1px solid #d8dfe7;background:#edf2f7;border-radius:11px;cursor:pointer}.item-add-row{display:grid;grid-template-columns:72px 1fr auto;gap:8px;padding-top:12px;border-top:1px solid var(--line)}.item-add-row select{font-size:18px}.preset-title{font-size:12px;font-weight:800;color:#a55b00}.preset-chips{display:flex;gap:7px;flex-wrap:wrap}.preset-chips button{border:1px solid #e2d7ca;background:#f8f5f1;border-radius:999px;padding:7px 10px;cursor:pointer;font-size:11px;font-weight:700;color:#4b4038}.preset-chips button:hover{border-color:var(--orange);background:#fff3e2}.brand-style-card{overflow:hidden}.brand-palette-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.brand-palette{border:1px solid var(--line);border-radius:13px;padding:11px;display:grid;gap:8px;cursor:pointer;background:#fff}.brand-palette.selected,.brand-palette:has(input:checked){border:2px solid var(--orange);background:#fff7eb}.brand-palette input{width:auto;position:absolute;opacity:0;pointer-events:none}.swatches{display:flex;height:34px;border-radius:9px;overflow:hidden;border:1px solid #ddd}.swatches i{flex:1}.brand-palette b{font-size:11px}.custom-color-row{display:grid;grid-template-columns:150px 150px 150px 1fr;gap:12px;align-items:end;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}input[type=color]{height:44px;padding:4px}.brand-preview{min-height:58px;border-radius:13px;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(135deg,#1D52B8,#F8A81D);color:#fff}.brand-preview span{font-size:11px;opacity:.85}.brand-preview b{font-size:17px}.scene-action-box{background:#fff7e8;border:1px solid #f1d2a6;border-radius:12px;padding:12px}.scene-action-box textarea{min-height:76px;font-weight:700}.prompt-video-note{font-size:11px;color:#7b6757;margin-top:5px}.api-cost{font-variant-numeric:tabular-nums}
@media(max-width:1300px){.brand-palette-grid{grid-template-columns:repeat(3,1fr)}.custom-color-row{grid-template-columns:repeat(3,1fr)}.brand-preview{grid-column:1/-1}}
@media(max-width:850px){.permission-grid,.brand-palette-grid,.custom-color-row{grid-template-columns:1fr}.item-add-row{grid-template-columns:70px 1fr}.item-add-row .btn{grid-column:1/-1}.v15-builder-row{grid-template-columns:1fr!important}.user-menu{flex-wrap:wrap}.top-actions{flex-wrap:wrap}}

/* V1.6 - Hạn mức phân cảnh AI */
.quota-chip{display:flex;flex-direction:column;gap:1px;min-width:132px;padding:8px 12px;border:1px solid #f0c58b;border-radius:12px;background:#fff8ed;color:#6f3517;line-height:1.15}.quota-chip span{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.02em}.quota-chip b{font-size:14px}.quota-chip small{font-size:11px;color:#8a5b3c}.quota-chip.quota-blocked{background:#fff0f0;border-color:#efb0b0;color:#a22525}.quota-chip.quota-blocked small{color:#a22525}.quota-inline{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:12px 0;padding:12px 14px;border-radius:12px;background:#fff8ec;border:1px solid #f0cf9c}.quota-inline b{color:#7b3d1c}.quota-inline span{font-weight:700}.quota-inline small{width:100%;color:#7a6a5d}.quota-dashboard{border:1px solid #efd2a6;background:linear-gradient(135deg,#fffaf3,#fff)}.quota-big{font-size:24px;font-weight:800;color:#7d3a18}.quota-progress{height:10px;background:#f1e6d7;border-radius:999px;overflow:hidden;margin:12px 0}.quota-progress>span{display:block;height:100%;background:linear-gradient(90deg,#c96b19,#f59b23);border-radius:inherit}.quota-summary{margin-top:10px;padding:12px;border-radius:10px;background:#fff8ed;border:1px solid #eed7b4;line-height:1.7}.rule-list{padding-left:20px;margin:10px 0}.rule-list li{margin:8px 0}.top-actions{flex-wrap:wrap}.topbar .quota-chip{align-self:center}
@media(max-width:900px){.quota-chip{min-width:0}.quota-big{font-size:20px}}
