/* Smart Tray — tablet-first layout, scoped to the unified gallery panel. */
.tray-page{display:grid;gap:17px;direction:rtl;min-width:0}
.tray-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px;border-radius:20px;background:linear-gradient(120deg,#212524,#313b36);color:#fff;box-shadow:0 10px 28px #25271c11}
.tray-hero h3{font-size:23px;margin:5px 0 9px;font-weight:850;color:#f0dfbf}
.tray-hero p{max-width:620px;font-size:12px;color:#d3d9d4;margin:0;line-height:1.85}
.tray-eyebrow{font-size:10px;color:#c9ad74;letter-spacing:1.6px;font-weight:700}
.tray-live{background:#ffffff16;border:1px solid #ffffff19;border-radius:30px;padding:9px 12px;font-size:10px;color:#e5ede5;display:flex;gap:8px;align-items:center;white-space:nowrap}
.tray-live span{height:8px;width:8px;background:#69cc9c;border-radius:50%;box-shadow:0 0 0 4px #69cc9c21}
.tray-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.tray-stat{border:1px solid #e9e4db;background:#fff;border-radius:15px;padding:16px;min-height:87px;display:grid;align-content:center;gap:6px}
.tray-stat small{font-size:10px;color:#7f807c}.tray-stat b{font-size:22px;color:#252b29}
.tray-stat-active{border-top:3px solid #b69258}.tray-stat-pending{border-top:3px solid #be704e}.tray-stat-selected{border-top:3px solid #427e66}.tray-stat-stale{border-top:3px solid #b66b62}
.tray-columns{display:grid;grid-template-columns:minmax(230px,.78fr) minmax(0,2fr);gap:16px;align-items:start}
.tray-side,.tray-workspace{display:grid;gap:14px;min-width:0}
.tray-box{background:#fff;border:1px solid #eae5dc;border-radius:17px;padding:18px;box-shadow:0 3px 20px #24292506;min-width:0}
.tray-box h4{font-size:15px;margin:0 0 15px;color:#202823}.tray-box p{line-height:1.85}
.tray-box-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px;flex-wrap:wrap}.tray-box-title h4{margin:0}.tray-box-title small{font-size:10px;color:#93958f}
#tray-create{display:grid;gap:12px}#tray-create label{display:grid;gap:7px;font-size:11px;color:#77796d;font-weight:700}
.tray-input{width:100%;min-width:0;border:1px solid #e5e2dc;border-radius:11px;background:#fdfcfa;padding:12px 13px;min-height:43px;font-size:12px;color:#29312e}
.tray-input::placeholder{color:#acaca8}
.tray-link{border:0;background:none;color:#907347;font-size:11px;font-weight:700}
.tray-muted{color:#91968f;margin:0;font-size:11px;line-height:1.9}
.tray-list{max-height:530px;overflow-y:auto;display:grid;gap:8px}
.tray-option{padding:12px;border-radius:12px;border:1px solid #eae6e0;background:#fdfcfb;text-align:right;display:grid;gap:7px;color:#282d2a;transition:120ms}
.tray-option:hover{border-color:#d0b78f;background:#fffcf5}.tray-option.selected{background:#f8f2e9;border-color:#cda971;box-shadow:0 0 0 2px #d0ae7017}
.tray-option-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.tray-option-heading strong{font-size:12px;font-weight:800}.tray-option-sub{font-size:10px;color:#8d928e}.tray-option-count{font-size:10px;color:#99764a;font-weight:700}
.tray-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:20px;background:#f3f1ec;color:#767c74;border:1px solid #e7e4de;font-size:9px;white-space:nowrap}
.tray-badge.active,.tray-badge.present{color:#a27a37;background:#fff5e3;border-color:#f0ddba}.tray-badge.selected{color:#21765a;background:#edf8f0;border-color:#ccebd7}.tray-badge.returned,.tray-badge.closed{color:#838c85;background:#f5f6f4;border-color:#e5e8e3}
.tray-counter{display:inline-block;padding:6px 10px;color:#996b31;background:#fff5e8;border:1px solid #f1debf;border-radius:15px;font-weight:800;font-size:10px}
.tray-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.tray-note-orange,.tray-note-green{padding:10px 13px;border-radius:11px;border:1px solid #efdcb8;background:#fff9ec;color:#956e39;font-size:11px!important;margin:8px 0 0}
.tray-note-green{border-color:#cfe4d5;background:#eff7f1;color:#347655}
.tray-code-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}
.tray-code-row .btn{white-space:nowrap}.tray-help{font-size:10px;color:#989b93;line-height:1.95;margin:9px 0 0}
.tray-mini{font-size:10px;color:#9a9b96}.tray-camera-area{display:grid;gap:10px;justify-items:center;background:#202625;border-radius:13px;padding:12px;margin-top:11px}
.tray-camera-area[hidden],#tray-input-box[hidden],#tray-report[hidden],#tray-suggestions[hidden]{display:none!important}
.tray-camera-area video{width:100%;max-width:460px;max-height:320px;border-radius:9px;object-fit:cover}
.tray-suggestions{position:relative;display:grid;margin:5px 0;border:1px solid #dfdace;border-radius:10px;overflow:hidden}
.tray-suggestions button{background:#fffcf8;border:0;text-align:right;padding:10px 12px;display:flex;gap:10px;align-items:center;justify-content:space-between;font-size:11px;color:#525b50;min-width:0}
.tray-suggestions button+button{border-top:1px solid #f1efe9}.tray-suggestions button:hover{background:#f4ede2}.tray-suggestions code{font-family:monospace;font-weight:800;color:#765c36}.tray-suggestions small{color:#9ca09a}
.tray-message{font-size:11px;color:#38664e;border-radius:11px;min-height:4px}
.tray-message:not(:empty){background:#eaf6ed;border:1px solid #d3ebda;padding:10px 13px}
.tray-message.tray-error{background:#fff2ef;border-color:#f0d7d0;color:#a73f38}
.tray-items{display:grid;gap:10px}.tray-item{background:#fafaf8;border:1px solid #ebe7e0;border-radius:13px;padding:13px;display:grid;gap:10px}
.tray-item-returned{opacity:.73;background:#f8f9f7}.tray-item-top{display:flex;gap:12px;align-items:center;min-width:0}
.tray-product-pic{width:66px;height:66px;flex:0 0 66px;border:1px solid #e7e3db;background:#eee6d9;border-radius:11px;display:grid;place-items:center;font-size:24px;overflow:hidden}
.tray-product-pic img{width:100%;height:100%;object-fit:cover}.tray-item-info{display:grid;gap:3px;min-width:0;flex:1}
.tray-item-info strong{font-size:12px;color:#282d2a;overflow-wrap:anywhere}.tray-item-info code{font-size:11px;direction:ltr;text-align:right;color:#95703f}
.tray-item-info small,.tray-small-print{font-size:10px;color:#858b85;overflow-wrap:anywhere}.tray-item-info .tray-small-print{font-size:9px}
.tray-item-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;border-top:1px dashed #e4e0d9;padding-top:10px}
.tray-transfer{display:flex;gap:6px;align-items:center;font-size:10px;color:#7c8078;margin-right:auto;max-width:100%}
.tray-transfer select{border:1px solid #e2dfd7;background:#fff;border-radius:8px;padding:7px;font-size:10px;max-width:130px}
.tray-empty{padding:30px 12px;border:1px dashed #e8dfd1;border-radius:12px;text-align:center;color:#8d897f}.tray-empty b{font-size:13px;color:#73664d}.tray-empty p{font-size:11px;margin:6px 0 0}
.tray-history{display:grid;max-height:310px;overflow:auto}.tray-event{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid #f2f0ed;font-size:11px}
.tray-event:last-child{border-bottom:0}.tray-event-dot{height:7px;width:7px;background:#ba9559;border-radius:50%;margin-top:5px;flex:0 0 7px}
.tray-event strong{font-weight:650}.tray-event small{display:block;font-size:10px;color:#969b93;margin-top:4px}
.tray-warning{padding:13px 16px;border-radius:12px;background:#fff8e9;border:1px solid #ebdcb9;font-size:11px;color:#866537;line-height:2}
.tray-report-trigger{padding:13px;border:1px dashed #baa57a;border-radius:12px;background:#fdfbf6;color:#8b733e;text-align:center;font-size:11px;font-weight:750}
.tray-report-table{max-width:100%;overflow-x:auto}.tray-report-table table{border-collapse:collapse;width:100%;font-size:10px;white-space:nowrap}
.tray-report-table th,.tray-report-table td{padding:9px;border-bottom:1px solid #efede9;text-align:right}
@media(max-width:1090px){.tray-columns{grid-template-columns:minmax(0,1fr)}.tray-side{grid-template-columns:1fr 1fr;align-items:start}.tray-side #tray-report,.tray-side .tray-report-trigger{grid-column:1/-1}.tray-list{max-height:285px}}
@media(max-width:680px){.tray-hero{padding:18px;align-items:flex-start;flex-direction:column}.tray-hero h3{font-size:20px}.tray-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.tray-stat{padding:12px;min-height:76px}.tray-side{grid-template-columns:1fr}.tray-box{padding:14px}.tray-code-row{grid-template-columns:minmax(0,1fr) auto}.tray-code-row input{grid-column:1/-1}.tray-item-top{align-items:flex-start}.tray-item .tray-badge{margin-right:auto}.tray-transfer{margin:0;width:100%;justify-content:flex-start}.tray-box-title .tray-head-actions{margin-top:4px}}
