html.theme-dark{color-scheme:dark;--ink:#edf1f7;--muted:#aab4c3;--line:#303b4c;--bg:#10151e;--white:#1a222e;--soft:#263550;--shadow:0 24px 70px rgba(0,0,0,.28)}
html.theme-dark body{background:#10151e!important;color:#edf1f7!important}
html.theme-dark :is(.layout,.main,.login-page,.not-found){background:#10151e!important;color:#edf1f7}
html.theme-dark :is(.sidebar,.card,.table-wrap,.payment-panel,.feature-setting-card,.command-card,.section-intro,.support-list-card,.support-chat-card,.support-new-box,.stack-row,.feature-editor,.demo-modal,.tour-popover,.tend-account-confirm-card,.login-card,.not-found .card,.sim-window,.sim-control,.sim-chat,.sim-channel-rail,.sim-server-rail,.sim-message-list,.sim-info-card,.sim-stat-grid>div,.sim-action-list button,.sim-ban-row,.sim-ann-preview,.demo-inventory-grid>div){background:#1a222e!important;border-color:#303b4c!important;color:#edf1f7!important}
html.theme-dark :is(.topbar,.sidebar-bottom,.support-chat-head,.support-reply-form,.support-admin-list,.sim-channel-head,.sim-compose,.sim-bottom){border-color:#303b4c!important}
html.theme-dark :is(.brand,.page-title,.card-title,.stat-value,.profile-text strong,.feature-setting-head strong,.command-group-title,.command-card>strong,.support-chat-head strong,.support-chat-empty strong,.login-card h1,.demo-modal h4,.demo-modal header b,.sim-message-meta b,.sim-control-title b,.sim-stat-grid b,.sim-info-card b,.sim-ann-preview b){color:#edf1f7!important}
html.theme-dark :is(.crumb,.page-subtitle,.stat-label,.stat-foot,.card-note,.profile-text small,.field label,.field>span,.setting-row strong,.setting-row small,.feature-setting-head small,.feature-config-label,.command-card p,.support-ticket-item>small,.support-chat-head small,.support-chat-empty p,.support-new-heading p,.login-card>p,.login-back,.login-foot,.login-footer,.demo-modal p,.demo-inventory-grid small,.demo-modal>small,.sim-message p,.sim-message-meta small,.sim-control-title small,.sim-info-card span,.sim-info-card small,.sim-stat-grid small,.sim-bottom span,.sim-empty){color:#aab4c3!important}
html.theme-dark :is(.side-nav a,.nav-label){color:#aab4c3}
html.theme-dark .side-nav a:hover{background:#252f40!important;color:#f2f5fa!important}
html.theme-dark .side-nav a.active{background:#263550!important;color:#a9c0ff!important}
html.theme-dark :is(.btn-light,.mobile-nav a,.demo-modal-close,.tour-controls button:not(.btn-blue)){background:#263142!important;border:1px solid #3a4659!important;color:#e7edf6!important}
html.theme-dark .btn-dark{background:#e8edf5!important;color:#171b24!important}
html.theme-dark .btn-blue{background:#356df3!important;color:#fff!important}
html.theme-dark .btn-danger{background:#44272d!important;border-color:#633941!important;color:#ffadb4!important}
html.theme-dark :is(input,select,textarea,.control,.review-reason,.feature-setting-card textarea,.feature-editor-fields input,.feature-editor-fields select,.feature-editor-fields textarea,.demo-field select,.demo-field textarea,.support-reply-form textarea,.support-new-box input,.support-new-box textarea){background:#111821!important;border-color:#3a4659!important;color:#edf1f7!important}
html.theme-dark input::placeholder,html.theme-dark textarea::placeholder{color:#778397!important}
html.theme-dark :is(input,select,textarea,button,a):focus-visible{outline-color:#7da2ff}
html.theme-dark :is(.data-table th,.admin-table th){background:#222d3d!important;color:#b8c3d3!important;border-color:#303b4c!important}
html.theme-dark :is(.data-table td,.admin-table td){background:transparent;color:#d0d8e4!important;border-color:#303b4c!important}
html.theme-dark :is(.data-table tbody tr:hover,.admin-table tbody tr:hover){background:#222d3d!important}
html.theme-dark :is(.badge,.command-group-title span){background:#2a3546!important;color:#cbd5e2!important}
html.theme-dark .badge.green{background:#183b31!important;color:#7ee0b4!important}
html.theme-dark .badge.blue{background:#263550!important;color:#a9c0ff!important}
html.theme-dark .badge.amber{background:#42351f!important;color:#f0c77a!important}
html.theme-dark .badge.red{background:#42262b!important;color:#ffadb4!important}
html.theme-dark :is(.empty,.empty-state){color:#aab4c3!important}
html.theme-dark :is(.notice,.notice.warning,.notice.success,.tutorial-demo-ribbon,.sim-feedback){background:#202c3d!important;border-color:#35465f!important;color:#c3d0e2!important}
html.theme-dark .notice.warning{background:#382f20!important;border-color:#5b492b!important;color:#f0d49a!important}
html.theme-dark .notice.success{background:#18372f!important;border-color:#285746!important;color:#9ce2c3!important}
html.theme-dark :is(.dashboard-welcome,.bank-row,.payment-summary,.quick-links a,.support-ticket-item,.support-closed-note,.support-message-list,.sim-tabs,.sim-ann-preview,.demo-inventory-grid>div){background:#202b3a!important;border-color:#354255!important;color:#edf1f7!important}
html.theme-dark .dashboard-welcome{background:linear-gradient(115deg,#1a2432,#202e43)!important}
html.theme-dark .welcome-kicker,html.theme-dark .payment-eyebrow{color:#9bb7ff!important}
html.theme-dark .dashboard-welcome h1 span{color:#9bb7ff!important}
html.theme-dark .support-ticket-item.active{background:#263550!important;border-color:#526fae!important}
html.theme-dark .support-message-list{background:#111821!important}
html.theme-dark .support-message-body p{background:#263142!important;border-color:#3a4659!important;color:#e5ebf4!important}
html.theme-dark .support-message.mine .support-message-body p{background:#263c60!important;border-color:#3b5682!important}
html.theme-dark .support-message-avatar{background:#303c4f!important;color:#d5deeb!important}
html.theme-dark .support-message-avatar.admin{background:#263550!important;color:#a9c0ff!important}
html.theme-dark .support-empty-icon,.theme-dark .login-note>span{background:#263550!important;color:#a9c0ff!important}
html.theme-dark .login-divider{background:#303b4c!important}
html.theme-dark .login-page{background:radial-gradient(circle at 50% 12%,#1d2a40 0,transparent 38%),#10151e!important}
html.theme-dark .login-symbol{background:transparent!important}
html.theme-dark .feature-editor>header{border-color:#303b4c!important}
html.theme-dark .feature-editor-fields .field>span{color:#cbd5e2!important}
html.theme-dark .sim-tabs button{color:#aab4c3!important}
html.theme-dark .sim-tabs button.active{background:#35445a!important;color:#a9c0ff!important;box-shadow:none!important}
html.theme-dark .sim-action-list button{background:#202b3a!important;border-color:#354255!important;color:#dce4ef!important}
html.theme-dark .sim-control{border-color:#303b4c!important}
html.theme-dark .sim-compose{background:#1a222e!important}
html.theme-dark .sim-server-rail{background:#141b26!important}
html.theme-dark .sim-channel-rail{background:#1a222e!important}
html.theme-dark .sim-channel-head{background:#1a222e!important;color:#edf1f7!important}
html.theme-dark .sim-ann-preview{border-color:#3a4a64!important}
html.theme-dark .sim-ban-row{border-color:#354255!important}
html.theme-dark .tour-popover{box-shadow:0 18px 60px #0008!important}
html.theme-dark .demo-modal-close{color:#edf1f7!important}
html.theme-dark .tend-confirm-kicker,html.theme-dark .tend-confirm-info small{color:#aab4c3!important}
html.theme-dark .tend-confirm-profile{background:#202b3a!important;border-color:#354255!important}
html.theme-dark .tend-confirm-info strong{color:#edf1f7!important}
html.theme-dark .tend-confirm-desc{color:#aab4c3!important}
html.theme-dark .toast{background:#e8edf5!important;color:#171b24!important}
html.theme-dark .modal-backdrop{background:#05080dcc!important}
html.theme-dark .admin-panel{background:linear-gradient(180deg,#182130,#10151e)!important;border-color:#303b4c!important}
html.theme-dark .admin-table-wrap{background:#1a222e!important;border-color:#303b4c!important}
html.theme-dark .tend-log-row{border-color:#303b4c!important}
html.theme-dark .tend-log-row b{color:#edf1f7!important}
html.theme-dark .tend-log-row small{color:#aab4c3!important}
html.theme-dark .tend-log-level{background:#263550!important;color:#a9c0ff!important}
html.theme-dark .tend-log-level.error,html.theme-dark .tend-log-level.critical{background:#42262b!important;color:#ffadb4!important}
html.theme-dark .tend-log-level.warning{background:#42351f!important;color:#f0c77a!important}
html.theme-dark nav{background:rgba(16,21,30,.94)!important;border-color:#303b4c!important}
html.theme-dark .navlinks,html.theme-dark .footer-links{color:#aab4c3!important}
html.theme-dark .hero{background:linear-gradient(180deg,#182130 0%,#10151e 100%)!important}
html.theme-dark .hero p,html.theme-dark .section-head p,html.theme-dark .feature p,html.theme-dark .price-desc,html.theme-dark .price-note,html.theme-dark .faq p,html.theme-dark .cta-box p{color:#aab4c3!important}
html.theme-dark :is(.dashboard,.feature,.price-card,.faq,.trust,footer,.modal){background:#1a222e!important;border-color:#303b4c!important;color:#edf1f7!important}
html.theme-dark :is(.dash-top,.dash-bottom,.metric,.faq button){background:#222d3d!important;border-color:#354255!important;color:#edf1f7!important}
html.theme-dark .metric span,html.theme-dark .activity-copy small,html.theme-dark .activity time,html.theme-dark .dash-bottom,html.theme-dark .trust-label,html.theme-dark .trust-item,html.theme-dark .price-features{color:#aab4c3!important}
html.theme-dark .activity{border-color:#303b4c!important}
html.theme-dark :is(.activity-icon,.feature-icon){background:#263550!important;color:#a9c0ff!important}
html.theme-dark .story-band{background:#182130!important;border-color:#303b4c!important}
html.theme-dark .story-stat{border-color:#303b4c!important}
html.theme-dark :is(.story-stat strong,.feature h3,.price-name,.faq button){color:#edf1f7!important}
html.theme-dark .cta-box{background:radial-gradient(circle at 15% 0%,#27344b 0%,#1b263a 58%,#182236 100%)!important;border-color:#34445f!important}
html.theme-dark .admin-table-wrap{background:#1a222e!important;border-color:#303b4c!important}
html.theme-dark .copyright{color:#8792a3!important}
html.theme-dark [style*="background:#fff"],html.theme-dark [style*="background: #fff"],html.theme-dark [style*="background-color:#fff"],html.theme-dark [style*="background-color: #fff"],html.theme-dark [style*="background:white"],html.theme-dark [style*="background: white"]{background-color:#1a222e!important;color:#edf1f7!important;border-color:#303b4c!important}
html.theme-dark hr{border-color:#303b4c!important}
html.theme-dark ::selection{background:#365b99;color:#fff}
.theme-toggle{white-space:nowrap}
@media(max-width:560px){.topbar-actions .theme-toggle{padding:9px 10px;font-size:11px}.topbar-actions .theme-toggle span{display:none}}

/* Dark theme component normalization */
html.theme-dark :is(button,[role="button"],[role="tab"]):not(.btn-blue):not(.btn-danger):not(.tend-logout-yes):not(.logout-confirm-danger):not(.switch){background-color:#263142!important;border-color:#3a4659!important;color:#e7edf6!important;box-shadow:none!important}
html.theme-dark :is(.btn-dark,.btn-light,.theme-toggle,.mobile-menu,.demo-modal-close){background:#263142!important;border:1px solid #3a4659!important;color:#edf1f7!important}
html.theme-dark :is(.btn-blue,.login-discord,.hero-actions .btn-blue,.price-card .btn-blue){background:#356df3!important;border-color:#356df3!important;color:#fff!important}
html.theme-dark :is(.btn-danger,.tend-logout-yes){background:#7b3039!important;border-color:#99434d!important;color:#fff!important}
html.theme-dark :is(.btn-blue:hover,.login-discord:hover){background:#285bd0!important}
html.theme-dark :is(.btn-dark:hover,.btn-light:hover,.theme-toggle:hover,.mobile-menu:hover){background:#334156!important}
html.theme-dark :is(.bot-tab,.tutorial-steps button,.sim-tabs button,.faq button,.modal-actions button,.support-chat-head-actions button,.support-new-actions button,.support-ticket-item button,.filter-row button,.tab-button){background:#222d3d!important;border-color:#354255!important;color:#dce4ef!important}
html.theme-dark :is(.bot-tab.active,.tutorial-steps button.active,.sim-tabs button.active,.faq.open button,.tab-button.active){background:#263b5d!important;border-color:#496a9f!important;color:#b8ccff!important}
html.theme-dark :is(.bot-panel,.feature-setting-card,.feature-editor,.section-intro,.support-chat-inner,.support-admin-list,.support-new-box,.payment-panel,.price-card,.toolkit-card,.principle-list,.faq,.feature,.trust,.story-band,.admin-panel,.admin-table-wrap,.sim-window,.sim-control,.demo-modal,.tour-popover,.modal,.modal-content,.logout-confirm-modal){background:#1a222e!important;border-color:#303b4c!important;color:#edf1f7!important}
html.theme-dark :is(.bot-panel p,.section-intro p,.feature-setting-card p,.feature-editor p,.toolkit-card p,.faq p,.modal p,.modal label,.field label,.field span,.support-new-heading p,.support-chat-empty p,.support-ticket-item small,.payment-panel p,.price-desc,.price-note,.price-features,.principle-list p){color:#aab4c3!important}
html.theme-dark :is(.bot-tabs,.tutorial-steps,.support-ticket-list,.support-layout,.support-chat-view,.support-message-list,.feature-editor-fields,.form-grid,.quick-links){background:transparent!important}
html.theme-dark :is(.setting-row,.feature-setting-row,.feature-editor-row,.support-ticket-item,.support-closed-note,.bank-row,.payment-summary,.quick-links a,.admin-table tbody tr,.data-table tbody tr){background:#202b3a!important;border-color:#354255!important;color:#e5ebf4!important}
html.theme-dark :is(.field input,.field select,.field textarea,.control,input,select,textarea,.status-select,.data-table select,.support-reply-form textarea,.support-new-box input,.support-new-box textarea,.review-reason){background:#111821!important;border-color:#3a4659!important;color:#edf1f7!important;accent-color:#6f96ff}
html.theme-dark select option{background:#1a222e!important;color:#edf1f7!important}
html.theme-dark :is(.switch,.toggle,.feature-switch){background:#465267!important}
html.theme-dark :is(.switch:checked,.toggle:checked,.feature-switch:checked){background:#356df3!important}
html.theme-dark :is(.switch:before,.toggle:before){background:#f5f7fb!important}
html.theme-dark :is(.bot-tabs,.support-chat-head,.support-reply-form,.support-new-heading,.card-head,.topbar,.page-head,.setting-row,.feature-setting-head,.feature-editor>header){border-color:#303b4c!important}
html.theme-dark :is(.data-table th,.admin-table th){background:#222d3d!important;color:#b8c3d3!important}
html.theme-dark :is(.data-table td,.admin-table td){background:transparent!important;color:#d0d8e4!important}
html.theme-dark :is(.data-table tbody tr:hover,.admin-table tbody tr:hover){background:#263142!important}
html.theme-dark :is(.price-card.featured,.popular){background:#202e43!important;border-color:#496a9f!important}
html.theme-dark .popular{color:#b8ccff!important}
html.theme-dark .check-list li{color:#cbd5e2!important}
html.theme-dark .logout-confirm-modal .modal-actions .btn-light{background:#263142!important;color:#edf1f7!important}
html.theme-dark [style*="background:#fff"],html.theme-dark [style*="background: #fff"],html.theme-dark [style*="background-color:#fff"],html.theme-dark [style*="background-color: #fff"],html.theme-dark [style*="background:white"],html.theme-dark [style*="background: white"],html.theme-dark [style*="background:#ffffff"],html.theme-dark [style*="background: #ffffff"]{background-color:#1a222e!important;border-color:#303b4c!important}
html.theme-dark [style*="color:#171"],html.theme-dark [style*="color: #171"],html.theme-dark [style*="color:#202"],html.theme-dark [style*="color: #202"]{color:#edf1f7!important}


/* Dark mode: convert pale blue surfaces to dark navy */
html.theme-dark :is(.bg-blue-50,.bg-blue-100,.bg-sky-50,.bg-sky-100,.bg-indigo-50,.bg-indigo-100,.bg-primary-light,.blue-bg,.blue-panel,.info-box,.info-card,.info-panel,.notice.info,.notice.blue,.alert-info,.callout-info,.hint-box,.tip-box,.selected-card,.selected-row){
  background:#202b3a!important;
  border-color:#35465f!important;
  color:#dce6f5!important;
}
html.theme-dark :is(.bg-blue-50,.bg-blue-100,.bg-sky-50,.bg-sky-100,.bg-indigo-50,.bg-indigo-100,.bg-primary-light,.blue-bg,.blue-panel,.info-box,.info-card,.info-panel,.notice.info,.notice.blue,.alert-info,.callout-info,.hint-box,.tip-box,.selected-card,.selected-row) :is(p,span,small,strong,b,label){
  color:inherit!important;
}
html.theme-dark [style*="background:#eff"],html.theme-dark [style*="background: #eff"],
html.theme-dark [style*="background-color:#eff"],html.theme-dark [style*="background-color: #eff"],
html.theme-dark [style*="background:#eef"],html.theme-dark [style*="background: #eef"],
html.theme-dark [style*="background-color:#eef"],html.theme-dark [style*="background-color: #eef"],
html.theme-dark [style*="background:#eaf"],html.theme-dark [style*="background: #eaf"],
html.theme-dark [style*="background-color:#eaf"],html.theme-dark [style*="background-color: #eaf"],
html.theme-dark [style*="background:#e8f"],html.theme-dark [style*="background: #e8f"],
html.theme-dark [style*="background-color:#e8f"],html.theme-dark [style*="background-color: #e8f"],
html.theme-dark [style*="background:#dbeafe"],html.theme-dark [style*="background: #dbeafe"],
html.theme-dark [style*="background-color:#dbeafe"],html.theme-dark [style*="background-color: #dbeafe"],
html.theme-dark [style*="background:#e0f2fe"],html.theme-dark [style*="background: #e0f2fe"],
html.theme-dark [style*="background-color:#e0f2fe"],html.theme-dark [style*="background-color: #e0f2fe"],
html.theme-dark [style*="background:#e0e7ff"],html.theme-dark [style*="background: #e0e7ff"],
html.theme-dark [style*="background-color:#e0e7ff"],html.theme-dark [style*="background-color: #e0e7ff"]{
  background:#202b3a!important;
  border-color:#35465f!important;
  color:#dce6f5!important;
}
html.theme-dark :is(.text-blue-900,.text-blue-800,.text-sky-900,.text-indigo-900){
  color:#c4d6f5!important;
}
html.theme-dark :is(.border-blue-100,.border-blue-200,.border-sky-100,.border-indigo-100){
  border-color:#35465f!important;
}


/* Homepage dashboard preview dark theme */
html.theme-dark .dashboard{
  background:#1a222e!important;
  border-color:#303b4c!important;
  color:#edf1f7!important;
  box-shadow:0 30px 85px rgba(0,0,0,.32)!important;
}
html.theme-dark .dashboard .dash-top{
  background:#1a222e!important;
  border-color:#303b4c!important;
}
html.theme-dark .dashboard .dash-state{
  background:#263550!important;
  color:#b8ccff!important;
}
html.theme-dark .dashboard .server-icon{
  background:#263550!important;
  color:#a9c0ff!important;
}
html.theme-dark .dashboard .server-head strong,
html.theme-dark .dashboard .activity-copy strong{
  color:#edf1f7!important;
}
html.theme-dark .dashboard .server-head small,
html.theme-dark .dashboard .section-label{
  color:#aab4c3!important;
}
html.theme-dark .dashboard .metric{
  background:#202b3a!important;
  border-color:#354255!important;
}
html.theme-dark .dashboard .metric span,
html.theme-dark .dashboard .activity-copy small,
html.theme-dark .dashboard .activity time{
  color:#aab4c3!important;
}
html.theme-dark .dashboard .activity{
  border-color:#303b4c!important;
}
html.theme-dark .dashboard .activity-icon{
  background:#263550!important;
  color:#a9c0ff!important;
}
html.theme-dark .dashboard .dash-bottom{
  background:#151c27!important;
  border-color:#303b4c!important;
  color:#aab4c3!important;
}


/* Homepage content sections: dark theme */
html.theme-dark .toolkit{
  background:linear-gradient(180deg,#151d29 0%,#10151e 100%)!important;
}
html.theme-dark .toolkit .section-head h2,
html.theme-dark .content .section-head h2,
html.theme-dark .workflow-step h3,
html.theme-dark .toolkit-card h3,
html.theme-dark .usecase b{
  color:#edf1f7!important;
}
html.theme-dark .toolkit .section-head p,
html.theme-dark .content .section-head p,
html.theme-dark .workflow-step p,
html.theme-dark .toolkit-card p,
html.theme-dark .usecase p{
  color:#aab4c3!important;
}
html.theme-dark .toolkit-card,
html.theme-dark .usecase{
  background:#1a222e!important;
  border-color:#303b4c!important;
  color:#edf1f7!important;
  box-shadow:0 12px 35px rgba(0,0,0,.16)!important;
}
html.theme-dark .toolkit-card:after{
  background:radial-gradient(circle,rgba(70,103,163,.2),transparent 70%)!important;
}
html.theme-dark .toolkit-tags span{
  background:#263142!important;
  color:#cbd5e2!important;
  border:1px solid #354255!important;
}
html.theme-dark .workflow-index{
  background:#202b3a!important;
  border-color:#3a4b66!important;
  color:#a9c0ff!important;
}
html.theme-dark .workflow-step:not(:last-child):after{
  background:#354255!important;
}
html.theme-dark .content{
  background:#10151e!important;
  color:#edf1f7!important;
}


/* Legal and policy pages dark theme */
html.theme-dark body:has(.legal-wrap){background:#11151d!important;color:#edf1f7!important}
html.theme-dark body:has(.legal-wrap)>header{
  background:#171e29!important;
  border-color:#303b4c!important;
}
html.theme-dark .legal-wrap .legal-head h1,
html.theme-dark .legal-wrap .legal-section h2,
html.theme-dark .legal-wrap .legal-section h3{
  color:#edf1f7!important;
}
html.theme-dark .legal-wrap .legal-head p,
html.theme-dark .legal-wrap .legal-section p,
html.theme-dark .legal-wrap .legal-section li{
  color:#b7c1cf!important;
}
html.theme-dark .legal-wrap .legal-nav a{
  background:#202b3a!important;
  border-color:#354255!important;
  color:#dce6f5!important;
}
html.theme-dark .legal-wrap .legal-nav a:hover{
  background:#293951!important;
  border-color:#49658f!important;
}
html.theme-dark .legal-wrap .legal-section{
  background:#1a222e!important;
  border-color:#303b4c!important;
  color:#edf1f7!important;
  box-shadow:0 12px 32px rgba(0,0,0,.14)!important;
}
html.theme-dark .legal-wrap .legal-section .date{
  color:#8996a8!important;
}
html.theme-dark .legal-wrap .legal-table th,
html.theme-dark .legal-wrap .legal-table td{
  background:#1d2735!important;
  border-color:#354255!important;
  color:#cbd5e2!important;
}
html.theme-dark .legal-wrap .legal-table th{
  background:#263142!important;
  color:#edf1f7!important;
}
html.theme-dark .legal-wrap .legal-alert{
  background:#332b1d!important;
  border-color:#66502b!important;
  color:#f0d9a8!important;
}
html.theme-dark .legal-wrap .legal-footer{
  border-color:#303b4c!important;
  color:#8996a8!important;
}
html.theme-dark .legal-wrap .legal-footer a,
html.theme-dark .legal-wrap .legal-head>div{
  color:#9eb7ff!important;
}


/* Dark mode: keep meaningful red and blue accents */
html.theme-dark :is(.text-blue,.text-primary,.text-link,.link-primary,.accent-blue,.status-blue,.icon-blue,.blue-accent){
  color:#78a5ff!important;
}
html.theme-dark :is(.text-red,.text-danger,.text-error,.accent-red,.status-red,.icon-red,.red-accent){
  color:#ff858e!important;
}
html.theme-dark :is(.text-blue-500,.text-blue-600,.text-blue-700,.text-indigo-500,.text-indigo-600,.text-sky-500){
  color:#78a5ff!important;
}
html.theme-dark :is(.text-red-500,.text-red-600,.text-red-700,.text-rose-500,.text-rose-600){
  color:#ff858e!important;
}
html.theme-dark :is(.bg-blue-500,.bg-blue-600,.bg-primary,.btn-primary,.btn-accent,.button-primary){
  background:#2855a8!important;
  border-color:#3f70c9!important;
  color:#fff!important;
}
html.theme-dark :is(.bg-red-500,.bg-red-600,.bg-danger,.btn-red,.button-danger,.btn-outline-danger){
  background:#762f39!important;
  border-color:#a34a56!important;
  color:#fff!important;
}
html.theme-dark :is(.border-blue-400,.border-blue-500,.border-primary){
  border-color:#456fb6!important;
}
html.theme-dark :is(.border-red-400,.border-red-500,.border-danger){
  border-color:#94434d!important;
}
html.theme-dark :is(.badge.red,.badge.danger,.status-badge.rejected,.status-badge.error){
  background:#48262d!important;
  border-color:#75404a!important;
  color:#ff9da5!important;
}
html.theme-dark :is(.badge.blue,.status-badge.active,.status-badge.approved){
  background:#243b60!important;
  border-color:#3b5c91!important;
  color:#a9c7ff!important;
}
html.theme-dark :is(.btn-blue,.login-discord,.hero-actions .btn-blue,.price-card .btn-blue){
  background:#285bd0!important;
  border-color:#4679e5!important;
  color:#fff!important;
}
html.theme-dark :is(.btn-danger,.tend-logout-yes){
  background:#762f39!important;
  border-color:#a34a56!important;
  color:#fff!important;
}


/* Logout confirmation: keep the destructive action clearly red */
.logout-confirm-modal .logout-confirm-danger{background:#e5484d!important;border:1px solid #e5484d!important;color:#fff!important}
.logout-confirm-modal .logout-confirm-danger:hover{background:#d9363e!important;border-color:#d9363e!important}
html.theme-dark .logout-confirm-modal .logout-confirm-danger{background:#762f39!important;border-color:#a34a56!important;color:#fff!important}
html.theme-dark .logout-confirm-modal .logout-confirm-danger:hover{background:#8a3944!important;border-color:#b65a65!important}


/* TEND dark-mode form and payment normalization */
html.theme-dark :is(input,select,textarea,button,[contenteditable="true"],[role="textbox"]){color-scheme:dark;}
html.theme-dark :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.field input,.field select,.field textarea,.control,.status-select,.review-reason,.feature-editor-fields input,.feature-editor-fields select,.feature-editor-fields textarea,.tutorial-fields input,.support-new-box input,.support-new-box textarea,.support-reply-form textarea){
  background-color:#111821!important;
  color:#edf1f7!important;
  border-color:#3a4659!important;
  caret-color:#edf1f7!important;
  -webkit-text-fill-color:#edf1f7!important;
  color-scheme:dark;
}
html.theme-dark :is(input,textarea)::placeholder{color:#8995a7!important;opacity:1!important;-webkit-text-fill-color:#8995a7!important;}
html.theme-dark select option{background-color:#1a222e!important;color:#edf1f7!important;}
html.theme-dark input:-webkit-autofill,
html.theme-dark input:-webkit-autofill:hover,
html.theme-dark input:-webkit-autofill:focus,
html.theme-dark textarea:-webkit-autofill,
html.theme-dark select:-webkit-autofill{
  -webkit-text-fill-color:#edf1f7!important;
  -webkit-box-shadow:0 0 0 1000px #111821 inset!important;
  box-shadow:0 0 0 1000px #111821 inset!important;
  caret-color:#edf1f7!important;
  transition:background-color 99999s ease-out 0s;
}
html.theme-dark :is(.bank-row,.payment-summary){background:#202b3a!important;border:1px solid #354255!important;color:#edf1f7!important;}
html.theme-dark :is(.bank-row,.payment-summary) :is(span,small){color:#aab4c3!important;}
html.theme-dark :is(.bank-row,.payment-summary) strong{color:#edf1f7!important;}
html.theme-dark :is(.payment-panel,.payment-panel .payment-title){background:#1a222e!important;border-color:#303b4c!important;color:#edf1f7!important;}
html.theme-dark :is(input,select,textarea):focus{border-color:#6f96ff!important;outline-color:#6f96ff!important;box-shadow:0 0 0 3px rgba(111,150,255,.14)!important;}
html.theme-dark :is(input,select,textarea):disabled{background:#202b3a!important;color:#8995a7!important;-webkit-text-fill-color:#8995a7!important;opacity:1!important;}

/* Homepage introduction: readable dark-mode copy and surfaces */
html.theme-dark .toolkit{
  background:linear-gradient(180deg,#141c29 0%,#10151e 100%)!important;
}
html.theme-dark .toolkit-card,
html.theme-dark .usecase{
  background:#1a222e!important;
  border-color:#303b4c!important;
  color:#edf1f7!important;
}
html.theme-dark .toolkit-card h3,
html.theme-dark .usecase b,
html.theme-dark .workflow-step h3{
  color:#edf1f7!important;
}
html.theme-dark .toolkit-card p,
html.theme-dark .usecase p,
html.theme-dark .workflow-step p,
html.theme-dark .story-stat span{
  color:#b6c1d0!important;
}
html.theme-dark .toolkit-tags span{
  background:#263142!important;
  color:#cbd5e2!important;
}
html.theme-dark .workflow-step-index,
html.theme-dark .workflow-index{
  background:#202d42!important;
  border-color:#3a4d6b!important;
  color:#a9c0ff!important;
}
html.theme-dark .workflow-step:not(:last-child):after{
  background:#354255!important;
}
html.theme-dark .story-step{
  background:#1a222e!important;
  border-color:#303b4c!important;
}
html.theme-dark .story-step h3{
  color:#f0f4fa!important;
}
html.theme-dark .story-step p{
  color:#b6c1d0!important;
}
html.theme-dark .story-step:not(.is-active){
  opacity:.78!important;
}
html.theme-dark .story-step.is-active{
  opacity:1!important;
  border-color:#496a9f!important;
}
html.theme-dark .story-step-no,
html.theme-dark .story-step-hint{
  color:#a9c0ff!important;
}
html.theme-dark .story-visual-label{
  color:#c4cfdd!important;
}
html.theme-dark .story-demo-tag{
  background:#263142!important;
  color:#cbd5e2!important;
}
html.theme-dark .hero-note{
  color:#c0cad8!important;
}
html.theme-dark .hero-note:before{
  background:#60708a!important;
}
html.theme-dark .story-band .story-stat span{
  color:#b6c1d0!important;
}


/* Homepage scroll-story: blend step copy into the dark section */
html.theme-dark #product-showcase{
  background:#11151d!important;
  color:#edf1f7!important;
}
html.theme-dark #product-showcase .story-step{
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
html.theme-dark #product-showcase .story-step h3{
  color:#edf1f7!important;
}
html.theme-dark #product-showcase .story-step p{
  color:#aab3c2!important;
}
html.theme-dark #product-showcase .story-step-no,
html.theme-dark #product-showcase .story-step-hint{
  color:#9eb7ff!important;
}
@media(max-width:850px){
  html.theme-dark #product-showcase .story-step{
    background:#1a202b!important;
    border-color:#303949!important;
  }
  html.theme-dark #product-showcase .story-step.is-active{
    border-color:#496a9f!important;
  }
}


/* Server connection page: fix the light root canvas in dark mode */
html.theme-dark:has(body[data-page="servers"]){
  background:#11151d!important;
  color:#edf1f7!important;
  color-scheme:dark;
}
html.theme-dark body[data-page="servers"]{
  background:#11151d!important;
  color:#edf1f7!important;
}
html.theme-dark body[data-page="servers"] .main{
  background:transparent!important;
}
html.theme-dark body[data-page="servers"] .card{
  background:#1a202b!important;
  border-color:#303949!important;
  color:#edf1f7!important;
}
html.theme-dark body[data-page="servers"] .notice{
  background:#202b3a!important;
  border-color:#35465f!important;
  color:#cbd8ea!important;
}
html.theme-dark body[data-page="servers"] .empty{
  color:#aab3c2!important;
}


/* Homepage server-screen mockup: dark surfaces must cover the whole preview */
html.theme-dark .showcase-window{
  background:#151b25!important;
  border-color:#303949!important;
}
html.theme-dark .showcase-browserbar{
  background:#1a202b!important;
  border-color:#303949!important;
}
html.theme-dark .showcase-browserbar span{
  background:#111720!important;
  border-color:#394457!important;
  color:#aab3c2!important;
}
html.theme-dark .showcase-app{
  background:#151b25!important;
  color:#edf1f7!important;
}
html.theme-dark .showcase-rail{
  background:#171e29!important;
  border-color:#303949!important;
}
html.theme-dark .showcase-rail-icon{
  background:#202837!important;
  border-color:#394457!important;
  color:#aab3c2!important;
}
html.theme-dark .showcase-rail-icon.active{
  background:#263550!important;
  border-color:#49618b!important;
  color:#a9c0ff!important;
}
html.theme-dark .showcase-serverlist{
  background:#1a202b!important;
  border-color:#303949!important;
  color:#edf1f7!important;
}
html.theme-dark .showcase-main{
  background:#151b25!important;
  color:#edf1f7!important;
}
html.theme-dark .showcase-main-top{
  background:transparent!important;
  border-color:#303949!important;
  color:#edf1f7!important;
}
html.theme-dark .showcase-server-card,
html.theme-dark .showcase-metric{
  background:#202837!important;
  border-color:#303949!important;
  color:#edf1f7!important;
}
html.theme-dark .showcase-metric small,
html.theme-dark .showcase-server-card small{
  color:#aab3c2!important;
}
html.theme-dark .showcase-table th{
  background:#202837!important;
  color:#aab3c2!important;
}
html.theme-dark .showcase-table td{
  background:transparent!important;
  border-color:#303949!important;
  color:#c7cfdb!important;
}
html.theme-dark .showcase-panel-title{
  color:#edf1f7!important;
}
html.theme-dark .showcase-panel-title span{
  color:#9eb7ff!important;
}
html.theme-dark .showcase-navitem{
  color:#aab3c2!important;
}
html.theme-dark .showcase-navitem.active{
  background:#263550!important;
  color:#a9c0ff!important;
}
html.theme-dark .showcase-notice{
  background:#202837!important;
  border-color:#394457!important;
}
html.theme-dark .showcase-notice p{
  color:#aab3c2!important;
}
