/* Dark Mode Logo Converter: scoped to this page's tool. No shared styles change. */

/* ---- settings panel (dark) ---- */
#tool .tool-aside{background:#172033;color:#f1f5f9;padding:24px;border:1px solid #334155;box-shadow:0 12px 32px #0f172a12}
#tool .tool-aside::before{display:none}
#tool .tool-aside .aside-title,#tool .tool-aside .input-label,#tool .tool-aside .checkbox-group label,#tool .tool-aside .settings-header{color:#f1f5f9}
#tool .tool-aside .aside-sub{color:#cbd5e1;margin-bottom:14px}
#tool .tool-aside .input-group{margin-top:18px}
#tool .tool-aside .help-note{background:#0f172a;border:1px solid #334155;border-left:3px solid #818cf8;color:#cbd5e1;line-height:1.6}
#tool .tool-aside .help-note a{color:#a5d8ff;text-decoration:underline}
#tool .tool-aside .seg{display:flex;background:#0f172a;border:1px solid #475569;padding:4px;gap:4px}
#tool .tool-aside .seg button{color:#e2e8f0;background:transparent;min-height:42px;border-radius:8px;white-space:normal;line-height:1.25}
#tool .tool-aside .seg button.active{color:#fff;background:#4338ca}
#tool .tool-aside .seg button:not(.active):hover{background:#334155;color:#fff}
#tool .tool-aside .checkbox-group{background:#0f172a;border:1px solid #475569;align-items:flex-start}
#tool .tool-aside .checkbox-group input{width:18px;height:18px;margin-top:2px;flex:0 0 auto;accent-color:#818cf8}
#tool .tool-aside .checkbox-group label{line-height:1.45}
#tool .tool-aside select,#tool .tool-aside input[type=text]{width:100%;min-height:44px;background-color:#0f172a;color:#f1f5f9;border:1px solid #475569;border-radius:8px;padding:10px 12px;font:inherit;font-size:14px}
#tool .tool-aside select{padding-right:34px}
#tool .tool-aside input[type=color]{width:56px;min-width:56px;height:44px;padding:3px;margin:0;background:#fff;border:1px solid #94a3b8;border-radius:8px;cursor:pointer}
#tool .tool-aside input[aria-invalid=true]{border-color:#f87171}
@media(min-width:1025px){#tool .tool-aside{max-height:calc(100vh - 100px);overflow-y:auto}}

#tool .dm-surfaces{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#tool .dm-surf{display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 10px;border:1px solid #475569;border-radius:10px;background:#0f172a;color:#f1f5f9;cursor:pointer;font:inherit;text-align:left;min-width:0}
#tool .dm-surf:hover{border-color:#94a3b8}
#tool .dm-surf[aria-pressed=true]{border-color:#a5b4fc;box-shadow:inset 0 0 0 2px #818cf8}
#tool .dm-surf-sw{width:26px;height:26px;border-radius:6px;border:1px solid #64748b;flex:0 0 auto}
#tool .dm-surf-txt{display:flex;flex-direction:column;min-width:0}
#tool .dm-surf-txt b{font-size:13px;font-variant-numeric:tabular-nums}
#tool .dm-surf-txt small{font-size:11.5px;color:#cbd5e1;line-height:1.3}
#tool .dm-inline{display:flex;gap:8px;align-items:center}

/* ---- stage (light) ---- */
#tool .upload-zone{margin-bottom:14px;background:#f8fafc;border-color:#64748b;color:#172033}
#tool .upload-title{color:#172033}
#tool .upload-subtitle,#tool .upload-hint{color:#475569}
#tool .dm-drag{outline:3px dashed #4338ca;outline-offset:-6px}
#tool .dm-filebar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:12px;padding:10px 12px;background:#fff;border:1px solid #cbd5e1;border-radius:10px}
#tool .dm-fileinfo{flex:1 1 220px;min-width:0;font-size:13px;line-height:1.45;color:#334155;overflow-wrap:anywhere}
#tool .dm-filebar .btn{flex:0 0 auto}
#tool .dm-warn{margin-bottom:12px;padding:12px 14px;background:#fffbeb;border:1px solid #f59e0b;border-left-width:4px;border-radius:10px;color:#78350f;font-size:13.5px;line-height:1.55}
#tool .dm-warn a{color:#92400e;text-decoration:underline}
#tool .stage-card{background:#fff;color:#172033}
#tool .stage-card-head{gap:12px;flex-wrap:wrap}
#tool .dim-pill{background:#e2e8f0;color:#334155;border-color:#cbd5e1;white-space:normal;line-height:1.45;max-width:100%}
#tool .dim-pill.dm-pill-warn{background:#fef3c7;color:#78350f;border-color:#f59e0b}
#tool .dm-empty{margin:0;padding:18px 20px;color:#475569;font-size:14px;line-height:1.6}

#tool .dm-previews{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px 16px 8px}
#tool .dm-prev{margin:0;min-width:0}
#tool .dm-surface{display:flex;align-items:center;justify-content:center;min-height:160px;padding:16px;border-radius:10px;border:1px solid #cbd5e1}
#tool .dm-light-surface{background:#fff}
#tool .dm-dark-surface{background:#121212;border-color:#334155}
#tool .dm-surface canvas{display:block;max-width:100%;max-height:150px;width:auto;height:auto}
#tool .dm-prev figcaption{margin-top:8px;font-size:12.5px;font-weight:700;color:#334155}

#tool .dm-strip-wrap{padding:6px 16px 16px}
#tool .dm-strip-head{margin:0 0 8px;font-size:12.5px;line-height:1.5;color:#475569}
#tool .dm-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
#tool .dm-tile{display:flex;flex-direction:column;gap:6px;padding:4px;border:2px solid transparent;border-radius:10px;background:#f1f5f9;color:#334155;cursor:pointer;font:inherit;min-width:0}
#tool .dm-tile:hover{border-color:#94a3b8}
#tool .dm-tile[aria-pressed=true]{border-color:#4338ca}
#tool .dm-tile-surface{display:flex;align-items:center;justify-content:center;height:76px;padding:8px;border-radius:7px}
#tool .dm-tile canvas{display:block;max-width:100%;max-height:60px;width:auto;height:auto}
#tool .dm-tile-label{font-size:11.5px;font-weight:700;font-variant-numeric:tabular-nums}

#tool .dm-colors{list-style:none;margin:0;padding:12px 16px;display:grid;gap:10px}
#tool .dm-colors:empty{display:none}
#tool .dm-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}
#tool .dm-sw{width:36px;height:36px;border-radius:8px;border:1px solid rgba(15,23,42,.25);flex:0 0 auto}
#tool .dm-arrow{color:#64748b;font-weight:700}
#tool .dm-pick{width:52px;min-width:52px;height:40px;padding:3px;margin:0;border:1px solid #94a3b8;border-radius:8px;background:#fff;cursor:pointer}
#tool .dm-info{flex:1 1 200px;min-width:0;font-size:13px;line-height:1.45;color:#475569}
#tool .dm-hexes{color:#0f172a;font-variant-numeric:tabular-nums}
#tool .dm-badge{font-size:12px;font-weight:800;padding:4px 10px;border-radius:999px;white-space:nowrap}
#tool .dm-badge.is-same{background:#e2e8f0;color:#334155}
#tool .dm-badge.is-changed{background:#dbeafe;color:#1e3a8a}
#tool .dm-badge.is-fail{background:#fee2e2;color:#991b1b}
#tool .dm-row-btns{display:flex;gap:6px;margin-left:auto}
#tool .dm-row-btns .btn{min-height:40px;padding:8px 12px;flex:0 0 auto}
#tool .dm-row-btns .btn[aria-pressed=true]{background:#1e293b;color:#fff;border-color:#1e293b}
#tool .dm-colors-foot{padding:0 16px 16px}

#tool .dm-snippet-body{padding:16px}
#tool .dm-fields{display:grid;grid-template-columns:2fr 2fr 1fr;gap:12px}
#tool .dm-snippet-card .input-label{color:#334155}
#tool .dm-snippet-card input{width:100%;min-height:44px;background:#fff;color:#0f172a;border:1px solid #94a3b8;border-radius:8px;padding:10px 12px;font:inherit;font-size:14px}
#tool .dm-code{margin:14px 0 0;padding:14px 16px;background:#0f172a;color:#e2e8f0;border-radius:10px;overflow:auto;font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre}
#tool .dm-note{margin:10px 0 0;font-size:13px;line-height:1.55;color:#475569}

/* ---- buttons and focus ---- */
#tool .action-buttons{display:flex;flex-direction:row;flex-wrap:wrap;gap:10px;margin-bottom:20px}
#tool .btn-secondary{background:#fff;color:#1e293b;border:1px solid #64748b}
#tool .btn-primary{background:#4338ca;color:#fff}
#tool button:disabled{opacity:1;background:#e2e8f0;color:#475569;border-color:#94a3b8;cursor:not-allowed;box-shadow:none;transform:none}
#tool .tool-aside button:disabled{background:#334155;color:#cbd5e1}
#tool button:focus-visible,#tool input:focus-visible,#tool select:focus-visible,#tool [tabindex]:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
#tool [hidden]{display:none!important}

/* ---- tablets and phones ---- */
@media(max-width:860px){
  #tool .dm-previews{grid-template-columns:1fr 1fr}
  #tool .dm-prev:first-child{grid-column:1/-1}
}
@media(max-width:700px){
  #tool .tool-aside{padding:18px}
  #tool .action-buttons .btn{width:100%;white-space:normal}
  #tool .dm-fields{grid-template-columns:1fr 1fr}
  #tool .dm-fields .input-group:first-child{grid-column:1/-1}
  #tool .dm-strip{grid-template-columns:1fr 1fr}
}
@media(max-width:520px){
  #tool .dm-previews{grid-template-columns:1fr;padding:12px 12px 6px}
  #tool .dm-surface{min-height:120px}
  #tool .dm-surface canvas{max-height:110px}
  #tool .dm-strip-wrap{padding:6px 12px 12px}
  #tool .dm-colors{padding:12px}
  #tool .dm-row-btns{margin-left:0;width:100%}
  #tool .dm-row-btns .btn{flex:1 1 0}
  #tool .dm-snippet-body{padding:12px}
}
