
:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --line:#e5e7eb;
  --primary:#2563eb;
  --primary-hover:#1d4ed8;
  --success:#16a34a;
  --danger:#dc2626;
  --shadow:0 10px 30px rgba(2,6,23,.08);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}
button,input{font:inherit}

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

.topbar{
  background:#0f172a;
  color:#fff;
  box-shadow:var(--shadow);
}

.topbar-inner{
  max-width:1100px;
  margin:0 auto;
  padding:16px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.brand{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.brand h1{
  margin:0;
  font-size:22px;
}

.brand span{
  color:#cbd5e1;
  font-size:13px;
}

.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.nav a{
  padding:10px 14px;
  border-radius:10px;
  color:#e2e8f0;
  background:rgba(255,255,255,.06);
  transition:.2s;
}

.nav a:hover{
  background:rgba(255,255,255,.12);
}

.page-title{
  margin:0 0 18px;
  font-size:28px;
}

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

.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border:1px solid rgba(229,231,235,.8);
  padding:20px;
}

.card-title{
  margin:0 0 16px;
  font-size:18px;
}

.form-row{
  display:grid;
  grid-template-columns:1fr 160px 140px;
  gap:12px;
}

.input,
select{
  width:100%;
  height:44px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:0 14px;
  outline:none;
}

.input:focus,
select:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

.btn{
  border:none;
  border-radius:12px;
  height:44px;
  padding:0 16px;
  cursor:pointer;
  transition:.2s;
  font-weight:bold;
}

.btn-primary{
  background:var(--primary);
  color:#fff;
}

.btn-primary:hover{
  background:var(--primary-hover);
}

.btn-danger{
  background:var(--danger);
  color:#fff;
}

.btn-light{
  background:#eef2ff;
  color:#1e3a8a;
}

.table-wrap{
  overflow:auto;
}

.table{
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td{
  text-align:left;
  padding:14px 12px;
  border-bottom:1px solid var(--line);
  font-size:14px;
}

.table th{
  color:var(--muted);
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.badge{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:bold;
}

.badge-ok{
  background:#dcfce7;
  color:#166534;
}

.badge-low{
  background:#fee2e2;
  color:#991b1b;
}

.search-box{
  margin-bottom:14px;
}

.product-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:420px;
  overflow:auto;
}

.product-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  transition:.2s;
}

.product-item:hover{
  border-color:#bfdbfe;
  background:#f8fbff;
}

.product-name{
  font-weight:bold;
}

.product-meta{
  color:var(--muted);
  font-size:13px;
  margin-top:4px;
}

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

.cart-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
  background:#fff;
}

.cart-item strong{
  display:block;
  margin-bottom:4px;
}

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

.qty-btn{
  width:34px;
  height:34px;
  border:none;
  border-radius:10px;
  cursor:pointer;
  background:#e5e7eb;
  font-weight:bold;
}

.qty{
  min-width:24px;
  text-align:center;
  font-weight:bold;
}

.total-box{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.total-value{
  font-size:28px;
  font-weight:bold;
  color:#0f172a;
}

.empty{
  color:var(--muted);
  padding:16px 0;
}

.footer-actions{
  margin-top:18px;
  display:flex;
  justify-content:flex-end;
}

@media (max-width: 900px){
  .grid{grid-template-columns:1fr}
  .form-row{grid-template-columns:1fr}
  .topbar-inner{flex-direction:column;align-items:flex-start}
  .footer-actions .btn{width:100%}
}
