/* Selection, the action panel, review by person and upload for the V2 order page. */
.photo-grid,.review-board,.review-group{user-select:none;-webkit-user-select:none}
body.lassoing{cursor:crosshair}
.lasso{position:fixed;z-index:90;border:1.5px solid #d7b400;background:#ffdc2026;border-radius:4px;pointer-events:none}
.v2 kbd{font:600 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace;background:#f0f0ea;border:1px solid #deded6;border-bottom-width:2px;border-radius:4px;padding:2px 5px;color:#55574e}

/* One row: back, title, then status and quiet text tools: filter, select all, add. */
.shoot-head{display:flex;align-items:center;gap:8px;margin:0 0 14px}
.shoot-tools{display:flex;align-items:center;gap:2px;flex-wrap:wrap;justify-content:flex-end}
.shoot-head.selecting .shoot-tools>:not(.sel-slim),.shoot-head.selecting>.filter-chip{display:none}
.v2 .shoot-tools .filter-chip{height:32px;padding:0 8px;border:0;border-radius:8px;background:none;color:#81827d;font-size:var(--fs-body);font-weight:500;box-shadow:none}
.v2 .shoot-tools .filter-chip:hover,.v2 .shoot-tools .add-toggle[aria-expanded="true"]{background:none;color:#242522}
.v2 .shoot-tools .filter-chip.set{color:#242522;font-weight:600}
.shoot-filter .chip-count{display:grid;place-items:center;min-width:18px;height:18px;padding:0 5px;box-sizing:border-box;border-radius:9px;background:var(--yellow,#ffdc20);color:#242522;font-size:var(--fs-caption);font-weight:600}
.v2 .shoot-head h2{flex:1;min-width:0;margin:0;font-size:var(--fs-head);letter-spacing:-.4px}
.v2 .shoot-back{display:grid;place-items:center;width:32px;height:32px;margin-left:-6px;padding:0;border-radius:8px;background:none;color:#81827d}
.v2 .shoot-back:hover{background:#ebebe6;color:#242522}
.add-menu{position:relative}
/* «Добавить» opens the same quiet drop zone as elsewhere: icon, text, «фото» / «папку» as links. */
.add-pop{position:absolute;right:0;top:calc(100% + 6px);z-index:40;display:flex;flex-direction:column;align-items:center;gap:8px;width:280px;box-sizing:border-box;padding:18px 16px;background:#fafaf8;border:1.5px dashed #dcddd7;border-radius:14px;box-shadow:0 12px 32px #2224221f;color:#8a8b85;text-align:center}
.add-pop[hidden]{display:none}
.add-pop .drop-links{margin:0;font-size:var(--fs-body);line-height:1.5;color:#8a8b85}
.add-pop small{font-size:var(--fs-caption);color:#a3a49e}
.v2 .filter-chips{display:flex;gap:6px;flex-wrap:wrap;margin-left:0}
.v2 .filter-chips button{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:#ebebe6;color:#55574e;font-size:var(--fs-small);font-weight:600}
.v2 .filter-chips button:hover{background:#e2e2dc}
.v2 .filter-chips button.active{background:#272922;color:#fff}
.filter-chips button small{font-size:var(--fs-micro);font-weight:600;opacity:.7}
/* Empty filter reads as text on the page, not a white card. */
.v2 #photo-results .empty-state{background:none;border:0;box-shadow:none;padding:56px 24px;text-align:center}

.photo-tile input[data-photo]{z-index:2;cursor:pointer}
.photo-tile{cursor:pointer}
.tile-media{position:relative;display:block}
.tile-quick{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:10px;opacity:0;transition:opacity .12s}
.photo-tile:hover .tile-quick,.photo-tile:focus-within .tile-quick{opacity:1}
.tile-quick:empty{display:none}
.quick{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#23241f;box-shadow:0 3px 12px #0003;transition:background .12s,color .12s}
.quick:hover{background:#23241f;color:#fff}
.quick.ok:hover{background:#2f8f4e}
.quick.no:hover{background:#ac3f31}
@media(hover:none){.tile-quick{opacity:1}}

/* Selection mark: hidden until hover, a round yellow check when chosen. */
.v2 .photo-tile input[data-photo]{-webkit-appearance:none;appearance:none;position:absolute;top:10px;left:10px;width:22px;height:22px;margin:0;border:1.5px solid #fff;border-radius:50%;background:#0000002e;box-shadow:0 1px 4px #0000004d;opacity:0;transform:scale(.85);transition:opacity .12s,transform .12s,background .12s}
.v2 .photo-tile:hover input[data-photo],.v2 .photo-tile input[data-photo]:focus-visible,body.has-selection .photo-tile input[data-photo]{opacity:1;transform:none}
body.has-selection .photo-tile:not(:hover) input[data-photo]:not(:checked){opacity:.7}
.v2 .photo-tile input[data-photo]:hover{background:#00000052}
.v2 .photo-tile input[data-photo]:checked{opacity:1;transform:none;border-color:var(--yellow,#ffdc20);background:var(--yellow,#ffdc20) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23242522' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center/14px no-repeat}
.v2 .photo-tile:has(input[data-photo]:checked){outline:3px solid var(--yellow,#ffdc20);outline-offset:-1px}

/* Face recognition after upload: a passing status in the filter row, not a filter. */
.recog{display:inline-flex;align-items:center;gap:8px;margin-right:6px;font-size:var(--fs-small);color:#81827d;white-space:nowrap}
.recog .spin{width:13px;height:13px;border-radius:50%;border:2px solid #d9dad4;border-top-color:#81827d;animation:recog-spin .8s linear infinite}
@keyframes recog-spin{to{transform:rotate(360deg)}}
.photo-tile.recognising img{opacity:.5;filter:grayscale(.5)}

/* Count row in place of the filter chips while photos are selected. */
.sel-slim{display:flex;align-items:center;gap:14px;min-height:32px;font-size:var(--fs-body)}
.sel-slim b{font-weight:600}
.v2 .sel-slim button{padding:5px 0;background:none;color:#242522;font-size:var(--fs-small);font-weight:600;text-decoration:underline;text-decoration-color:#d7b400;text-decoration-thickness:2px;text-underline-offset:3px}

/* Action panel next to the last selected photo, arrow pointing at it. */
.selection-dock{position:fixed;z-index:50;left:0;top:0;width:max-content;box-sizing:border-box;background:#fff;border:1px solid #e3e4de;border-radius:14px;box-shadow:0 14px 36px #22242226,0 2px 6px #2224220f;font-size:var(--fs-body);color:#242522;transition:top .16s ease,left .16s ease}
.selection-dock[hidden]{display:none}
.selection-dock::before{content:"";position:absolute;left:var(--tip,50%);width:12px;height:12px;background:#fff;border:1px solid #e3e4de;transform:translateX(-50%) rotate(45deg);opacity:var(--arrow,1)}
.selection-dock:not(.below):not(.above)::before{display:none}
.selection-dock.below::before{top:-7px;border-right:0;border-bottom:0}
.selection-dock.above::before{bottom:-7px;border-left:0;border-top:0}
.selection-dock.in-dialog{position:fixed;margin:0}
.selection-dock.in-dialog .near-row{flex-wrap:wrap}
.near-row{position:relative;display:flex;align-items:center;gap:4px;padding:6px}
.near-count{display:flex;align-items:center;gap:2px;padding-right:6px;margin-right:2px;border-right:1px solid #ecece7;font-weight:600;white-space:nowrap}
.v2 .selection-dock .ico-btn{display:grid;place-items:center;width:30px;height:30px;padding:0;border-radius:8px;background:none;color:#9a9c92}
.v2 .selection-dock .ico-btn:hover{background:#f1f1ec;color:#242522}
.v2 .selection-dock .sel-act{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 11px;border-radius:9px;background:none;color:#242522;font-size:var(--fs-body);font-weight:600;white-space:nowrap}
.v2 .selection-dock .sel-act:hover{background:#f3f3ef}
.v2 .selection-dock .sel-act:disabled{opacity:.45;cursor:default}
.v2 .selection-dock .sel-act svg{color:#81827d}
.v2 .selection-dock .sel-act.danger,.v2 .selection-dock .sel-act.danger svg{color:#c2412f}
.v2 .selection-dock .sel-act.danger:hover{background:#fbece9}
.v2 .selection-dock .sel-act.primary{background:var(--yellow,#ffdc20)}
.v2 .selection-dock .sel-act.primary svg{color:#242522}
.v2 .selection-dock .sel-act.primary:hover{background:#f0cb00}
.selection-dock .sel-act kbd{font-size:var(--fs-micro);padding:2px 4px;background:#f5f5f2;border-color:#e4e4de;color:#8d8f86}
.selection-dock.no-kbd .sel-act kbd,.selection-dock.icons .sel-act:not(.primary) span{display:none}
.v2 .selection-dock.icons .sel-act:not(.primary){padding:0 9px}
/* Person step: the same panel grows into a search. */
.selection-dock.picking{width:360px}
.pp-head{display:flex;align-items:center;gap:6px;padding:8px 8px 4px}
.pp-head strong{font-size:var(--fs-body)}
.pp-head span{color:#9a9c92;font-weight:500}
.pp-search{position:relative;margin:4px 10px 6px}
.pp-search svg{position:absolute;left:10px;top:50%;translate:0 -50%;color:#a3a49e}
.v2 .pp-search input{width:100%;box-sizing:border-box;height:36px;margin:0;padding:0 10px 0 32px;border:1px solid #e0e1db;border-radius:9px;background:#fafaf8;font:inherit;font-size:var(--fs-body)}
.v2 .pp-search input:focus{outline:none;border-color:#c9cac3;background:#fff}
.pp-list{max-height:292px;overflow:auto;padding:0 6px 6px}
.v2 .selection-dock .opt{display:flex;align-items:center;gap:12px;width:100%;height:52px;padding:0 8px;border-radius:9px;background:none;color:#242522;text-align:left;font-size:var(--fs-body);font-weight:500}
.v2 .selection-dock .opt:hover,.v2 .selection-dock .opt.hot{background:#f3f3ef}
.opt .ava{position:relative;display:grid;place-items:center;width:40px;height:40px;flex:none;overflow:hidden;border-radius:50%;background:#efeee9;color:#9a9c92}
.opt .ava img,.sm-face img{width:100%;height:100%;object-fit:cover}
.opt .ava img.face,.sm-face img.face{position:absolute;left:50%;top:50%;height:auto;max-width:none;object-fit:initial}
.opt .opt-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.opt .tag{margin-left:auto;font-size:var(--fs-caption);color:#a3a49e}
.opt .tag.like{color:#8a6d00}
.opt.new .ava{background:none;border:1px dashed #c9cac3}
.v2 .selection-dock .opt.new{color:#55574e}
.pp-empty{padding:10px 8px;color:#9a9c92;font-size:var(--fs-small)}
.pp-foot{padding:7px 14px 9px;border-top:1px solid #efefea;font-size:var(--fs-caption);color:#a3a49e}

.review-board{display:grid;gap:30px;margin:14px 0 20px}
.review-section>header{display:flex;align-items:baseline;gap:8px 16px;flex-wrap:wrap;margin-bottom:12px}
.review-section h3{font-size:var(--fs-lead);margin:0}
.review-section h3 span{color:#9a9c92;font-weight:500;margin-left:3px}
.review-section header p{flex:1 1 360px;margin:0;font-size:var(--fs-small);color:#81827d;line-height:1.5}
.review-section .photo-grid{margin:0}
.v2 .with-icon{display:inline-flex;align-items:center;gap:7px}
.review-groups{display:grid;gap:12px}
.review-group{padding:14px 16px 16px;background:#fff;border:1px solid #e0e3d7;border-radius:14px;transition:border-color .12s,box-shadow .12s,background .12s}
.review-group.drop{border-color:#dcbd13;background:#fffbe6;box-shadow:0 0 0 3px #ffdc2055}
.review-head{display:flex;align-items:center;gap:10px 16px;flex-wrap:wrap;margin-bottom:12px}
.review-head>div{flex:1;min-width:180px;display:grid;gap:3px}
.review-head strong{font-size:var(--fs-lead)}
.review-head small{font-size:var(--fs-small);color:#81827d}
.v2 .review-head .review-ok{display:inline-flex;align-items:center;gap:6px;font-weight:600;padding:10px 16px}
.v2 .review-head .text-button{background:none;color:#5b5d53;padding:8px 4px}
.v2 .review-cands{margin:0;align-items:start}
.ref-tile{position:relative;border-radius:10px;overflow:hidden;background:#f1f1ec;border:1px solid #23241f;box-shadow:0 0 0 1px #23241f}
.ref-tile img{display:block;width:100%;height:205px;object-fit:cover}
.ref-tile p{font-size:var(--fs-small);font-weight:600;margin:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ref-empty{height:100%;min-height:240px;display:grid;place-items:center;align-content:center;color:#a3a59a;background:#f7f7f2;border-style:dashed;border-color:#deded6}
.ref-label{position:absolute;left:8px;top:8px;padding:3px 7px;border-radius:6px;background:#23241fd9;color:#fff;font-size:var(--fs-micro);font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.review-done{text-align:center}
.review-done>svg{color:#4f9a5f;margin-bottom:6px}

.v2 .dropzone-actions .primary,.v2 .dropzone-actions .secondary{display:inline-flex;align-items:center;gap:7px}
.dropzone-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.drop-overlay{position:fixed;inset:12px;z-index:95;display:grid;place-items:center;border:2px dashed #b9bab4;border-radius:22px;background:#f5f5f3ee;backdrop-filter:blur(2px);pointer-events:none;opacity:0;transition:opacity .12s}
.drop-overlay.show{opacity:1}
.drop-overlay div{display:grid;justify-items:center;gap:8px;color:#23241f}
.drop-overlay strong{font-size:var(--fs-head)}
.drop-overlay small{font-size:var(--fs-body);color:#8a8b85}
.upload-pill{position:fixed;bottom:22px;right:22px;z-index:60;display:grid;width:340px;max-height:min(520px,65vh);overflow:auto;box-sizing:border-box;background:#fff;border:1px solid #e0e3d7;border-radius:13px;box-shadow:0 10px 30px #0000001f;color:#23241f}
.upload-pill[hidden]{display:none}
.upload-item{display:flex;align-items:flex-start;gap:10px;padding:12px 14px}
.upload-item+.upload-item{border-top:1px solid #eeefea}
.upload-item-body{flex:1;min-width:0;display:grid;gap:5px}
.upload-item a{display:grid;gap:2px;color:inherit;text-decoration:none;min-width:0}
.upload-item strong,.upload-item a>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upload-item strong{font-size:var(--fs-body)}
.upload-item a>span{font-size:var(--fs-small);color:#8a8b85}
.upload-item-status{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:var(--fs-small);font-variant-numeric:tabular-nums}
.upload-item.has-error .upload-item-status,.upload-item details{color:#a14331}
.upload-item button,.upload-expand{border:0;background:none;color:inherit;font:inherit;cursor:pointer;padding:0}
.upload-item button{text-decoration:underline;text-underline-offset:3px}
.upload-item details{font-size:var(--fs-caption);overflow-wrap:anywhere}
.upload-item summary{cursor:pointer}
.upload-item progress{width:100%;height:4px}
.upload-expand{padding:10px 14px;border-top:1px solid #eeefea;font-size:var(--fs-small);color:#72746a;text-align:center}
.pill-icon.error{background:#fbece7;color:#a14331}
.pill-icon{position:relative;flex:none;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#eef3e6;color:#4f9a5f}
.pill-icon.busy{background:#fff3b8;color:#23241f}
@media(prefers-reduced-motion:reduce){.recog .spin{animation:none}}


@media(max-width:760px){
  .v2 .review-head .review-ok{width:100%;justify-content:center}
  .ref-tile img{height:160px}
  .upload-pill{left:12px;right:12px;bottom:12px;width:auto}
}
/* «Все / Выбраны» in the shoot head are the same pills as in «Ученики», not quiet tools. */
.filter-toggle small{font-size:var(--fs-small);opacity:.7}


@media(max-width:700px){
  .v2 .shoot-head{flex-wrap:wrap}
  .v2 .shoot-head>h2{flex:1 0 calc(100% - 40px)}
  .v2 .shoot-head .shoot-tools{margin-left:auto}
}
