/* Trang giọng đọc (voice_domain): nền sáng, menu trái, điểm nhấn tím–hồng của thương hiệu.
   Chỉ nạp khi site == 'voice'; ghi đè biến màu của style.css nên mọi thành phần cũ tự đổi sang nền sáng. */
body.site-voice {
  --bg: #f6f6f9; --panel: #ffffff; --panel-2: #f2f2f6; --line: #e6e6ec;
  --text: #17171c; --muted: #6b6b78; --accent: #7c3aed; --accent-2: #db2777;
  --accent-soft: rgba(124, 58, 237, .09); --accent-ink: #6d28d9;
  --ok: #16a34a; --warn: #d97706; --err: #dc2626; --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 4px 16px rgba(20, 20, 40, .04);
  background: var(--bg); color: var(--text);
  font: 14.5px/1.55 "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
}

/* ---------- khung ---------- */
.vshell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.vshell-guest { grid-template-columns: 1fr; }
.vside { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 14px 12px 12px; z-index: 30; }
.vside-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 14px; }
.vside-close { display: none; background: none; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; }
.vlogo { display: inline-flex; align-items: center; gap: 9px; font-size: 16.5px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.vlogo b { font-weight: 800; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vlogo-mark { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 4px 12px rgba(124, 58, 237, .3); }
.vlogo-mark .vicon { width: 17px; height: 17px; }

.vnav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.vnav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 10px 5px; }
.vnav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: #3f3f4a; font-weight: 500; }
.vnav-item .vicon { color: #8a8a98; flex: none; }
.vnav-item:hover { background: var(--panel-2); color: var(--text); }
.vnav-item.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.vnav-item.active .vicon { color: var(--accent); }
.vnav-item .nav-count { margin-left: auto; }

.vside-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; margin-top: 12px; border-top: 1px solid var(--line); }
.vcredit { border-radius: 12px; padding: 12px; background: linear-gradient(135deg, rgba(124, 58, 237, .08), rgba(219, 39, 119, .08));
  border: 1px solid rgba(124, 58, 237, .15); display: flex; flex-direction: column; gap: 10px; }
.vcredit-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.vcredit-row b { font-size: 15px; }
.vcredit-btn { width: 100%; padding: 8px 12px; }
.vgpu { margin: 0; font-size: 12px; padding: 0 4px; }
.vuser summary { width: auto; height: auto; background: none; border-radius: 10px; padding: 6px; gap: 9px; justify-content: flex-start; font-weight: 500; }
.vuser summary:hover { background: var(--panel-2); }
.vavatar { width: 30px; height: 30px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff;
  font-weight: 700; font-size: 13px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.vuser-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.vuser .menu { top: auto; bottom: 48px; left: 0; right: auto; }

.vbody { min-width: 0; display: flex; flex-direction: column; }
.vmain { padding: 28px 36px 40px; width: 100%; max-width: 1320px; flex: 1; }
.vtopbar { display: none; align-items: center; gap: 12px; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; }
.vshell-guest .vtopbar { display: flex; }
.vmenu-btn { background: none; border: 1px solid var(--line); border-radius: 8px; width: 36px; height: 36px; font-size: 17px; cursor: pointer; color: var(--text); }
.vscrim { display: none; }

@media (max-width: 900px) {
  .vshell { grid-template-columns: 1fr; }
  .vtopbar { display: flex; }
  .vside { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
  .vside-close { display: block; }
  body.vnav-open .vside { transform: none; }
  body.vnav-open .vscrim { display: block; position: fixed; inset: 0; background: rgba(15, 15, 30, .35); z-index: 25; }
  .vmain { padding: 20px 16px 32px; }
}

/* ---------- thành phần cũ trên nền sáng ---------- */
body.site-voice h1 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 6px; }
body.site-voice h2 { font-size: 17px; }
body.site-voice .panel, body.site-voice .card, body.site-voice .stat, body.site-voice .job { box-shadow: var(--shadow); }
body.site-voice input[type=text], body.site-voice input[type=number], body.site-voice input[type=password], body.site-voice input[type=email],
body.site-voice input[type=search], body.site-voice textarea, body.site-voice select {
  background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; }
body.site-voice input:focus, body.site-voice textarea:focus, body.site-voice select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
body.site-voice .btn { box-shadow: 0 2px 8px rgba(124, 58, 237, .25); }
body.site-voice .btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
body.site-voice .btn.secondary:hover { border-color: #cfcfda; background: var(--panel-2); }
body.site-voice .btn.danger { box-shadow: none; }
body.site-voice .choices span { background: #fff; }
body.site-voice .choices input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
body.site-voice .filters button { background: #fff; }
body.site-voice .filters button.active { background: var(--text); border-color: var(--text); color: #fff; }
body.site-voice .voice-item.selected { background: var(--accent-soft); }
body.site-voice .voice-item:hover { background: var(--panel-2); }
body.site-voice .notice { background: #fffbeb; border-color: #fde68a; color: #92400e; }
body.site-voice .notice.err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
body.site-voice .notice.ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
body.site-voice .job .err { color: #b91c1c; }
body.site-voice .job .outputs .out { background: var(--panel-2); }
body.site-voice .usermenu .menu { box-shadow: 0 12px 32px rgba(20, 20, 40, .14); }
body.site-voice .toast { background: #17171c; color: #fff; border: 0; }
body.site-voice .overlay { background: rgba(15, 15, 30, .45); }
body.site-voice code { background: var(--panel-2); color: #3f3f4a; }
body.site-voice .drop { background: var(--panel-2); border-color: #d6d6e0; }
body.site-voice .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
body.site-voice .price-box { background: var(--panel-2); }
body.site-voice .site-footer { padding: 18px 36px 26px; text-align: left; }
body.site-voice .auth { margin-top: 40px; }
body.site-voice .auth .panel { padding: 28px; }
body.site-voice .btn.google { border: 1px solid var(--line); box-shadow: none; }
body.site-voice .vicon { display: block; }

/* ---------- trang chủ ---------- */
.vhero { margin-bottom: 22px; }
.vhero p { color: var(--muted); margin: 0; font-size: 15px; }
.vfeature { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 30px; }
.vfeature a { position: relative; overflow: hidden; border-radius: 16px; padding: 18px; min-height: 148px; color: #fff; display: flex; flex-direction: column;
  justify-content: flex-end; gap: 4px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.vfeature a:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(60, 20, 120, .18); }
.vfeature a b { font-size: 16.5px; }
.vfeature a span { font-size: 13px; opacity: .9; }
.vfeature .vicon { position: absolute; top: 16px; left: 18px; width: 30px; height: 30px; opacity: .95; }
.vf-1 { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.vf-2 { background: linear-gradient(135deg, #db2777, #f472b6); }
.vf-3 { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.vf-4 { background: linear-gradient(135deg, #0f766e, #2563eb); }
.vsection-title { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px; }
.vsection-title h2 { margin: 0; }
.vtools { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.vtool { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s; }
.vtool:hover { border-color: rgba(124, 58, 237, .45); }
.vtool-ico { width: 38px; height: 38px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.vtool b { display: block; font-size: 14.5px; }
.vtool small { color: var(--muted); font-size: 12.8px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vtool .badge { margin-top: 6px; display: inline-block; }

/* ---------- trang tạo (ba cột: menu | soạn thảo | cài đặt) ---------- */
body.site-voice .tooltabs { background: var(--panel-2); border-color: transparent; }
body.site-voice .tooltabs a.active { background: #fff; color: var(--accent-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 20, 40, .12); }
.vcreate-head { margin-bottom: 18px; }
.vcreate-head p { color: var(--muted); margin: 0; max-width: 760px; }
.vcreate { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.vcreate-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vcreate-main .panel { padding: 18px 20px; }
.vcreate-main textarea { min-height: 300px; font-size: 15.5px; line-height: 1.65; border: 0; padding: 4px 2px; box-shadow: none !important; resize: vertical; }
.vcreate-main .field { margin-bottom: 0; }
.vcreate-main .field + .field { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.vcreate-side { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }
.vcreate-side .panel { padding: 18px; }
.vcreate-side .side-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 14px; }
.vcreate-side .field label.title { font-size: 13.5px; }
.vcreate-side .choices span { padding: 6px 11px; font-size: 13px; }
.vcreate-side .voice-list { max-height: 300px; }
.vcreate-side .btn[type=submit] { width: 100%; padding: 12px 18px; font-size: 15px; }
/* cột cài đặt: danh sách giọng gọn, nút nghe chỉ còn ▶ */
.vcreate-side .voice-list { max-height: 232px; }
.vcreate-side .voice-item { padding: 7px 10px; gap: 8px; }
.vcreate-side .voice-item b { font-size: 13.2px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 250px; }
.vcreate-side .voice-item small { font-size: 11.8px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 250px; }
.vcreate-side .voice-item > div { min-width: 0; }
.vcreate-side .voice-item br { display: none; }
.vcreate-side .voice-item .btn { width: 30px; height: 30px; padding: 0; border-radius: 50%; flex: none; font-size: 11px; }
.vcreate-side .voice-item .btn .lbl { display: none; }
.vcreate-side .voice-filter span { padding: 4px 10px; }
.vcreate-side select.voice-lang { padding: 6px 10px; font-size: 13px; }
.vmore { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; }
.vmore > summary { cursor: pointer; padding: 9px 12px; font-weight: 600; font-size: 13.5px; list-style: none; display: flex; justify-content: space-between; }
.vmore > summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.vmore[open] > summary::after { content: "–"; }
.vmore > .field { padding: 0 12px 12px; margin: 0; }
.vmore > .field > label.title { display: none; }
/* cột soạn thảo: thanh chèn thẻ như thanh công cụ, ô kéo thả file rộng */
.vcreate-main .insert-tag { background: var(--panel-2); border-color: transparent; box-shadow: none; font-size: 12.5px; padding: 4px 10px; }
.vcreate-main .insert-tag:hover { background: var(--accent-soft); color: var(--accent-ink); }
.vcreate-main .drop { padding: 38px 16px; font-size: 14.5px; }
.vcreate-main .drop-text::before { content: "⬆"; display: block; font-size: 22px; margin-bottom: 4px; color: var(--accent); }
.vcreate-main .tts-preview { border-color: rgba(124, 58, 237, .35); color: var(--accent-ink); }
.vcreate-info { color: var(--muted); font-size: 13.5px; }
.vcreate-info h2 { font-size: 14px; color: var(--text); margin: 0 0 8px; }
.vcreate-info ul { margin: 0; padding-left: 18px; }
@media (max-width: 1100px) { .vcreate { grid-template-columns: 1fr; } .vcreate-side { position: static; max-height: none; } }
