body{background:#f3f6fc}.nav-item{text-decoration:none;color:#68748b;background:#fff;margin-top:5px}.nav-item.active{color:#165eab;background:#eaf3ff}.eyebrow{color:#1f67b2}.page-heading h1{color:#203555}.page-heading p{max-width:560px}.primary{background:#1f67b2;border-radius:11px}.order-upload{background:#fff;border:1px solid #dbe4f0;border-radius:16px;padding:20px}.order-drop{display:flex;align-items:center;gap:16px;position:relative;border:2px dashed #9ab5db;background:#f3f8ff;padding:22px;border-radius:12px;cursor:pointer;min-height:100px}.order-drop input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.order-drop:focus-within{outline:3px solid #7ea9e2;outline-offset:3px}.order-drop.drag{background:#deedff}.file-icon{display:grid;place-items:center;background:#1f67b2;color:white;width:44px;height:44px;border-radius:12px;font-size:28px;flex-shrink:0}.order-drop strong{display:block;color:#294467;overflow-wrap:anywhere}.order-drop small{display:block;font-size:14px;color:#657a98;margin-top:4px}.order-upload>p{font-size:14px;color:#65748b;margin:12px 0 0}.order-guide{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:22px 0}.order-guide>div{display:flex;align-items:flex-start;gap:12px;background:#eaf3ff;border-radius:14px;padding:18px}.order-guide>div:last-child{background:#e9f8f2}.guide-icon{display:grid;place-items:center;width:34px;height:34px;background:#2267b2;color:#fff;border-radius:9px;flex-shrink:0;font-size:21px}.guide-icon.numeric{background:#08785f;font-weight:700}.order-guide p{font-size:14px;color:#526681;line-height:1.65;margin:0}.order-guide strong{display:block;color:#2b415f;font-size:16px;margin-bottom:5px}.page-workspace{background:white;border:1px solid #dbe4f0;border-radius:18px;overflow:hidden}.order-toolbar{padding:20px 22px;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;border-bottom:1px solid #e5ecf6}.order-toolbar h2{font-size:18px;margin:0;color:#263d60}.order-toolbar span{font-size:14px;color:#65748b}.order-actions{display:flex;gap:10px;flex-wrap:wrap}.order-actions button{font-size:14px;font-weight:600;padding:11px 15px;border-radius:9px;min-height:44px}.sort-button{background:#08785f;color:white}.reset-button{background:#edf2fa;color:#425a7d}button:disabled{opacity:.45;cursor:not-allowed}.order-status{color:#41638d;font-size:14px;margin:0;padding:16px 22px}.pages-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:18px;padding:6px 22px 24px}.page-card{min-width:0;background:#f6f9ff;border:2px solid #dfe8f5;border-radius:13px;padding:12px;position:relative;transition:border-color .12s,box-shadow .12s}.position-badge{display:inline-block;font-size:14px;color:#1f67b2;font-weight:700;background:#e1edfc;border-radius:7px;padding:4px 8px;margin-bottom:10px}.page-preview{display:flex;align-items:center;justify-content:center;aspect-ratio:210/297;background:white;border:1px solid #dce4ef;border-radius:5px;overflow:hidden;cursor:grab;touch-action:pan-y}.page-preview canvas{display:block;width:auto!important;height:auto!important;max-width:100%;max-height:100%}.page-preview .thumb-placeholder{font-size:14px;color:#72839a;text-align:center;padding:8px}.original-page{font-size:14px;color:#546a88;text-align:center;margin:9px 0}.page-order-label{display:flex;align-items:center;gap:8px;font-size:14px;color:#425a7b;font-weight:600}.page-order-label input{width:70px;min-width:0;flex:1;font-size:16px;padding:9px 8px;text-align:center;margin:0;background:white;border:1px solid #b7c8e1;border-radius:7px;height:44px}.page-order-label input[aria-invalid=true]{border:2px solid #c03849;background:#fff2f3}.page-move{display:flex;gap:6px;margin-top:10px}.drag-handle{touch-action:none;user-select:none;cursor:grab;background:#e2ecfb;color:#28578d;flex:1;border-radius:8px;min-height:44px;font-size:14px;font-weight:600}.page-step{background:white;border:1px solid #c8d5e9;color:#335b8c;width:36px;min-height:44px;border-radius:8px;font-size:17px}.page-card.drag-source{opacity:.4}.page-card.drop-target{border-color:#08785f;box-shadow:0 0 0 4px #08785f22;background:#edfbf5}.drag-ghost{position:fixed;z-index:100;pointer-events:none;background:white;padding:8px;border:2px solid #1f67b2;border-radius:12px;box-shadow:0 15px 35px #24385e40;transform:rotate(3deg);opacity:.92;width:130px}.drag-ghost canvas{width:100%!important;height:auto!important}.drag-ghost span{display:block;font-size:14px;color:#245589;font-weight:bold;text-align:center}.dragging-pages{user-select:none;cursor:grabbing}.empty-pages{text-align:center;padding:40px 20px 50px;background:#fafcff;color:#637a99}.empty-pages>span{display:block;font-size:50px;color:#8eabd2;margin-bottom:10px}.empty-pages strong{color:#405e85;font-size:18px}.empty-pages p{font-size:14px;margin-top:8px}.empty-pages[hidden]{display:none}.mobile-tools{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:22px}.mobile-tools a{font-size:14px;min-height:44px;padding:10px;color:#68748b}.mobile-tools .current{color:#1f67b2;font-weight:700}
@media(max-width:850px){.order-guide{grid-template-columns:1fr;gap:12px}.pages-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:6px 14px 20px}.order-toolbar{padding:18px 16px}.order-guide p,.order-status{font-size:16px}.order-upload{padding:16px}.order-drop{padding:18px 12px}.order-drop small{font-size:14px}.page-card{padding:10px}.order-actions{width:100%}.order-actions button{flex:1}.page-step{width:32px}.drag-handle{font-size:14px}.page-order-label{flex-wrap:wrap}.page-order-label input{flex-basis:65px}.page-preview{cursor:default}}
@media(prefers-reduced-motion:reduce){.page-card{transition:none}}
/* Color cues keep each original page recognizable after moving it. */
body{background:linear-gradient(135deg,#eff4ff 0%,#f5f0ff 55%,#ecfaf6 100%)}.page-heading h1{color:#282663}.eyebrow{color:#6550c2}.order-upload{border-color:#cfcaec;box-shadow:0 8px 25px #40327909}.order-drop{background:#f1edff;border-color:#a495de}.file-icon{background:#7051c7}.order-guide>div{background:#e8f2ff;border-left:5px solid #2267b2}.order-guide>div:last-child{background:#e5f7ef;border-left-color:#08785f}.page-workspace{border-color:#d5cfee;box-shadow:0 12px 40px #3426660b}.order-toolbar{background:#eeebff}.order-toolbar h2{color:#453380}.page-card{--page-tone:#245eaf;--page-tint:#edf4ff;border-top:5px solid var(--page-tone);background:var(--page-tint);border-radius:15px;box-shadow:0 5px 12px #23365608}.page-card[data-color="1"]{--page-tone:#08785f;--page-tint:#e9f9f2}.page-card[data-color="2"]{--page-tone:#a34c0c;--page-tint:#fff4e6}.page-card[data-color="3"]{--page-tone:#ad2c76;--page-tint:#ffedf5}.position-badge{background:var(--page-tone);color:#fff;border-radius:8px;padding:6px 10px}.drag-handle{background:var(--page-tone);color:#fff}.page-order-label input{border-color:var(--page-tone)}.original-page{color:#43556d}.page-card.drop-target{box-shadow:0 0 0 4px #6950cd35;border-color:#6950cd}.heading-actions{display:flex;gap:10px;align-items:stretch;flex-wrap:wrap;justify-content:flex-end}.heading-actions button{min-height:46px}.preview-button{background:#fff0bf;border:1px solid #dcac3f;color:#795004;border-radius:11px;padding:13px 17px;font-size:14px;font-weight:700}.preview-button:hover:not(:disabled){background:#ffe494}.sort-button{background:#7051c7}.reset-button{background:#fff;color:#5d4a8d}.empty-pages{background:#f7f5ff}.empty-pages>span{color:#9b8acd}.empty-pages strong{color:#5a477f}.primary{background:#7051c7}.order-status{color:#5c4b83}
#order-preview{position:fixed;inset:0;margin:0;border:0;border-radius:0;padding:32px 16px;width:100vw;height:100dvh;max-width:none;max-height:none;background:#69717e;color:#fff;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}#order-preview::backdrop{background:#29313c}.close-preview{position:fixed;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));z-index:2;width:44px;height:44px;border:1px solid #ffffff55;border-radius:50%;font-size:28px;line-height:1;background:#253040e8;color:#fff;box-shadow:0 3px 12px #0003}.preview-message{font-size:16px;text-align:center;margin:60px auto 20px;max-width:600px;color:#fff}.preview-message[hidden]{display:none}.pdf-reader{display:flex;flex-direction:column;gap:18px;align-items:center;max-width:800px;margin:auto}.reader-page{width:100%;position:relative;background:white;box-shadow:0 4px 18px #17202c55;overflow:hidden;flex-shrink:0;color:#657080;display:flex;align-items:center;justify-content:center;font-size:14px}.reader-page canvas{display:block;width:100%!important;height:auto!important;max-width:none;max-height:none}.reader-page[data-state=blank]::after,.reader-page[data-state=queued]::after,.reader-page[data-state=rendering]::after{content:"";width:24px;height:24px;border:3px solid #edf0f5;border-top-color:#7284a2;border-radius:50%;animation:reader-loading .8s linear infinite}@keyframes reader-loading{to{transform:rotate(360deg)}}
@media(max-width:850px){.page-heading{flex-wrap:wrap;gap:16px}.heading-actions{justify-content:flex-start}}
@media(max-width:560px){body{padding-bottom:calc(98px + env(safe-area-inset-bottom))}.heading-actions{position:fixed;bottom:calc(12px + env(safe-area-inset-bottom));left:12px;right:12px;z-index:30;display:flex;flex-wrap:nowrap;gap:8px;background:#ffffffed;border:1px solid #ddd5f2;border-radius:15px;padding:8px;box-shadow:0 7px 28px #34266626}.heading-actions .primary,.heading-actions .preview-button{position:static;left:auto;right:auto;bottom:auto;width:auto;flex:1;margin:0;padding:10px 8px;min-height:55px;font-size:14px!important;line-height:1.3;box-shadow:none}#order-preview{padding:60px 8px 20px}.pdf-reader{gap:12px}}
@media(prefers-reduced-motion:reduce){.reader-page::after{animation:none!important}}
.numbering-panel{background:#fff;border:1px solid #ddccea;border-left:5px solid #a32f81;border-radius:16px;margin:22px 0;padding:22px;box-shadow:0 6px 22px #54346108}.numbering-toggle{display:flex;gap:12px;align-items:flex-start;cursor:pointer;margin:0}.numbering-toggle input{width:22px;height:22px;accent-color:#a32f81;margin:2px 0 0;flex-shrink:0}.numbering-toggle strong{display:block;color:#753565;font-size:18px}.numbering-toggle small{display:block;color:#68748b;font-size:14px;font-weight:400;margin-top:3px}.numbering-options{display:grid;grid-template-columns:1fr 1.3fr 1.2fr 110px;gap:16px;align-items:start;margin-top:20px}.numbering-options>label{font-size:14px;color:#52637f;margin:0}.numbering-options select{width:100%;margin-top:7px;font:inherit;font-size:16px;min-height:46px;padding:10px 8px;border:1px solid #c8b7d9;border-radius:9px;background:#fcf9ff;color:#493453}.numbering-options.inactive{opacity:.5}.numbering-options select:disabled{cursor:not-allowed}.numbering-paper{width:76px;height:106px;background:white;border:1px solid #cbb9d8;box-shadow:0 3px 7px #4d365c12;position:relative;margin:auto}.numbering-paper span{position:absolute;font-size:12px;font-weight:600;line-height:1;color:#743e66}.numbering-paper[data-location^=top] span{top:10px}.numbering-paper[data-location^=bottom] span{bottom:10px}.numbering-paper[data-location$=left] span{left:8px}.numbering-paper[data-location$=center] span{left:50%;transform:translateX(-50%)}.numbering-paper[data-location$=right] span{right:8px}.numbering-example p{font-size:12px;color:#79547c;text-align:center;line-height:1.5;margin:8px 0 0;overflow-wrap:anywhere}.numbering-note{font-size:14px;line-height:1.6;color:#68748b;margin:16px 0 0}@media(max-width:1150px){.numbering-options{grid-template-columns:1fr 1fr}.numbering-example{display:flex;align-items:center;gap:15px}.numbering-paper{flex-shrink:0;margin:0}.numbering-example p{font-size:14px;text-align:left}}@media(max-width:560px){.numbering-panel{padding:18px}.numbering-options{grid-template-columns:1fr}.numbering-toggle strong{font-size:17px}.numbering-example{padding-top:5px}.numbering-options>label,.numbering-note{font-size:16px}}
.numbering-options{grid-template-columns:repeat(4,minmax(0,1fr)) 100px}.numbering-options input{width:100%;margin-top:7px;font:inherit;font-size:16px;min-height:46px;padding:10px 8px;border:1px solid #c8b7d9;border-radius:9px;background:#fcf9ff;color:#493453}.numbering-options input[aria-invalid=true]{border:2px solid #c03849;background:#fff2f3}.number-size-hint{display:block;font-size:12px;font-weight:400;color:#79547c;margin-top:6px}.numbering-options input:disabled{cursor:not-allowed}@media(max-width:1300px){.numbering-options{grid-template-columns:1fr 1fr}.numbering-example{display:flex;gap:16px;align-items:center}}@media(max-width:560px){.numbering-options{grid-template-columns:1fr}.number-size-hint{font-size:14px}}
