/* V50 fixes: readable controls, scoped page layouts and local SVG icons. */
:root{--dn-primary:#2563eb;--dn-success:#15803d;--dn-danger:#dc2626;--dn-warning:#b45309;--dn-purple:#7c3aed;--dn-info:#0369a1}
body[data-dn-ui] .dn-top-nav{scrollbar-width:none!important;-ms-overflow-style:none}
body[data-dn-ui] .dn-top-nav::-webkit-scrollbar{display:none!important;height:0!important}
body[data-dn-ui] .dn-top-nav>a.is-active{color:#1d4ed8!important;border-bottom-color:#2563eb!important}
body[data-dn-ui] .dn-top-nav>a>i{color:inherit!important}
body[data-dn-ui] .dn-page-heading>div{min-width:0}body[data-dn-ui] .dn-page-heading p{overflow-wrap:anywhere}
body[data-dn-ui] .dn-server-status[data-status=online]{background:#f0fdf4!important;color:#15803d!important;border-color:#bbf7d0!important}
body[data-dn-ui] .dn-server-status[data-status=online]>span{background:#16a34a}
body[data-dn-ui] .dn-server-status[data-status=maintenance]{background:#fffbeb!important;color:#a16207!important;border-color:#fde68a!important}
body[data-dn-ui] .dn-server-status[data-status=maintenance]>span{background:#d97706}
body[data-dn-ui] .dn-server-status[data-status=offline]{background:#fef2f2!important;color:#b91c1c!important;border-color:#fecaca!important}
body[data-dn-ui] .dn-server-status[data-status=offline]>span{background:#dc2626}
body[data-dn-ui] :is(.dn43-primary,.dn37-primary,.btn-primary,.btn-main,.macos-save-button,.app-action-btn.primary,.dn-download-save,.mobile-create-submit,button[type=submit]){background:#2563eb!important;border-color:#2563eb!important;color:white!important;box-shadow:none!important}
body[data-dn-ui] :is(.dn43-primary,.dn37-primary,.btn-primary,.btn-main,.macos-save-button):hover{background:#1d4ed8!important}
body[data-dn-ui] :is(button,a,label)[data-ui-tone]{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--action-border,#dbeafe)!important;background:var(--action-bg,#eff6ff)!important;color:var(--action-text,#1d4ed8)!important;border-radius:9px;min-height:39px;padding:9px 12px;font-weight:600;font-size:12px;line-height:1.4;text-align:center;box-shadow:none!important;text-decoration:none}
body[data-dn-ui] [data-ui-tone=primary]{--action-bg:#2563eb;--action-border:#2563eb;--action-text:#fff}
body[data-dn-ui] [data-ui-tone=success]{--action-bg:#f0fdf4;--action-border:#bbf7d0;--action-text:#15803d}
body[data-dn-ui] [data-ui-tone=danger]{--action-bg:#fef2f2;--action-border:#fecaca;--action-text:#b91c1c}
body[data-dn-ui] [data-ui-tone=warning]{--action-bg:#fffbeb;--action-border:#fde68a;--action-text:#a16207}
body[data-dn-ui] [data-ui-tone=purple]{--action-bg:#f5f3ff;--action-border:#ddd6fe;--action-text:#6d28d9}
body[data-dn-ui] [data-ui-tone=info]{--action-bg:#f0f9ff;--action-border:#bae6fd;--action-text:#0369a1}
body[data-dn-ui] [data-ui-tone=neutral]{--action-bg:#f5f5f5;--action-border:#e5e5e5;--action-text:#525252}
body[data-dn-ui] [data-ui-tone]>:is(i,span){color:inherit!important}
body[data-dn-ui] :is(button,a,label)[data-ui-tone]:hover{filter:brightness(.97);transform:none!important}
body[data-dn-ui] :is(button,a,label)[data-ui-tone]:disabled{opacity:.55;cursor:wait}
body[data-dn-ui] .dn45-stat[data-tone=active] .dn45-stat-number{color:#15803d}
body[data-dn-ui] .dn45-stat[data-tone=stock] .dn45-stat-number{color:#0369a1}
body[data-dn-ui] .dn45-stat[data-tone=expired] .dn45-stat-number{color:#b45309}
body[data-dn-ui] .dn45-stat[data-tone=banned] .dn45-stat-number{color:#dc2626}
body[data-dn-ui] #keysContainer span[class*="bg-green-"]{color:#15803d!important;background:#f0fdf4!important;border-color:#bbf7d0!important}
body[data-dn-ui] #keysContainer span[class*="bg-sky-"]{color:#0369a1!important;background:#f0f9ff!important;border-color:#bae6fd!important}
body[data-dn-ui] #keysContainer span[class*="bg-orange-"]{color:#b45309!important;background:#fffbeb!important;border-color:#fde68a!important}
body[data-dn-ui] #keysContainer span[class*="bg-red-"]{color:#b91c1c!important;background:#fef2f2!important;border-color:#fecaca!important}
body[data-dn-ui] .dn-key-check.is-checked{background:#2563eb!important;border-color:#2563eb!important}
body[data-dn-ui] .dn45-stat[aria-pressed=true]{border-color:#93c5fd;background:#f8fbff}
body[data-dn-ui] .dn45-stat[aria-pressed=true] .dn45-stat-dot{background:#2563eb}
body[data-dn-ui] .dn-key-toolbar-row{display:flex!important;flex-direction:row!important;align-items:center;gap:12px!important;justify-content:space-between}
body[data-dn-ui] .dn-key-search{max-width:520px;min-width:0;flex:1}.dn-create-key-trigger{flex-shrink:0}
body[data-dn-ui] #createKeyModal>[data-modal-content]{width:min(100%,740px);max-width:740px;padding:0!important;overflow-y:auto!important}
.dn-create-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:24px;border-bottom:1px solid #e7e7e7}
.dn-modal-eyebrow{font-size:9px;letter-spacing:1.2px;color:#888}.dn-create-modal-head h3{font-size:21px!important;margin:6px 0}.dn-create-modal-head p{font-size:12px;color:#888;margin:0}
.dn-modal-close{display:flex;align-items:center;justify-content:center;background:#f5f5f5;border:1px solid #e5e5e5;border-radius:8px;width:34px;height:34px;flex:none;color:#666}
body[data-dn-ui] .dn-create-modal-form{padding:24px;border:0;border-radius:0;background:white;margin:0}
body[data-dn-ui] .dn-create-modal-form .dn43-create-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}
body[data-dn-ui] .dn-create-modal-form .dn43-field-key,body[data-dn-ui] .dn-create-modal-form .dn43-field:last-child{grid-column:1/-1}
body[data-dn-ui] .dn-create-modal-form .dn43-field{font-size:12px;gap:8px}
body[data-dn-ui] .dn-create-modal-form .dn43-field:nth-child(2){grid-column:auto}
.dn-create-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:24px;padding-top:18px;border-top:1px solid #eee}
body[data-dn-ui] .dn-create-modal-form .dn43-presets{margin-top:20px}.dn-key-tools-body{display:flex;gap:8px;padding:0 16px 16px;flex-wrap:wrap}.dn-key-tools-body>form{width:100%;max-width:620px}
/* Library cards have labels as well as icons, and their edit window has its own spacing. */
body[data-dn-ui] .file-library-card{min-width:0;padding:20px!important}
body[data-dn-ui] .file-card-icon{background:#f5f3ff!important;color:#7c3aed!important;width:42px!important;height:42px!important}
body[data-dn-ui] .file-card-icon i{color:inherit!important;font-size:19px}
body[data-dn-ui] :is(.library-badge,.library-default-chip,.library-state-chip){display:inline-flex;align-items:center;gap:4px;font-size:9px;line-height:1.4;border:1px solid #ddd6fe;border-radius:5px;padding:3px 6px;background:#f5f3ff!important;color:#6d28d9!important;font-weight:600}
body[data-dn-ui] .library-default-chip{background:#fffbeb!important;color:#a16207!important;border-color:#fde68a}
body[data-dn-ui] .library-state-chip.is-enabled{background:#f0fdf4!important;color:#15803d!important;border-color:#bbf7d0}
body[data-dn-ui] .library-state-chip.is-disabled{background:#f5f5f5!important;color:#888!important;border-color:#e5e5e5}
.library-description{font-size:12px;color:#666;margin:10px 0;line-height:1.8;overflow-wrap:anywhere}
.file-card-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:18px;padding-top:15px;border-top:1px solid #eee}.file-card-actions>*{flex:1 1 105px}
body[data-dn-ui] .file-card-actions :is(a,button){font-size:11px;min-height:39px;padding:8px 9px}
body[data-dn-ui] .files-empty-state{grid-column:1/-1;padding:38px 22px!important;text-align:center}.files-empty-state h3{font-size:16px;margin:13px 0 7px}.files-empty-state p{font-size:12px;color:#888}.files-empty-icon{font-size:27px;color:#8b5cf6}
body[data-dn-ui] #file-upload-bar{background:#2563eb!important;min-height:5px}.files-toolbar-actions{align-items:center}
body[data-dn-ui] #libraryMetaModal>.library-meta-panel{width:min(100%,620px);max-width:620px;padding:0!important}
.library-meta-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:22px;border-bottom:1px solid #eee}.library-meta-head h3{margin:0;font-size:17px!important}.library-meta-head p{max-width:440px;overflow-wrap:anywhere;white-space:normal}
.library-meta-close{border:1px solid #ddd;border-radius:8px;background:#f5f5f5;display:flex;align-items:center;justify-content:center;width:33px;height:33px;flex:none;color:#666}
.library-meta-body{padding:22px}.library-meta-label{display:block;margin-bottom:6px;font-size:12px;color:#666}.library-meta-body>div{margin-bottom:16px}.library-meta-body input:not([type=checkbox]),.library-meta-body textarea{width:100%}
.library-meta-body>.grid:has(#library-meta-sort-order){grid-template-columns:110px minmax(0,1fr);align-items:center;gap:15px}
.library-enabled-control{display:flex;align-items:center;gap:10px;border:1px solid #dbeafe;background:#f8fbff;border-radius:10px;padding:12px;min-height:70px}
.library-enabled-control strong{display:block;font-size:11px;color:#1d4ed8}.library-enabled-control small{display:block;font-size:10px;margin-top:4px;color:#888}.library-enabled-switch{display:none}
/* Rebuilt app settings, without inherited floating-window grid or sticky black footer. */
body[data-dn-ui] #appSettingsModal>.dn50-app-panel{padding:24px!important;width:100%;max-width:none}
body[data-dn-ui] #appSettingsModal .dn50-app-heading{display:flex!important;align-items:center!important;gap:13px!important;grid-template-columns:none!important;margin:0!important;padding:0 0 20px!important;background:none!important}
.dn50-app-heading>div{min-width:0;flex:1}.dn50-app-heading h2{font-size:17px;margin:0 0 6px}.dn50-app-heading p{font-size:12px;margin:0;color:#888;white-space:normal;word-break:normal;overflow-wrap:break-word}
.dn50-section-icon{display:flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;background:#eff6ff;color:#2563eb;border-radius:12px;font-size:20px}
body[data-dn-ui] #appSettingsModal .app-settings-tabs{margin:0 0 15px!important;padding:15px 0!important;gap:8px!important}
body[data-dn-ui] #appSettingsModal .app-settings-tab-btn{display:inline-flex;align-items:center;gap:7px;flex:none;min-width:110px;justify-content:center;padding:10px 14px!important;min-height:40px;border:1px solid transparent!important}
body[data-dn-ui] #appSettingsModal .app-settings-tab-btn.active{background:#eff6ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important}
.dn50-load-state{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:20px;font-size:11px;color:#888}.dn50-load-state button{font-size:10px!important;min-height:33px!important;padding:6px 9px!important}
#appSettingsFields{border:0;padding:0;margin:0;min-width:0;width:100%}#appSettingsFields:disabled{opacity:.55}
body[data-dn-ui] #appSettingsModal .app-settings-body{margin:0;padding:0!important;overflow:visible!important;max-height:none!important}
body[data-dn-ui] #appSettingsModal .app-settings-section{background:#fff!important;border:1px solid #e5e7eb!important;padding:22px!important;border-radius:12px!important;margin:0 0 18px!important}
.app-settings-section>h3{display:flex;align-items:center;gap:8px;font-size:13px;margin:0 0 20px}.app-settings-section>h3 i{color:#2563eb}
.dn50-app-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.dn50-span-all{grid-column:1/-1}.dn50-field{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#555;min-width:0}.dn50-field input{width:100%;min-width:0}.dn50-field small,.dn50-field-help{font-size:10px;line-height:1.8;color:#999;margin:0}.dn50-field-help{margin-top:13px}
.dn50-image-editor{display:flex;align-items:center;gap:22px;margin-bottom:22px}.dn50-image-frame img{width:100%;height:100%;object-fit:contain;background:#fff}.dn50-check{display:flex;align-items:center;gap:9px;font-size:11px;margin-top:13px;color:#777}
body[data-dn-ui] #appSettingsModal .app-settings-actions{display:flex!important;position:static!important;align-items:center;justify-content:space-between;gap:16px;background:#fff!important;background-image:none!important;box-shadow:none!important;border-top:1px solid #e7e7e7;margin-top:22px;padding:19px 0 0!important;inset:auto!important;z-index:auto!important;width:auto!important}
.app-settings-actions>span{font-size:10px;color:#999}.app-settings-actions button{min-height:44px!important;padding:11px 20px!important}
.dn50-form-message{padding:12px 15px;border-radius:9px;font-size:12px;border:1px solid #bbf7d0;background:#f0fdf4;color:#15803d}.dn50-form-message[data-tone=danger]{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
.dn50-live-preview{border:1px solid #e5e7eb;border-radius:16px;padding:23px;max-width:480px;margin:20px auto;background:#f8fafc}.dn50-preview-top{display:flex;align-items:center;gap:13px;padding-bottom:22px}.dn50-preview-top strong{font-size:18px;overflow-wrap:anywhere}.dn50-preview-top small{display:block;font-size:10px;color:#999;margin-top:4px}.dn50-preview-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background:#e0e7ff;color:#4f46e5;border-radius:12px;overflow:hidden;flex:none}.dn50-preview-icon img{width:100%;height:100%;object-fit:contain}.dn50-preview-link{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:15px;margin-bottom:10px}.dn50-preview-link>i{color:#2563eb;font-size:18px}.dn50-preview-link>div{min-width:0}.dn50-preview-link strong{font-size:12px;display:block}.dn50-preview-link span{display:block;font-size:10px;color:#999;margin-top:4px;overflow-wrap:anywhere}
/* Account management fields and the pages shown in the screenshots. */
body[data-dn-ui] .users-body-v37{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;padding-top:20px}
.dn37-user-left,.dn37-user-right{min-width:0}.dn37-card{border:1px solid #e5e7eb;border-radius:12px;background:#fff;padding:20px;margin-bottom:18px}.dn37-section-title{font-size:13px;font-weight:600}.dn37-section-sub{font-size:11px;color:#999;margin-top:7px;line-height:1.8}.dn37-label{display:block;font-size:11px;color:#777;margin:0 0 7px}.dn37-field{display:block;width:100%;padding:10px 12px}.dn37-help{font-size:10px;color:#999}.dn37-code-format{display:flex;gap:7px;flex-wrap:wrap}.dn37-format-btn{background:#fff;border:1px solid #e5e7eb;border-radius:7px;padding:8px 10px;font-size:10px;color:#888}.dn37-format-btn.is-active{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}.dn37-secret-result{display:none;border:1px dashed #86efac;border-radius:10px;background:#f0fdf4;padding:14px;margin-top:15px}.dn37-secret-result.show{display:block}.dn37-secret-code{font-family:monospace;font-size:13px;overflow-wrap:anywhere}.dn37-permission-wrap{overflow-x:auto;width:100%;margin-top:16px}.dn37-permission-table{min-width:450px}.dn37-permission-table th,.dn37-permission-table td{padding:10px!important;font-size:10px!important}.dn37-yes{color:#15803d}.dn37-no{color:#aaa}.dn37-user-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.dn37-edit-btn,.dn37-delete-btn{padding:7px 11px;border-radius:7px;border:1px solid #ddd;background:#fff;font-size:11px}.dn37-edit-btn{color:#2563eb}.dn37-delete-btn{color:#dc2626}
body[data-dn-ui] .dn37-switch{position:relative;width:42px;height:24px;border-radius:20px;background:#d1d5db!important;display:block;flex:none}.dn37-switch input{position:absolute;opacity:0;width:1px!important;height:1px!important}.dn37-switch span{position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .15s}body[data-dn-ui] .dn37-switch:has(input:checked){background:#2563eb!important}.dn37-switch input:checked+span{transform:translateX(18px)}
body[data-dn-ui] .notice{background:#f0f9ff!important;border-color:#bae6fd!important;color:#475569!important}body[data-dn-ui] .notice :is(strong,b,.title){color:#0369a1!important}body[data-dn-ui] .helper-card .helper-title{color:#334155!important}body[data-dn-ui] .helper-card .helper-text{color:#64748b!important}
body[data-dn-ui] .key-value-display{background:#eff6ff!important;border:1px solid #bfdbfe!important;color:#1e40af!important;padding:16px;border-radius:10px}.key-value-display .key-value-text{color:#1e40af!important;overflow-wrap:anywhere;min-width:0}.key-value-display .btn-copy{background:#dbeafe!important;color:#1d4ed8!important;flex:none;border:1px solid #bfdbfe}.key-card-header .key-card-icon{color:#7c3aed!important;background:#f5f3ff!important}body[data-dn-ui] .feature-icon.green{color:#15803d!important;background:#f0fdf4!important}body[data-dn-ui] .feature-icon.rose{color:#e11d48!important;background:#fff1f2!important}.key-value-text{font-size:14px!important}
body[data-dn-ui] #logsContainer>div>div>div:first-child{background:#eff6ff!important;color:#2563eb!important}body[data-dn-ui] #logsContainer>div>div>div:first-child i{color:inherit!important}
body[data-dn-ui] .window-content .header-icon{color:#2563eb!important;background:#eff6ff!important}body[data-dn-ui] .window-content .header-icon i{background:none!important;color:#2563eb!important}
body[data-dn-ui] .telegram-domain-help{background:#f0f9ff!important;color:#0369a1!important;border-color:#bae6fd!important;line-height:1.8}
body[data-dn-ui] .telegram-domain-help code{background:#dbeafe!important;color:#1e40af!important}.domain-copy-btn{white-space:nowrap}
@media(max-width:900px){body[data-dn-ui] .users-body-v37{grid-template-columns:1fr}.dn37-user-right{order:2}.dn50-app-grid{grid-template-columns:1fr}.dn50-span-all{grid-column:auto}}
@media(max-width:767px){body[data-dn-ui] .dn-key-search{max-width:none}.dn-create-key-trigger>span{display:none}.dn-create-key-trigger{width:44px;min-width:44px;height:44px;padding:0!important;font-size:18px!important}body[data-dn-ui] #mobileCreateFab:not([hidden]){display:flex!important;position:fixed;right:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px));width:52px;height:52px;z-index:45;border-radius:50%;border:1px solid #1d4ed8;background:#2563eb!important;color:#fff!important;box-shadow:0 6px 18px #2563eb35}.dn-create-modal-head{padding:20px}.dn-create-modal-head h3{font-size:19px!important}.dn-create-modal-head p{font-size:11px;max-width:250px}.dn-create-modal-form{padding:20px!important}body[data-dn-ui] .dn-create-modal-form .dn43-create-grid{gap:14px}.dn-create-footer{margin-top:20px}.dn-create-footer>*{flex:1}.library-meta-head{padding:18px}.library-meta-body{padding:18px}.library-meta-head p{max-width:250px}.library-meta-body>.grid:has(#library-meta-sort-order){grid-template-columns:1fr}.library-enabled-control{min-height:0}.file-card-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.file-card-actions>*{min-width:0}.dn50-app-heading h2{font-size:15px}.dn50-app-heading p{font-size:11px;max-width:none}.dn50-section-icon{width:38px;height:38px;font-size:17px}body[data-dn-ui] #appSettingsModal>.dn50-app-panel{padding:18px!important}body[data-dn-ui] #appSettingsModal .app-settings-section{padding:17px!important}.dn50-image-frame{width:88px;height:88px}.dn50-app-grid{gap:16px}.app-settings-actions{flex-direction:column;align-items:stretch!important;gap:10px!important}.app-settings-actions>span{display:none}.app-settings-actions button{width:100%}.dn50-live-preview{padding:17px}.dn37-card{padding:16px}.dn37-form-grid{grid-template-columns:1fr}.dn37-user-actions{width:100%}.dn37-user-row{padding:13px!important}.dn37-permission-table{min-width:390px}.dn-page-heading h1{font-size:22px}.dn-server-status{margin-top:27px}.files-toolbar-actions{gap:7px}.files-toolbar-actions label{flex:0 0 auto}.files-search-wrap{flex:1 1 170px}.files-empty-state{padding:30px 18px!important}}
@media(prefers-reduced-motion:reduce){body[data-dn-ui] .dn37-switch span{transition:none}}
body[data-dn-ui] .dn37-chip.blue{color:#1d4ed8!important;background:#eff6ff!important;border-color:#bfdbfe!important}
body[data-dn-ui] .dn37-chip.green{color:#15803d!important;background:#f0fdf4!important;border-color:#bbf7d0!important}
body[data-dn-ui] .dn37-chip.red{color:#b91c1c!important;background:#fef2f2!important;border-color:#fecaca!important}
body[data-dn-ui] .dn37-chip.purple{color:#6d28d9!important;background:#f5f3ff!important;border-color:#ddd6fe!important}
body[data-dn-ui] input[type=checkbox],body[data-dn-ui] input[type=radio]{accent-color:#2563eb}
body[data-dn-ui] .dn37-switch:focus-within{outline:2px solid #2563eb;outline-offset:3px}
body[data-dn-ui] .dn37-format-btn.is-active{background:#eff6ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important}
body[data-dn-ui] .step-title{color:#171717!important}
body[data-dn-ui] .step-number{background:#2563eb!important;color:#fff!important}
body[data-dn-ui] .copy-btn{background:#eff6ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important}
/* V51: true red/off and green/on tracks; checkbox remains keyboard accessible. */
body[data-dn-ui] .dn51-switch,body[data-dn-ui] .dn37-switch{position:relative!important;display:inline-flex!important;align-items:center!important;width:44px!important;height:26px!important;min-width:44px;flex-shrink:0;border:0!important;border-radius:999px!important;background:#dc2626!important;cursor:pointer}
body[data-dn-ui] .dn51-switch>input,body[data-dn-ui] .dn37-switch>input{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;margin:0!important;opacity:0!important;cursor:pointer;z-index:2}
body[data-dn-ui] .dn51-switch>.dn51-switch-track{position:static!important;display:block!important;width:44px!important;height:26px!important;background:transparent!important;border:0!important;border-radius:999px!important}
body[data-dn-ui] .dn51-switch>.dn51-switch-track::after,body[data-dn-ui] .dn37-switch>span{content:'';position:absolute!important;top:3px!important;left:3px!important;width:20px!important;height:20px!important;background:#fff!important;border:0!important;border-radius:50%!important;transform:translateX(0)!important;transition:transform .15s ease!important;box-shadow:0 1px 3px #0002}
body[data-dn-ui] .dn51-switch:has(>input:checked),body[data-dn-ui] .dn37-switch:has(>input:checked){background:#16a34a!important}
body[data-dn-ui] .dn51-switch:has(>input:checked)>.dn51-switch-track::after,body[data-dn-ui] .dn37-switch>input:checked+span{transform:translateX(18px)!important}
body[data-dn-ui] .dn51-switch:has(>input:focus-visible){outline:2px solid #2563eb;outline-offset:3px}
body[data-dn-ui] .dn51-switch:has(>input:disabled){opacity:.5;cursor:not-allowed}
.dn51-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px;padding:14px;background:#fafafa;border:1px solid #eee;border-radius:10px}.dn51-toggle-row strong{display:block;font-size:12px}.dn51-toggle-row small{display:block;color:#888;font-size:10px;margin-top:5px}
.dn51-popup-preview{max-width:480px;margin:18px auto;padding:24px;border-radius:12px;background:#f5f3ff;border:1px solid #ddd6fe;text-align:center}.dn51-popup-preview small{display:block;color:#999;font-size:10px;margin-bottom:14px}.dn51-popup-preview strong{display:block;color:#4c1d95;font-size:15px;overflow-wrap:anywhere}.dn51-popup-preview p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}.dn51-popup-preview>span{color:#777;font-size:10px}
@media(prefers-reduced-motion:reduce){body[data-dn-ui] .dn51-switch>.dn51-switch-track::after,body[data-dn-ui] .dn37-switch>span{transition:none!important}}
/* V51 Download Manager */
.dn51-download-intro{font-size:12px;color:#888;margin:0 0 15px}.dn51-download-toolbar{display:flex;justify-content:flex-end;gap:8px;margin-bottom:20px;flex-wrap:wrap}
body[data-dn-ui] .dn-download-head{padding:0 0 18px!important}body[data-dn-ui] .dn-download-body{padding:20px 0 0!important}.dn-download-body>div{margin-bottom:20px}
body[data-dn-ui] .dn-download-section{padding:20px!important}.dn-download-section h4{display:flex;align-items:center;gap:8px;margin-bottom:15px;font-size:14px}
body[data-dn-ui] .dn-source-card{display:flex!important;align-items:center;gap:10px;padding:16px!important;background:#fff!important;border:1px solid #e5e7eb!important;border-radius:10px;min-width:0}.dn-source-card>div[id$=radio]{display:none!important}.dn-source-card>div{min-width:0}.dn-source-card>div>div{white-space:normal!important;overflow-wrap:break-word}
body[data-dn-ui] .dn-source-card:has(input:checked){border-color:#86efac!important;background:#f0fdf4!important}.dn-source-card input[type=radio]{display:block!important;appearance:auto;flex-shrink:0;accent-color:#16a34a}
.dn51-r2-advanced{padding:16px;border:1px solid #e5e7eb;border-radius:10px;margin-bottom:20px;background:#fafafa}.dn51-r2-advanced summary{cursor:pointer;color:#737373;font-size:12px}.dn51-r2-advanced[open]>summary{margin-bottom:20px}
.dn51-file-search{position:relative;margin:16px 0}.dn51-file-search>i{position:absolute;left:14px;top:15px;color:#999}.dn51-file-search>input{width:100%;padding:11px 14px 11px 39px}
.dn51-game-card{border:1px solid #e5e7eb;background:#fff;border-radius:12px;padding:18px;margin-bottom:12px}.dn51-game-main{display:flex;align-items:center;gap:12px}.dn51-game-icon{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:10px;color:#2563eb;background:#eff6ff;flex:none}.dn51-game-main>div{flex:1;min-width:0}.dn51-game-main strong{display:block;font-size:13px;overflow-wrap:anywhere}.dn51-game-main small{display:block;font-size:10px;color:#888;margin-top:5px}.dn51-game-state{font-size:10px;padding:4px 8px;border-radius:6px;white-space:nowrap}.dn51-game-state.is-on{color:#15803d;background:#f0fdf4}.dn51-game-state.is-off{color:#b91c1c;background:#fef2f2}.dn51-game-card>p{font-size:11px;color:#737373;white-space:pre-wrap;overflow-wrap:anywhere}.dn51-game-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:15px}.dn51-game-actions>*{flex:1;font-size:11px!important}
.dn51-download-empty{display:flex;align-items:center;flex-direction:column;gap:10px;padding:28px;text-align:center;color:#888}.dn51-download-empty>i{font-size:28px;color:#93c5fd}.dn51-download-empty strong{font-size:13px;color:#555}.dn51-download-empty span{font-size:11px}
body[data-dn-ui] .dn51-apk-picker{display:block;border:1px dashed #93c5fd;border-radius:12px;background:#f8fbff;text-align:center;padding:28px 16px;cursor:pointer}.dn51-apk-picker>i{color:#2563eb!important;font-size:26px}.dn51-apk-picker:focus-within{outline:2px solid #2563eb;outline-offset:3px}
body[data-dn-ui] #dl-progress-bar{background:#2563eb!important}body[data-dn-ui] #gameDownloadEditModal>[data-modal-content]{width:min(100%,540px);padding:24px!important}.dn51-game-edit header{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}.dn51-game-edit h3{font-size:18px!important}.dn51-game-edit form{display:grid;gap:15px}.dn51-game-edit label{display:grid;gap:7px;font-size:12px}.dn51-game-edit input,.dn51-game-edit textarea{width:100%;padding:10px 12px}.dn51-game-edit footer{display:flex;justify-content:flex-end;gap:10px;margin-top:7px}.dn51-error,#game-edit-error{color:#b91c1c;font-size:12px}
@media(max-width:767px){.dn51-download-toolbar>*{flex:1;font-size:11px!important}.dn-download-source>.grid{grid-template-columns:1fr!important}.dn51-game-card{padding:14px}.dn51-game-main{flex-wrap:wrap}.dn51-game-state{margin-left:52px}.dn51-game-actions{gap:5px}.dn51-game-actions>*{padding:8px!important}.dn-download-body .grid-cols-2{grid-template-columns:1fr}.dn-download-stats.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.dn-download-section>h4{font-size:13px}}
