/* AITBELLA Drive v8 — single-block upload workspace and compact upload queue */
#app.card{
  max-width:980px!important;
}
.upload-panel-v8{
  padding:18px!important;
}
.upload-layout-v8{
  display:block!important;
  grid-template-columns:1fr!important;
}
.upload-workspace-v8{
  width:100%!important;
  display:grid!important;
  gap:14px!important;
  min-width:0!important;
}
.upload-intro-v8{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:12px!important;
  padding:6px 4px 2px!important;
}
.upload-kicker-v8{
  display:inline-flex!important;
  align-items:center!important;
  width:max-content!important;
  border-radius:999px!important;
  padding:5px 9px!important;
  background:#e8f8fe!important;
  border:1px solid #cdeefa!important;
  color:var(--brand2)!important;
  font-size:11px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.12em!important;
}
.upload-intro-v8 h1{
  margin:8px 0 4px!important;
  font-size:clamp(25px,3.4vw,38px)!important;
  line-height:1.03!important;
  letter-spacing:-.055em!important;
}
.upload-intro-v8 p{
  margin:0!important;
  max-width:720px!important;
  font-size:15px!important;
  line-height:1.5!important;
}
.upload-section-v8{
  background:linear-gradient(180deg,#ffffff,#f8fdff)!important;
  border:1px solid var(--border)!important;
  border-radius:22px!important;
  padding:16px!important;
  box-shadow:0 18px 45px rgba(31,43,70,.08)!important;
  min-width:0!important;
}
.section-head-v8{
  display:flex!important;
  justify-content:space-between!important;
  align-items:flex-start!important;
  gap:14px!important;
  margin-bottom:12px!important;
}
.section-head-v8 b{
  display:block!important;
  color:var(--text)!important;
  font-size:16px!important;
  line-height:1.2!important;
  letter-spacing:-.025em!important;
}
.section-head-v8 span{
  display:block!important;
  margin-top:3px!important;
  color:var(--muted)!important;
  font-size:13px!important;
  line-height:1.35!important;
}
.upload-section-v8 .upload-zone{
  min-height:104px!important;
  border-radius:18px!important;
}
.upload-section-v8 #fileInput{
  margin-top:10px!important;
}
.selected-files-details,
.upload-queue-compact{
  margin-top:12px!important;
  border:1px solid var(--border)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#f8fdff,#eef9ff)!important;
  overflow:hidden!important;
  box-shadow:0 10px 28px rgba(31,43,70,.05)!important;
}
.selected-files-details>summary,
.upload-queue-compact>summary{
  list-style:none!important;
  cursor:pointer!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:13px 15px!important;
  font-weight:950!important;
  color:var(--text)!important;
}
.selected-files-details>summary::-webkit-details-marker,
.upload-queue-compact>summary::-webkit-details-marker{display:none!important}
.selected-files-details>summary:before,
.upload-queue-compact>summary:before{
  content:"›"!important;
  display:grid!important;
  place-items:center!important;
  width:26px!important;
  height:26px!important;
  border-radius:999px!important;
  background:#e8f8fe!important;
  color:var(--brand2)!important;
  transform:rotate(0deg)!important;
  transition:.16s ease!important;
  flex:none!important;
}
.selected-files-details[open]>summary:before,
.upload-queue-compact[open]>summary:before{transform:rotate(90deg)!important}
.selected-files-details>summary span,
.upload-queue-compact>summary span{
  flex:1!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.selected-files-details>summary b,
.upload-queue-compact>summary b{
  flex:none!important;
  color:var(--brand2)!important;
  font-size:13px!important;
}
.selected-files-body{
  border-top:1px solid var(--border)!important;
  padding:12px!important;
}
.compact-file-pills-v8{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.compact-file-pills-v8 .upload-file-pill{
  min-height:44px!important;
}
.security-section-v8 .upload-guard-card{
  display:grid!important;
  grid-template-columns:minmax(280px,.9fr) minmax(0,1fr)!important;
  gap:14px!important;
  align-items:start!important;
  background:transparent!important;
  border:0!important;
  padding:0!important;
}
.security-section-v8 .turnstile-wrap{
  margin:0!important;
  padding:12px!important;
  border-radius:18px!important;
  background:#f8fdff!important;
  border:1px solid var(--border)!important;
}
.security-section-v8 #turnstileRetryButton{
  width:auto!important;
  margin-top:8px!important;
  padding:8px 12px!important;
  font-size:13px!important;
  box-shadow:none!important;
}
.upload-terms-row-v8{
  margin:0!important;
  align-self:start!important;
  background:#fff!important;
  border:1px solid var(--border)!important;
  border-radius:18px!important;
  padding:13px!important;
  text-transform:none!important;
  letter-spacing:0!important;
  font-size:13px!important;
  line-height:1.45!important;
  color:var(--text)!important;
}
.security-section-v8 .legal-note{
  grid-column:1/-1!important;
  margin:0!important;
}
.options-section-v8 .advanced-options{
  background:#f8fdff!important;
  border:1px solid var(--border)!important;
  border-radius:18px!important;
  padding:0!important;
  overflow:hidden!important;
}
.options-section-v8 .advanced-options>summary{
  padding:13px 15px!important;
  cursor:pointer!important;
  font-weight:950!important;
  color:var(--text)!important;
}
.options-section-v8 .advanced-options[open]>summary{
  border-bottom:1px solid var(--border)!important;
}
.options-section-v8 .advanced-options .compact-options-grid,
.options-section-v8 .advanced-options .custom-link-preview,
.options-section-v8 .advanced-options .alias-status,
.options-section-v8 .advanced-options p,
.options-section-v8 .advanced-options .sender-note-text-box,
.options-section-v8 .advanced-options .voice-note-recorder,
.options-section-v8 .advanced-options .check-row{
  margin-left:14px!important;
  margin-right:14px!important;
}
.options-section-v8 .advanced-options .compact-options-grid{
  padding-top:2px!important;
}
.more-options-grid-v8{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
  margin-top:12px!important;
}
.more-options-grid-v8 .advanced-options{
  min-width:0!important;
}
.more-options-grid-v8 textarea{min-height:96px!important}
.action-section-v8{
  display:grid!important;
  gap:10px!important;
}
.action-section-v8 .cta-row{margin:0!important}
.action-section-v8 #status,
.action-section-v8 #uploadStats,
.action-section-v8 #uploadDiagnostics{
  white-space:normal!important;
  word-break:normal!important;
}
.upload-progress-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  font-weight:900!important;
  color:var(--brand2)!important;
  font-size:13px!important;
  margin-top:0!important;
}
.upload-live-stats{
  background:transparent!important;
  border:0!important;
  padding:0!important;
  margin-top:0!important;
}
.upload-stat-grid{
  margin-top:0!important;
}
.upload-queue-grid-v8{
  border-top:1px solid var(--border)!important;
  padding:12px!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
}
.upload-queue-tile{
  position:relative!important;
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  grid-template-areas:"check name" "check meta" "check state"!important;
  gap:3px 9px!important;
  align-items:center!important;
  min-width:0!important;
  padding:12px!important;
  border-radius:16px!important;
  background:#fff!important;
  border:1px solid var(--border)!important;
  box-shadow:0 10px 24px rgba(31,43,70,.05)!important;
  transition:.18s ease!important;
}
.upload-queue-tile .queue-check{
  grid-area:check!important;
  width:30px!important;
  height:30px!important;
  border-radius:12px!important;
  display:grid!important;
  place-items:center!important;
  background:#eef6fb!important;
  border:1px solid var(--border)!important;
  color:transparent!important;
  font-size:18px!important;
  font-weight:950!important;
  transition:.18s ease!important;
}
.upload-queue-name{
  grid-area:name!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:var(--text)!important;
  font-size:13px!important;
  font-weight:950!important;
  line-height:1.2!important;
}
.upload-queue-meta{
  grid-area:meta!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:var(--muted)!important;
  font-size:12px!important;
  line-height:1.2!important;
}
.upload-queue-state{
  grid-area:state!important;
  width:max-content!important;
  max-width:100%!important;
  padding:4px 8px!important;
  border-radius:999px!important;
  border:1px solid var(--border)!important;
  background:#f8fdff!important;
  color:var(--muted)!important;
  font-size:11px!important;
  font-weight:950!important;
}
.upload-queue-state.active{background:#e8f8fe!important;color:var(--brand2)!important;border-color:#cdeefa!important}
.upload-queue-state.done{background:#eafcf5!important;color:#0f8f62!important;border-color:#bcebd7!important}
.upload-queue-state.error{background:#fff1f4!important;color:#b91f41!important;border-color:#ffd4dc!important}
.upload-queue-tile.is-uploading{border-color:#90ddf5!important;box-shadow:0 0 0 3px rgba(53,188,232,.10)!important}
.upload-queue-tile.is-done .queue-check{
  color:#fff!important;
  background:linear-gradient(135deg,#11b67a,#6bedb8)!important;
  border-color:#9be7c9!important;
  transform:scale(1.05)!important;
  animation:aitbellaCheckPop .38s ease both!important;
}
.upload-queue-tile.is-error .queue-check{
  color:#fff!important;
  background:#e4516c!important;
  border-color:#ffc9d2!important;
}
@keyframes aitbellaCheckPop{0%{transform:scale(.78);opacity:.55}65%{transform:scale(1.12);opacity:1}100%{transform:scale(1.02)}}
/* Keep generated result professional in both modes */
#app.upload-result-active{max-width:min(980px,calc(100vw - 28px))!important}
#app.upload-result-active .upload-panel-v8{padding:18px!important}
#app.upload-result-active .upload-workspace-v8{display:block!important}
#app.upload-result-active .upload-intro-v8,
#app.upload-result-active .file-section-v8,
#app.upload-result-active .security-section-v8,
#app.upload-result-active .options-section-v8,
#app.upload-result-active .action-section-v8>.cta-row,
#app.upload-result-active .action-section-v8>#status,
#app.upload-result-active .action-section-v8>.upload-progress-head,
#app.upload-result-active .action-section-v8>.progress-wrap,
#app.upload-result-active .action-section-v8>#uploadStats,
#app.upload-result-active .action-section-v8>#uploadQueue,
#app.upload-result-active .action-section-v8>#uploadDiagnostics{
  display:none!important;
}
#app.upload-result-active .action-section-v8{
  display:block!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
}
#app.upload-result-active #result{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  white-space:normal!important;
  word-break:normal!important;
}
/* Dark mode */
html[data-drive-theme="dark"] .upload-kicker-v8{
  background:rgba(46,188,232,.12)!important;
  border-color:rgba(118,205,236,.24)!important;
  color:#6dd8ff!important;
}
html[data-drive-theme="dark"] .upload-section-v8,
html[data-drive-theme="dark"] .selected-files-details,
html[data-drive-theme="dark"] .upload-queue-compact,
html[data-drive-theme="dark"] .options-section-v8 .advanced-options{
  background:linear-gradient(180deg,rgba(23,38,61,.97),rgba(15,28,47,.97))!important;
  border-color:rgba(191,214,241,.18)!important;
  box-shadow:0 22px 56px rgba(0,0,0,.24)!important;
}
html[data-drive-theme="dark"] .section-head-v8 b,
html[data-drive-theme="dark"] .selected-files-details>summary,
html[data-drive-theme="dark"] .upload-queue-compact>summary,
html[data-drive-theme="dark"] .options-section-v8 .advanced-options>summary,
html[data-drive-theme="dark"] .upload-queue-name{
  color:#f5faff!important;
}
html[data-drive-theme="dark"] .section-head-v8 span,
html[data-drive-theme="dark"] .upload-queue-meta{
  color:#b7c8df!important;
}
html[data-drive-theme="dark"] .selected-files-details>summary:before,
html[data-drive-theme="dark"] .upload-queue-compact>summary:before{
  background:rgba(46,188,232,.12)!important;
  color:#6dd8ff!important;
}
html[data-drive-theme="dark"] .selected-files-body,
html[data-drive-theme="dark"] .upload-queue-grid-v8,
html[data-drive-theme="dark"] .options-section-v8 .advanced-options[open]>summary{
  border-color:rgba(191,214,241,.18)!important;
}
html[data-drive-theme="dark"] .security-section-v8 .turnstile-wrap,
html[data-drive-theme="dark"] .upload-terms-row-v8,
html[data-drive-theme="dark"] .upload-queue-tile{
  background:rgba(9,22,38,.74)!important;
  border-color:rgba(191,214,241,.18)!important;
  box-shadow:0 16px 36px rgba(0,0,0,.18)!important;
}
html[data-drive-theme="dark"] .upload-queue-tile .queue-check,
html[data-drive-theme="dark"] .upload-queue-state{
  background:rgba(18,34,56,.92)!important;
  border-color:rgba(191,214,241,.18)!important;
  color:#aebfd4!important;
}
html[data-drive-theme="dark"] .upload-queue-state.active{background:rgba(46,188,232,.16)!important;color:#6dd8ff!important;border-color:rgba(118,205,236,.30)!important}
html[data-drive-theme="dark"] .upload-queue-state.done{background:rgba(17,182,122,.15)!important;color:#76f0bc!important;border-color:rgba(118,240,188,.28)!important}
html[data-drive-theme="dark"] .upload-queue-state.error{background:rgba(228,81,108,.15)!important;color:#ff9eb0!important;border-color:rgba(255,158,176,.26)!important}
html[data-drive-theme="dark"] .upload-terms-row-v8{color:#e7f2ff!important}
html[data-drive-theme="dark"] #app.upload-result-active .action-section-v8{background:transparent!important}
@media(max-width:900px){
  .security-section-v8 .upload-guard-card{grid-template-columns:1fr!important}
  .more-options-grid-v8{grid-template-columns:1fr!important}
  .upload-queue-grid-v8{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .compact-file-pills-v8{grid-template-columns:1fr!important}
}
@media(max-width:560px){
  .upload-panel-v8{padding:12px!important}
  .upload-section-v8{padding:13px!important;border-radius:18px!important}
  .upload-queue-grid-v8{grid-template-columns:1fr!important}
  .selected-files-details>summary,
  .upload-queue-compact>summary{align-items:flex-start!important}
  .selected-files-details>summary b,
  .upload-queue-compact>summary b{white-space:normal!important;text-align:right!important}
}
