:root{
  --bg:#000000;
  --card: rgba(255,255,255,0.06);
  --text:#f2f2f2;
  --muted:#b8b8b8;
  --shadow: 0 18px 55px rgba(0,0,0,0.55);
  --radius:20px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  overflow-x:hidden;
}

.app-shell{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
  background: rgba(0,0,0,0.72);
  border-bottom:1px solid rgba(255,255,255,0.07);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.brand-text{ line-height:1; }

.brand-title{
  font-weight:900;
  letter-spacing:1.2px;
  font-size:14px;
}

.brand-sub{
  font-size:12px;
  color: var(--muted);
  margin-top:2px;
}

/* ✅ TU LOGO EN TOPBAR */
.brand-logo{
  width:34px;
  height:34px;
  object-fit:contain;
  border-radius:14px;
  padding:6px;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.12);
  box-shadow: 0 14px 40px rgba(0,0,0,0.55);
}

.topbar-actions{
  display:flex;
  gap:10px;
}

.icon-btn{
  border:none;
  cursor:pointer;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);
  border-radius:14px;
  padding:10px 12px;
  transition: transform 0.12s ease, background 0.12s ease;
}
.icon-btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.10); }
.icon-btn.danger{ background: rgba(255,0,0,0.10); border-color: rgba(255,0,0,0.18); }

.main{
  padding: 18px 16px 80px;
  flex:1;
}

.view.hidden{ display:none; }

.container{
  width:100%;
  max-width: 1100px;
  margin: 0 auto;
}

.mobile-like{ max-width: 520px; }

.center-wrap{
  min-height: calc(100vh - 86px);
  display:flex;
  align-items:center;
  justify-content:center;
}

.card{
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.10);
}

.glass{
  background: var(--card);
  backdrop-filter: blur(14px);
}

.hero{
  text-align:center;
  padding: 10px 6px 18px;
}

/* ✅ TU LOGO EN LOGIN */
.hero-logo{
  width:92px;
  height:92px;
  margin: 6px auto 12px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.hero-img{
  width:92px;
  height:92px;
  object-fit:contain;
  border-radius:22px;
  padding:12px;
  background: rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 55px rgba(0,0,0,0.65);
}

.hero-title{
  font-size:22px;
  font-weight:900;
  letter-spacing:1.2px;
}

.hero-desc{
  margin-top:6px;
  color: var(--muted);
  font-size:14px;
}

.form{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.label{
  font-size:12px;
  color: var(--muted);
  margin-top:6px;
}

.input{
  width:100%;
  padding: 14px 14px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  outline:none;
  font-size:16px;
}

.input:focus{
  border-color: rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.07);
}

.btn{
  width:100%;
  padding: 14px 14px;
  border:none;
  border-radius: 16px;
  cursor:pointer;
  font-weight:800;
  letter-spacing:0.2px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}

.btn:disabled{ opacity:0.55; cursor:not-allowed; }
.btn:hover{ transform: translateY(-1px); }

.btn.primary{
  background: rgba(255,255,255,0.95);
  color:#000;
}

.btn.ghost{
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.12);
  color: var(--text);
}

.btn.small{
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  width:auto;
}

.hint{
  margin-top:8px;
  display:flex;
  align-items:center;
  gap:8px;
  color: rgba(255,255,255,0.62);
  font-size:12px;
}

.row-between{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.row{ display:flex; align-items:center; }
.gap{ gap:12px; }
.col{ flex:1; }

.divider{
  height:1px;
  background: rgba(255,255,255,0.08);
  margin: 14px 0;
}

.muted{ color: var(--muted); }
.tiny{ font-size:12px; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.pill{
  padding: 8px 12px;
  border-radius:999px;
  background: rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.10);
  font-size:12px;
  font-weight:900;
  letter-spacing:0.6px;
}

.balance{
  font-size:38px;
  font-weight:900;
  letter-spacing:-0.6px;
  margin-top:4px;
}

.balance-small{
  font-size:22px;
  font-weight:900;
  margin-top:2px;
}

.section-title{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  font-size:16px;
  margin-bottom:10px;
}

.list{ display:flex; flex-direction:column; gap:10px; }

.ticket-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

.ticket-title{ font-weight:900; }

.ticket-state{
  min-width:88px;
  text-align:center;
  padding:8px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  border:1px solid rgba(255,255,255,0.14);
}
.ticket-state.ok{ background: rgba(0,255,120,0.08); }
.ticket-state.bad{ background: rgba(255,0,0,0.10); }

.grid-cards{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}

.product-card{
  display:flex;
  gap:12px;
  padding:12px;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

.product-img{
  width:82px;
  height:82px;
  border-radius:18px;
  overflow:hidden;
  flex:0 0 auto;
  background: rgba(255,255,255,0.06);
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,0.10);
}

.product-img img{
  width:100%;
  height:100%;
  object-fit: cover;
}

.product-img.placeholder i{
  font-size:18px;
  opacity:0.8;
}

.product-body{ flex:1; min-width:0; }

.product-title{
  font-weight:900;
  font-size:14px;
}

.product-foot{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.qty-pill{
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.10);
  font-weight:900;
  font-size:12px;
}

.state-pill{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  font-weight:900;
  font-size:12px;
}
.state-pill.ok{ background: rgba(0,255,120,0.08); }

.counter{
  display:flex;
  align-items:center;
  gap:8px;
}

.counter-btn{
  width:34px;
  height:34px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor:pointer;
}
.counter-btn:disabled{ opacity:0.4; cursor:not-allowed; }
.counter-val{ min-width:28px; text-align:center; font-weight:900; }

.page-title .title{ font-size:18px; font-weight:900; }

.preview-box{
  margin-top:10px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

.row-qr{ display:flex; align-items:center; gap:12px; }

.qr-box{
  width:120px;
  height:120px;
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  display:flex;
  align-items:center;
  justify-content:center;
}

.qr-box img{
  width:100%;
  height:100%;
  object-fit: cover;
}

.qr-info{ flex:1; min-width:0; }

.fab{
  position: fixed;
  right: 18px;
  bottom: 18px;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  font-weight: 900;
  letter-spacing: 0.4px;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  background: rgba(255,255,255,0.95);
  color:#000;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
}

.modal{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.62);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:80;
}

.modal.hidden{ display:none; }

.modal-card{
  width:100%;
  max-width:520px;
  padding:16px;
  border-radius: 22px;
}

.qr-reader{
  width:100%;
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.10);
}

.grid-2{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
  margin-bottom:12px;
}

.kpi{
  font-size:30px;
  font-weight:900;
  margin-top:4px;
}

.tool-list{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.inv-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}
.inv-name{ font-weight:900; }
.inv-stock{ font-weight:900; font-size:16px; }

.empty{
  padding:12px;
  border-radius:16px;
  border:1px dashed rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}

@media (min-width: 860px){
  .grid-cards{ grid-template-columns: 1fr 1fr; }
  .grid-2{ grid-template-columns: 1fr 1fr; }
}