:root{--red:#ef1d22;--black:#111;--white:#fff;--soft:#f4f4f4}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Arial,Helvetica,sans-serif;color:#111;background:#fff}
button,input{font:inherit}
a{color:inherit;text-decoration:none}
.btn{border:2px solid #111;background:#fff;border-radius:999px;padding:10px 15px;font-weight:900;cursor:pointer;display:inline-block}
.btn.dark{background:#111;color:#fff}.btn.red{background:var(--red);color:#fff;border-color:var(--red)}
.input{width:100%;border:2px solid #111;border-radius:14px;padding:13px 14px;background:#fff}
.label{display:block;font-weight:900;margin:0 0 6px}.field{margin-bottom:14px}
.badge{display:inline-block;padding:5px 9px;border-radius:999px;background:#eee;border:1px solid #ccc;font-size:12px;font-weight:900}
.price{font-weight:bold;background:#111;color:#fff;border-radius:999px;padding:7px 10px;display:inline-block;margin-top:6px}
.price.ask{background:#ef1d22;color:#fff}

.pokeball-screen{min-height:100vh;position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;background:#fff}
.poke-half{position:absolute;left:0;width:100%;height:50%;z-index:1;transition:transform .8s ease-in-out}
.poke-top{top:0;background:#ef1d22;border-bottom:14px solid #111}
.poke-bottom{bottom:0;background:#fff;border-top:14px solid #111}
.pokeball-screen.open .poke-top{transform:translateY(-105%)}
.pokeball-screen.open .poke-bottom{transform:translateY(105%)}
.brand{position:absolute;top:22px;left:22px;z-index:3;background:#fff;border:3px solid #111;border-radius:999px;padding:10px 16px;font-weight:900;letter-spacing:.05em}
.center-circle{position:relative;z-index:4;width:220px;height:220px;border-radius:50%;border:14px solid #111;background:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;box-shadow:0 18px 48px rgba(0,0,0,.28);transition:transform .8s ease-in-out,opacity .45s ease-in-out}
.pokeball-screen.open .center-circle{transform:scale(1.18);opacity:0}
.center-circle button{width:140px;padding:11px 18px;border:3px solid #111;border-radius:999px;background:#fff;font-weight:900;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease,color .16s ease;box-shadow:0 4px 0 #111}
.center-circle button:hover{background:#111;color:#fff;transform:translateY(-2px) scale(1.03)}
.center-circle button:active{transform:translateY(2px) scale(.98);box-shadow:0 1px 0 #111}

.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#fff,#ececec)}
.login-card{width:min(440px,100%);background:#fff;border:4px solid #111;border-radius:28px;padding:28px;box-shadow:12px 12px 0 #111}
.login-card h1{margin:0 0 8px;font-size:30px}.login-card p{margin:0 0 20px;color:#555}
.error{border:2px solid var(--red);background:#fff4f4;color:#991b1b;border-radius:14px;padding:12px;margin-bottom:14px;font-weight:700}

.app{min-height:100vh;display:grid;grid-template-columns:260px 1fr;background:#f4f4f4}
.sidebar{background:#111;color:#fff;padding:18px}.sidebar h2{margin:0 0 14px}
.navbtn{width:100%;display:block;margin:8px 0;border:1px solid rgba(255,255,255,.25);border-radius:14px;padding:12px;background:rgba(255,255,255,.08);color:#fff;text-align:left;font-weight:900;cursor:pointer}
.navbtn.active{background:var(--red)}.main{padding:22px}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}
.panel{background:#fff;border:3px solid #111;border-radius:22px;padding:16px;box-shadow:6px 6px 0 rgba(0,0,0,.12)}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}
.stat{background:#fff;border:3px solid #111;border-radius:20px;padding:16px;box-shadow:5px 5px 0 rgba(0,0,0,.12)}
.stat strong{display:block;font-size:28px}

.customer-wrap{min-height:100vh;background:linear-gradient(to bottom,#fff 0 45%,#111 45% 48%,#fff 48% 100%);padding:20px;overflow:hidden}
.customer-head{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff;border:3px solid #111;border-radius:22px;padding:12px 16px;margin-bottom:18px}
.customer-toolbar{display:flex;gap:8px;overflow:auto;margin-bottom:14px;padding:8px;background:#111;border-radius:16px}
.customer-toolbar button{white-space:nowrap;border:2px solid #111;background:#fff;border-radius:999px;padding:8px 12px;font-weight:900;cursor:pointer}
.customer-toolbar button.active{background:#ef1d22;color:#fff;border-color:#ef1d22}

.coverflow-shell{position:relative;min-height:650px;display:flex;align-items:center;justify-content:center;perspective:1100px;overflow:hidden}
.slide{position:absolute;width:min(330px,72vw);border:3px solid #111;border-radius:18px;padding:12px;background:#fff;display:flex;flex-direction:column;box-shadow:6px 6px 0 rgba(0,0,0,.18);transition:transform .42s ease,opacity .42s ease;opacity:0;pointer-events:none}
.slide.active{opacity:1;pointer-events:auto;transform:translateX(0) scale(1) rotateY(0deg);z-index:5}
.slide.prev{opacity:.62;transform:translateX(-64%) scale(.86) rotateY(-18deg);z-index:4}
.slide.next{opacity:.62;transform:translateX(64%) scale(.86) rotateY(18deg);z-index:4}
.slide.far-prev{opacity:.2;transform:translateX(-112%) scale(.76) rotateY(-24deg);z-index:3}
.slide.far-next{opacity:.2;transform:translateX(112%) scale(.76) rotateY(24deg);z-index:3}
.img{width:100%;aspect-ratio:2.5/3.5;background:#eee;border:1px solid #111;margin-bottom:6px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-weight:bold;color:#777}
.image-divider{height:4px;background:#111;border-radius:999px;margin:2px 0 8px}
.slide-title{font-weight:900;margin-top:8px;font-size:18px}.card-number{color:#555;font-size:13px;margin-top:3px}
.coverflow-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:10;width:54px;height:54px;border-radius:50%;border:3px solid #111;background:#fff;font-size:28px;font-weight:900;cursor:pointer;box-shadow:4px 4px 0 rgba(0,0,0,.2)}
.coverflow-arrow.left{left:16px}.coverflow-arrow.right{right:16px}
.coverflow-dots{display:flex;justify-content:center;gap:8px;margin-top:8px}
.coverflow-dot{width:11px;height:11px;border-radius:50%;border:2px solid #111;background:#fff;cursor:pointer}
.coverflow-dot.active{background:#ef1d22}
@media(max-width:760px){.app{grid-template-columns:1fr}.topbar{display:block}.coverflow-shell{min-height:610px}.coverflow-arrow{width:44px;height:44px}.slide.prev{transform:translateX(-52%) scale(.82) rotateY(-16deg)}.slide.next{transform:translateX(52%) scale(.82) rotateY(16deg)}}



/* Phase 3 Inventory */
.inventory-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.inventory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
.inventory-card{background:#fff;border:3px solid #111;border-radius:22px;padding:14px;box-shadow:5px 5px 0 rgba(0,0,0,.14)}
.inventory-thumb-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
.thumb{aspect-ratio:2.5/3.5;border:2px solid #111;border-radius:10px;background:#eee;display:flex;align-items:center;justify-content:center;font-weight:900;color:#777;overflow:hidden}
.thumb img{width:100%;height:100%;object-fit:cover;display:block}
.inventory-meta{font-size:14px;color:#555;margin-top:4px}
.status-row{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.badge.public{background:#e7ffe7;border-color:#35a853}
.badge.hidden-status{background:#f1f1f1}
.badge.unpriced{background:#fff5cc;border-color:#d8a300}
.badge.priced{background:#e8f0ff;border-color:#5f7fd6}
.intake-layout{display:grid;grid-template-columns:minmax(320px,44%) 1fr;gap:18px;align-items:start}
.photo-panel{background:#fff;border:3px solid #111;border-radius:24px;padding:16px;box-shadow:6px 6px 0 rgba(0,0,0,.14);position:sticky;top:18px}
.photo-stack{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.photo-box{border:2px solid #111;border-radius:16px;padding:10px;background:#f6f6f6}
.photo-box h3{margin:0 0 8px;font-size:15px}
.photo-preview{aspect-ratio:2.5/3.5;border:2px dashed #999;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:900;color:#777;overflow:hidden}
.photo-preview img{width:100%;height:100%;object-fit:cover;display:block}
.photo-box input{margin-top:10px;width:100%}
.form-panel{background:#fff;border:3px solid #111;border-radius:24px;padding:18px;box-shadow:6px 6px 0 rgba(0,0,0,.14)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-grid .full{grid-column:1 / -1}
textarea.input{min-height:90px;resize:vertical}
.checkline{display:flex;gap:10px;align-items:center;font-weight:900;margin:6px 0 14px}
.checkline input{width:20px;height:20px}
.table-wrap{background:#fff;border:3px solid #111;border-radius:22px;overflow:auto;box-shadow:6px 6px 0 rgba(0,0,0,.12)}
.inventory-table{width:100%;border-collapse:collapse;min-width:860px}
.inventory-table th,.inventory-table td{padding:12px;border-bottom:1px solid #ddd;text-align:left;vertical-align:middle}
.inventory-table th{background:#111;color:#fff}
.inventory-table tr:last-child td{border-bottom:0}
.small-thumb{width:46px;height:64px;border:2px solid #111;border-radius:6px;background:#eee;overflow:hidden;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900;color:#777}
.small-thumb img{width:100%;height:100%;object-fit:cover}
@media(max-width:900px){.intake-layout{grid-template-columns:1fr}.photo-panel{position:relative;top:auto}.form-grid{grid-template-columns:1fr}.photo-stack{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.photo-stack{grid-template-columns:1fr}}



/* Phase 4 Camera Capture */
.camera-stage{
  border:3px solid #111;
  border-radius:22px;
  background:#111;
  overflow:hidden;
  position:relative;
  min-height:430px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.camera-video,
.camera-canvas{
  width:100%;
  height:100%;
  min-height:430px;
  object-fit:cover;
  display:block;
  background:#111;
}
.camera-overlay{
  position:absolute;
  inset:0;
  pointer-events:none;
  display:flex;
  align-items:center;
  justify-content:center;
}
.card-guide{
  width:min(62%,260px);
  aspect-ratio:2.5/3.5;
  border:4px solid rgba(255,255,255,.92);
  border-radius:18px;
  box-shadow:0 0 0 999px rgba(0,0,0,.28), 0 0 0 6px rgba(239,29,34,.45);
  position:relative;
}
.card-guide:before{
  content:"Align card inside frame";
  position:absolute;
  left:50%;
  top:-42px;
  transform:translateX(-50%);
  background:#fff;
  color:#111;
  border:2px solid #111;
  border-radius:999px;
  padding:7px 12px;
  font-size:13px;
  font-weight:900;
  white-space:nowrap;
}
.camera-status{
  background:#fff;
  border:2px solid #111;
  border-radius:14px;
  padding:10px 12px;
  margin:10px 0;
  font-weight:800;
}
.camera-status.warn{border-color:#ef1d22;background:#fff4f4;color:#991b1b}
.camera-controls{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.camera-controls .full{grid-column:1 / -1}
.capture-review{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:14px;
}
.capture-card{
  border:2px solid #111;
  border-radius:16px;
  padding:10px;
  background:#f6f6f6;
}
.capture-card h3{margin:0 0 8px;font-size:15px}
.capture-preview{
  aspect-ratio:2.5/3.5;
  border:2px dashed #999;
  border-radius:12px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-weight:900;
  color:#777;
  overflow:hidden;
}
.capture-preview img{width:100%;height:100%;object-fit:cover;display:block}
.fallback-upload{
  display:none;
  margin-top:12px;
  border:2px dashed #999;
  border-radius:16px;
  padding:12px;
  background:#fafafa;
}
.fallback-upload.show{display:block}
.photo-panel.camera-mode{position:sticky;top:18px}
@media(max-width:900px){
  .camera-stage{min-height:360px}
  .camera-video,.camera-canvas{min-height:360px}
}
@media(max-width:560px){
  .camera-controls{grid-template-columns:1fr}
  .capture-review{grid-template-columns:1fr 1fr}
  .camera-stage{min-height:330px}
  .camera-video,.camera-canvas{min-height:330px}
}



/* Phase 4.1 Camera Crop + Carousel Image Fix */
.img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.slide .img{
  overflow:hidden;
}
.camera-stage{
  aspect-ratio:4/5;
}
.camera-video{
  object-fit:cover;
}
.camera-overlay .card-guide{
  width:min(64%,280px);
}
.capture-preview img{
  object-fit:cover;
}



/* Phase 4.2 Kiosk Carousel Tightening */
.customer-wrap{
  min-height:100vh;
  padding:16px 20px;
  overflow:hidden;
}

.customer-toolbar{
  margin-bottom:10px;
}

.coverflow-shell{
  min-height:520px !important;
  height:calc(100vh - 190px);
  max-height:620px;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.slide{
  width:min(230px,46vw) !important;
  max-width:230px !important;
  padding:9px !important;
}

.slide.prev{
  transform:translateX(-48%) scale(.78) rotateY(-14deg) !important;
}
.slide.next{
  transform:translateX(48%) scale(.78) rotateY(14deg) !important;
}
.slide.far-prev{
  transform:translateX(-78%) scale(.66) rotateY(-20deg) !important;
}
.slide.far-next{
  transform:translateX(78%) scale(.66) rotateY(20deg) !important;
}

.slide-title{
  font-size:15px !important;
  margin-top:6px !important;
}
.card-number{
  font-size:11px !important;
}
.price{
  font-size:13px !important;
  padding:6px 9px !important;
}

.image-divider{
  height:3px !important;
  margin:1px 0 6px !important;
}

.coverflow-arrow{
  width:44px !important;
  height:44px !important;
  font-size:24px !important;
}
.coverflow-arrow.left{left:10px !important}
.coverflow-arrow.right{right:10px !important}

.coverflow-dots{
  margin-top:2px !important;
}

@media(max-width:900px){
  .coverflow-shell{
    height:calc(100vh - 175px);
    min-height:460px !important;
  }
  .slide{
    width:min(210px,58vw) !important;
    max-width:210px !important;
  }
  .slide.prev{
    transform:translateX(-43%) scale(.74) rotateY(-12deg) !important;
  }
  .slide.next{
    transform:translateX(43%) scale(.74) rotateY(12deg) !important;
  }
  .slide.far-prev{
    transform:translateX(-68%) scale(.62) rotateY(-18deg) !important;
  }
  .slide.far-next{
    transform:translateX(68%) scale(.62) rotateY(18deg) !important;
  }
}

@media(max-width:560px){
  .customer-wrap{
    padding:12px;
  }
  .customer-head{
    padding:10px 12px;
    margin-bottom:10px;
  }
  .coverflow-shell{
    height:calc(100vh - 165px);
    min-height:430px !important;
  }
  .slide{
    width:min(190px,64vw) !important;
    max-width:190px !important;
  }
}



/* Phase 4.3 Kiosk Smaller Carousel + Save Speed */
.coverflow-shell{
  min-height:390px !important;
  height:calc(100vh - 205px) !important;
  max-height:460px !important;
}
.slide{
  width:min(175px,38vw) !important;
  max-width:175px !important;
  padding:7px !important;
}
.slide.prev{
  transform:translateX(-42%) scale(.72) rotateY(-12deg) !important;
}
.slide.next{
  transform:translateX(42%) scale(.72) rotateY(12deg) !important;
}
.slide.far-prev{
  transform:translateX(-66%) scale(.58) rotateY(-18deg) !important;
}
.slide.far-next{
  transform:translateX(66%) scale(.58) rotateY(18deg) !important;
}
.slide-title{
  font-size:13px !important;
  line-height:1.1 !important;
}
.card-number{
  font-size:10px !important;
}
.price{
  font-size:11px !important;
  padding:5px 8px !important;
}
.coverflow-arrow{
  width:38px !important;
  height:38px !important;
  font-size:20px !important;
}
.customer-head{
  padding:8px 12px !important;
  margin-bottom:10px !important;
}
.customer-toolbar{
  padding:6px !important;
  margin-bottom:8px !important;
}
.customer-toolbar button{
  padding:6px 10px !important;
  font-size:13px !important;
}

@media(max-width:900px){
  .coverflow-shell{
    min-height:360px !important;
    height:calc(100vh - 190px) !important;
    max-height:430px !important;
  }
  .slide{
    width:min(165px,46vw) !important;
    max-width:165px !important;
  }
}
@media(max-width:560px){
  .coverflow-shell{
    min-height:340px !important;
    height:calc(100vh - 175px) !important;
    max-height:400px !important;
  }
  .slide{
    width:min(155px,58vw) !important;
    max-width:155px !important;
  }
}



/* Phase 4.5 Front-Only Customer Kiosk + Full Image Modal */
.coverflow-shell{
  min-height:520px !important;
  height:calc(100vh - 190px) !important;
  max-height:640px !important;
}
.slide{
  width:min(285px,42vw) !important;
  max-width:285px !important;
  padding:10px !important;
}
.slide .kiosk-front-only{
  aspect-ratio:2.5/3.5 !important;
  width:100% !important;
}
.kiosk-image-button{
  cursor:pointer;
  padding:0;
}
.slide.prev{
  transform:translateX(-54%) scale(.78) rotateY(-13deg) !important;
}
.slide.next{
  transform:translateX(54%) scale(.78) rotateY(13deg) !important;
}
.slide.far-prev{
  transform:translateX(-88%) scale(.62) rotateY(-18deg) !important;
}
.slide.far-next{
  transform:translateX(88%) scale(.62) rotateY(18deg) !important;
}
.slide-title{
  font-size:17px !important;
  margin-top:8px !important;
}
.card-number{
  font-size:12px !important;
}
.price{
  font-size:13px !important;
}
.image-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.84);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:28px;
}
.image-modal.open{
  display:flex;
}
.image-modal img{
  max-width:92vw;
  max-height:92vh;
  object-fit:contain;
  border:4px solid #fff;
  border-radius:18px;
  background:#fff;
}
.image-modal-close{
  position:fixed;
  top:18px;
  right:18px;
  width:52px;
  height:52px;
  border-radius:50%;
  border:3px solid #fff;
  background:#111;
  color:#fff;
  font-size:34px;
  line-height:1;
  font-weight:900;
  cursor:pointer;
}
@media(max-width:900px){
  .coverflow-shell{
    min-height:480px !important;
    height:calc(100vh - 180px) !important;
  }
  .slide{
    width:min(250px,56vw) !important;
    max-width:250px !important;
  }
}
@media(max-width:560px){
  .coverflow-shell{
    min-height:430px !important;
    height:calc(100vh - 165px) !important;
  }
  .slide{
    width:min(220px,68vw) !important;
    max-width:220px !important;
  }
}



/* Phase 5 Orientation + Speed Scan */
.rotate-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:8px;
}
.speed-layout{
  display:grid;
  grid-template-columns:minmax(340px,52%) 1fr;
  gap:18px;
  align-items:start;
}
.speed-form-panel{
  background:#fff;
  border:3px solid #111;
  border-radius:24px;
  padding:16px;
  box-shadow:6px 6px 0 rgba(0,0,0,.14);
}
.speed-mini-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.speed-status{
  background:#fff;
  border:3px solid #111;
  border-radius:18px;
  padding:12px;
  margin-bottom:14px;
  font-weight:900;
}
.speed-status.saved{
  border-color:#35a853;
}
.speed-captured{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:10px;
  color:#555;
  font-weight:800;
}
.capture-ok{
  display:inline-block;
  border-radius:999px;
  background:#e7ffe7;
  border:1px solid #35a853;
  padding:4px 8px;
  font-size:12px;
}
.capture-missing{
  display:inline-block;
  border-radius:999px;
  background:#fff5cc;
  border:1px solid #d8a300;
  padding:4px 8px;
  font-size:12px;
}
@media(max-width:980px){
  .speed-layout{grid-template-columns:1fr}
}
@media(max-width:560px){
  .speed-mini-grid{grid-template-columns:1fr}
  .rotate-row{grid-template-columns:1fr}
}



/* Phase 6 Labels + A-Z Inventory Search */
.inventory-filter-panel{margin-bottom:14px}
.letter-bar{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:10px}
.letter-bar button{
  border:2px solid #111;
  background:#fff;
  border-radius:999px;
  padding:7px 10px;
  font-weight:900;
  cursor:pointer;
}
.letter-bar button.active{background:#ef1d22;color:#fff;border-color:#ef1d22}
.label-inline-code{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.barcode-svg{max-width:260px;height:auto}
.qr-img{width:145px;height:145px;object-fit:contain}
.print-toolbar{padding:16px;display:flex;gap:10px}
.label-sheet{display:grid;gap:10px;padding:14px}
.label-card{
  border:2px solid #111;
  border-radius:10px;
  padding:8px;
  background:#fff;
  display:flex;
  align-items:center;
  gap:8px;
  break-inside:avoid;
}
.label-card .label-code{flex:0 0 auto}
.label-card .barcode-svg{width:180px;max-height:58px}
.label-card .qr-img{width:74px;height:74px}
.label-text{display:flex;flex-direction:column;font-size:11px;line-height:1.2;min-width:0}
.label-text strong{font-size:12px}
.label-small{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
.label-small .label-card{min-height:78px}
.label-medium{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.label-medium .label-card{min-height:96px}
.label-large{grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}
.label-large .label-card{min-height:130px}
.label-large .barcode-svg{width:250px;max-height:80px}
.label-large .qr-img{width:110px;height:110px}
.print-body{background:#fff}
.no-print{display:flex}
@media print{
  .no-print{display:none!important}
  body{background:#fff}
  .label-sheet{padding:0}
  .label-card{box-shadow:none}
}
@media(max-width:760px){
  .letter-bar button{padding:6px 8px;font-size:12px}
}
