
        .tool-page-wide{max-width:1100px;width:100%;}
        /* Khaali state mein card pehle jaisa (640px, beech mein); file aate hi poori chaudai */
        .tool-page-wide:not(:has(.i2p-layout.has-files)){max-width:640px;}
        .i2p-layout.has-files{display:grid;grid-template-columns:1fr 300px;gap:20px;align-items:start;}
        @media(max-width:860px){ .i2p-layout.has-files{grid-template-columns:1fr;} }
        .i2p-mini-select{
          display:flex;align-items:center;gap:6px;margin-bottom:12px;padding:6px 12px 6px 4px;cursor:pointer;
          border:2px dashed #CBD5F0;border-radius:14px;background:linear-gradient(180deg,#FCFDFF,#F6F8FC);
        }
        .i2p-mini-select:hover{border-color:var(--orange);}
        .i2p-mini-select .upload-orbit-wrap{flex-shrink:0;margin:-14px -14px -14px -14px;transform:scale(.62);}
        .i2p-mini-text{display:flex;flex-direction:column;gap:2px;min-width:0;}
        .i2p-mini-text b{font-size:13.5px;color:var(--navy);}
        .i2p-mini-text span{font-size:11px;color:var(--ink-soft);line-height:1.35;}
        .i2p-side #upload-actions{margin-top:14px;}
        /* File aate hi (desktop): poori screen ka dashboard. Home/Back ekdum upar-left corner,
           tool ka naam (design ke saath) upar-right corner; neeche preview upar se neeche tak
           poora khaali; right column poori height cover karta hai. */
        @media(min-width:861px){
          .tool-page-wide:has(.i2p-layout.has-files){
            max-width:none;padding:10px 18px 18px;
            display:grid;grid-template-columns:1fr 340px;column-gap:20px;align-items:center;
          }
          .tool-page-wide:has(.i2p-layout.has-files) > *{grid-column:1 / -1;}
          .tool-page-wide:has(.i2p-layout.has-files) > .tool-top-row{grid-column:1;grid-row:1;margin:0 0 10px;}
          .tool-page-wide:has(.i2p-layout.has-files) > .tool-head{
            grid-column:2;grid-row:1;margin:0 0 10px;flex-direction:row-reverse;text-align:right;gap:12px;
            padding:8px 16px;border-radius:16px;color:#fff;
            background:linear-gradient(135deg,var(--navy),var(--navy-2));
            box-shadow:0 8px 20px -8px rgba(15,27,60,.55);
          }
          .tool-page-wide:has(.i2p-layout.has-files) .tool-head-icon{
            width:40px;height:40px;border-radius:12px;font-size:20px;flex-shrink:0;
            background:linear-gradient(135deg,var(--orange),var(--gold));
          }
          .tool-page-wide:has(.i2p-layout.has-files) .tool-head h1{font-size:18px;margin:0;color:#fff;letter-spacing:.01em;}
          .tool-page-wide:has(.i2p-layout.has-files) .tool-head p{font-size:11.5px;color:rgba(255,255,255,.75);}
          .tool-page-wide:has(.i2p-layout.has-files) #step-upload{
            display:flex;flex-direction:column;min-height:max(560px, calc(100vh - 215px));
          }
          .tool-page-wide:has(.i2p-layout.has-files) .i2p-layout.has-files{
            flex:1;grid-template-columns:1fr 340px;align-items:stretch;
          }
          .tool-page-wide:has(.i2p-layout.has-files) .i2p-main{
            background:var(--paper-2);border:1.5px solid var(--line);border-radius:16px;padding:16px;
          }
          .tool-page-wide:has(.i2p-layout.has-files) .i2p-file-grid{
            grid-template-columns:repeat(auto-fill,minmax(170px,1fr));align-content:start;
          }
          .tool-page-wide:has(.i2p-layout.has-files) .i2p-side{
            display:flex !important;flex-direction:column;
          }
          .tool-page-wide:has(.i2p-layout.has-files) .i2p-options-panel{flex:1;display:flex !important;flex-direction:column;justify-content:space-between;}
          .tool-page-wide:has(.i2p-layout.has-files) .i2p-options-panel .i2p-opt-group{margin-bottom:0;}
        }
        @media(min-width:861px){
          .dash-tool.dash-active{
            width:100%;max-width:none;padding:10px 18px 18px;
            display:grid;grid-template-columns:1fr 340px;column-gap:20px;align-items:center;
          }
          .dash-tool.dash-active > *{grid-column:1 / -1;}
          .dash-tool.dash-active > .tool-top-row{grid-column:1;grid-row:1;margin:0 0 10px;}
          .dash-tool.dash-active > .tool-head{
            grid-column:2;grid-row:1;margin:0 13px 10px -13px;flex-direction:row-reverse;text-align:right;gap:12px;
            justify-self:stretch;width:auto;
            padding:8px 16px;border-radius:16px;color:#fff;
            background:linear-gradient(135deg,var(--navy),var(--navy-2));
            box-shadow:0 8px 20px -8px rgba(15,27,60,.55);
          }
          .dash-tool.dash-active .tool-head-icon{
            width:40px;height:40px;border-radius:12px;font-size:20px;flex-shrink:0;
            background:linear-gradient(135deg,var(--orange),var(--gold));
          }
          .dash-tool.dash-active .tool-head h1{font-size:18px;margin:0;color:#fff;letter-spacing:.01em;}
          .dash-tool.dash-active .tool-head p{font-size:11.5px;color:rgba(255,255,255,.75);}
          .dash-tool.dash-active #step-upload{
            display:flex;flex-direction:column;min-height:max(560px, calc(100vh - 215px));
          }
          .dash-tool.dash-active #step-upload[style*="display: none"]{display:none;}
          .dash-tool.dash-active .dash-layout.has-files{
            flex:1;grid-template-columns:1fr 340px;align-items:stretch;
          }
          .dash-tool.dash-active .dash-main{
            background:var(--paper-2);border:1.5px solid var(--line);border-radius:16px;padding:16px;
            overflow:auto;max-height:max(560px, calc(100vh - 215px));
          }
          .dash-tool.dash-active .i2p-file-grid{
            grid-template-columns:repeat(auto-fill,minmax(210px,1fr));align-content:start;
          }
          .dash-tool.dash-active .dash-side{
            display:flex !important;flex-direction:column;
          }
        }

        /* ===== Sabhi tools ka same dashboard (dash-tool) — file aate hi: bayen taraf poora preview,
           daayen taraf mini SELECT + tool ke options + action button ===== */
        .dash-layout:not(.has-files), .dash-layout:not(.has-files) > .dash-main, .dash-layout:not(.has-files) > .dash-side{display:contents;}
        .tool-page.dash-tool:not(.dash-active){width:100%;max-width:640px;}
        /* Khaali state mein sirf bada SELECT box — options file chunne ke BAAD hi dikhte hain */
        .dash-layout:not(.has-files) .dash-side > *{display:none !important;}
        .dash-layout.has-files{display:grid;grid-template-columns:1fr 340px;gap:20px;align-items:start;}
        .dash-layout.has-files .dash-main{background:var(--paper-2);border:1.5px solid var(--line);border-radius:16px;padding:16px;min-width:0;}
        .dash-layout.has-files .dash-side{display:flex;flex-direction:column;min-width:0;}
        .dash-layout.has-files .dash-side #upload-actions{margin-top:auto;padding-top:14px;}
        .dash-layout.has-files .dash-main .file-list{margin-top:0;}
        /* PDF ka asli preview (pages ki tasveerein) */
        .dash-pages{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;margin-top:14px;}
        .dash-pages-msg{grid-column:1/-1;text-align:center;padding:26px 10px;font-size:13px;color:var(--ink-soft);}
        .dash-page{position:relative;background:#fff;border:1.5px solid var(--line);border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(15,27,60,.07);}
        .dash-page img{width:100%;display:block;}
        .dash-page-num{position:absolute;left:0;right:0;bottom:0;text-align:center;font-size:11px;font-weight:700;color:#fff;padding:3px 0;background:linear-gradient(0deg,rgba(15,27,60,.7),transparent);}
        .dash-row-thumb{width:38px;height:50px;object-fit:cover;border-radius:5px;border:1px solid var(--line);flex-shrink:0;background:#fff;}
        /* Ek hi image ho to poora bada preview (contain), sahi aspect ke saath */
        .dash-layout.has-files .i2p-file-grid.dash-single{grid-template-columns:1fr;grid-template-rows:1fr;}
        .dash-layout.has-files .i2p-file-grid.dash-single .file-row.i2p-thumb{aspect-ratio:auto;height:auto;min-height:340px;background:#EEF1F8;}
        .dash-layout.has-files .i2p-file-grid.dash-single .i2p-thumb-img{object-fit:contain;position:absolute;inset:0;}
        .dash-layout.has-files .dash-main{display:flex;flex-direction:column;}
        .dash-layout.has-files .dash-main .file-list{flex:1;}
        @media(max-width:860px){ .dash-layout.has-files{grid-template-columns:1fr;} .dash-layout.has-files .dash-main{padding:12px;} }
        .i2p-file-grid{margin-top:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px;}
        .i2p-file-grid .file-row.i2p-thumb{
          position:relative;flex-direction:column;align-items:stretch;padding:0;border-radius:14px;overflow:hidden;
          aspect-ratio:3/4;cursor:grab;border:1.5px solid var(--line);background:var(--paper-2);
        }
        .i2p-file-grid .file-row.i2p-thumb.dragging{opacity:.4;}
        .i2p-file-grid .file-row.i2p-thumb.drag-over{outline:2.5px dashed var(--orange);outline-offset:-2px;}
        .i2p-thumb-img{width:100%;height:100%;object-fit:cover;display:block;}
        .i2p-thumb-num{
          position:absolute;top:7px;left:7px;background:var(--navy);color:#fff;font-size:11px;font-weight:800;
          width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;
          box-shadow:0 2px 6px rgba(0,0,0,.25);
        }
        .i2p-thumb-remove{
          position:absolute;top:6px;right:6px;width:21px;height:21px;border-radius:50%;border:none;
          background:rgba(15,27,60,.75);color:#fff;font-size:12px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;
        }
        .i2p-thumb-remove:hover{background:#D9463E;}
        .i2p-thumb-name{
          position:absolute;left:0;right:0;bottom:0;padding:4px 7px;font-size:10px;color:#fff;
          background:linear-gradient(0deg,rgba(0,0,0,.65),transparent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
        }
        .i2p-thumb-handle{position:absolute;bottom:5px;right:5px;color:#fff;font-size:12px;text-shadow:0 1px 3px rgba(0,0,0,.5);}
        .i2p-add-tile{
          display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
          border:2px dashed #CBD5F0;border-radius:14px;aspect-ratio:3/4;cursor:pointer;color:var(--blue);
          background:var(--blue-light);font-size:11.5px;font-weight:700;
        }
        .i2p-add-tile .i2p-plus{width:30px;height:30px;border-radius:50%;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-size:17px;}
        .i2p-add-tile:hover{background:#E3EDFF;}
        .i2p-opt-group{margin-bottom:18px;}
        .i2p-opt-label{font-size:11.5px;font-weight:700;color:var(--ink-soft);margin-bottom:8px;display:block;text-transform:uppercase;letter-spacing:.03em;}
        .i2p-opt-row-2{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
        .i2p-opt-row-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;}
        .i2p-opt-card{
          border:1.5px solid var(--line);border-radius:10px;padding:10px 6px;text-align:center;cursor:pointer;
          background:var(--paper);font-size:11px;font-weight:600;color:var(--ink-soft);
        }
        .i2p-oi{font-size:19px;display:block;margin-bottom:4px;}
        .i2p-opt-card.active{border-color:var(--orange);background:#FFF3EA;color:var(--orange-2);}
        .i2p-select{
          width:100%;padding:9px 10px;border-radius:10px;border:1.5px solid var(--line);font-size:12.5px;
          background:var(--paper);color:var(--ink);
        }
      