:root{
  --bg:#0b1020;
  --bg2:#11182b;
  --panel:#151d33;
  --panel2:#1b2540;
  --text:#f5f7fb;
  --muted:#aeb8cd;
  --line:#2a3555;
  --accent:#6f8cff;
  --accent2:#8ca1ff;
  --good:#8ce0b3;
  --warn:#ffd37a;
  --bad:#ff9a9a;
  --shadow:0 18px 50px rgba(0,0,0,.28);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}
html{height:100%;background:var(--bg);color:var(--text)}
body{margin:0;height:100dvh;min-height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;background:radial-gradient(circle at 10% 0%,#18234a 0,transparent 32%),linear-gradient(180deg,#0b1020,#0d1324 55%,#0a0f1b)}
a{color:#b8c5ff;text-decoration:none}a:hover{color:white}
button,input,select,textarea{font:inherit}
button:disabled{opacity:.55;cursor:not-allowed}
.hidden{display:none!important}

.topbar{position:relative;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:14px clamp(18px,4vw,54px);background:rgba(11,16,32,.92);backdrop-filter:blur(14px);border-bottom:1px solid rgba(255,255,255,.06)}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;color:white;white-space:nowrap}.brand>span{font-weight:700}.brand small{color:var(--muted);font-size:11px;border:1px solid var(--line);padding:3px 7px;border-radius:999px}
.nav{display:flex;align-items:center;gap:8px;font-size:14px;min-width:0}.nav-link,.nav-account{display:flex;align-items:center;gap:7px;padding:8px 10px;border-radius:10px;color:#b8c5ff;transition:.18s ease}.nav-link:hover,.nav-account:hover{background:rgba(111,140,255,.08)}.nav-link.active,.nav-account.active{color:white;font-weight:800;background:rgba(111,140,255,.13);box-shadow:inset 0 0 0 1px rgba(140,161,255,.22),0 0 18px rgba(111,140,255,.12)}
.nav-account{max-width:210px}.nav-avatar{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,var(--accent),#8a70ff);color:white;font-size:11px;font-weight:900;flex:0 0 auto}.nav-account-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.inline-form{display:inline}.link-button{border:0;background:transparent;color:#b8c5ff;cursor:pointer;padding:0}.nav-logout{padding:8px 7px}.pill-link{padding:9px 13px;border-radius:10px;background:var(--accent);color:white}

.page-shell{width:min(1220px,calc(100% - 28px));min-height:0;margin:0 auto;padding:32px 0 38px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}
.footer{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:12px clamp(18px,4vw,54px);border-top:1px solid rgba(255,255,255,.08);background:rgba(9,14,27,.94);backdrop-filter:blur(12px);color:var(--muted);font-size:13px;z-index:20}.footer>div{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.footer-links{gap:18px!important}

.hero{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:28px;align-items:center;padding:54px 0 30px}.hero h1,.studio-head h1,.simple-head h1,.auth-card h1,.support-wrap h1{font-size:clamp(34px,5vw,64px);line-height:1.02;margin:10px 0 18px;letter-spacing:-.035em}.hero-copy p{font-size:19px;line-height:1.7;color:var(--muted);max-width:760px}.eyebrow{font-size:12px;font-weight:800;letter-spacing:.15em;color:#9db0ff}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}
.primary-button,.secondary-button,.oauth-button{display:inline-flex;justify-content:center;align-items:center;min-height:44px;border-radius:12px;padding:11px 16px;border:1px solid transparent;font-weight:750;cursor:pointer}.primary-button{background:linear-gradient(135deg,var(--accent),#8a70ff);color:white;border:0}.primary-button:hover{filter:brightness(1.08);color:white}.secondary-button{background:transparent;border-color:var(--line);color:white}.secondary-button:hover{border-color:#7180ae}.full{width:100%}.small-button{min-height:38px;padding:8px 12px;font-size:13px}
.security-card,.panel,.auth-card{background:linear-gradient(180deg,rgba(24,33,59,.97),rgba(18,25,45,.97));border:1px solid rgba(255,255,255,.08);box-shadow:var(--shadow);border-radius:20px}.panel{padding:22px}.security-card{padding:28px}.shield{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#6d89ff,#7459dd);font-weight:900}.security-card h3{font-size:22px;margin:18px 0 8px}.security-card p,.muted{color:var(--muted);line-height:1.65}.small{font-size:13px}
.auth-wrap{min-height:68vh;display:grid;place-items:center;padding:12px 0 40px}.auth-card{width:min(520px,100%);padding:30px}.auth-card.compact-card{width:min(470px,100%)}.auth-card h1{font-size:42px}.oauth-stack{display:grid;gap:10px;margin-top:22px}.oauth-button{border-color:var(--line);background:#10172a;color:white}.oauth-button.disabled{color:#73809c}.divider{display:flex;align-items:center;gap:12px;color:#7e8aa6;margin:20px 0}.divider:before,.divider:after{content:"";height:1px;background:var(--line);flex:1}.divider span{font-size:12px}.form-stack{display:grid;gap:14px}.form-stack label,.panel label{display:grid;gap:7px;color:#dfe5f3;font-size:13px;font-weight:650}input,select,textarea{width:100%;background:#0d1426;color:white;border:1px solid var(--line);border-radius:11px;padding:12px 13px;outline:none}input:focus,select:focus,textarea:focus{border-color:#6f8cff;box-shadow:0 0 0 3px rgba(111,140,255,.12)}textarea{resize:vertical;min-height:120px}.auth-links{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:18px;font-size:13px}.dev-hint{font-size:12px;color:#8794af;margin-top:18px}.notice,.error,.warning-card,.status-box{padding:12px 14px;border-radius:11px;margin:14px 0}.notice{background:rgba(68,126,255,.13);border:1px solid rgba(111,140,255,.3);color:#cbd5ff}.error,.error-lite{background:rgba(255,90,90,.11)!important;border:1px solid rgba(255,120,120,.28)!important;color:#ffc3c3!important}.warning-card{background:rgba(255,190,80,.1);border:1px solid rgba(255,211,122,.25);color:#ffe0a0}

.studio-head,.simple-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px}.studio-head h1,.simple-head h1{font-size:44px;margin-bottom:8px}.studio-head p{margin:0}.compact-head{margin-bottom:14px}.compact-head h1{font-size:38px;margin:6px 0 4px}.compact-head p{font-size:14px;line-height:1.45}.compact-notice{margin:0 0 10px}
.field-grid{display:grid;gap:14px}.field-grid.two{grid-template-columns:1fr 1fr}.voice-selects{margin:14px 0}.voice-picker-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}.voice-preview-button{white-space:nowrap}.script-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:8px 0}.script-toolbar>div{display:grid;gap:5px}.script-label{font-size:13px}.script-panel #script-text{height:360px;min-height:260px;resize:vertical}.script-meta{display:flex;justify-content:space-between;gap:16px;color:#8290ad;font-size:12px;margin:10px 2px 0}.script-meta.limit-reached{color:var(--bad);font-weight:750}.script-alert{margin-top:9px;padding:9px 11px;border-radius:10px;background:rgba(255,90,90,.10);border:1px solid rgba(255,120,120,.24);color:#ffc3c3;font-size:12px;line-height:1.45}.range-value{font-size:13px;color:#bac5dd}

.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(310px,.75fr);gap:20px;align-items:stretch}.dashboard-panel{min-width:0}.script-panel{display:flex;flex-direction:column}.control-panel{display:flex;flex-direction:column;min-height:100%}.side-tabs,.mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px;background:#0d1426;border:1px solid var(--line);border-radius:12px}.side-tab,.mode-tab{border:0;border-radius:9px;background:transparent;color:var(--muted);font-weight:800;padding:10px 12px;cursor:pointer}.side-tab.active,.mode-tab.active{background:linear-gradient(135deg,rgba(111,140,255,.24),rgba(138,112,255,.20));color:white;box-shadow:inset 0 0 0 1px rgba(140,161,255,.28)}.side-tab-content{margin-top:14px}.tab-pane,.clone-mode-pane{display:none}.tab-pane.active,.clone-mode-pane.active{display:block}.settings-speed{margin-bottom:12px}.settings-divider{height:1px;background:var(--line);margin:12px 0}.settings-note{margin:0 0 12px}.advanced-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.side-advanced-grid label{gap:6px}.side-advanced-grid input,.side-advanced-grid select{padding:9px 10px}.save-profile-row{display:grid;grid-template-columns:1fr auto;gap:10px;margin-top:12px}.side-save-profile{grid-template-columns:1fr}.compact-title{margin-bottom:10px}.control-panel-bottom{margin-top:auto;padding-top:14px}.generate-button{min-height:50px;font-size:15px}.status-box{background:rgba(111,140,255,.1);border:1px solid rgba(111,140,255,.24);color:#cdd6ff;margin:0 0 10px}.result-card{display:grid;gap:10px;padding:12px;margin:0 0 10px;border:1px solid var(--line);border-radius:14px;background:#10172a}.result-card>div{display:flex;justify-content:space-between;gap:12px}.result-card audio,.recent-item audio,.history-item audio{width:100%}
.panel-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.panel-title h2,.panel h2{margin:0 0 14px;font-size:19px}.panel-title h2{margin:0}.recent-list{display:grid;gap:10px}.recent-item{padding:11px;border:1px solid var(--line);border-radius:13px;background:#10172a}.recent-item>div{display:flex;justify-content:space-between;gap:10px;font-size:12px}.recent-item p{color:#b5bfd3;font-size:12px;line-height:1.45;margin:7px 0 9px;overflow-wrap:normal;word-break:normal}.dashboard-recent .recent-item audio{height:34px}.empty-state{padding:28px 12px;text-align:center;color:#8794af}.bad-status{color:#ffaaa8}

.history-panel{padding:0;overflow:hidden}.history-list{display:grid}.history-item{padding:18px 22px;border-bottom:1px solid var(--line)}.history-item:last-child{border-bottom:0}.history-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:#8f9bb4;font-size:12px}.history-meta strong{color:#cbd5ff}.history-item p{color:#c5cede;line-height:1.55;margin:12px 0;word-break:normal}.history-item audio{max-width:680px;display:block;margin:10px 0}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.info-row,.provider-row{display:flex;justify-content:space-between;gap:20px;padding:13px 0;border-bottom:1px solid var(--line)}.info-row:last-child,.provider-row:last-of-type{border-bottom:0}

.clone-head{margin-bottom:16px}.clone-mode-tabs{width:min(520px,100%);margin-bottom:18px}.clone-layout{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}.clone-card{display:grid;gap:12px}.clone-card h2,.clone-preview-card h2{margin:0}.consent-row{grid-template-columns:auto 1fr!important;align-items:flex-start;gap:9px!important}.consent-row input{width:auto;margin-top:3px}.sample-meta{padding:8px 10px;border-radius:10px;background:#10172a;border:1px solid var(--line)}#clone-sample-audio,.clone-preview-card audio{width:100%}.clone-preview-card{display:grid;gap:12px}.clone-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.hq-clone-panel{display:grid;gap:14px}.development-badge{font-size:12px;font-weight:800;color:var(--warn);border:1px solid rgba(255,211,122,.35);padding:5px 9px;border-radius:999px}.hq-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.hq-files,.hq-transcript{grid-column:1/-1}

.voice-library-tools{display:grid;grid-template-columns:minmax(0,2fr) 1fr 1fr;gap:12px;margin-bottom:20px}.voice-section{margin-bottom:20px}.voice-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.voice-card{display:grid;gap:10px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#10172a}.voice-card>div:first-child{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.voice-badge{font-size:11px;color:#aeb8cd;border:1px solid var(--line);border-radius:999px;padding:3px 7px;white-space:nowrap}.voice-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.voice-delete-form{margin:0;text-align:right}.voice-delete-form button{font-size:12px}.voice-actions{display:flex;justify-content:space-between;align-items:center;gap:10px}.voice-actions form{margin:0}

.support-wrap{display:grid;grid-template-columns:1.2fr .8fr;align-items:center;gap:28px}.support-qr{width:min(360px,100%);justify-self:end;border-radius:18px;background:white;padding:10px}.mail-item{padding:18px 0;border-bottom:1px solid var(--line)}.mail-item span{display:block;color:#8b98b4;font-size:12px;margin:4px 0 12px}.mail-item pre{white-space:pre-wrap;background:#0c1325;border:1px solid var(--line);border-radius:10px;padding:12px;overflow:auto;color:#dce4f5}.feedback-card{width:min(620px,100%)}.feedback-form{margin-top:18px}.feedback-form textarea{min-height:150px;resize:vertical}.feedback-fallback{margin:16px 0 0;text-align:center}

@media(max-width:1050px){
  .dashboard-grid{grid-template-columns:minmax(0,1.45fr) minmax(300px,.85fr)}
  .voice-card-grid{grid-template-columns:1fr 1fr}
  .voice-library-tools{grid-template-columns:1fr 1fr}.voice-library-tools input{grid-column:1/-1}
}
@media(max-width:900px){
  .dashboard-grid,.hero,.support-wrap,.settings-grid,.clone-layout{grid-template-columns:1fr}
  .control-panel{min-height:auto}.support-qr{justify-self:start}.field-grid.two{grid-template-columns:1fr}.topbar{align-items:flex-start}.nav{flex-wrap:wrap;justify-content:flex-end}.hero{padding-top:28px}.hero h1{font-size:46px}.script-panel #script-text{height:300px}.voice-card-grid{grid-template-columns:1fr 1fr}.hq-grid{grid-template-columns:1fr}.hq-files,.hq-transcript{grid-column:auto}
}
@media(max-width:700px){
  .advanced-grid,.save-profile-row,.voice-card-grid,.voice-library-tools{grid-template-columns:1fr}.voice-library-tools input{grid-column:auto}.voice-card-actions{grid-template-columns:1fr}.voice-card>div:first-child{flex-direction:column}.voice-picker-row{grid-template-columns:1fr}.voice-preview-button{width:100%}.nav-account-name{display:none}.nav-account{padding:7px}.nav-account-chevron{display:none}.script-meta{flex-direction:column;gap:4px}
}
@media(max-width:620px){
  .page-shell{width:min(100% - 20px,1220px);padding-top:24px}.topbar{padding:12px 10px;gap:10px}.brand>span,.brand small{display:none}.nav{gap:4px;font-size:12px}.nav-link{padding:7px 6px}.nav-account-dropdown{right:0}.footer{align-items:flex-start;flex-direction:column}.auth-card,.panel{padding:18px}.hero h1,.studio-head h1,.simple-head h1,.auth-card h1{font-size:34px}.studio-head,.simple-head{align-items:flex-start;flex-direction:column}.script-panel #script-text{height:260px}
}


/* ===== patch_03: dependent controls + busy state ===== */
.conditional-setting.control-disabled{
  opacity:.42;
  filter:saturate(.55);
}
.conditional-setting.control-disabled select{
  cursor:not-allowed;
}
.dashboard-panel.is-busy,
.clone-mode-pane.is-busy{
  cursor:progress;
}
.dashboard-panel.is-busy input:disabled,
.dashboard-panel.is-busy select:disabled,
.dashboard-panel.is-busy textarea:disabled,
.clone-mode-pane.is-busy input:disabled,
.clone-mode-pane.is-busy select:disabled,
.clone-mode-pane.is-busy textarea:disabled{
  opacity:.72;
}


/* ===== patch 04: custom profile actions ===== */
.profile-action-buttons{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.danger-button{border-color:rgba(255,120,120,.38)!important;color:#ffc0c0!important}
.danger-button:hover{border-color:#ff8e8e!important;background:rgba(255,90,90,.08)!important}
@media(max-width:620px){.profile-action-buttons{justify-content:stretch}.profile-action-buttons button{flex:1}}

/* ===== Admin panel ===== */
/* ===== Account dropdown ===== */
.nav-user-menu{position:relative;flex:0 0 auto}
.nav-account{appearance:none;border:0;font:inherit;cursor:pointer;background:transparent;max-width:230px}
.nav-account-chevron{font-size:11px;color:#8796c8;transition:transform .18s ease}
.nav-user-menu.open .nav-account-chevron{transform:rotate(180deg)}
.nav-account-dropdown{display:none;position:absolute;top:calc(100% + 9px);right:0;width:min(290px,calc(100vw - 24px));padding:8px;border:1px solid rgba(140,161,255,.20);border-radius:14px;background:#10172a;box-shadow:0 18px 55px rgba(0,0,0,.36);z-index:80}
.nav-user-menu.open .nav-account-dropdown{display:grid}
.nav-account-summary{display:grid;gap:4px;padding:10px 11px 11px;border-bottom:1px solid var(--line);margin-bottom:5px;min-width:0}
.nav-account-summary strong,.nav-account-summary span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav-account-summary strong{color:#f4f6ff;font-size:14px}
.nav-account-summary span{color:var(--muted);font-size:12px}
.nav-account-item{display:flex;width:100%;align-items:center;box-sizing:border-box;border:0;border-radius:9px;padding:10px 11px;background:transparent;color:#c9d3ff;font:inherit;font-size:13px;text-align:left;cursor:pointer}
.nav-account-item:hover,.nav-account-item:focus-visible{background:rgba(111,140,255,.10);color:white;outline:none}
.nav-account-logout-form{margin:0;padding:0;border-top:1px solid var(--line);margin-top:4px;padding-top:4px}
.nav-account-logout{color:#ffb5b5}
.nav-account-logout:hover,.nav-account-logout:focus-visible{background:rgba(255,90,90,.09);color:#ffd0d0}

.admin-nav-link{color:#d9deff}.admin-nav-link.active{box-shadow:0 0 0 1px rgba(140,161,255,.34),0 0 24px rgba(111,140,255,.12)}
.admin-head{align-items:flex-end}.admin-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}.admin-stat-card{display:grid;gap:8px;padding:18px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:linear-gradient(180deg,rgba(24,33,59,.97),rgba(18,25,45,.97))}.admin-stat-card span{color:var(--muted);font-size:13px}.admin-stat-card strong{font-size:30px}.admin-users-panel{padding:18px}.admin-filter-bar{display:grid;grid-template-columns:minmax(0,1fr) 220px auto;gap:10px;margin-bottom:16px}.admin-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px}.admin-table{width:100%;border-collapse:collapse;min-width:1040px;background:#10172a}.admin-table th,.admin-table td{padding:13px 12px;text-align:left;border-bottom:1px solid var(--line);font-size:13px;vertical-align:middle}.admin-table th{position:sticky;top:0;background:#141d33;color:#aeb8cd;font-size:12px;letter-spacing:.02em;z-index:1}.admin-table tbody tr:hover{background:rgba(111,140,255,.05)}.admin-table tr:last-child td{border-bottom:0}.admin-user-cell{display:flex;align-items:center;gap:10px;min-width:240px}.admin-user-cell>div{display:grid;gap:3px}.admin-user-cell span{color:var(--muted);font-size:12px}.admin-avatar{width:34px;height:34px;display:grid!important;place-items:center;border-radius:10px;background:linear-gradient(135deg,#6f8cff,#8a70ff);color:#fff!important;font-weight:900;font-size:13px!important}.admin-badge{display:inline-flex;align-items:center;width:max-content;padding:4px 8px;border-radius:999px;border:1px solid var(--line);color:#bdc7da;font-size:11px;font-weight:750;white-space:nowrap}.admin-badge.good{color:#a9ebc6;border-color:rgba(140,224,179,.28);background:rgba(140,224,179,.07)}.admin-badge.warn{color:#ffe0a0;border-color:rgba(255,211,122,.28);background:rgba(255,211,122,.06)}.admin-badge.bad{color:#ffc0c0;border-color:rgba(255,120,120,.30);background:rgba(255,90,90,.07)}.admin-badge.admin{color:#d9d5ff;border-color:rgba(138,112,255,.38);background:rgba(138,112,255,.10)}.admin-time{white-space:nowrap;color:#aab5ca}.admin-detail-head{align-items:flex-end}.admin-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}.admin-usage-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:22px}.admin-usage-grid>div{display:grid;gap:6px;padding:16px;border:1px solid var(--line);border-radius:13px;background:#10172a}.admin-usage-grid span{color:var(--muted);font-size:12px}.admin-usage-grid strong{font-size:26px}.admin-subtitle{margin-top:22px!important}.admin-actions-panel{margin-bottom:20px}.admin-action-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.admin-action-row form{margin:0}.admin-audit-list{display:grid}.admin-audit-item{padding:13px 0;border-bottom:1px solid var(--line)}.admin-audit-item:last-child{border-bottom:0}.admin-audit-item>div{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.admin-audit-item span{color:var(--muted);font-size:12px}.admin-audit-item p{margin:7px 0 0;color:#c5cede;font-size:13px}.admin-access-card{width:min(620px,100%);margin:50px auto}.admin-access-card h1{font-size:36px;margin:8px 0 12px}
@media(max-width:900px){.admin-stat-grid{grid-template-columns:1fr 1fr}.admin-detail-grid{grid-template-columns:1fr}.admin-filter-bar{grid-template-columns:1fr 1fr}.admin-filter-bar input{grid-column:1/-1}}
@media(max-width:620px){.admin-stat-grid,.admin-filter-bar,.admin-usage-grid{grid-template-columns:1fr}.admin-filter-bar input{grid-column:auto}.admin-stat-card strong{font-size:26px}.admin-action-row{display:grid}.admin-action-row form,.admin-action-row button{width:100%}}

/* ===== Patch 13: cấu hình riêng gọn + true cancel ===== */
.profile-create-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin-top:12px}
.profile-create-panel{margin-top:10px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#0d1426;display:grid;gap:10px}
.profile-create-panel.hidden{display:none}
.profile-create-panel label{display:grid;gap:7px}
.profile-create-buttons{display:flex;gap:8px;justify-content:flex-end}
.processing-actions{display:flex!important;align-items:center;justify-content:space-between;gap:10px;margin-top:6px}
.tiny-button{min-height:30px!important;padding:6px 10px!important;font-size:12px!important}
.generate-button.danger-button,.clone-actions .primary-button.danger-button{background:linear-gradient(135deg,#c84c5a,#a83a49)!important;color:#fff!important;border-color:rgba(255,130,130,.35)!important}
@media(max-width:620px){.profile-create-actions,.profile-create-buttons{justify-content:stretch}.profile-create-actions button,.profile-create-buttons button{flex:1}}
.password-field{position:relative;display:flex;align-items:center}.password-field input{padding-right:46px}.password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:#aeb9d1;cursor:pointer;display:grid;place-items:center;font-size:16px}.password-toggle:hover,.password-toggle:focus-visible{background:rgba(111,140,255,.12);color:white;outline:none}.password-toggle[aria-pressed="true"]{color:#dfe5ff;background:rgba(111,140,255,.12)}
.turnstile-wrap{min-height:65px;display:flex;align-items:center;justify-content:center;overflow:hidden}.turnstile-wrap .cf-turnstile{max-width:100%}
.history-page-head{gap:16px}.history-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.history-head-actions form,.history-item-actions form{margin:0}.history-item-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}.settings-password-panel{grid-column:1/-1}.settings-password-form{max-width:620px}.warning-card a{color:#dbe4ff;text-decoration:underline;text-underline-offset:2px}
@media(max-width:720px){.history-page-head{align-items:flex-start}.history-head-actions{width:100%;justify-content:flex-start}.history-head-actions>*{flex:1}.history-head-actions form button{width:100%}}

/* ===== Patch 15: public legal pages ===== */
.legal-page{width:min(920px,100%);margin:0 auto;display:grid;gap:16px;padding-bottom:12px}
.legal-hero{padding:12px 4px 8px}.legal-hero h1{font-size:clamp(38px,5vw,58px);line-height:1.02;letter-spacing:-.035em;margin:10px 0 14px}.legal-hero p{max-width:820px;margin:0;color:var(--muted);font-size:17px;line-height:1.7}.legal-meta{margin-top:14px;color:#8794af;font-size:13px}
.legal-card{padding:22px 24px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:linear-gradient(180deg,rgba(24,33,59,.88),rgba(18,25,45,.88));box-shadow:0 12px 34px rgba(0,0,0,.18)}.legal-card h2{margin:0 0 12px;font-size:20px}.legal-card p,.legal-card li{color:#c4cde0;line-height:1.72}.legal-card p{margin:10px 0}.legal-card ul{margin:10px 0 0;padding-left:22px;display:grid;gap:8px}.legal-card strong{color:#f1f4fb}
.legal-contact{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:18px 22px;border:1px solid rgba(111,140,255,.26);border-radius:16px;background:rgba(111,140,255,.08)}
@media(max-width:620px){.legal-card{padding:18px}.legal-hero p{font-size:15px}.footer-links{gap:12px!important}}

/* Patch 17: permanent account deletion in admin */
.admin-danger-zone{margin-bottom:20px;border-color:rgba(255,105,105,.28);background:linear-gradient(180deg,rgba(40,18,26,.68),rgba(18,25,45,.97))}
.admin-danger-zone-copy{display:flex;align-items:center;justify-content:space-between;gap:24px}
.admin-danger-zone-copy h2{margin:6px 0 8px}.danger-eyebrow{color:#ff9b9b}.permanent-delete-button{white-space:nowrap}
.admin-delete-dialog{width:min(620px,calc(100vw - 32px));padding:0;border:1px solid rgba(255,115,115,.30);border-radius:18px;background:#11192c;color:var(--text);box-shadow:0 28px 90px rgba(0,0,0,.55)}
.admin-delete-dialog::backdrop{background:rgba(2,6,15,.74);backdrop-filter:blur(3px)}
.admin-delete-dialog-card{padding:24px}.admin-delete-dialog h2{margin:8px 0 12px;font-size:26px}.admin-delete-dialog p{line-height:1.65;color:#c8d1e2}
.admin-delete-dialog label{display:grid;gap:8px;margin-top:18px;font-size:13px;font-weight:750}.admin-delete-dialog input{width:100%}
.admin-delete-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.danger-final-button{background:linear-gradient(135deg,#d94a58,#ff6d6d);border-color:rgba(255,120,120,.5)}
.danger-final-button:disabled{opacity:.38;cursor:not-allowed;filter:saturate(.6)}
@media(max-width:620px){.admin-danger-zone-copy{display:grid}.permanent-delete-button{width:100%}.admin-delete-dialog-actions{display:grid}.admin-delete-dialog-actions button{width:100%}}

/* ===== Patch 19: technical SEO + richer public homepage ===== */
.home-limit-note{margin:16px 0 0!important;font-size:13px!important;line-height:1.55!important;color:#8794af!important;max-width:720px!important}
.home-seo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:18px 0 28px}
.home-seo-card{padding:22px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:linear-gradient(180deg,rgba(24,33,59,.86),rgba(18,25,45,.86));box-shadow:0 12px 34px rgba(0,0,0,.14)}
.home-seo-card h2{margin:0 0 10px;font-size:20px;line-height:1.25}.home-seo-card p{margin:0;color:var(--muted);line-height:1.65}
@media(max-width:820px){.home-seo-grid{grid-template-columns:1fr}}

/* ===== Patch 20: public SEO landing pages + long-tail content ===== */
.home-seo-card h2 a,.blog-card h2 a{color:inherit;text-decoration:none}.home-seo-card h2 a:hover,.blog-card h2 a:hover{color:#fff}.text-link{display:inline-flex;margin-top:12px;color:#aebeff;text-decoration:none;font-weight:750}.text-link:hover{text-decoration:underline;text-underline-offset:3px}
.seo-hero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr);gap:22px;align-items:stretch;padding:34px 0 24px}.seo-hero.compact{grid-template-columns:1fr}.seo-hero h1{font-size:clamp(38px,5vw,62px);line-height:1.02;letter-spacing:-.04em;margin:10px 0 16px}.seo-hero p{max-width:830px;color:var(--muted);font-size:17px;line-height:1.72;margin:0}.seo-fact-card{padding:22px;border:1px solid rgba(111,140,255,.26);border-radius:18px;background:linear-gradient(180deg,rgba(30,42,74,.92),rgba(17,24,43,.92));box-shadow:0 18px 46px rgba(0,0,0,.2)}.seo-fact-card strong{font-size:18px}.seo-fact-card ul{padding-left:20px;margin:14px 0 0;display:grid;gap:10px;color:#c7d1e4;line-height:1.55}
.seo-content-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:10px 0 26px}.seo-content-card,.voice-public-group,.blog-card{padding:22px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:linear-gradient(180deg,rgba(24,33,59,.88),rgba(18,25,45,.88));box-shadow:0 12px 34px rgba(0,0,0,.14)}.seo-content-card h2,.blog-card h2{margin:0 0 10px;font-size:21px;line-height:1.3}.seo-content-card p,.blog-card p{margin:0;color:var(--muted);line-height:1.7}
.seo-cta-panel{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;margin:16px 0 30px;border:1px solid rgba(111,140,255,.26);border-radius:18px;background:linear-gradient(135deg,rgba(111,140,255,.10),rgba(138,112,255,.08))}.seo-cta-panel h2{margin:7px 0 8px;font-size:25px}.seo-cta-panel p{margin:0;color:var(--muted);line-height:1.6;max-width:760px}.seo-cta-panel .primary-button{white-space:nowrap}
.voice-public-list{display:grid;gap:16px;padding:8px 0 20px}.voice-public-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:16px}.voice-public-head h2{margin:5px 0 0}.voice-count{font-size:12px;color:#aab5ca;border:1px solid var(--line);padding:6px 9px;border-radius:999px}.voice-chip-grid{display:flex;gap:9px;flex-wrap:wrap}.voice-chip{padding:8px 10px;border-radius:999px;background:#10172a;border:1px solid var(--line);color:#d8e0ef;font-size:13px}
.blog-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:10px 0 24px}.blog-card{display:flex;flex-direction:column}.blog-card .text-link{margin-top:auto;padding-top:16px}.blog-card .eyebrow{margin-bottom:10px}
.seo-article{width:min(900px,100%);margin:0 auto;padding-bottom:10px}.seo-article-head{padding:24px 0 12px}.seo-article-head>.text-link{margin:0 0 22px}.seo-article-head h1{font-size:clamp(38px,5.2vw,60px);line-height:1.04;letter-spacing:-.04em;margin:10px 0 18px}.seo-article-head p{font-size:18px;line-height:1.78;color:#c5cede;margin:0}.seo-article-body{display:grid;gap:14px;margin:18px 0}.seo-article-body section{padding:22px 24px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:rgba(17,24,43,.78)}.seo-article-body h2{margin:0 0 12px;font-size:23px}.seo-article-body p{margin:10px 0;color:#c4cde0;line-height:1.78}.article-related{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0 28px}.article-related a{padding:9px 11px;border:1px solid var(--line);border-radius:999px;color:#bfcaff;text-decoration:none;font-size:13px}.article-related a:hover{background:rgba(111,140,255,.08);color:#fff}
@media(max-width:880px){.seo-hero{grid-template-columns:1fr}.seo-content-grid,.blog-card-grid{grid-template-columns:1fr}.seo-cta-panel{align-items:flex-start;display:grid}.seo-cta-panel .primary-button{width:max-content}.nav{gap:8px}}
@media(max-width:620px){.seo-hero h1,.seo-article-head h1{font-size:36px}.seo-hero p,.seo-article-head p{font-size:15px}.seo-content-card,.voice-public-group,.blog-card,.seo-article-body section{padding:18px}.seo-cta-panel{padding:18px}.seo-cta-panel .primary-button{width:100%;text-align:center}.voice-public-head{align-items:flex-start}.nav .nav-link[href="/thu-vien-giong"],.nav .nav-link[href="/blog"]{display:none}}


/* Patch 21: persistent generation status */
.generation-banner{border:1px solid rgba(250,190,60,.45);background:rgba(250,190,60,.10);border-radius:12px;padding:11px 12px;display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:10px}
.generation-banner.hidden,.generation-progress.hidden{display:none}
.generation-progress{border:1px solid rgba(130,160,255,.28);background:rgba(110,140,230,.08);border-radius:12px;padding:11px 12px;margin-bottom:10px}
.generation-progress-row{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px}
.generation-progress-track{height:7px;border-radius:999px;background:rgba(255,255,255,.09);overflow:hidden}
.generation-progress-track>span{display:block;height:100%;background:linear-gradient(90deg,#5d7cff,#9f7aea);border-radius:999px;transition:width .35s ease}
.clone-featured-guide{border:1px solid rgba(115,139,255,.45);background:linear-gradient(135deg,rgba(72,91,180,.25),rgba(117,74,160,.18));border-radius:18px;padding:22px;margin:18px 0 26px;box-shadow:0 12px 38px rgba(0,0,0,.18)}
.clone-featured-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.seo-group-head{margin:28px 0 12px}

/* PATCH25_LEGAL_UI */
.footer-legal-link {
  white-space: nowrap;
}

.legal-hub {
  width: min(860px, calc(100% - 32px));
  margin: 48px auto 72px;
}

.legal-hub-head {
  margin-bottom: 22px;
}

.legal-hub-head h1 {
  margin: 6px 0 10px;
}

.legal-hub-head > p:last-child {
  max-width: 720px;
  opacity: .78;
}

.legal-hub-list {
  display: grid;
  gap: 12px;
}

.legal-hub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  text-decoration: none;
}

.legal-hub-item:hover,
.legal-hub-item:focus-visible {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
}

.legal-hub-item strong,
.legal-hub-item small {
  display: block;
}

.legal-hub-item small {
  margin-top: 5px;
  opacity: .72;
  line-height: 1.45;
}

.legal-hub-arrow {
  flex: 0 0 auto;
  font-size: 1.05rem;
  opacity: .75;
}

.account-legal-card {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}

.account-legal-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 16px;
}

.account-legal-head h2 {
  margin: 5px 0 0;
}

.account-legal-head > p {
  max-width: 460px;
  margin: 0;
  opacity: .72;
  text-align: right;
}

.account-legal-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.account-legal-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
  text-decoration: none;
}

.account-legal-links a:hover,
.account-legal-links a:focus-visible {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.22);
}

@media (max-width: 760px) {
  .legal-hub {
    margin-top: 28px;
  }

  .account-legal-head {
    display: block;
  }

  .account-legal-head > p {
    margin-top: 8px;
    text-align: left;
  }

  .account-legal-links {
    grid-template-columns: 1fr;
  }
}


/* PATCH26_CLEAN_LEGAL_UI */

/* Footer guest: chỉ là text link bình thường, không mang cảm giác button/dropdown. */
.footer-legal-link {
  display: inline;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: none;
}

.footer-legal-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Trang Tài khoản */
.account-legal-card-clean {
  margin-top: 22px;
  padding: 0;
  overflow: hidden;
}

.account-legal-title-row {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.account-legal-title-row h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.account-legal-list {
  display: block;
}

.account-legal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 13px 20px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.075);
  border-radius: 0;
  background: transparent;
  text-decoration: none;
}

.account-legal-row:last-child {
  border-bottom: 0;
}

.account-legal-row:hover,
.account-legal-row:focus-visible {
  background: rgba(255,255,255,.035);
}

.account-legal-copy strong,
.account-legal-copy small {
  display: block;
}

.account-legal-copy strong {
  font-size: .96rem;
}

.account-legal-copy small {
  margin-top: 3px;
  opacity: .62;
  line-height: 1.35;
}

.account-legal-chevron {
  flex: 0 0 auto;
  font-size: 1.5rem;
  line-height: 1;
  opacity: .48;
}

/* Trang /legal */
.legal-page-clean {
  width: min(760px, calc(100% - 32px));
  margin: 52px auto 76px;
}

.legal-page-intro {
  margin-bottom: 20px;
}

.legal-page-intro h1 {
  margin: 0 0 8px;
}

.legal-page-intro p {
  margin: 0;
  opacity: .68;
}

.legal-page-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}

.legal-page-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.075);
  text-decoration: none;
}

.legal-page-row:last-child {
  border-bottom: 0;
}

.legal-page-row:hover,
.legal-page-row:focus-visible {
  background: rgba(255,255,255,.04);
}

.legal-page-row strong,
.legal-page-row small {
  display: block;
}

.legal-page-row small {
  margin-top: 4px;
  opacity: .62;
  line-height: 1.4;
}

.legal-page-row > span:last-child {
  flex: 0 0 auto;
  font-size: 1.5rem;
  opacity: .48;
}

@media (max-width: 700px) {
  .legal-page-clean {
    margin-top: 30px;
  }

  .account-legal-row,
  .legal-page-row {
    padding-left: 16px;
    padding-right: 16px;
  }

  .account-legal-copy small,
  .legal-page-row small {
    font-size: .82rem;
  }
}

/* PATCH27_ADMIN_USAGE_STYLES */
.p27-usage-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.p27-usage-heading h2,.p27-usage-heading h3{margin:0}
.p27-usage-link{font-size:.78rem;font-weight:700;text-decoration:none;color:#b6c8ff;border:1px solid #475474;border-radius:10px;padding:7px 12px;white-space:nowrap}
.p27-usage-link:hover{background:#24314d;color:#fff}
.p27-wrap{width:min(920px,calc(100% - 32px));margin:26px auto 70px;color:#f4f6ff}
.p27-back{display:inline-block;color:#cbd6f7;text-decoration:none;font-size:.87rem;margin:0 0 22px}
.p27-back:hover{text-decoration:underline}
.p27-intro{display:flex;justify-content:space-between;gap:14px;align-items:end;margin-bottom:22px}
.p27-eyebrow{font-size:.66rem;font-weight:800;letter-spacing:.16em;color:#a7c1ff;margin-bottom:7px}
.p27-intro h1{margin:0;font-size:clamp(1.75rem,3vw,2.2rem)}
.p27-intro p{color:#aebbd2;font-size:.89rem;margin:8px 0 0;overflow-wrap:anywhere}
.p27-timezone{font-size:.76rem;color:#b0bbcf;white-space:nowrap}
.p27-panel{border:1px solid #2a344b;background:#1b253d;border-radius:16px;padding:23px;margin:16px 0}
.p27-section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:16px}
.p27-section-title h2{margin:0;font-size:1.14rem}.p27-section-title span{font-size:.76rem;color:#aebbd2}
.p27-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.p27-stat{background:#161e30;border:1px solid #3c4860;border-radius:11px;padding:13px 14px;min-height:83px}
.p27-stat small{display:block;color:#b0bdd7;line-height:1.4;font-size:.73rem}
.p27-stat strong{display:block;color:white;font-size:1.62rem;line-height:1.15;margin-top:8px}
.p27-primary{border-color:#6b83e9}
.p27-details{margin-top:20px;border-top:1px solid #33405a;padding-top:15px}
.p27-details summary{cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:8px;list-style:none;font-size:.91rem;font-weight:700}
.p27-details summary::-webkit-details-marker{display:none}.p27-details summary span{font-size:1.2rem;color:#bbcaff}
.p27-details[open] summary span{transform:rotate(90deg)}
.p27-list-head,.p27-list-item{display:grid;grid-template-columns:1fr 1fr 1.35fr;gap:12px;align-items:center}
.p27-list-head{color:#96a6c1;font-size:.71rem;margin-top:16px;padding:10px 0;border-bottom:1px solid #3c4860}
.p27-list-item{padding:10px 0;border-bottom:1px solid #313d55;font-size:.81rem}
.p27-list-item:last-child{border-bottom:0}
.p27-list-item code{font-family:ui-monospace,monospace;color:#d5def8;font-size:.8rem}
.p27-list-item time{text-align:right;color:#bac5db}
.p27-chip{justify-self:start;color:#c9d1e6;border:1px solid #4b5570;padding:3px 8px;border-radius:999px;font-size:.72rem}
.p27-done,.p27-saved{border-color:#367a69;color:#99e0c2}.p27-server_deleted,.p27-deleted,.p27-failed{border-color:#855562;color:#ffb9c3}
.p27-voice-name{overflow-wrap:anywhere}.p27-voice-name small{color:#aebad1}
.p27-empty{color:#b7c4db;font-size:.82rem}.p27-footnote{color:#9eabc2;font-size:.74rem;margin:12px 0 0}
.p27-subsection{border-top:1px solid #33405a;margin-top:22px;padding-top:17px}
.p27-subsection h3{font-size:.95rem;margin:0 0 4px}.p27-subsection>p{font-size:.79rem;color:#adbad2;margin:0 0 12px}
.p27-notice{font-size:.78rem;color:#aab8d0;line-height:1.6;margin:16px 5px 0}
@media(max-width:740px){.p27-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.p27-intro{display:block}.p27-timezone{display:block;margin-top:10px}.p27-panel{padding:15px}.p27-list-head,.p27-list-item{grid-template-columns:1fr 1fr;gap:4px}.p27-list-head span:last-child{display:none}.p27-list-item time{grid-column:1/-1;text-align:left;font-size:.74rem}.p27-section-title{align-items:start}}

/* PATCH31_ADMIN_LOGIN_DEVICES_CSS */
.p31-wrap .p27-panel{padding:22px}.p31-note{font-size:.81rem;color:#aebbd1;line-height:1.55}
.p31-device{background:#161e30;border:1px solid #37455f;border-radius:13px;padding:16px 17px;margin:13px 0}
.p31-device-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.p31-device-head h3{margin:0;font-size:1rem;line-height:1.45}
.p31-device-head h3 span{color:#b6c3da;font-size:.88rem;font-weight:500}
.p31-device-head p{color:#aabbd5;font-size:.8rem;margin:5px 0 0}
.p31-state{white-space:nowrap;color:#c5d2e7;border:1px solid #58677e;border-radius:999px;padding:5px 9px;font-size:.72rem}
.p31-state.is-active{border-color:#427662;color:#96e4c2}
.p31-device-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
.p31-device-meta>div{background:#1d2940;border-radius:8px;padding:10px 11px;min-width:0}
.p31-device-meta small{color:#aabbd2;font-size:.7rem;display:block;margin-bottom:4px}
.p31-device-meta strong{font-size:.88rem;font-weight:600;overflow-wrap:anywhere}
.p31-revoke{margin:14px 0 0}.p31-revoke button{background:transparent;color:#ffb0bf;border:1px solid #926073;border-radius:8px;padding:7px 12px;cursor:pointer;font-size:.78rem}
.p31-revoke button:hover{background:rgba(198,82,116,.15)}.p31-message{padding:11px 14px;border-radius:9px;border:1px solid #5b709b;margin:12px 0;background:#253450;font-size:.85rem}
@media(max-width:650px){.p31-device-head{display:block}.p31-state{display:inline-block;margin-top:10px}.p31-device-meta{grid-template-columns:1fr}.p31-wrap .p27-panel{padding:14px}}

.p31-actions{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:7px}.p27-usage-heading:has(.p31-actions){flex-wrap:wrap}


/* PATCH32_PRESENCE_DOT */
.p32-presence-anchor{position:relative!important;overflow:visible!important}
.p32-presence-dot{position:absolute;top:-3px;right:-3px;width:11px;height:11px;border-radius:999px;border:2px solid #111a2d;box-sizing:border-box;z-index:4;box-shadow:0 0 0 1px rgba(0,0,0,.08)}
.p32-presence-dot-inline{display:inline-block;width:9px;height:9px;border-radius:999px;margin:0 7px 0 0;vertical-align:middle;box-shadow:0 0 0 2px #111a2d}
.p32-presence-dot.is-online,.p32-presence-dot-inline.is-online{background:#39d98a}
.p32-presence-dot.is-idle,.p32-presence-dot-inline.is-idle{background:#e9b949}
.p32-presence-dot.is-offline,.p32-presence-dot-inline.is-offline{background:#77839a}

/* PATCH33_AUDIO_ONLY_7D */
.p33a-banner{border:1px solid #3e5871;border-radius:12px;padding:13px 16px;display:grid;gap:6px;margin-bottom:16px;background:#1b2941}
.p33a-banner strong{font-size:.91rem;color:#e9f2ff}.p33a-banner span{font-size:.79rem;color:#c5d5e6}
.p33a-expired-list{margin-top:7px;border-top:1px solid #40536e;padding-top:9px}.p33a-expired-list summary{color:#f2c787;cursor:pointer;font-size:.82rem}
.p33a-expired-entry{display:flex;gap:12px;align-items:center;justify-content:space-between;border-bottom:1px solid #32435a;padding:7px 0;font-size:.79rem}
.p33a-expired-entry b{color:#f4ce82}.p33a-expired-entry span{color:#bdcce2}
.p33a-admin-control{border:1px solid #3e5871;border-radius:12px;background:#1a263b;padding:12px 14px;margin:12px 0;display:flex;gap:14px;align-items:center;justify-content:space-between}
.p33a-admin-control>div{display:grid;gap:5px}.p33a-admin-control strong{font-size:.9rem}.p33a-admin-control span{font-size:.8rem;color:#bfccdd}.p33a-admin-control small{font-size:.72rem;color:#91a9c0}
.p33a-admin-control form{margin:0}.p33a-admin-control button{background:transparent;color:#d6e6fc;border:1px solid #6d83a0;border-radius:8px;padding:8px 11px;cursor:pointer}
.p27-expired{border-color:#936d38!important;color:#efcd80!important}
@media(max-width:700px){.p33a-admin-control{display:block}.p33a-admin-control form{margin-top:10px}.p33a-expired-entry{display:grid;gap:2px}}

/* PATCH33_AUDIO_HISTORY_CARDS_FIX3 */
.p33b-expired-card{display:block;width:100%;min-width:0;box-sizing:border-box;background:#151f36;border:1px solid #52617b;border-radius:12px;margin:10px 0;color:#d6e5f8;overflow:hidden}
.p33b-expired-card summary{cursor:pointer;display:block;list-style:none;padding:14px 17px}
.p33b-expired-card summary::-webkit-details-marker{display:none}
.p33b-expired-card summary:hover{background:#1e2d47;border-color:#e9ba64}
.p33b-expired-card summary:focus-visible{outline:2px solid #93b8f5;outline-offset:-2px}
.p33b-expired-card[open]{border-color:#b68a4a}
.p33b-main{display:grid;gap:8px;min-width:0}
.p33b-topline{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.p33b-preview{color:#eff5ff;font-size:.92rem;overflow-wrap:anywhere}
.p33b-expired-badge{color:#fbd28a;border:1px solid #947544;background:#382c24;border-radius:999px;padding:4px 9px;font-size:.73rem;white-space:nowrap}
.p33b-details{display:flex;flex-wrap:wrap;gap:6px 16px;color:#aabbd2;font-size:.8rem}
.p33b-expand-label{font-size:.74rem;color:#e2bd7e}
.p33b-notice{margin:0;padding:12px 17px;border-top:1px solid #495873;color:#f1d0a2;font-size:.85rem;line-height:1.6;background:#24283b}
.p33b-expired-row td{padding:0!important;border:0!important}
.p33b-expired-count{color:#e4ba73!important}
@media(max-width:640px){.p33b-expired-card summary{padding:12px}.p33b-topline{align-items:flex-start}.p33b-notice{padding:12px}}

/* PATCH33_AUDIO_HISTORY_DELETE_FIX4 */
.p33f4-toolbar{display:flex;justify-content:flex-end;margin:8px 0 16px}
.p33f4-toolbar form,.p33f4-item-actions{margin:0}
.p33f4-delete-all{background:transparent;border:1px solid #e1a5a5;color:#ffcece;padding:9px 14px;border-radius:9px;cursor:pointer;font-size:.84rem}
.p33f4-delete-all:hover{background:#492a32}
.p33f4-history-entry{display:flex;flex-direction:column;min-width:0}
.p33f4-history-entry .p33b-expired-card{margin-bottom:3px}
.p33f4-history-entry .history-job-card{flex:1}
.p33f4-item-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 10px}
.p33f4-delete-one{background:transparent;color:#e3b3b3;border:1px solid #a66d6d;border-radius:7px;padding:5px 12px;cursor:pointer;font-size:.8rem}
.p33f4-delete-one:hover{background:#502c36;color:#fff}
.p33f4-delete-one:focus-visible,.p33f4-delete-all:focus-visible{outline:2px solid #a7caff;outline-offset:2px}

/* PATCH33_FIX5_NATIVE_HISTORY_LAYOUT
 * Reuse built-in delete controls. Position fallback/expired button INSIDE its card.
 * No additional toolbar, no new row under each card. */
.p33f4-toolbar{display:none!important}
.p33f4-history-entry{position:relative!important;display:block!important;min-width:0;isolation:isolate}
.p33f4-history-entry > .p33b-expired-card{width:100%;box-sizing:border-box;margin:0 0 12px!important;min-height:96px}
.p33f4-history-entry > .p33b-expired-card summary{padding-right:146px;min-height:72px}
.p33f4-history-entry > .p33b-expired-card .p33b-topline{align-items:start}
.p33f4-history-entry > .p33f4-item-actions{position:absolute!important;right:15px!important;bottom:24px!important;z-index:3;display:flex!important;justify-content:end!important;align-items:center!important;padding:0!important;margin:0!important;width:auto!important;height:auto!important;background:transparent!important;border:0!important}
.p33f4-history-entry > .p33f4-item-actions[hidden]{display:none!important}
.p33f4-history-entry .p33f4-delete-one{background:transparent;border:1px solid #624854;color:#ffb8b8;border-radius:8px;padding:5px 12px;font-size:.8rem;font-weight:600;line-height:1.4;white-space:nowrap;cursor:pointer;min-height:29px;transition:background .15s,border-color .15s}
.p33f4-history-entry .p33f4-delete-one:hover{background:#4d2932;border-color:#ba667b;color:#fff}
.p33f4-history-entry .p33f4-delete-one:focus-visible{outline:2px solid #95bcff;outline-offset:3px}
/* The original live card already has a native Xóa button: do NOT add another. */
.p33f4-history-entry.p33f5-has-native-delete > .p33f4-item-actions{display:none!important}
@media(max-width:650px){.p33f4-history-entry > .p33b-expired-card summary{padding-right:100px}.p33f4-history-entry > .p33f4-item-actions{right:11px!important;bottom:19px!important}.p33f4-history-entry .p33f4-delete-one{font-size:.75rem;padding:5px 9px}}

/* PATCH33_FIX6_REUSE_ORIGINAL_DELETE_BUTTON
 * Current (not expired): use ONLY the button that existed before FIX4.
 * Expired: FIX4 safe form is inside the card and styled like the original.
 */
.p33f4-history-entry.p33f6-live > form.p33f4-item-actions,
.p33f4-history-entry > form.p33f4-item-actions[hidden]{display:none!important;visibility:hidden!important;pointer-events:none!important}
.p33f4-history-entry.p33f6-expired{position:relative!important;isolation:isolate}
.p33f4-history-entry.p33f6-expired > .p33b-expired-card{margin:0 0 10px!important;min-height:90px}
.p33f4-history-entry.p33f6-expired > .p33b-expired-card > summary{padding-right:118px!important;padding-bottom:36px!important}
.p33f4-history-entry.p33f6-expired > form.p33f4-item-actions{
 position:absolute!important;right:12px!important;bottom:22px!important;z-index:2!important;
 display:flex!important;align-items:center!important;justify-content:flex-end!important;
 width:auto!important;height:auto!important;padding:0!important;margin:0!important;
 border:0!important;background:transparent!important;box-shadow:none!important;
}
.p33f4-history-entry.p33f6-expired > form.p33f4-item-actions > .p33f4-delete-one{
 display:inline-block;box-sizing:border-box;background:transparent;border:1px solid #65505e;
 color:#ffbaba;font-size:.78rem;font-weight:500;line-height:1.35;
 border-radius:8px;min-height:26px;padding:4px 9px;cursor:pointer;
}
.p33f4-history-entry.p33f6-expired > form.p33f4-item-actions > .p33f4-delete-one:hover{background:#412c3b;color:#fff}
@media(max-width:650px){
 .p33f4-history-entry.p33f6-expired > .p33b-expired-card > summary{padding-right:100px!important}
 .p33f4-history-entry.p33f6-expired > form.p33f4-item-actions{right:10px!important;bottom:20px!important}
}

/* PATCH33_FIX7_REAL_HISTORY_CARDS
 * Scoped to /history. Reuses FIX4/FIX6 buttons, audio and file-missing notices.
 * All cards have identical exterior shell; status only changes inner actions.
 */
.p33f7-history-panel{
  padding:0!important; overflow:visible!important;
  border:0!important; background:transparent!important; box-shadow:none!important;
}
.p33f7-history-list{
  display:grid!important; grid-template-columns:minmax(0,1fr)!important;
  gap:12px!important; margin:0!important; padding:0!important;
}
.p33f7-history-list > .p33f7-history-card{
  position:relative!important; isolation:isolate!important;
  display:block!important; box-sizing:border-box!important;
  width:100%!important; min-width:0!important;
  margin:0!important; padding:15px 17px!important;
  border:1px solid #455572!important; border-radius:13px!important;
  background:#17213a!important; box-shadow:none!important;
  overflow:hidden!important;
}
.p33f7-history-list > .p33f7-history-card.p33f6-expired{
  padding-bottom:49px!important;
}
.p33f7-history-list > .p33f7-history-card > .history-item,
.p33f7-history-list > .p33f7-history-card > .p33b-expired-card{
  display:block!important; width:100%!important; min-height:0!important;
  margin:0!important; padding:0!important; border:0!important;
  border-radius:0!important; box-shadow:none!important;
  background:transparent!important; overflow:visible!important;
}
.p33f7-history-list > .p33f7-history-card .history-meta,
.p33f7-history-list > .p33f7-history-card .p33f7-meta{
  display:flex; align-items:center; flex-wrap:wrap;
  column-gap:10px; row-gap:5px;
  color:#9eacc6; font-size:12px; line-height:1.45;
}
.p33f7-history-list > .p33f7-history-card .history-meta strong{
  color:#d8e4ff;
}
.p33f7-history-list > .p33f7-history-card .history-item p,
.p33f7-history-list > .p33f7-history-card .p33f7-preview{
  display:block; margin:12px 0!important; padding:0!important;
  color:#d6dff0; font-size:14px; line-height:1.55;
  overflow-wrap:anywhere;
}
.p33f7-history-list > .p33f7-history-card .p33f7-meta-row{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:8px 14px; min-width:0;
}
.p33f7-history-list > .p33f7-history-card .p33f7-meta-row > .p33f7-meta{
  flex:1 1 0; min-width:0;
}
.p33f7-history-list > .p33f7-history-card .p33b-expired-badge{
  position:static!important; margin:0!important; flex:0 0 auto;
  padding:3px 8px; line-height:1.35;
}
.p33f7-history-list > .p33f7-history-card > .p33b-expired-card > summary{
  display:block!important; padding:0!important; margin:0!important;
  min-height:0!important; border:0!important;
  border-radius:0!important; background:transparent!important;
  list-style:none;
}
.p33f7-history-list > .p33f7-history-card > .p33b-expired-card > summary:hover{
  background:transparent!important;
}
.p33f7-history-list > .p33f7-history-card .p33b-expand-label{
  color:#e9bd76; font-size:12px;
}
.p33f7-history-list > .p33f7-history-card .p33b-notice{
  background:transparent!important; border:0!important;
  border-top:1px solid #41516b!important;
  padding:10px 0 0!important; margin:12px 0 0!important;
  font-size:12px; line-height:1.55;
}
.p33f7-history-list > .p33f7-history-card .history-item-actions{
  display:flex!important; align-items:center!important;
  justify-content:flex-end!important; gap:12px;
  min-height:30px; margin:12px 0 0!important;
}
.p33f7-history-list > .p33f7-history-card .history-item-actions > a{
  margin-right:auto!important;
}
.p33f7-history-list > .p33f7-history-card .history-item-actions > form{
  margin:0!important;
}
/* Expired uses the FIX4 audited post action; native uses FIX4 capture routing. */
.p33f7-history-list > .p33f7-history-card.p33f6-live > form.p33f4-item-actions,
.p33f7-history-list > .p33f7-history-card > form.p33f4-item-actions[hidden]{
  display:none!important; visibility:hidden!important; pointer-events:none!important;
}
.p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions{
  display:flex!important; align-items:center!important; justify-content:flex-end!important;
  position:absolute!important; right:17px!important; bottom:13px!important;
  top:auto!important; left:auto!important; z-index:2!important;
  width:auto!important; height:auto!important; padding:0!important;
  margin:0!important; background:transparent!important; border:0!important; box-shadow:none!important;
}
.p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions > button{
  display:inline-flex!important; align-items:center!important; justify-content:center!important;
  min-height:30px!important; padding:6px 10px!important;
  border-radius:9px!important; font-size:12px!important;
  background:transparent!important; border:1px solid rgba(255,120,120,.38)!important;
  color:#ffc0c0!important; font-weight:750!important; white-space:nowrap;
}
.p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions > button:hover{
  border-color:#ff8e8e!important; background:rgba(255,90,90,.08)!important;
}
@media(max-width:650px){
  .p33f7-history-list{gap:10px!important}
  .p33f7-history-list > .p33f7-history-card{padding:13px!important; border-radius:12px!important}
  .p33f7-history-list > .p33f7-history-card.p33f6-expired{padding-bottom:46px!important}
  .p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions{right:13px!important;bottom:10px!important}
  .p33f7-history-list > .p33f7-history-card .p33f7-meta-row{flex-wrap:wrap}
}

/* PATCH33_FIX8_EXPIRED_BADGE_TO_RIGHT
   Status and delete are one right-aligned footer row, matching live cards.
   Appearance only: no HTML, JS, routes, or database changes.
*/
.p33f7-history-list > .p33f7-history-card.p33f6-expired{
  padding-bottom:36px!important;
}
.p33f7-history-list > .p33f7-history-card.p33f6-expired .p33b-expired-badge{
  position:absolute!important;
  top:auto!important;
  left:auto!important;
  right:81px!important;
  bottom:17px!important;
  margin:0!important;
  padding:3px 8px!important;
  white-space:nowrap!important;
  line-height:1.35!important;
  z-index:2!important;
  pointer-events:none!important;
}
/* Match the existing live delete button's hover and keyboard focus. */
.p33f7-history-list > .p33f7-history-card .history-item-actions button.danger-button:hover,
.p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions button:hover{
  background:rgba(255,90,90,.16)!important;
  border-color:#ff8e8e!important;
  color:#ffd4d4!important;
  box-shadow:0 0 0 1px rgba(255,100,100,.10)!important;
}
.p33f7-history-list > .p33f7-history-card .history-item-actions button.danger-button:focus-visible,
.p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions button:focus-visible{
  outline:2px solid #ffb1b1!important;
  outline-offset:2px!important;
}
@media(max-width:650px){
 .p33f7-history-list > .p33f7-history-card.p33f6-expired{padding-bottom:34px!important}
 .p33f7-history-list > .p33f7-history-card.p33f6-expired .p33b-expired-badge{
   right:76px!important;bottom:14px!important;
 }
}
/* Very narrow phones cannot fit prompt + status + button on one line.
   The <summary> and its title remain clickable and explain the status. */
@media(max-width:360px){
 .p33f7-history-list > .p33f7-history-card.p33f6-expired .p33b-expand-label{
   display:none!important;
 }
}

/* PATCH33_FIX9_BADGE_ROW_AND_HOVER
   Badge is physically part of the same action bar as the original delete button.
   Overrides former CSS absolute badge positioning; no backend changes.
*/
.p33f7-history-list > .p33f7-history-card.p33f6-expired{
  padding-bottom:43px!important;
}
.p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions{
  display:flex!important; align-items:center!important; justify-content:flex-end!important;
  gap:9px!important; right:15px!important; bottom:12px!important;
  width:auto!important; min-height:30px!important; z-index:4!important;
}
.p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions > .p33b-expired-badge{
  position:static!important; display:inline-flex!important; align-items:center!important;
  top:auto!important; right:auto!important; bottom:auto!important; left:auto!important;
  width:auto!important; height:auto!important; margin:0!important;
  transform:none!important; flex:0 0 auto!important; pointer-events:none!important;
  padding:3px 8px!important; line-height:1.35!important;
  white-space:nowrap!important;
}
.p33f7-history-list > .p33f7-history-card .history-item-actions button.danger-button:hover,
.p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions > button:hover{
  background:rgba(255,90,90,.18)!important;
  border-color:#ff9898!important;
  color:#ffe0e0!important;
  box-shadow:0 0 0 1px rgba(255,120,120,.1)!important;
}
.p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions > button:focus-visible{
  outline:2px solid #ffc0c0!important; outline-offset:2px!important;
}
@media(max-width:650px){
  .p33f7-history-list > .p33f7-history-card.p33f6-expired{padding-bottom:43px!important}
  .p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions{
     right:12px!important; bottom:10px!important; gap:7px!important;
  }
}

/* PATCH33_FIX14_UNIFIED_DELETE_BORDER_HOVER
   Root cause removed from FIX4 JS: no computedStyle -> inline !important.
   One CSS rule handles normal, missing-file and expired audio actions.
   No filled backgrounds, shadow halos or secondary outlines.
*/
.p33f7-history-list > .p33f7-history-card .history-item-actions button.danger-button,
.p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions > button.p33f4-delete-one {
  background: transparent !important;
  border: 1px solid rgba(255, 139, 139, .46) !important;
  color: #ffc3c3 !important;
  box-shadow: none !important;
  outline: none !important;
  filter: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: border-color .16s ease, color .16s ease !important;
}
.p33f7-history-list > .p33f7-history-card .history-item-actions button.danger-button:is(:hover,:focus-visible),
.p33f7-history-list > .p33f7-history-card.p33f6-expired > form.p33f4-item-actions > button.p33f4-delete-one:is(:hover,:focus-visible) {
  /* FIX15: brighter stroke and a tight border glow, NEVER a filled background. */
  background: transparent !important;
  border-color: #fff0f1 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(255, 172, 182, .92),
              0 0 6px rgba(255, 135, 153, .54) !important;
  outline: none !important;
  filter: none !important;
}
/* PATCH33_FIX15_VISIBLE_SHARED_HOVER: hover stroke more visible; no layout, JS or data changes. */


/* PATCH34_MOBILE_HEADER_FOOTER_COMPACT
   Only <=900px. Mobile/tablet navigation can swipe horizontally while the account avatar
   stays visible and the account dropdown is not clipped. Desktop remains unchanged.
*/
.mobile-nav-track {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
@media (max-width:900px) {
  /* Constrain the implicit grid column to viewport width on iOS Safari. */
  body { grid-template-columns:minmax(0,1fr); }
  .topbar {
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    justify-content:space-between;
    min-height:52px;
    gap:10px;
    padding:8px 11px;
  }
  .topbar > .brand {
    display:inline-flex;
    flex:0 0 auto;
    font-size:15px;
    white-space:nowrap;
    line-height:1;
  }
  .topbar > .brand > span,
  .topbar > .brand > small { display:none; }
  .topbar > .nav {
    display:flex;
    flex:1 1 auto;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:nowrap;
    min-width:0;
    gap:6px;
    overflow:visible;
  }
  .topbar .mobile-nav-track {
    display:flex;
    flex:1 1 auto;
    min-width:0;
    max-width:100%;
    align-items:center;
    flex-wrap:nowrap;
    gap:5px;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
  }
  .topbar .mobile-nav-track::-webkit-scrollbar { display:none; }
  .topbar .mobile-nav-track .nav-link,
  .topbar .mobile-nav-track .pill-link {
    display:inline-flex;
    flex:0 0 auto;
    align-items:center;
    justify-content:center;
    min-height:34px;
    padding:7px 9px;
    font-size:12px;
    line-height:1.2;
    white-space:nowrap;
    border-radius:10px;
  }
  /* The account menu stays OUTSIDE the horizontally scrolling area. */
  .topbar .nav-user-menu {
    display:block;
    flex:0 0 auto;
    position:relative;
    min-width:0;
  }
  .topbar .nav-account {
    display:flex;
    width:36px;
    height:36px;
    min-height:36px;
    max-width:none;
    padding:4px;
    gap:0;
    align-items:center;
    justify-content:center;
    border-radius:999px;
  }
  .topbar .nav-avatar {width:27px;height:27px;flex:0 0 auto;}
  .topbar .nav-account-name,
  .topbar .nav-account-chevron {display:none;}
  .topbar .nav-account-dropdown {
    top:calc(100% + 8px);
    right:0;
    z-index:120;
  }
  .footer {
    display:flex;
    flex-direction:row;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:5px 10px;
    min-height:38px;
    padding:7px 12px;
    font-size:11px;
    line-height:1.3;
  }
  .footer > div {
    display:flex;
    align-items:center;
    flex-wrap:nowrap;
    gap:6px;
    min-width:0;
  }
  .footer > div:first-child,
  .footer-links > a {white-space:nowrap;}
  .footer .footer-links {gap:12px!important;}
  .page-shell { padding-top:18px; padding-bottom:18px; }
}
@media (max-width:360px) {
  .topbar {gap:6px;padding-left:9px;padding-right:9px;}
  .topbar .mobile-nav-track {gap:3px;}
  .topbar .mobile-nav-track .nav-link,
  .topbar .mobile-nav-track .pill-link {padding-left:7px;padding-right:7px;}
  .footer {padding:6px 9px;font-size:10px;gap:4px 8px;}
  .footer > div:first-child > span {display:none;}
  .footer .footer-links {gap:9px!important;}
}

/* PATCH35A_EMOTION_PANEL - limited to the opt-in analysis panel */
.p35a-panel{margin:16px 0;border:1px solid rgba(139,161,255,.3);border-radius:14px;padding:16px;background:rgba(60,78,131,.10);min-width:0}
.p35a-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.p35a-head strong{font-size:14px}.p35a-chip{font-size:10px;color:#c7d4ff;border:1px solid #546595;border-radius:999px;padding:3px 7px;font-weight:600;margin-left:5px}
.p35a-intro{margin:9px 0 12px!important;line-height:1.5}
.p35a-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.p35a-fields label{display:grid;gap:6px;font-size:12px}.p35a-fields select{width:100%;min-width:0;padding:9px;font-size:12px}
.p35a-privacy{margin:10px 0!important;line-height:1.5}.p35a-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.p35a-state{overflow-wrap:anywhere}
.p35a-error{color:#ffc4c4!important}.p35a-results{display:grid;gap:10px;margin-top:14px}.p35a-output-heading{margin:0!important;font-size:12px;color:#c3d4ff!important}
.p35a-result{padding:10px 12px;background:rgba(9,16,36,.55);border:1px solid #364967;border-radius:10px;min-width:0}
.p35a-segment-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 8px!important;font-size:12px!important;color:#e2eafa!important;line-height:1.5!important}
.p35a-result-meta{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap}.p35a-result-label{font-size:11px;color:#c8d8ff}.p35a-edit{width:auto;max-width:100%;padding:6px;font-size:12px}
.p35a-reason{margin:6px 0 0!important;font-size:11px!important}
@media(max-width:620px){.p35a-panel{padding:12px}.p35a-fields{grid-template-columns:1fr}.p35a-actions .p35a-run{width:100%}}
