/* AITBELLA Drive dark mode v5
   Covers generated upload, room, manage-room and guide components without touching app.js, config.js or the worker. */

html[data-drive-theme="dark"]{
  --bg:#101928;
  --bg2:#16243a;
  --card:#18263d;
  --card2:#142137;
  --text:#f2f7ff;
  --muted:#b5c6dc;
  --border:rgba(191,214,241,.18);
  --brand:#35bce8;
  --brand2:#1aa6d8;
  --success:#6ee7b7;
  --warn:#f5c76d;
  --danger:#ff9aaa;
  color-scheme:dark;
}

html[data-drive-theme="dark"],
html[data-drive-theme="dark"] body{
  background:
    radial-gradient(circle at 12% -10%,rgba(53,188,232,.15),transparent 34%),
    radial-gradient(circle at 90% 18%,rgba(80,119,202,.11),transparent 36%),
    linear-gradient(180deg,#101928 0%,#121e31 46%,#0f1828 100%)!important;
  color:var(--text)!important;
}

html[data-drive-theme="dark"] .abx-drive-header,
html[data-drive-theme="dark"] .app-header{
  background:rgba(18,29,47,.92)!important;
  border-color:rgba(191,214,241,.15)!important;
  box-shadow:0 10px 30px rgba(0,0,0,.20)!important;
}

html[data-drive-theme="dark"] .hero,
html[data-drive-theme="dark"] .shell,
html[data-drive-theme="dark"] .seo-landing,
html[data-drive-theme="dark"] main,
html[data-drive-theme="dark"] section{
  background:transparent!important;
  color:var(--text)!important;
}

html[data-drive-theme="dark"] .card,
html[data-drive-theme="dark"] .panel,
html[data-drive-theme="dark"] .admin-card,
html[data-drive-theme="dark"] .download-card,
html[data-drive-theme="dark"] .download-main,
html[data-drive-theme="dark"] .download-side,
html[data-drive-theme="dark"] .side-note,
html[data-drive-theme="dark"] .box,
html[data-drive-theme="dark"] .top-right-guard,
html[data-drive-theme="dark"] .upload-guard-card,
html[data-drive-theme="dark"] .link-options-below-upload,
html[data-drive-theme="dark"] .advanced-options,
html[data-drive-theme="dark"] .side-details,
html[data-drive-theme="dark"] .seo-section,
html[data-drive-theme="dark"] .seo-card,
html[data-drive-theme="dark"] .seo-step,
html[data-drive-theme="dark"] .faq-item,
html[data-drive-theme="dark"] .guide-card,
html[data-drive-theme="dark"] .legal-page,
html[data-drive-theme="dark"] .request-feature-page,
html[data-drive-theme="dark"] .contact-context,
html[data-drive-theme="dark"] .legal-callout,
html[data-drive-theme="dark"] .download-meta,
html[data-drive-theme="dark"] .stat-card,
html[data-drive-theme="dark"] .pending-item,
html[data-drive-theme="dark"] .file-info,
html[data-drive-theme="dark"] .qr-box,
html[data-drive-theme="dark"] .table-wrap,
html[data-drive-theme="dark"] .upload-selection-summary,
html[data-drive-theme="dark"] .upload-live-stats,
html[data-drive-theme="dark"] .upload-queue-row,
html[data-drive-theme="dark"] .upload-queue-title,
html[data-drive-theme="dark"] .upload-result-pro,
html[data-drive-theme="dark"] .result-share-card,
html[data-drive-theme="dark"] .result-next-steps,
html[data-drive-theme="dark"] .smart-email-card,
html[data-drive-theme="dark"] .manage-room-card,
html[data-drive-theme="dark"] .manage-warning,
html[data-drive-theme="dark"] .living-add-file-box,
html[data-drive-theme="dark"] .manage-files-box,
html[data-drive-theme="dark"] .manage-file-row,
html[data-drive-theme="dark"] .room-file-list,
html[data-drive-theme="dark"] .room-file-row,
html[data-drive-theme="dark"] .client-approval-room,
html[data-drive-theme="dark"] .manage-client-feedback-box,
html[data-drive-theme="dark"] .client-approval-latest,
html[data-drive-theme="dark"] .client-approval-form,
html[data-drive-theme="dark"] .client-approval-summary,
html[data-drive-theme="dark"] .sender-note-text-box,
html[data-drive-theme="dark"] .sender-text-message,
html[data-drive-theme="dark"] .voice-note-recorder,
html[data-drive-theme="dark"] .voice-note-room,
html[data-drive-theme="dark"] .bundle-gallery-card,
html[data-drive-theme="dark"] .bundle-video-gallery-card,
html[data-drive-theme="dark"] .image-preview-card,
html[data-drive-theme="dark"] .video-preview-card,
html[data-drive-theme="dark"] .image-preview-frame,
html[data-drive-theme="dark"] .video-preview-frame,
html[data-drive-theme="dark"] .smart-room-rules,
html[data-drive-theme="dark"] .smart-rule,
html[data-drive-theme="dark"] .privacy-options-compact,
html[data-drive-theme="dark"] .upload-action-note,
html[data-drive-theme="dark"] .room-bottom-actions .download-feedback,
html[data-drive-theme="dark"] .downloader-map-card,
html[data-drive-theme="dark"] .downloader-map-countries,
html[data-drive-theme="dark"] .downloader-map-countries span,
html[data-drive-theme="dark"] .downloader-map-recent,
html[data-drive-theme="dark"] .downloader-map-stats > *,
html[data-drive-theme="dark"] .downloader-fallback-world,
html[data-drive-theme="dark"] .map-empty,
html[data-drive-theme="dark"] .link-ready-card,
html[data-drive-theme="dark"] .link-ready-url,
html[data-drive-theme="dark"] .custom-link-preview,
html[data-drive-theme="dark"] .living-link-ready{
  background:linear-gradient(180deg,rgba(25,39,61,.97),rgba(18,31,50,.97))!important;
  border-color:rgba(191,214,241,.18)!important;
  color:var(--text)!important;
  box-shadow:0 18px 42px rgba(0,0,0,.22)!important;
}

html[data-drive-theme="dark"] .upload-summary-grid > div,
html[data-drive-theme="dark"] .upload-stat-grid > div,
html[data-drive-theme="dark"] .download-meta-grid > .download-meta,
html[data-drive-theme="dark"] .result-safety-strip span,
html[data-drive-theme="dark"] .download-share-row input,
html[data-drive-theme="dark"] .upload-file-pill,
html[data-drive-theme="dark"] .upload-file-pill.more,
html[data-drive-theme="dark"] .multi-link-item,
html[data-drive-theme="dark"] .result-link-item,
html[data-drive-theme="dark"] .download-feedback,
html[data-drive-theme="dark"] .admin-section-card,
html[data-drive-theme="dark"] .admin-kpi-card,
html[data-drive-theme="dark"] .admin-login-panel,
html[data-drive-theme="dark"] .admin-filter-panel,
html[data-drive-theme="dark"] .priority-item,
html[data-drive-theme="dark"] .admin-mini-row,
html[data-drive-theme="dark"] .admin-health-strip,
html[data-drive-theme="dark"] .admin-health-check{
  background:rgba(14,27,45,.82)!important;
  border-color:rgba(191,214,241,.18)!important;
  color:var(--text)!important;
  box-shadow:none!important;
}

html[data-drive-theme="dark"] .upload-zone{
  background:linear-gradient(180deg,rgba(24,49,76,.96),rgba(16,32,52,.96))!important;
  border-color:rgba(92,202,239,.34)!important;
  color:var(--text)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important;
}
html[data-drive-theme="dark"] .upload-zone strong,
html[data-drive-theme="dark"] .upload-summary-head strong,
html[data-drive-theme="dark"] .upload-summary-grid b,
html[data-drive-theme="dark"] .upload-stat-grid b,
html[data-drive-theme="dark"] .download-meta b,
html[data-drive-theme="dark"] .downloader-map-stats b,
html[data-drive-theme="dark"] .downloader-map-countries b,
html[data-drive-theme="dark"] .downloader-map-countries strong,
html[data-drive-theme="dark"] .downloader-map-recent b,
html[data-drive-theme="dark"] .result-share-card h4,
html[data-drive-theme="dark"] .result-next-steps b,
html[data-drive-theme="dark"] .result-card-head span,
html[data-drive-theme="dark"] .result-kicker,
html[data-drive-theme="dark"] h1,
html[data-drive-theme="dark"] h2,
html[data-drive-theme="dark"] h3,
html[data-drive-theme="dark"] h4,
html[data-drive-theme="dark"] strong,
html[data-drive-theme="dark"] b{
  color:#f4f8ff!important;
}

html[data-drive-theme="dark"] .muted,
html[data-drive-theme="dark"] .small,
html[data-drive-theme="dark"] label,
html[data-drive-theme="dark"] .upload-summary-head span,
html[data-drive-theme="dark"] .upload-summary-grid span,
html[data-drive-theme="dark"] .upload-stat-grid span,
html[data-drive-theme="dark"] .download-meta span,
html[data-drive-theme="dark"] .seo-section p,
html[data-drive-theme="dark"] .seo-card p,
html[data-drive-theme="dark"] .seo-step p,
html[data-drive-theme="dark"] .faq-item p,
html[data-drive-theme="dark"] .guide-card span,
html[data-drive-theme="dark"] .downloader-map-countries em,
html[data-drive-theme="dark"] .downloader-map-recent span,
html[data-drive-theme="dark"] .download-feedback,
html[data-drive-theme="dark"] .room-file-row small,
html[data-drive-theme="dark"] .manage-file-row small,
html[data-drive-theme="dark"] .result-next-steps li,
html[data-drive-theme="dark"] .result-share-card p,
html[data-drive-theme="dark"] .qr-caption,
html[data-drive-theme="dark"] .expires-message,
html[data-drive-theme="dark"] .legal-note,
html[data-drive-theme="dark"] .check-row{
  color:var(--muted)!important;
}

html[data-drive-theme="dark"] input,
html[data-drive-theme="dark"] select,
html[data-drive-theme="dark"] textarea{
  background:#0f1b2d!important;
  color:#f2f7ff!important;
  border-color:rgba(191,214,241,.22)!important;
  box-shadow:none!important;
}
html[data-drive-theme="dark"] input::placeholder,
html[data-drive-theme="dark"] textarea::placeholder{color:#8ea4bf!important;opacity:1!important}
html[data-drive-theme="dark"] input[type="file"]{
  background:#0f1b2d!important;
  color:#dcecff!important;
  border-color:rgba(191,214,241,.22)!important;
}
html[data-drive-theme="dark"] input[type="file"]::file-selector-button{
  background:#e6f7fd!important;
  color:#0f2136!important;
  border:0!important;
  border-radius:9px!important;
  font-weight:900!important;
}

html[data-drive-theme="dark"] .progress-wrap,
html[data-drive-theme="dark"] .pending-progress,
html[data-drive-theme="dark"] .managed-upload-track{
  background:#0b1524!important;
  border-color:rgba(191,214,241,.18)!important;
}
html[data-drive-theme="dark"] .progress-bar,
html[data-drive-theme="dark"] .pending-progress span,
html[data-drive-theme="dark"] .managed-upload-track span{background:linear-gradient(135deg,var(--brand),var(--brand2))!important}

html[data-drive-theme="dark"] .result-check,
html[data-drive-theme="dark"] .result-card-head b:not(.danger),
html[data-drive-theme="dark"] .download-status-pill.ready{
  background:rgba(42,191,135,.13)!important;
  border-color:rgba(110,231,183,.24)!important;
  color:#7bf0c1!important;
}
html[data-drive-theme="dark"] .result-share-card.private .result-card-head b,
html[data-drive-theme="dark"] .private-warning,
html[data-drive-theme="dark"] .manage-warning,
html[data-drive-theme="dark"] .time-capsule-options,
html[data-drive-theme="dark"] .download-status-pill.pending{
  background:rgba(245,199,109,.12)!important;
  border-color:rgba(245,199,109,.26)!important;
  color:#f8d990!important;
}
html[data-drive-theme="dark"] .danger-btn,
html[data-drive-theme="dark"] .upload-action-note.bad,
html[data-drive-theme="dark"] .error{
  background:rgba(255,122,151,.10)!important;
  border-color:rgba(255,154,170,.24)!important;
  color:#ffb5c1!important;
}
html[data-drive-theme="dark"] .upload-action-note.ok,
html[data-drive-theme="dark"] .link-ready,
html[data-drive-theme="dark"] .success{
  background:rgba(42,191,135,.10)!important;
  border-color:rgba(110,231,183,.22)!important;
  color:#7bf0c1!important;
}
html[data-drive-theme="dark"] .upload-action-note.warn,
html[data-drive-theme="dark"] .warn{
  background:rgba(245,199,109,.10)!important;
  border-color:rgba(245,199,109,.22)!important;
  color:#f8d990!important;
}

html[data-drive-theme="dark"] .secondary,
html[data-drive-theme="dark"] .tiny-btn.secondary,
html[data-drive-theme="dark"] button.secondary,
html[data-drive-theme="dark"] .download-map-actions .tiny-btn,
html[data-drive-theme="dark"] .downloader-map-actions .tiny-btn{
  background:#182943!important;
  color:#f2f7ff!important;
  border-color:rgba(191,214,241,.22)!important;
  box-shadow:none!important;
}
html[data-drive-theme="dark"] button:not(.abx-theme-toggle):not(.abx-tools-trigger):hover,
html[data-drive-theme="dark"] .secondary:hover,
html[data-drive-theme="dark"] .tiny-btn:hover{
  filter:brightness(1.04)!important;
}

html[data-drive-theme="dark"] .result-qr,
html[data-drive-theme="dark"] .qr-box{
  background:rgba(11,21,36,.72)!important;
  border-color:rgba(191,214,241,.18)!important;
}
html[data-drive-theme="dark"] .qr-img,
html[data-drive-theme="dark"] .qr-box svg,
html[data-drive-theme="dark"] .result-qr svg,
html[data-drive-theme="dark"] .result-qr canvas{
  background:#fff!important;
  border-radius:12px!important;
  padding:8px!important;
}

html[data-drive-theme="dark"] .link-ready-url,
html[data-drive-theme="dark"] .custom-link-preview,
html[data-drive-theme="dark"] .download-share-row input{
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
}
html[data-drive-theme="dark"] a{color:#63d6ff!important}
html[data-drive-theme="dark"] a:hover{color:#9be8ff!important}

/* Keep the real map readable while darkening its loading/metadata panels. */
html[data-drive-theme="dark"] .downloader-leaflet-map{
  border-color:rgba(191,214,241,.18)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.22)!important;
}
html[data-drive-theme="dark"] .downloader-leaflet-map .map-loading{
  background:linear-gradient(180deg,rgba(25,39,61,.96),rgba(18,31,50,.96))!important;
  color:var(--muted)!important;
}
html[data-drive-theme="dark"] .downloader-map-countries span,
html[data-drive-theme="dark"] .downloader-map-recent span{
  display:block!important;
}
html[data-drive-theme="dark"] .map-badge{
  background:#17263d!important;
  color:#f2f7ff!important;
  border-color:rgba(191,214,241,.24)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.25)!important;
}

/* Footer links must remain clickable and visible in every theme. */
.abx-footer,
.abx-footer a,
.abx-footer-mini-links,
.abx-footer-mini-links a{
  position:relative!important;
  z-index:5!important;
  pointer-events:auto!important;
}
html[data-drive-theme="dark"] .abx-footer{
  background:linear-gradient(180deg,#162238,#111b2c)!important;
  border-top:1px solid rgba(191,214,241,.14)!important;
}
html[data-drive-theme="dark"] .abx-footer a,
html[data-drive-theme="dark"] .abx-footer-mini-links a{color:#cfe2f8!important}
html[data-drive-theme="dark"] .abx-footer a:hover,
html[data-drive-theme="dark"] .abx-footer-mini-links a:hover{color:#fff!important}

/* Generated runtime style patches. */
html[data-drive-theme="dark"] .room-file-row,
html[data-drive-theme="dark"] .room-bottom-actions .download-feedback,
html[data-drive-theme="dark"] .clientApprovalStatus,
html[data-drive-theme="dark"] .download-feedback.success,
html[data-drive-theme="dark"] .download-feedback.warn,
html[data-drive-theme="dark"] .download-feedback.error{
  background:linear-gradient(180deg,rgba(25,39,61,.97),rgba(18,31,50,.97))!important;
  border-color:rgba(191,214,241,.18)!important;
}

/* Light external widgets such as Turnstile and QR remain readable, but their containers match the dark layout. */
html[data-drive-theme="dark"] .turnstile-wrap,
html[data-drive-theme="dark"] .smart-email-turnstile,
html[data-drive-theme="dark"] .top-right-guard .turnstile-wrap{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}


/* AITBELLA Drive dark mode v6 — complete generated result polish + favicon refresh */
html[data-drive-theme="dark"] .upload-result-hero,
html[data-drive-theme="dark"] #result .upload-result-hero,
html[data-drive-theme="dark"] .box .upload-result-hero{
  background:linear-gradient(135deg,rgba(30,48,75,.98),rgba(18,33,54,.98))!important;
  border-color:rgba(118,205,236,.24)!important;
  color:#eef7ff!important;
  box-shadow:0 18px 42px rgba(0,0,0,.26)!important;
}
html[data-drive-theme="dark"] .upload-result-hero h3,
html[data-drive-theme="dark"] #result .upload-result-hero h3{
  color:#f6fbff!important;
  text-shadow:0 1px 0 rgba(0,0,0,.18)!important;
}
html[data-drive-theme="dark"] .upload-result-hero p,
html[data-drive-theme="dark"] #result .upload-result-hero p{
  color:#b9cce5!important;
}
html[data-drive-theme="dark"] .upload-result-hero .result-kicker,
html[data-drive-theme="dark"] .result-kicker{
  color:#72f0bf!important;
  background:transparent!important;
  border:0!important;
}
html[data-drive-theme="dark"] .result-check{
  background:rgba(52,211,153,.14)!important;
  border:1px solid rgba(110,231,183,.35)!important;
  color:#7cf2c3!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 14px 30px rgba(0,0,0,.22)!important;
}
html[data-drive-theme="dark"] .upload-result-grid,
html[data-drive-theme="dark"] .result-button-row,
html[data-drive-theme="dark"] .copy-actions,
html[data-drive-theme="dark"] .multi-links,
html[data-drive-theme="dark"] .result-link-list{
  background:transparent!important;
}
html[data-drive-theme="dark"] .result-card-head,
html[data-drive-theme="dark"] .download-map-actions,
html[data-drive-theme="dark"] .downloader-map-actions{
  background:transparent!important;
}
html[data-drive-theme="dark"] .result-card-head span{
  color:#c2d6ee!important;
}
html[data-drive-theme="dark"] .result-card-head b,
html[data-drive-theme="dark"] .result-share-card.public .result-card-head b{
  background:rgba(42,191,135,.16)!important;
  border-color:rgba(110,231,183,.32)!important;
  color:#81f5c4!important;
}
html[data-drive-theme="dark"] .result-share-card.private .result-card-head b,
html[data-drive-theme="dark"] .private-warning{
  background:rgba(245,199,109,.13)!important;
  border-color:rgba(245,199,109,.34)!important;
  color:#ffd989!important;
}
html[data-drive-theme="dark"] .result-share-card .link-ready-url,
html[data-drive-theme="dark"] .link-ready-url,
html[data-drive-theme="dark"] .custom-link-preview,
html[data-drive-theme="dark"] .download-share-row input,
html[data-drive-theme="dark"] .multi-link-item,
html[data-drive-theme="dark"] .result-link-item{
  background:rgba(9,22,38,.74)!important;
  border:1px solid rgba(118,205,236,.18)!important;
  color:#e9f5ff!important;
  box-shadow:none!important;
}
html[data-drive-theme="dark"] .link-ready-url a,
html[data-drive-theme="dark"] .custom-link-preview a,
html[data-drive-theme="dark"] .download-share-row a,
html[data-drive-theme="dark"] #result a{
  color:#5edbff!important;
}
html[data-drive-theme="dark"] .result-qr{
  background:rgba(9,22,38,.66)!important;
  border-color:rgba(118,205,236,.20)!important;
  color:#b9cce5!important;
}
html[data-drive-theme="dark"] .result-next-steps,
html[data-drive-theme="dark"] .upload-result-pro .advanced-options{
  background:rgba(10,23,39,.66)!important;
  border-color:rgba(190,211,238,.18)!important;
  color:#eef7ff!important;
}
html[data-drive-theme="dark"] .result-safety-strip{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
html[data-drive-theme="dark"] .result-safety-strip span{
  background:linear-gradient(180deg,rgba(21,38,60,.98),rgba(15,29,49,.98))!important;
  border-color:rgba(118,205,236,.22)!important;
  color:#74dcff!important;
  box-shadow:0 10px 24px rgba(0,0,0,.18)!important;
}
html[data-drive-theme="dark"] .download-main [style*="background: #fff"],
html[data-drive-theme="dark"] .download-side [style*="background: #fff"],
html[data-drive-theme="dark"] .manage-room-card [style*="background: #fff"],
html[data-drive-theme="dark"] #result [style*="background: #fff"],
html[data-drive-theme="dark"] #app [style*="background: #fff"],
html[data-drive-theme="dark"] .download-main [style*="background:#fff"],
html[data-drive-theme="dark"] .download-side [style*="background:#fff"],
html[data-drive-theme="dark"] .manage-room-card [style*="background:#fff"],
html[data-drive-theme="dark"] #result [style*="background:#fff"],
html[data-drive-theme="dark"] #app [style*="background:#fff"],
html[data-drive-theme="dark"] .download-main [style*="background: rgb(255, 255, 255)"],
html[data-drive-theme="dark"] .download-side [style*="background: rgb(255, 255, 255)"],
html[data-drive-theme="dark"] .manage-room-card [style*="background: rgb(255, 255, 255)"],
html[data-drive-theme="dark"] #result [style*="background: rgb(255, 255, 255)"],
html[data-drive-theme="dark"] #app [style*="background: rgb(255, 255, 255)"]{
  background:linear-gradient(180deg,rgba(25,39,61,.97),rgba(18,31,50,.97))!important;
  color:#eef7ff!important;
  border-color:rgba(190,211,238,.18)!important;
}
html[data-drive-theme="dark"] .downloader-map-countries,
html[data-drive-theme="dark"] .downloader-map-countries span,
html[data-drive-theme="dark"] .downloader-map-recent,
html[data-drive-theme="dark"] .downloader-map-recent span,
html[data-drive-theme="dark"] .downloader-map-card .downloader-map-countries,
html[data-drive-theme="dark"] .downloader-map-card .downloader-map-countries > span,
html[data-drive-theme="dark"] .downloader-map-card .downloader-map-recent{
  background:rgba(13,27,46,.88)!important;
  border-color:rgba(190,211,238,.18)!important;
  color:#eaf4ff!important;
}
html[data-drive-theme="dark"] .downloader-map-countries em,
html[data-drive-theme="dark"] .downloader-map-recent span,
html[data-drive-theme="dark"] .downloader-map-card small{
  color:#b9cce5!important;
}
html[data-drive-theme="dark"] .client-approval-summary,
html[data-drive-theme="dark"] .download-status-pill,
html[data-drive-theme="dark"] .pill,
html[data-drive-theme="dark"] .mini-badge,
html[data-drive-theme="dark"] .upload-file-pill,
html[data-drive-theme="dark"] .upload-file-pill.more{
  background:rgba(53,188,232,.13)!important;
  border-color:rgba(53,188,232,.28)!important;
  color:#83e0ff!important;
}
html[data-drive-theme="dark"] .upload-summary-grid > div,
html[data-drive-theme="dark"] .upload-stat-grid > div{
  background:rgba(10,23,39,.78)!important;
  border-color:rgba(190,211,238,.18)!important;
  color:#eef7ff!important;
}
html[data-drive-theme="dark"] #result,
html[data-drive-theme="dark"] #app,
html[data-drive-theme="dark"] .download-card,
html[data-drive-theme="dark"] .manage-room-card{
  color:#eef7ff!important;
}
html[data-drive-theme="dark"] #result *::selection,
html[data-drive-theme="dark"] #app *::selection,
html[data-drive-theme="dark"] .download-card *::selection,
html[data-drive-theme="dark"] .manage-room-card *::selection{
  background:rgba(53,188,232,.35)!important;
  color:#ffffff!important;
}
