@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root{--ink:#17313a;--ink-2:#254750;--muted:#70848a;--line:#dce8e8;--soft-line:#eaf1f1;--paper:#ffffff;--canvas:#f3f8f7;--teal:#0b6f70;--teal-dark:#084d58;--mint:#e5f7f1;--cyan:#e8f6f6;--navy:#103844;--navy-2:#0b2934;--gold:#b7791f;--orange:#b45309;--red:#b4233b;--blue:#175cd3;--shadow:0 18px 45px rgba(20,65,72,.08);--shadow-sm:0 7px 18px rgba(20,65,72,.07)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--canvas);color:var(--ink);font:14px/1.7 Vazirmatn,Tahoma,sans-serif}.app-shell{min-height:100vh}.sidebar{width:276px;position:fixed;inset:0 auto 0 0;padding:30px 18px 20px;background:linear-gradient(160deg,var(--navy) 0%,var(--navy-2) 100%);color:#fff;display:flex;flex-direction:column;z-index:10;box-shadow:4px 0 22px rgba(7,33,42,.12)}.brand-lockup{display:flex;align-items:center;gap:12px;padding:0 8px 28px;border-bottom:1px solid rgba(255,255,255,.13)}.brand-mark{display:grid;place-items:center;width:45px;height:45px;border-radius:14px;color:white;font-size:23px;font-weight:800;background:linear-gradient(135deg,#17b2a2,#0c8192);box-shadow:0 10px 25px rgba(7,185,173,.27)}.brand-lockup strong{font-size:17px;letter-spacing:-.3px}.brand-lockup small,.profile-card small{display:block;color:#a8c0c5;font-size:10.5px;margin-top:1px}.sidebar-caption{margin:26px 10px 9px;color:#85a4aa;font-size:10px;font-weight:700;letter-spacing:.4px}.main-nav{display:grid;gap:5px}.main-nav a{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:10px;color:#afc6ca;text-decoration:none;font-weight:600;transition:.2s ease}.main-nav a:hover,.main-nav a.active{color:#fff;background:rgba(255,255,255,.12)}.main-nav a.active{box-shadow:inset -3px 0 0 #5eead4}.nav-icon{width:20px;text-align:center;color:#8ce6da;font-size:16px}.quality-note{display:flex;align-items:flex-start;gap:10px;border:1px solid rgba(160,241,222,.18);border-radius:12px;background:rgba(45,173,153,.12);padding:12px;margin-top:26px;color:#e5fffa}.quality-note b{display:block;font-size:11px}.quality-note small{display:block;color:#a9d4cc;font-size:10px;line-height:1.6;margin-top:2px}.quality-dot{width:8px;height:8px;flex:none;border-radius:50%;background:#5eead4;box-shadow:0 0 0 4px rgba(94,234,212,.12);margin-top:6px}.profile-card{margin-top:auto;padding:16px 8px 0;border-top:1px solid rgba(255,255,255,.13);display:flex;align-items:center;gap:9px}.profile-card b{font-size:12px}.profile-card a{margin-right:auto;color:#d5e6e8;font-size:11px;text-decoration:none}.avatar{display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:#1b5662;color:#d6fbf4;font-weight:800}.workspace{margin-left:276px;padding:32px 42px 70px;max-width:1800px}.topbar{display:flex;justify-content:space-between;gap:28px;align-items:flex-start;margin-bottom:31px}.kicker{margin:0 0 5px;color:var(--teal);font-size:10.5px;font-weight:800;letter-spacing:.3px}.topbar h1{font-size:26px;line-height:1.35;margin:0;letter-spacing:-.5px}.header-subtitle{margin:6px 0 0;color:var(--muted);font-size:12px}.top-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}.connection{display:inline-flex;align-items:center;gap:6px;background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:7px 11px;color:var(--ink-2);font-size:10.5px;font-weight:600}.connection i{width:7px;height:7px;border-radius:50%;background:#15a46f;box-shadow:0 0 0 3px #d8f6e8}.button{display:inline-flex;justify-content:center;align-items:center;border:1px solid transparent;border-radius:9px;padding:10px 14px;background:var(--paper);color:var(--ink-2);font:700 12px Vazirmatn,Tahoma,sans-serif;text-decoration:none;cursor:pointer;transition:.2s ease;white-space:nowrap}.button:hover{transform:translateY(-1px)}.button.primary{color:#fff;border-color:#0b6f70;background:linear-gradient(135deg,#0e8d84,#0b606a);box-shadow:0 8px 17px rgba(8,111,112,.19)}.button.ghost{border-color:#ccdcdc;background:#fff;box-shadow:none}.button.danger{color:#fff;border-color:#b4233b;background:#b4233b;box-shadow:0 8px 17px rgba(180,35,59,.16)}.star-decision-grid{display:grid;gap:7px}.star-decision-grid .button{justify-content:flex-start;white-space:normal;text-align:right}.star-decision-grid .button small{font-weight:500;opacity:.86}.star-decision-disabled{padding:8px 9px;border:1px dashed #d5c59a;border-radius:8px;color:#856e37;font-size:10px;line-height:1.7}.review-rejected{padding:11px;border:1px solid #f4bcc5;border-radius:9px;background:#fff4f5;color:#a51f38;font-size:10.5px}.review-auto-report{display:grid;gap:5px;padding:12px;border:1px solid #aed8cb;border-radius:9px;background:#effbf7;color:#176154;font-size:10.5px}.review-auto-report span{color:#356f66}.review-auto-report small{color:#537b75}.auto-unit-summary{border-color:#a8dccb;background:#effbf7;color:#176154}.button.compact{padding:9px 12px;font-size:11px}.button.tiny{padding:7px 10px;font-size:10.5px}.section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:15px}.section-heading h2{margin:0;font-size:19px;letter-spacing:-.3px}.muted{margin:4px 0 0;color:var(--muted);font-size:11.5px}.stat-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.stat-card{position:relative;overflow:hidden;min-height:131px;padding:18px;border:1px solid var(--line);border-radius:15px;background:var(--paper);box-shadow:var(--shadow-sm)}.stat-card:before{position:absolute;content:"";width:72px;height:72px;left:-24px;top:-27px;border-radius:50%;background:var(--accent-soft)}.stat-card.total{--accent:#1d6270;--accent-soft:#e2f2f3}.stat-card.queued{--accent:#5445bb;--accent-soft:#eceaff}.stat-card.process{--accent:#1678b8;--accent-soft:#e3f4ff}.stat-card.review{--accent:#b65e08;--accent-soft:#fff2da}.stat-card.verified{--accent:#098660;--accent-soft:#dff8ec}.stat-card.failed{--accent:#bd2747;--accent-soft:#fde7ec}.stat-label{display:block;color:var(--muted);font-size:11px;font-weight:600}.stat-card b{display:block;color:var(--accent);font-size:31px;line-height:1.2;margin:11px 0 4px;letter-spacing:-1px}.stat-card small{display:block;color:#86999f;font-size:10px}.panel{position:relative;margin-top:26px;border:1px solid var(--line);border-radius:17px;background:var(--paper);box-shadow:var(--shadow);padding:25px}.upload-panel{overflow:hidden}.upload-panel:after{content:"";position:absolute;width:300px;height:300px;border-radius:50%;background:#effbf8;left:-190px;bottom:-235px;pointer-events:none}.panel-intro{position:relative;z-index:1;display:flex;align-items:flex-start;gap:15px;max-width:760px}.panel-symbol{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:13px;background:var(--mint);color:var(--teal);font-size:26px;font-weight:800}.panel-intro h2{margin:0;font-size:20px}.panel-intro>div:last-child>p:last-child{margin:5px 0 0;color:var(--muted);font-size:11.5px;max-width:680px}.workflow-strip{position:relative;z-index:1;display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:23px 0 18px;padding:12px 15px;border-radius:11px;background:#f5faf9;color:#436269;font-size:10.5px;font-weight:600}.workflow-strip span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.workflow-strip b{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#d3efea;color:#0b6665;font-size:10px}.workflow-strip i{width:18px;height:1px;background:#bddbd7}.upload-form{position:relative;z-index:1}.form-grid{display:grid;grid-template-columns:1.45fr repeat(3,.8fr);gap:13px}.field{display:grid;gap:6px;font-size:11px;font-weight:700;color:#446067}.field em{font-style:normal;color:var(--red)}input,select{width:100%;min-width:0;border:1px solid #cfdfdf;border-radius:9px;padding:10px 11px;background:#fff;color:var(--ink);font:500 12px Vazirmatn,Tahoma,sans-serif;outline:none;transition:.2s ease}input:focus,select:focus{border-color:#17978d;box-shadow:0 0 0 3px rgba(20,142,132,.12)}.dropzone{display:flex;position:relative;min-height:142px;flex-direction:column;justify-content:center;align-items:center;gap:4px;margin-top:14px;padding:18px;border:1.5px dashed #8dcfc4;border-radius:12px;background:linear-gradient(135deg,#f5fffc,#f6fcff);text-align:center;cursor:pointer;transition:.2s ease}.dropzone:hover{border-color:#0a857a;background:#effbf7}.dropzone input{position:absolute;inset:0;opacity:0;cursor:pointer}.drop-icon{font-size:24px;line-height:1;color:var(--teal)}.dropzone strong{color:#1a5559;font-size:13px}.dropzone small{color:var(--muted);font-size:10.5px}.dropzone output{max-width:90%;margin-top:6px;overflow:hidden;color:#0d6b67;font-size:10.5px;text-overflow:ellipsis;white-space:nowrap}.form-foot{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-top:13px;color:var(--muted);font-size:10.5px}.archive-heading{align-items:center}.selection-summary{padding:8px 11px;border:1px solid #d7e5e5;border-radius:9px;background:#f7fbfb;color:var(--muted);font-size:10.5px}.selection-summary span{color:var(--teal);font-size:15px;font-weight:800}.filter-bar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-bottom:17px;padding:11px;border:1px solid var(--soft-line);border-radius:12px;background:#f9fbfb}.filter-bar select{width:auto;min-width:150px;padding:9px 11px;font-size:11px}.search-field{display:flex;flex:1 1 280px;align-items:center;gap:7px;min-width:240px;padding:0 10px;border:1px solid #cfdfdf;border-radius:9px;background:#fff;color:#6f888d}.search-field:focus-within{border-color:#17978d;box-shadow:0 0 0 3px rgba(20,142,132,.12)}.search-field input{border:0;box-shadow:none!important;padding:9px 0;background:transparent}.search-field span{font-size:18px;line-height:1}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:11px}.data-table{width:100%;min-width:1010px;border-collapse:collapse}.data-table th{padding:11px 12px;background:#f6faf9;color:#597078;font-size:10.5px;text-align:right;white-space:nowrap}.data-table td{padding:12px;border-top:1px solid var(--soft-line);color:#385158;font-size:11.5px;vertical-align:middle}.data-table tbody tr{transition:.15s ease}.data-table tbody tr:hover{background:#fbfefd}.data-table input[type=checkbox]{width:16px;height:16px;accent-color:var(--teal);cursor:pointer}.case-cell{display:grid;gap:2px;min-width:160px}.case-cell b{color:#24444c;font-size:11.5px}.case-cell small{color:#81959b;font-size:10px}.data-type{display:inline-flex;padding:4px 8px;border-radius:6px;background:#edf8f7;color:#16746e;font-size:10px;font-weight:800;white-space:nowrap}.meta-stack{display:grid;gap:1px}.meta-stack b{font-size:11px}.meta-stack small{color:#809499;font-size:10px}.image-chip{display:inline-flex;gap:5px;align-items:center;padding:4px 8px;border-radius:7px;background:#f1f7f8;color:#46636a;font-size:10.5px;font-weight:700}.issue-count{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:23px;padding:0 7px;border-radius:99px;background:#fff2df;color:#b35c09;font-size:10.5px;font-weight:800}.issue-none{color:#7b9592;font-size:11px}.pill{display:inline-flex;align-items:center;padding:5px 8px;border-radius:99px;font-size:10px;font-weight:800;white-space:nowrap}.UPLOADED{background:#f0efff;color:#5344b4}.PROCESSING{background:#e7f5ff;color:#1975b4}.NEEDS_REVIEW{background:#fff2df;color:#b35c09}.VERIFIED{background:#e1f8ed;color:#087451}.REJECTED,.REJECTED_BY_USER{background:#fee9ed;color:#b4233b}.FAILED{background:#fee9ed;color:#b4233b}.action-link{border:0;background:transparent;color:var(--teal);font:800 11px Vazirmatn,Tahoma,sans-serif;cursor:pointer;white-space:nowrap}.archive-foot{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:16px;padding:13px 0 0}.archive-foot>div{display:grid;gap:1px}.archive-foot b{font-size:11.5px}.archive-foot span{color:var(--muted);font-size:10.5px}.report-filters{max-width:660px}.export-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:12px}.export-card{display:flex;flex-direction:column;min-height:190px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:16px;transition:.2s ease}.export-card:hover{border-color:#a6ceca;box-shadow:var(--shadow-sm);transform:translateY(-2px)}.export-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.file-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#e8f7f3;color:#07816f;font-size:9px;font-weight:800}.export-kind{display:inline-flex;padding:4px 7px;border-radius:6px;background:#eef4ff;color:#4169b0;font-size:9.5px;font-weight:800}.export-card h3{margin:12px 0 4px;color:#28474f;font-size:12px;word-break:break-word}.export-card time{color:#84999e;font-size:10px}.source-list{display:flex;gap:5px;flex-wrap:wrap;margin:13px 0}.source-tag{max-width:100%;overflow:hidden;padding:3px 6px;border-radius:5px;background:#f5f8f8;color:#5d7379;font-size:9.5px;text-overflow:ellipsis;white-space:nowrap}.export-card .button{align-self:flex-start;margin-top:auto}.empty-state{grid-column:1/-1;padding:35px 20px;border:1px dashed #bfd6d4;border-radius:12px;background:#fbfefd;color:#769095;text-align:center;font-size:11.5px}.detail-dialog{width:min(1440px,96vw);max-height:94vh;border:0;border-radius:18px;padding:0;background:transparent;box-shadow:0 25px 90px rgba(3,38,44,.34)}.detail-dialog::backdrop{background:rgba(8,37,46,.6);backdrop-filter:blur(3px)}.dialog-shell{overflow:auto;max-height:94vh;background:#f6faf9}.dialog-header{position:sticky;top:0;z-index:3;display:flex;justify-content:space-between;align-items:flex-start;gap:17px;padding:21px 25px;border-bottom:1px solid var(--line);background:#fff}.dialog-header h2{margin:0;font-size:19px}.icon-button{display:grid;place-items:center;width:32px;height:32px;border:1px solid #d5e1e1;border-radius:8px;background:#fff;color:#506a70;font-size:22px;line-height:1;cursor:pointer}.detail-content{padding:21px 25px 30px}.case-hero{display:grid;grid-template-columns:1.2fr .8fr;gap:15px;margin-bottom:17px}.case-status{display:flex;align-items:center;gap:9px;padding:15px 17px;border:1px solid #dce9e8;border-radius:12px;background:#fff}.case-status p{margin:0;color:var(--muted);font-size:11px}.detail-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:14px;border:1px solid #dce9e8;border-radius:12px;background:#fff}.detail-meta div{min-width:0}.detail-meta span{display:block;color:#81969a;font-size:9.5px}.detail-meta b{display:block;overflow:hidden;color:#36555c;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.detail-section{margin-top:23px}.detail-section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:11px}.detail-section-head h3{margin:0;font-size:14px}.detail-section-head p{margin:2px 0 0;color:var(--muted);font-size:10px}.image-evidence-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:13px}.image-pair{overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#fff}.image-pair-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 11px;border-bottom:1px solid var(--soft-line)}.image-pair-head b{font-size:11px}.image-pair-head span{color:#779197;font-size:9.5px}.evidence-views{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line)}.evidence-view{min-width:0;background:#fff}.evidence-view a{display:block;overflow:hidden;height:150px;background:#edf4f3}.evidence-view img{display:block;width:100%;height:100%;object-fit:cover;transition:.2s ease}.evidence-view a:hover img{transform:scale(1.04)}.evidence-view span{display:block;padding:6px 8px;color:#607980;font-size:9.5px;font-weight:700}.image-pair-foot{padding:8px 11px;color:#72898f;font-size:9.5px}.review-grid{display:grid;gap:11px}.review-card{display:grid;grid-template-columns:minmax(210px,.8fr) minmax(300px,1.2fr) minmax(220px,.85fr);gap:13px;align-items:stretch;padding:14px;border:1px solid #f1c88f;border-radius:12px;background:#fffaf2}.review-address{display:grid;align-content:start;gap:6px}.review-address .address-label{display:inline-flex;align-items:center;gap:5px;color:#a05508;font-size:10px;font-weight:800}.cell-ref{width:max-content;padding:3px 7px;border-radius:5px;background:#feeac7;color:#a44d05;font:800 11px monospace}.review-address strong{font-size:11.5px}.review-address small{color:#7d8b8f;font-size:10px}.review-evidence{display:grid;grid-template-columns:1fr 1fr;gap:8px}.readout{padding:9px;border:1px solid #f1e2c8;border-radius:8px;background:#fff}.readout span{display:block;color:#91816a;font-size:9px}.readout code{display:block;overflow:hidden;margin-top:3px;color:#50391d;font:600 11px/1.5 ui-monospace,monospace;text-overflow:ellipsis;white-space:nowrap}.review-actions{display:grid;align-content:start;gap:7px}.review-actions label{color:#7a664a;font-size:10px;font-weight:700}.review-actions input{padding:8px 9px;border-color:#ebcf9e;font-size:11px}.review-actions .button{padding:8px 9px;font-size:10.5px}.review-links{display:flex;gap:8px;font-size:9.5px}.review-links a{color:#0e766e;text-decoration:none}.review-resolved{padding:11px;border:1px solid #bfe7d7;border-radius:9px;background:#f3fdf8;color:#167553;font-size:10.5px}.row-review{background:#fffaf2}.row-review td{border-top-color:#f4e1bf}.row-source{color:#5b767b;font-size:10px}.detail-export-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:10px}.related-export{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:12px;border:1px solid #dce9e8;border-radius:10px;background:#fff}.related-export b{font-size:11px;word-break:break-word}.related-export small{color:#758d92;font-size:9.5px}.export-lock{padding:15px;border:1px dashed #edcc9b;border-radius:10px;background:#fffaf1;color:#93510d;font-size:11px}.export-lock b{display:block;margin-bottom:2px}.empty-detail{padding:21px;border:1px dashed #c6d9d7;border-radius:10px;background:#fcfefe;color:#748d92;text-align:center;font-size:11px}#toast{position:fixed;z-index:30;right:calc(24px + env(safe-area-inset-right));bottom:24px;max-width:min(390px,calc(100vw - 48px));transform:translateY(20px);opacity:0;padding:11px 14px;border-radius:10px;background:#183f48;color:#fff;box-shadow:0 12px 34px rgba(3,35,43,.25);font-size:11.5px;pointer-events:none;transition:.25s ease}#toast.show{opacity:1;transform:translateY(0)}#toast.bad{background:#a92742}@media(max-width:1350px){.stat-grid{grid-template-columns:repeat(3,1fr)}.case-hero{grid-template-columns:1fr}.detail-meta{grid-template-columns:repeat(4,1fr)}}@media(max-width:1040px){.sidebar{position:static;width:auto;min-height:auto;padding:16px;display:block}.brand-lockup{padding-bottom:13px;border:0}.sidebar-caption,.quality-note{display:none}.main-nav{display:flex;overflow:auto;margin-top:11px}.main-nav a{flex:none;padding:8px 10px;font-size:11px}.profile-card{position:absolute;top:19px;left:18px;margin:0;padding:0;border:0}.profile-card small,.profile-card a{display:none}.workspace{margin-left:0;padding:26px}.topbar{align-items:flex-start}.form-grid{grid-template-columns:repeat(2,1fr)}.review-card{grid-template-columns:1fr}.review-address{grid-template-columns:auto 1fr;align-items:center}.review-address small{grid-column:1/-1}}@media(max-width:680px){.workspace{padding:20px 14px 45px}.topbar,.section-heading,.archive-foot,.form-foot{flex-direction:column;align-items:stretch}.top-actions{justify-content:flex-start}.topbar h1{font-size:21px}.stat-grid{grid-template-columns:repeat(2,1fr)}.stat-card{min-height:113px;padding:14px}.stat-card b{font-size:26px}.panel{margin-top:18px;padding:17px}.form-grid{grid-template-columns:1fr}.workflow-strip{align-items:flex-start;display:grid;grid-template-columns:1fr 1fr}.workflow-strip i{display:none}.filter-bar{align-items:stretch;flex-direction:column}.filter-bar select{width:100%}.search-field{flex-basis:auto;min-width:0}.detail-dialog{width:100vw;max-height:100vh;border-radius:0}.dialog-shell{max-height:100vh}.dialog-header,.detail-content{padding:16px}.detail-meta{grid-template-columns:1fr 1fr}.image-evidence-grid{grid-template-columns:1fr}.review-evidence{grid-template-columns:1fr}.connection{display:none}.archive-foot .button{width:100%}.export-grid{grid-template-columns:1fr}}@media(max-width:390px){.stat-grid{grid-template-columns:1fr}.detail-meta{grid-template-columns:1fr}.profile-card{left:12px}.main-nav a:nth-child(3),.main-nav a:nth-child(4){display:none}}

.field-muted{opacity:.55}.field-muted input:disabled{background:#f1f5f9;cursor:not-allowed}.field>span small{color:var(--muted);font-size:.74rem;font-weight:500}.crop-warning,.crop-ok{display:inline-flex;align-items:center;border-radius:999px;padding:.18rem .52rem;font-size:.72rem;font-weight:800}.crop-warning{color:#9a3412;background:#ffedd5}.crop-ok{color:#166534;background:#dcfce7}.image-pair-foot small{display:block;margin-top:.35rem;color:#64748b}.readout.pro{border-color:#a78bfa;background:#f5f3ff}.readout.pro span{color:#6d28d9}.pro-note{display:block;margin:-.15rem 0 .8rem;padding:.55rem .7rem;color:#5b21b6;background:#f5f3ff;border-radius:.55rem;line-height:1.7}.review-card.structural-card{border-color:#f59e0b}.review-actions.structural{display:grid;gap:.3rem;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:.65rem;padding:.75rem}.review-actions.structural span{font-size:.8rem;line-height:1.7}.detail-actions{display:flex;flex-wrap:wrap;gap:.55rem;justify-content:flex-end}

/* اصلاحات گردش پرونده و نمایش درون‌صفحه‌ای */
.archive-panel .table-wrap{overflow-x:visible}.archive-panel .data-table{min-width:0;table-layout:fixed}.archive-panel .data-table th,.archive-panel .data-table td{padding:10px 8px}.archive-panel .data-table th:nth-child(1){width:34px}.archive-panel .data-table th:nth-child(2){width:18%}.archive-panel .data-table th:nth-child(3){width:13%}.archive-panel .data-table th:nth-child(4){width:19%}.archive-panel .data-table th:nth-child(5){width:12%}.archive-panel .data-table th:nth-child(6){width:10%}.archive-panel .data-table th:nth-child(7){width:12%}.archive-panel .data-table th:nth-child(8){width:110px}.reports-panel{overflow:hidden}.report-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:11px}.report-table{width:100%;min-width:1180px;border-collapse:collapse;table-layout:fixed}.report-table th{padding:11px 9px;background:#f3faf8;color:#557077;font-size:10px;text-align:right;white-space:nowrap}.report-table th:nth-child(1){width:15%}.report-table th:nth-child(2){width:12%}.report-table th:nth-child(3),.report-table th:nth-child(4){width:17%}.report-table th:nth-child(5),.report-table th:nth-child(6),.report-table th:nth-child(7){width:11%}.report-table th:nth-child(8){width:13%}.report-table td{padding:10px 9px;border-top:1px solid var(--soft-line);vertical-align:top;color:#385158;font-size:10.5px;word-break:break-word}.report-table td>b,.report-table td>small{display:block}.report-table td>small{color:var(--muted);font-size:9px;margin-top:2px}.report-type{display:inline-flex!important;width:max-content;padding:2px 5px;border-radius:5px;background:#edf8f7;color:#16746e;font-weight:800}.mini-file-list{display:grid;gap:4px;max-height:105px;overflow:auto}.mini-file,.review-links button{border:1px solid #d4e5e3;border-radius:6px;background:#f8fcfb;color:#176e6c;padding:5px 6px;text-align:right;font:600 9px Vazirmatn,Tahoma,sans-serif;cursor:pointer}.mini-file:hover,.review-links button:hover{border-color:#5fb7ab;background:#edfaf6}.file-download{display:flex;flex-direction:column;gap:2px;width:max-content;max-width:100%;padding:6px 7px;border:1px solid #cfe4e0;border-radius:7px;background:#f3fbf8;color:#0d7069;text-decoration:none;font-weight:800;font-size:9.5px}.file-download small{overflow:hidden;color:#68858a;font-size:8.5px;text-overflow:ellipsis;white-space:nowrap}.not-ready{display:block;color:#a07b55;font-size:9px}.image-viewer-dialog{width:min(1100px,94vw);max-height:94vh;border:0;border-radius:16px;padding:0;background:transparent;box-shadow:0 25px 90px rgba(3,38,44,.45)}.image-viewer-dialog::backdrop{background:rgba(8,37,46,.72);backdrop-filter:blur(4px)}.image-viewer-shell{display:grid;gap:12px;max-height:94vh;padding:17px;background:#f7fbfa}.image-viewer-shell header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:7px;border-bottom:1px solid var(--line)}.image-viewer-shell h2{margin:0;font-size:16px}.image-viewer-body{display:grid;place-items:center;min-height:300px;max-height:76vh;overflow:auto;border-radius:10px;background:#123b42}.image-viewer-body img{display:block;max-width:100%;max-height:74vh;object-fit:contain}.image-viewer-shell>.button{justify-self:start}.evidence-view{border:0;padding:0;text-align:right;cursor:pointer}.evidence-view .evidence-image{display:block;overflow:hidden;height:150px;background:#edf4f3}.evidence-view:hover img{transform:scale(1.04)}.review-links{display:flex;flex-wrap:wrap;gap:5px}.review-links a,.review-links button{display:inline-flex;align-items:center;padding:3px 6px;border:1px solid #d7e6e4;border-radius:5px;background:#fff;color:#176e6c;font-size:9px;text-decoration:none;cursor:pointer}.reason-badge{display:inline-flex;width:max-content;padding:3px 7px;border-radius:6px;font-size:9px;font-weight:800}.reason-badge.mismatch{background:#fff0d5;color:#a85608}.reason-badge.unreadable{background:#ffe9ed;color:#b4233b}.reason-badge.rule{background:#eaf0ff;color:#405da4}@media(max-width:1100px){.workspace{padding:25px 20px}.archive-panel .table-wrap{overflow-x:auto}.archive-panel .data-table{min-width:900px;table-layout:auto}.archive-panel .data-table th:nth-child(n){width:auto}.report-table{min-width:1050px}}@media(max-width:720px){.workspace{margin-left:0;padding:18px 12px 45px}.sidebar{position:relative;width:100%;padding:15px}.main-nav{grid-template-columns:repeat(4,1fr)}.main-nav a{justify-content:center;padding:8px 5px;font-size:10px}.sidebar-caption,.quality-note,.profile-card{display:none}.topbar{display:block}.top-actions{justify-content:flex-start;margin-top:12px}.panel{padding:16px}.report-filters{max-width:none}.detail-content{padding:15px}.case-hero{grid-template-columns:1fr}.review-card{grid-template-columns:1fr}.detail-meta{grid-template-columns:repeat(2,1fr)}}

.report-table-wrap{overflow-x:visible}.report-table{min-width:0;table-layout:fixed}.report-table th,.report-table td{overflow-wrap:anywhere}.report-table .mini-file-list{max-width:100%}@media(max-width:1250px){.report-table th,.report-table td{padding:8px 5px;font-size:9px}.report-table th:nth-child(1){width:14%}.report-table th:nth-child(2){width:11%}.report-table th:nth-child(3),.report-table th:nth-child(4){width:15%}.report-table th:nth-child(5),.report-table th:nth-child(6),.report-table th:nth-child(7){width:12%}.report-table th:nth-child(8){width:17%}}

/* Desktop report table: use the complete workspace width with readable proportional columns. */
.workspace{max-width:none;width:auto}.reports-panel{width:100%}.reports-panel .report-table-wrap{width:100%;overflow:hidden}.reports-panel .report-table{width:100%;min-width:0;table-layout:fixed}.reports-panel .report-table th{padding:12px 10px;font-size:11px;white-space:normal;line-height:1.55}.reports-panel .report-table td{padding:12px 10px;font-size:11px;line-height:1.65;overflow-wrap:anywhere}.reports-panel .report-table th:nth-child(1){width:17%}.reports-panel .report-table th:nth-child(2){width:10%}.reports-panel .report-table th:nth-child(3){width:14%}.reports-panel .report-table th:nth-child(4){width:14%}.reports-panel .report-table th:nth-child(5){width:12%}.reports-panel .report-table th:nth-child(6){width:12%}.reports-panel .report-table th:nth-child(7){width:10%}.reports-panel .report-table th:nth-child(8){width:11%}.reports-panel .mini-file-list{max-height:none;overflow:visible}.reports-panel .file-download{width:100%;font-size:10px;line-height:1.55}.reports-panel .file-download small{white-space:normal;overflow-wrap:anywhere}.reports-panel .not-ready{line-height:1.6}@media(max-width:1100px){.reports-panel .report-table-wrap{overflow-x:auto}.reports-panel .report-table{min-width:980px;table-layout:fixed}.workspace{max-width:none}}@media(max-width:720px){.reports-panel .report-table-wrap{overflow-x:auto}.reports-panel .report-table{min-width:900px}}

/* Keep the report records table exactly aligned with the archive table. */
.archive-panel .table-wrap,.reports-panel #export-list,.reports-panel .report-table-wrap{width:100%;margin-left:0;margin-right:0}.reports-panel #export-list{display:block}.reports-panel .report-table-wrap{overflow:hidden}.reports-panel .report-table{display:table;width:100%;min-width:0;margin:0;table-layout:fixed}.main-nav a{position:relative}.main-nav a.active{color:#fff;background:linear-gradient(90deg,rgba(255,255,255,.17),rgba(94,234,212,.18));box-shadow:inset 4px 0 0 #5eead4,0 8px 18px rgba(0,0,0,.12)}.main-nav a.active:after{content:"";position:absolute;right:9px;width:6px;height:6px;border-radius:50%;background:#5eead4;box-shadow:0 0 0 4px rgba(94,234,212,.12)}

/* Temporal ordinal column: newest records remain at the bottom. */
.sequence-cell{width:5%;min-width:42px;text-align:center;color:#0f5963;font-variant-numeric:tabular-nums}.archive-panel .data-table{width:100%;min-width:0;table-layout:fixed}.archive-panel .data-table th:nth-child(1),.archive-panel .data-table td:nth-child(1){width:5%}.archive-panel .data-table th:nth-child(2),.archive-panel .data-table td:nth-child(2){width:15%}.archive-panel .data-table th:nth-child(3),.archive-panel .data-table td:nth-child(3){width:11%}.archive-panel .data-table th:nth-child(4),.archive-panel .data-table td:nth-child(4){width:20%}.archive-panel .data-table th:nth-child(5),.archive-panel .data-table td:nth-child(5){width:11%}.archive-panel .data-table th:nth-child(6),.archive-panel .data-table td:nth-child(6){width:9%}.archive-panel .data-table th:nth-child(7),.archive-panel .data-table td:nth-child(7){width:12%}.archive-panel .data-table th:nth-child(8),.archive-panel .data-table td:nth-child(8){width:17%}.reports-panel .report-table{width:100%;min-width:0;table-layout:fixed}.reports-panel .report-table th:nth-child(1),.reports-panel .report-table td:nth-child(1){width:5%}
/* Human review guidance: explicit image, row, column and cell location. */
.review-location{display:grid;gap:6px;margin-top:8px;padding:10px;border:1px solid #f1d8ae;border-radius:9px;background:#fffdf8}
.review-location>div{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.review-location span{color:#8c7658;font-size:9.5px;font-weight:700}
.review-location b{color:#493a28;font-size:10.5px;text-align:left;overflow-wrap:anywhere}
.review-location .cell-ref{font-size:12px}
.review-evidence-wrap{min-width:0}
.review-evidence-title{margin-bottom:6px;color:#75552c;font-size:10.5px;font-weight:800}
.review-card .review-evidence{align-self:start}
.review-card .review-links{margin-top:8px}

/* All report/output row controls stretch to the tallest control in their row. */
.reports-panel .report-table tbody tr{height:1px}
.reports-panel .report-table tbody td{height:inherit;vertical-align:middle}
.reports-panel .report-table .mini-file-list{display:flex;flex-direction:column;align-items:stretch;gap:4px;height:100%;overflow:visible}
.reports-panel .report-table .mini-file,.reports-panel .report-table .file-download{display:flex;flex:1 1 auto;min-height:34px;align-items:center;justify-content:center}
.reports-panel .report-table .mini-file{width:100%;border:1px solid #dce8e8;border-radius:7px;padding:7px 8px;background:#f7fbfb;color:#176d70;font:700 10px/1.45 Vazirmatn,Tahoma,sans-serif;text-align:center;cursor:pointer;white-space:normal;word-break:break-word}
.reports-panel .report-table .mini-file:hover{border-color:#8fc9c2;background:#effaf7}
.reports-panel .report-table .file-download{height:100%;flex-direction:column;gap:2px;text-align:center;white-space:normal}
.reports-panel .report-table .file-download small{display:block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:normal;overflow-wrap:anywhere}
.reports-panel .report-table .not-ready{display:flex;min-height:34px;height:100%;align-items:center;justify-content:center;text-align:center}

/* Export table: aggregate download is separated from report rows; image bundles use two equal-height columns. */
.reports-panel .report-table th:nth-child(1),.reports-panel .report-table td:nth-child(1){width:5%}
.reports-panel .report-table th:nth-child(2),.reports-panel .report-table td:nth-child(2){width:12%}
.reports-panel .report-table th:nth-child(3),.reports-panel .report-table td:nth-child(3){width:14%}
.reports-panel .report-table th:nth-child(4),.reports-panel .report-table td:nth-child(4){width:12%}
.reports-panel .report-table th:nth-child(5),.reports-panel .report-table td:nth-child(5){width:12%}
.reports-panel .report-table th:nth-child(6),.reports-panel .report-table td:nth-child(6){width:12%}
.reports-panel .report-table th:nth-child(7),.reports-panel .report-table td:nth-child(7){width:11%}
.reports-panel .report-table th:nth-child(8),.reports-panel .report-table td:nth-child(8){width:11%}
.reports-panel .report-table th:nth-child(9),.reports-panel .report-table td:nth-child(9){width:11%}
.reports-panel .report-table td:nth-child(7) .file-download,.reports-panel .report-table td:nth-child(8) .file-download{height:100%;min-height:34px;align-items:center;justify-content:center}
#download-aggregate.disabled,#download-aggregate-issues.disabled,.aggregate-download-actions button:disabled{pointer-events:none;opacity:.55;filter:grayscale(.2);cursor:not-allowed}

/* چیدمان فشرده گزارش‌ها: در دسکتاپ تمام ستون‌ها در یک صفحه دیده شوند. */
.aggregate-download-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.quality-problems-box{display:grid;gap:10px;padding:14px;border:1px solid #e79aa7;border-radius:12px;background:#fff1f3;color:#891f31}.quality-problems-box.empty{border-color:#c9ded8;background:#f4fbf9;color:#2c6c61}.quality-problems-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:8px;border-bottom:1px solid #efbec6}.quality-problems-head b{font-size:12px}.quality-problems-head span{padding:3px 8px;border-radius:99px;background:#b4233b;color:#fff;font-size:10px;font-weight:800}.quality-problems-box .review-summary{margin:0}.quality-problems-box .review-grid{margin:0}.case-issue-report{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:0 0 12px;padding:12px 14px;border:1px solid #e2e9e8;border-radius:10px;background:#fff}.case-issue-report>div{display:grid;gap:2px}.case-issue-report b{font-size:11.5px}.case-issue-report span{color:#698087;font-size:10px}.case-issue-report.available{border-color:#edb0ba;background:#fff6f7}.case-issue-report.empty{border-color:#c7ddd7;background:#f5fbf9}.case-issue-report.empty .issue-none{white-space:nowrap;font-weight:700}.report-table-wrap{width:100%;overflow:hidden;border:1px solid var(--line);border-radius:11px}.report-table{width:100%;border-collapse:collapse;table-layout:fixed}.report-table th{padding:8px 6px;background:#f5faf9;color:#526d74;font-size:9.5px;line-height:1.35;text-align:center;white-space:normal}.report-table td{padding:7px 6px;border-top:1px solid var(--soft-line);color:#385158;font-size:10px;line-height:1.45;text-align:center;vertical-align:middle;overflow:hidden}.report-table tbody tr{height:56px}.report-table small{display:block;overflow:hidden;color:#748a90;font-size:9px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.report-table th:nth-child(1){width:4%}.report-table th:nth-child(2){width:12%}.report-table th:nth-child(3){width:12%}.report-table th:nth-child(4){width:25%}.report-table th:nth-child(5){width:9%}.report-table th:nth-child(6){width:14%}.report-table th:nth-child(7){width:12%}.report-table th:nth-child(8){width:12%}.report-case,.report-meta{display:grid;gap:1px;min-width:0}.report-case b,.report-meta b{overflow:hidden;font-size:10.5px;text-overflow:ellipsis;white-space:nowrap}.report-image-list{display:grid;gap:4px}.report-image-line{display:grid;grid-template-columns:15px minmax(0,1fr) 21px 21px;gap:3px;align-items:center;min-height:24px}.report-image-line b{display:grid;place-items:center;width:15px;height:15px;border-radius:50%;background:#e4f3f1;color:#14716b;font-size:8px}.report-image-line span{overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap}.report-image-line button{height:21px;padding:0;border:1px solid #cfe1df;border-radius:5px;background:#fff;color:#15736c;font:800 9px Vazirmatn,Tahoma,sans-serif;cursor:pointer}.compact-download{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:5px 7px;border:1px solid #cbdedd;border-radius:7px;background:#fff;color:#156d67;font-size:9.5px;font-weight:800;line-height:1;text-decoration:none;white-space:nowrap}.compact-download:hover{border-color:#67a89f;background:#f3fbfa}.issue-report-download{border-color:#e3aab3;background:#fff4f5;color:#a52b40}.compact-link-stack{display:flex;justify-content:center;gap:4px}.compact-empty{display:inline-block;color:#789096;font-size:9px;line-height:1.3}.report-status{min-width:0}.report-status .pill{justify-content:center;font-size:8.5px;padding:4px 6px}.report-status small{margin-top:3px}@media (max-width:1099px){.report-table-wrap{overflow:auto}.report-table{min-width:900px}.aggregate-download-actions{width:100%}.case-issue-report{align-items:flex-start;flex-direction:column}}

/* بازطراحی نهایی کارت‌های گزارش: هر نوع اطلاعات در ستون مستقل و خوانا قرار می‌گیرد. */
.report-record-list{display:grid;gap:10px;width:100%}.report-record-head,.report-record{display:grid;grid-template-columns:4% 14% 14% 25% 18% 11% 14%;align-items:stretch}.report-record-head{padding:0 12px;color:#597078;font-size:10px;font-weight:800}.report-record-head span{padding:0 9px;text-align:center}.report-record{overflow:hidden;min-height:112px;border:1px solid #dce9e8;border-radius:13px;background:#fff;box-shadow:0 4px 12px rgba(20,65,72,.035);transition:.18s ease}.report-record:hover{border-color:#90c5bf;box-shadow:0 10px 22px rgba(20,65,72,.08);transform:translateY(-1px)}.report-record-index{display:flex;align-items:center;justify-content:center;border-left:1px solid #e2eceb;background:#f0f8f7;color:#0b706b;font-size:16px;font-weight:800}.report-cell{display:grid;align-content:center;justify-items:center;gap:5px;min-width:0;padding:14px 11px;border-left:1px solid #e2eceb;text-align:center}.report-cell small{color:#84989d;font-size:9.5px;font-weight:700}.report-cell>b{max-width:100%;overflow:hidden;color:#294950;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.report-cell>span:not(.data-type):not(.pill){max-width:100%;overflow:hidden;color:#60777d;font-size:10.5px;line-height:1.45;text-overflow:ellipsis}.report-case-cell{background:#f8fbfb}.report-company-cell{background:#fbfdfd}.report-images-cell{justify-items:stretch;background:#f8fbfb}.report-image-stack{display:grid;gap:6px}.report-image-item{display:grid;grid-template-columns:19px minmax(0,1fr) 31px 35px;gap:5px;align-items:center;min-height:30px}.report-image-item>b{display:grid;place-items:center;width:19px;height:19px;border-radius:50%;background:#e2f3f0;color:#0f716b;font-size:9px}.report-image-item span{overflow:hidden;color:#3e5b61;font-size:10px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.report-image-item button{height:26px;padding:0 3px;border:1px solid #c7dedb;border-radius:6px;background:#fff;color:#156e67;font:800 9px Vazirmatn,Tahoma,sans-serif;cursor:pointer}.report-image-item button:hover{border-color:#4ca79c;background:#eef9f7}.report-output-cell{background:#fbfdfd}.report-output-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;width:100%}.report-output-actions .compact-download:first-child{grid-column:1/-1}.report-output-actions .compact-download{width:100%;min-height:30px;font-size:10px}.report-problem-cell{background:#fffafa}.report-problem-cell .compact-download{min-width:86px;min-height:31px;font-size:10px}.report-status-cell{background:#f8fbfb}.report-status-cell .pill{font-size:9px}.report-status-cell>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;white-space:normal!important}.report-empty{color:#84989d;font-size:10px}@media (max-width:1250px){.report-record-head{display:none}.report-record{grid-template-columns:5% 16% 16% 25% 18% 12% 8%}.report-status-cell>span{display:none}}@media (max-width:1099px){.report-record-head{display:none}.report-record{grid-template-columns:1fr 1fr}.report-record-index{display:none}.report-cell{min-height:106px;border-bottom:1px solid #e2eceb}.report-images-cell,.report-output-cell{grid-column:1/-1}.report-status-cell{grid-column:1/-1}}

/* وضعیت تصویر ناقص/ناخوانا و درخواست تصویر جایگزین */
.NEEDS_SOURCE_REPLACEMENT{background:#ffe5e8!important;color:#b4233b!important}.source-replacement-badge{display:inline-flex;align-items:center;justify-content:center;max-width:100%;padding:5px 8px;border:1px solid #f1b7c0;border-radius:7px;background:#fff0f2;color:#ae2440;font-size:10px;font-weight:800;line-height:1.35;text-align:center}.intake-ok{display:inline-flex;padding:3px 7px;border-radius:5px;background:#e7f8ef;color:#087451;font-size:9.5px;font-weight:800}.source-replacement-card{display:grid;gap:7px;padding:14px;border:1px solid #e27686;border-radius:11px;background:#fff0f2;color:#8e1c31}.source-replacement-card>b{font-size:12px}.source-replacement-card span{font-size:11px;font-weight:700}.source-replacement-card small{color:#9a3b4d;font-size:10px}.source-replacement-card .review-links{margin-top:2px}.source-replacement-card .review-links a,.source-replacement-card .review-links button{border-color:#e8a3ae;background:#fff;color:#9d253a}

.replacement-upload{display:flex;align-items:end;gap:9px;flex-wrap:wrap;margin-top:5px;padding-top:9px;border-top:1px solid #efbdc5}.replacement-upload label{display:grid;gap:4px;flex:1 1 250px;font-size:10px;font-weight:800;color:#8e1c31}.replacement-upload input{max-width:100%;padding:6px;border:1px dashed #db8896;border-radius:7px;background:#fff;color:#533}.replacement-upload.set-level{display:grid;align-items:start;color:#8e1c31;font-size:11px}.replacement-upload.set-level span{font-weight:500}

/* کنترل دوره ماهانه و صفحه‌بندی قابل‌مدیریت در مجموعه‌ها و گزارش‌ها */
.period-selector{display:flex;align-items:center;gap:6px;min-width:178px;padding:5px 7px 5px 10px;border:1px solid #cfdfdf;border-radius:9px;background:#fff;color:#58747a;font-size:10px;font-weight:800}.period-selector select{min-width:112px;border:0;padding:4px;background:transparent;box-shadow:none!important;font-size:10.5px}.results-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:13px;padding:10px 12px;border:1px solid #dce9e8;border-radius:10px;background:#f8fbfb;color:#58737a;font-size:10.5px;font-weight:700}.pager-actions{display:flex;gap:7px;flex-wrap:wrap}.results-pager .button{min-height:31px}.reports-panel #exports-pager{margin-top:13px}@media(max-width:720px){.period-selector{width:100%;justify-content:space-between}.period-selector select{width:auto}.results-pager{align-items:stretch;flex-direction:column}.pager-actions .button{flex:1}}

/* فشرده‌سازی کنترل‌های جست‌وجو: همه فیلدها در یک ردیف دسکتاپ باقی می‌مانند. */
@media (min-width:900px){
  .archive-panel>.filter-bar{display:grid;grid-template-columns:minmax(185px,1.45fr) 112px 118px 148px 104px max-content;gap:7px;align-items:center;flex-wrap:nowrap}
  .reports-panel>.filter-bar{display:grid;grid-template-columns:minmax(190px,1fr) 136px 148px 104px;gap:7px;align-items:center;max-width:none;flex-wrap:nowrap}
  .archive-panel>.filter-bar .search-field,.reports-panel>.filter-bar .search-field{min-width:0;flex:none;padding:0 8px}
  .archive-panel>.filter-bar select,.reports-panel>.filter-bar select{min-width:0;padding:8px 8px;font-size:10.5px}
  .archive-panel>.filter-bar .period-selector,.reports-panel>.filter-bar .period-selector{min-width:0;gap:4px;padding:4px 5px 4px 7px;font-size:9.5px;white-space:nowrap}
  .archive-panel>.filter-bar .period-selector select,.reports-panel>.filter-bar .period-selector select{width:76px;min-width:76px;padding:4px 1px;font-size:9.5px}
  .archive-panel>.filter-bar .button.compact{padding:8px 10px;font-size:10.5px}
  .archive-panel>.filter-bar .search-field input,.reports-panel>.filter-bar .search-field input{padding:8px 0;font-size:10.5px}
}

/* فرم ثبت مجموعه: پنج فیلد ورودی در یک ردیف دسکتاپ، با نسبت‌های متوازن. */
@media (min-width:900px){
  .upload-form .form-grid{grid-template-columns:minmax(175px,1.45fr) repeat(4,minmax(104px,.76fr));gap:9px;align-items:end}
  .upload-form .field{gap:4px;font-size:10.5px}
  .upload-form .field input,.upload-form .field select{padding:8px 9px;font-size:11px}
}
@media (min-width:900px) and (max-width:1130px){
  .upload-form .form-grid{grid-template-columns:minmax(155px,1.25fr) repeat(4,minmax(92px,.7fr));gap:7px}
  .upload-form .field{font-size:10px}
  .upload-form .field input,.upload-form .field select{padding:7px 7px;font-size:10.5px}
}

/* بهینه‌سازی بصری: تجمیع کلی متمایز و فضای کاری عریض‌تر در دسکتاپ. */
#download-global-aggregate{border-color:#e7c66e;background:#fff4c9;color:#805d12;box-shadow:0 7px 16px rgba(180,132,23,.14)}
#download-global-aggregate:hover{border-color:#d7ae3e;background:#ffeb9b;color:#62450a}
#download-global-aggregate.disabled{pointer-events:none;opacity:.55;filter:grayscale(.18)}
@media (min-width:1041px){
  .sidebar{width:248px}
  .workspace{margin-left:248px}
}

/* کنترل خودکار تطابق نام و ترتیب ZIP خام و کراپ در مشاهده پرونده. */
.archive-name-check{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:11px;align-items:start;margin:0 0 12px;padding:12px 14px;border:1px solid #d6e5e3;border-radius:11px;background:#f8fbfb;color:#365b60}.archive-name-check-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;font-size:16px;font-weight:900}.archive-name-check b,.archive-name-check span,.archive-name-check small{display:block}.archive-name-check b{font-size:11.5px}.archive-name-check span{margin-top:2px;font-size:10.5px;line-height:1.6}.archive-name-check small{margin-top:4px;color:#607b80;font-size:9.5px;font-weight:700}.archive-name-check em{align-self:center;padding:4px 8px;border-radius:99px;font-size:9px;font-style:normal;font-weight:900;white-space:nowrap}.archive-name-check ul{margin:7px 0 0;padding-right:17px;font-size:9.5px;line-height:1.65}.archive-name-check.matched{border-color:#a8dac6;background:#f0fcf6;color:#17634d}.archive-name-check.matched .archive-name-check-icon,.archive-name-check.matched em{background:#d4f4e3;color:#087451}.archive-name-check.mismatch{border-color:#efacb8;background:#fff2f4;color:#95263a}.archive-name-check.mismatch .archive-name-check-icon,.archive-name-check.mismatch em{background:#ffdbe1;color:#b4233b}.archive-name-check.pending{border-color:#dfcf9e;background:#fffaf0;color:#836523}.archive-name-check.pending .archive-name-check-icon,.archive-name-check.pending em{background:#fff0c3;color:#9a6d09}@media(max-width:620px){.archive-name-check{grid-template-columns:30px minmax(0,1fr)}.archive-name-check em{grid-column:1/-1;justify-self:start}}

/* کارت‌های دوره در سربرگ: متقارن، متمایز و جدا از ابزارهای جست‌وجو. */
.heading-summary-actions{display:flex;align-items:stretch;gap:8px}.heading-summary-actions .selection-summary,.period-header-card{display:flex;align-items:center;justify-content:center;min-width:166px;min-height:48px;margin:0;padding:8px 11px;border-radius:11px;font-size:10px;font-weight:800;white-space:nowrap}.heading-summary-actions .selection-summary{border:1px solid #cfe4e2;background:linear-gradient(135deg,#f5fbfa,#edf8f7);color:#52727a}.heading-summary-actions .selection-summary span{font-size:14px}.period-header-card{gap:6px;border:1px solid #9fcede;background:linear-gradient(135deg,#e8fbfb,#eaf1ff);color:#176878;box-shadow:0 7px 17px rgba(28,116,145,.10)}.period-header-card span{font-size:10px}.period-header-card select{width:98px;min-width:98px;border:0;border-radius:7px;padding:5px 4px;background:rgba(255,255,255,.88);color:#145465;box-shadow:none!important;font:800 10px Vazirmatn,Tahoma,sans-serif;cursor:pointer}.period-header-card select:focus{box-shadow:0 0 0 3px rgba(48,151,178,.16)!important}.reports-heading{align-items:center}@media (min-width:900px){.archive-panel>.filter-bar{grid-template-columns:minmax(300px,1.85fr) 158px 158px 134px max-content}.reports-panel>.filter-bar{grid-template-columns:minmax(340px,1fr) 190px 138px}.archive-panel>.filter-bar .search-field,.reports-panel>.filter-bar .search-field{flex:1 1 auto}.archive-panel>.filter-bar .period-selector,.reports-panel>.filter-bar .period-selector{min-width:134px}.archive-panel>.filter-bar .period-selector select,.reports-panel>.filter-bar .period-selector select{width:72px;min-width:72px}}
@media(max-width:760px){.heading-summary-actions{width:100%;flex-wrap:wrap}.heading-summary-actions .selection-summary,.period-header-card{flex:1 1 160px}.period-header-card select{width:auto;min-width:0}.reports-heading{align-items:stretch}}

/* مسیر بازبینی انسانی: توضیح ساده، آدرس دقیق و اقدام نهایی */
.plain-guidance { display:grid; gap:6px; margin:12px 0; padding:12px 14px; border:1px solid #b8d8df; border-right:4px solid #168294; border-radius:12px; background:#effbfd; color:#17464f; line-height:1.85; }
.plain-guidance b { font-size:.92rem; color:#104a55; }
.plain-guidance span { font-size:.82rem; color:#35616a; }
.action-confirm-card { border-color:#9bcfc2; background:linear-gradient(135deg,#f2fffb 0%,#fafffd 100%); }
.action-confirm-card .review-actions { gap:10px; }
.payer-header-card { border-color:#9bbfe7; background:linear-gradient(135deg,#f3f8ff 0%,#fcfdff 100%); }
.payer-header-actions { display:grid; grid-template-columns:110px minmax(180px,.7fr) 110px minmax(240px,1.15fr) auto; align-items:center; gap:9px; }
.payer-header-actions label { font-size:.82rem; color:#31516d; font-weight:800; }
.payer-header-actions input { min-width:0; height:37px; border:1px solid #a9c5e1; border-radius:9px; padding:0 10px; background:#fff; }
.payer-header-actions .button { white-space:normal; min-height:37px; }
@media (max-width: 1040px) { .payer-header-actions { grid-template-columns:1fr; } .payer-header-actions label { margin-top:4px; } }

/* اعلان مرحله‌ای پردازش مجموعه تصویر */
.processing-notice { display:none; margin-top:15px; padding:16px; border:1px solid #a9d5d1; border-radius:16px; background:linear-gradient(135deg,#effcf9,#f9fffe); color:#1a5f5c; box-shadow:0 10px 26px rgba(15,108,100,.08); overflow:hidden; }
.processing-notice.show { display:block; }
.processing-notice-head { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:12px; padding-bottom:13px; border-bottom:1px solid rgba(28,111,105,.12); }
.processing-notice-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:13px; background:#d9f6ee; color:#0b776a; font-size:20px; font-weight:900; }
.processing-notice.working .processing-notice-icon { animation:processingPulse 1.3s ease-in-out infinite; }
.processing-notice-head > div { display:grid; gap:3px; min-width:0; }
.processing-notice b { font-size:12px; color:#15554f; }
.processing-notice span { font-size:10.5px; line-height:1.8; color:#4b7672; }
.processing-stage-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 2px 9px; color:#4b7672; font-size:10px; }
.processing-stage-summary strong { color:#0b776a; font-size:12px; }
.processing-steps { list-style:none; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; padding:0; margin:0; counter-reset:stage; }
.processing-step { position:relative; display:flex; align-items:center; gap:7px; min-height:48px; padding:8px 9px; border:1px solid #d9ebe8; border-radius:11px; background:#fbfffe; }
.processing-step::after { content:''; position:absolute; left:-8px; top:50%; width:7px; border-top:1px dashed #bddbd6; }
.processing-step:nth-child(5n+1)::after { display:none; }
.processing-step > div { min-width:0; display:grid; gap:2px; }
.processing-step b { font-size:10px; line-height:1.55; color:#456c68; }
.processing-step small { font-size:9px; color:#8aa5a1; }
.processing-step-index { flex:0 0 24px; display:grid; place-items:center; width:24px; height:24px; border-radius:8px; background:#eef5f4; color:#789490; font-size:10px; font-weight:900; }
.processing-step.done { border-color:#b7e1c8; background:#f5fff8; }
.processing-step.done .processing-step-index { background:#d9f6e5; color:#087451; }
.processing-step.done b,.processing-step.done small { color:#087451; }
.processing-step.current { border-color:#72c4b9; background:#effcf9; box-shadow:0 0 0 2px rgba(70,173,160,.12); }
.processing-step.current .processing-step-index { background:#c9f0e7; color:#0b776a; }
.processing-step.current b { color:#0b776a; }
.processing-step.attention { border-color:#efd09a; background:#fffaf0; }
.processing-step.attention .processing-step-index { background:#fff0d3; color:#a85a05; }
.processing-step.attention b,.processing-step.attention small { color:#a85a05; }
.processing-step.pending { opacity:.72; }
.processing-notice.success { border-color:#9fd8bd; background:linear-gradient(135deg,#effcf5,#fbfffd); }
.processing-notice.success .processing-notice-icon { background:#d9f6e5; color:#087451; }
.processing-notice.review,.processing-notice.replacement { border-color:#efd09a; background:linear-gradient(135deg,#fff8ea,#fffdf8); }
.processing-notice.review .processing-notice-icon,.processing-notice.replacement .processing-notice-icon { background:#fff0d3; color:#a85a05; }
.processing-notice.failed { border-color:#efb4bd; background:linear-gradient(135deg,#fff4f5,#fffafb); }
.processing-notice.failed .processing-notice-icon { background:#fee3e7; color:#b4233b; }
@keyframes processingPulse { 0%,100% { transform:scale(1); box-shadow:0 0 0 0 rgba(11,119,106,.18); } 50% { transform:scale(1.08); box-shadow:0 0 0 7px rgba(11,119,106,0); } }
@media (max-width: 920px) { .processing-steps { grid-template-columns:repeat(2,minmax(0,1fr)); } .processing-step:nth-child(5n+1)::after { display:block; } .processing-step:nth-child(2n+1)::after { display:none; } }
@media (max-width: 700px) { .processing-notice-head { grid-template-columns:36px 1fr; } .processing-notice-head .button { grid-column:1/-1; width:100%; } .processing-steps { grid-template-columns:1fr; gap:6px; } .processing-step::after { display:none; } .processing-step { min-height:42px; } }

.duplicate-delete-zone{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px;padding:11px;border:1px solid #f0b8c0;border-radius:10px;background:#fff5f6;color:#8d1b2c;font-size:10.5px}.duplicate-delete-zone b{font-size:11px}.duplicate-delete-zone span{flex:1;min-width:190px}.button.danger{background:#b4233c!important;border-color:#b4233c!important;color:#fff!important}.button.danger:hover{background:#8f1930!important;border-color:#8f1930!important}

/* بازبینی انتخاب نوع دیتا: تصمیم نهایی فقط با کاربر است. */
.type-decision-banner{margin:14px 0;padding:18px;border:1px solid #e4b65f;border-radius:16px;background:linear-gradient(135deg,#fff7e8,#fffdf8);box-shadow:0 10px 24px rgba(163,101,12,.08);color:#71420b}
.type-decision-heading{display:flex;align-items:flex-start;gap:12px}.type-decision-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:11px;background:#fff0ce;color:#a65a00;font-weight:900;font-size:17px}.type-decision-heading b{display:block;font-size:14px;color:#8a4b00}.type-decision-heading p{margin:4px 0 0;line-height:1.9;font-size:12px;color:#775226}.type-decision-heading strong{color:#9b5000}.type-decision-explanation{display:grid;gap:5px;margin-top:14px;padding:11px 13px;border-radius:11px;background:rgba(255,255,255,.7);border:1px solid rgba(216,161,69,.3);font-size:11.5px;line-height:1.9}.type-decision-explanation b{color:#8a4b00}.type-decision-explanation span{color:#644d30}.type-decision-explanation small{color:#8c7656}.type-decision-options{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px}.type-decision-options .button{min-height:40px;white-space:normal;line-height:1.65}.type-decision-options .button.primary{background:#0c756b;border-color:#0c756b}.type-decision-options .button.ghost{border-color:#b77a19;color:#87520b;background:#fffdf8}@media(max-width:650px){.type-decision-banner{padding:14px}.type-decision-options{display:grid;grid-template-columns:1fr}.type-decision-options .button{width:100%}}

/* Image-level reprocess action */
.image-reprocess-button{display:flex;align-items:center;justify-content:center;width:100%;margin-top:9px;padding:9px 11px;border:1px solid #78c9bd;border-radius:9px;background:linear-gradient(135deg,#eafff8,#effbff);color:#08756d;font:800 10.5px Vazirmatn,Tahoma,sans-serif;cursor:pointer;transition:.2s ease}.image-reprocess-button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 7px 16px rgba(14,141,132,.16);border-color:#0e8d84}.image-reprocess-button:disabled{cursor:wait;opacity:.78}.image-reprocess-button.is-processing{color:#1767a0;background:#eef8ff;border-color:#9bc8e7}.image-reprocess-button.is-done{color:#087451;background:#e9fbf2;border-color:#9ad9bd}.image-reprocess-button.is-failed{color:#a51f38;background:#fff1f3;border-color:#f0afb9}.image-reprocess-hint{display:block!important;margin-top:5px;color:#789197;font-size:9px!important}.image-pair-reprocessing{border-color:#8fcbd2;box-shadow:0 0 0 3px rgba(14,141,132,.08)}


/* کارت مستقل ساخت خروجی انتخابی؛ فقط ظاهر و درخواست فایل، بدون تغییر pipeline پردازش. */
.aggregate-builder-panel{border-color:#cfe4e2;background:linear-gradient(140deg,#fff,#f4fbfb)}.aggregate-builder-form{display:grid;gap:13px}.aggregate-builder-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:stretch}.builder-field{display:flex;flex-direction:column;min-height:176px;padding:12px;border:1px solid #cfe4e2;border-radius:13px;background:rgba(255,255,255,.92);box-shadow:0 7px 16px rgba(16,83,86,.05)}.builder-field-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:24px;margin-bottom:8px;color:#244f56;font-size:11px;font-weight:900}.text-button{border:0;background:transparent;color:#08756d;font:800 10px Vazirmatn,Tahoma,sans-serif;cursor:pointer}.text-button:hover{text-decoration:underline}.builder-search,.builder-period-tools{display:flex;align-items:center;gap:6px;min-height:37px;padding:0 9px;border:1px solid #bed9d8;border-radius:9px;background:#fbffff;color:#58747a}.builder-search input,.builder-period-tools input{width:100%;min-width:0;border:0!important;outline:0;background:transparent!important;box-shadow:none!important;padding:7px 0!important;font:700 10.5px Vazirmatn,Tahoma,sans-serif}.builder-period-tools input{direction:ltr;text-align:center}.builder-period-tools .button{flex:0 0 auto;min-height:28px;padding:5px 8px}.builder-choice-list{display:grid;gap:5px;min-height:74px;max-height:124px;margin-top:8px;padding:3px;overflow:auto}.builder-choice{display:flex;align-items:center;gap:7px;min-height:30px;padding:5px 7px;border:1px solid transparent;border-radius:8px;background:#f7fbfb;color:#36565d;font-size:10.5px;font-weight:700;cursor:pointer}.builder-choice:hover{border-color:#a9d7d0;background:#effaf8}.builder-choice input{accent-color:#08756d}.builder-choice i{font-style:normal;color:#82a1a4}.builder-empty{display:block;padding:12px 6px;color:#7e9598;font-size:10px}.builder-hint{display:block;margin-top:7px;color:#8b6a31;font-size:9.5px;line-height:1.75}.aggregate-builder-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border:1px solid #d5e8e6;border-radius:12px;background:#faffff}.aggregate-builder-status{flex:1;color:#58747a;font-size:10.5px;line-height:1.8}.aggregate-builder-status b{color:#08756d}.aggregate-builder-actions{display:flex;gap:8px;flex-wrap:wrap}.aggregate-builder-actions .button{min-height:39px;min-width:142px}.aggregate-builder-actions .button:disabled{cursor:wait;opacity:.72}@media(max-width:980px){.aggregate-builder-grid{grid-template-columns:1fr 1fr}.builder-field:last-child{grid-column:1/-1}}@media(max-width:650px){.aggregate-builder-grid{grid-template-columns:1fr}.builder-field:last-child{grid-column:auto}.aggregate-builder-foot{align-items:stretch;flex-direction:column}.aggregate-builder-actions{display:grid;grid-template-columns:1fr}.aggregate-builder-actions .button{width:100%}}


/* اصلاح دقیق کارت ساخت خروجی: checkbox ثابت در سمت راست و متن یک‌خطی در همهٔ نمایش‌ها. */
.aggregate-builder-grid{align-items:stretch}.builder-field{min-height:76px;padding:0;overflow:hidden}.builder-trigger{display:grid;grid-template-columns:minmax(72px,.72fr) minmax(0,1fr) 22px;align-items:center;gap:8px;width:100%;min-height:76px;padding:12px;border:0;background:transparent;color:#244f56;text-align:right;font:inherit;cursor:pointer}.builder-trigger>span{font-size:11px;font-weight:900;white-space:nowrap}.builder-trigger>b{min-width:0;color:#08756d;font-size:10.5px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.builder-trigger>i{display:grid;place-items:center;width:22px;height:22px;border:1px solid #b8d8d3;border-radius:7px;background:#f3fbfa;color:#08756d;font-size:15px;font-style:normal;line-height:1;transition:transform .18s ease}.builder-field.is-open .builder-trigger{min-height:57px;border-bottom:1px solid #d9eae8;background:#f8fdfc}.builder-field.is-open .builder-trigger>i{transform:rotate(180deg)}.builder-dropdown{display:none;padding:0 12px 12px}.builder-field.is-open .builder-dropdown{display:grid;gap:8px}.builder-search,.builder-period-tools{min-height:38px}.builder-period-tools{display:grid;grid-template-columns:minmax(62px,.72fr) minmax(86px,1fr) auto;padding:5px 7px}.builder-period-tools select{width:100%;min-width:0;border:0!important;outline:0;background:transparent!important;box-shadow:none!important;color:#36565d;font:800 10.5px Vazirmatn,Tahoma,sans-serif;cursor:pointer}.builder-choice-list{min-height:0;max-height:178px;margin-top:0;padding:2px;overflow:auto}.builder-dropdown-actions{display:grid;grid-template-columns:1fr minmax(0,1fr);gap:5px;padding-bottom:5px;border-bottom:1px solid #e2efed}.builder-reset-choice{min-height:31px;border:1px dashed #abcfc9;border-radius:8px;background:#fff;color:#52757b;font:800 10px Vazirmatn,Tahoma,sans-serif;cursor:pointer}.builder-choice{position:relative;display:block;min-height:32px;padding:7px 36px 7px 8px;border:1px solid transparent;border-radius:8px;background:#f7fbfb;color:#36565d;font-size:10.5px;font-weight:700;cursor:pointer}.builder-choice input{position:absolute!important;right:10px!important;top:50%!important;width:16px!important;height:16px!important;margin:0!important;transform:translateY(-50%);accent-color:#08756d}.builder-choice span{display:block;overflow:hidden;color:inherit;white-space:nowrap;text-overflow:ellipsis;line-height:17px}.builder-choice span i{font-style:normal;color:#82a1a4}.builder-choice:hover{border-color:#a9d7d0;background:#effaf8}.builder-all-choice{min-width:0;background:#edf9f7;color:#08756d}.builder-hint{margin:0;padding-top:4px}.aggregate-builder-grid .builder-field{height:auto}@media(max-width:980px){.aggregate-builder-grid{grid-template-columns:1fr}.builder-field:last-child{grid-column:auto}}@media(max-width:650px){.builder-trigger{grid-template-columns:minmax(78px,.78fr) minmax(0,1fr) 22px}.builder-period-tools{grid-template-columns:1fr 1fr auto}.builder-choice,.builder-choice span,.builder-trigger>span,.builder-trigger>b{white-space:nowrap}.builder-dropdown-actions{grid-template-columns:1fr 1fr}}

/* خلاصهٔ انتخاب‌ها همیشه در یک خط و با tooltip کامل نشان داده می‌شود. */
.builder-trigger>b{direction:rtl;text-align:right}
.builder-period-tools select{direction:ltr;text-align:left}
