:root{
  --brand-red:#b30d12;
  --brand-red-dark:#8e0a0e;
  --brand-gold:#f2b705;
  --brand-cream:#fff8ea;
  --brand-white:#ffffff;
  --brand-text:#1f2937;
  --brand-muted:#6b7280;
  --brand-line:#e5e7eb;
  --brand-bg:#f7f7f8;
  --success:#047857;
  --warning:#c2410c;
  --info:#1d4ed8;
  --danger:#b91c1c;
  --shadow-sm:0 6px 18px rgba(0,0,0,.07);
  --shadow-md:0 12px 28px rgba(0,0,0,.10);
  --radius-xl:22px;
  --radius-lg:16px;
  --radius-md:12px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  background:var(--brand-bg);
  color:var(--brand-text);
}
a{text-decoration:none;color:inherit}
img{max-width:100%}

.top-strip{
  background:linear-gradient(90deg,var(--brand-red-dark),var(--brand-red));
  color:#fff;
  font-size:.92rem;
  padding:.5rem 0;
}

.container{
  width:min(1200px,92%);
  margin:0 auto;
}

.brand-header{
  background:#fff;
  border-bottom:4px solid var(--brand-gold);
}

.brand-wrap{
  display:flex;
  align-items:center;
  gap:16px;
  padding:16px 0;
  flex-wrap:wrap;
}

.brand-logo{
  width:68px;
  height:68px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 30%, #d22 0%, var(--brand-red) 65%);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:1.6rem;
  font-weight:800;
  box-shadow:var(--shadow-sm);
  border:4px solid #fff;
  outline:3px solid var(--brand-gold);
}

.brand-title h1{
  margin:0;
  font-size:1.45rem;
  font-weight:800;
}

.brand-title p{
  margin:4px 0 0;
  color:var(--brand-muted);
  font-size:.95rem;
}

.header-actions{
  margin-left:auto;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.pill-btn,
.btn{
  border:1px solid var(--brand-line);
  background:#fff;
  color:var(--brand-text);
  border-radius:999px;
  padding:.7rem 1rem;
  font-weight:700;
  cursor:pointer;
  transition:.2s ease;
}

.pill-btn:hover,
.btn:hover{
  background:var(--brand-cream);
  border-color:var(--brand-gold);
  color:var(--brand-red);
}

.btn-primary{
  background:var(--brand-red);
  color:#fff;
  border-color:var(--brand-red);
}
.btn-primary:hover{
  background:var(--brand-red-dark);
  color:#fff;
}

.btn-block{
  display:block;
  width:100%;
}

.main-nav{
  background:var(--brand-red);
  box-shadow:0 4px 14px rgba(0,0,0,.12);
}
.main-nav .nav-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.main-nav .nav-links{
  display:flex;
  gap:0;
  flex-wrap:wrap;
}
.main-nav .nav-link{
  color:#fff;
  font-weight:700;
  padding:1rem .95rem;
  border-right:1px solid rgba(255,255,255,.12);
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active{
  background:var(--brand-red-dark);
}

.section{
  padding:30px 0;
}

.grid{
  display:grid;
  gap:18px;
}

.grid-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}

.grid-3{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.grid-4{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}

.card{
  background:#fff;
  border:1px solid var(--brand-line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  padding:18px;
}

.card h3,
.card h4{
  margin-top:0;
}

.hero{
  background:
    linear-gradient(115deg, rgba(179,13,18,.95), rgba(142,10,14,.88)),
    radial-gradient(circle at right top, rgba(242,183,5,.35), transparent 35%);
  color:#fff;
}
.hero-inner{
  padding:42px 0;
  display:grid;
  grid-template-columns:1.25fr .9fr;
  gap:24px;
  align-items:center;
}
.hero h2{
  margin:0 0 10px;
  font-size:clamp(2rem,4vw,3rem);
  font-weight:900;
}
.hero p{
  color:rgba(255,255,255,.92);
  max-width:720px;
}
.hero-card{
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.18);
  border-radius:22px;
  padding:18px;
  box-shadow:var(--shadow-md);
}

.input,
select,
textarea{
  width:100%;
  padding:.9rem 1rem;
  border:1px solid #d1d5db;
  border-radius:12px;
  background:#fff;
  font:inherit;
}
label{
  display:block;
  margin-bottom:6px;
  font-weight:700;
}
.form-group{
  margin-bottom:14px;
}

.toolbar{
  background:#fff;
  border:1px solid var(--brand-line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.product-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}
.product-card{
  overflow:hidden;
  background:#fff;
  border:1px solid var(--brand-line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  transition:transform .2s ease, box-shadow .2s ease;
}
.product-card:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-md);
}
.product-image{
  aspect-ratio:1/1;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2.5rem;
  color:#fff;
  font-weight:800;
  background:linear-gradient(145deg, #c62828, #7f1d1d);
}
.product-image.bg2{background:linear-gradient(145deg,#2e7d32,#66bb6a)}
.product-image.bg3{background:linear-gradient(145deg,#ef6c00,#ffb74d)}
.product-image.bg4{background:linear-gradient(145deg,#6a1b9a,#ab47bc)}
.product-image.bg5{background:linear-gradient(145deg,#1565c0,#64b5f6)}
.product-image.bg6{background:linear-gradient(145deg,#00897b,#80cbc4)}
.product-body{
  padding:14px;
}
.category-tag{
  display:inline-block;
  padding:.28rem .55rem;
  font-size:.78rem;
  border-radius:999px;
  background:var(--brand-cream);
  color:var(--brand-red);
  font-weight:700;
  margin-bottom:8px;
}
.product-name{
  font-weight:800;
  margin:0 0 6px;
}
.product-desc{
  color:var(--brand-muted);
  font-size:.92rem;
  min-height:42px;
  margin-bottom:10px;
}
.price-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.price{
  font-weight:900;
  font-size:1.1rem;
}
.add-btn{
  border:none;
  background:var(--brand-red);
  color:#fff;
  border-radius:12px;
  padding:.65rem .85rem;
  font-weight:700;
  cursor:pointer;
}
.add-btn:hover{
  background:var(--brand-red-dark);
}

.sidebar-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:24px;
}
.sidebar-box{
  background:#fff;
  border:1px solid var(--brand-line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  padding:16px;
  margin-bottom:16px;
}
.sidebar-title{
  font-weight:900;
  color:var(--brand-red);
  margin-bottom:12px;
  font-size:1.05rem;
  text-transform:uppercase;
}

.list{
  display:grid;
  gap:10px;
}
.list-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  background:#fafafa;
  border:1px solid var(--brand-line);
  border-radius:14px;
}
.list-item .left strong{
  display:block;
}
.list-item .left span{
  color:var(--brand-muted);
  font-size:.88rem;
}

.badge{
  display:inline-block;
  padding:.38rem .68rem;
  border-radius:999px;
  font-size:.8rem;
  font-weight:700;
}
.badge-success{background:#ecfdf5;color:#047857}
.badge-warning{background:#fff7ed;color:#c2410c}
.badge-info{background:#eff6ff;color:#1d4ed8}
.badge-danger{background:#fef2f2;color:#b91c1c}

.stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
.stat-card{
  background:#fff;
  border:1px solid var(--brand-line);
  border-radius:16px;
  box-shadow:var(--shadow-sm);
  padding:18px;
}
.stat-card .label{
  color:var(--brand-muted);
  font-size:.88rem;
}
.stat-card .value{
  font-size:1.5rem;
  font-weight:900;
  margin-top:6px;
  color:var(--brand-red);
}
.stat-card .meta{
  margin-top:6px;
  font-size:.88rem;
  color:var(--success);
  font-weight:700;
}

.table-wrap{
  overflow:auto;
}
.table{
  width:100%;
  border-collapse:collapse;
}
.table th,
.table td{
  padding:12px 10px;
  border-bottom:1px solid var(--brand-line);
  text-align:left;
  font-size:.94rem;
}
.table th{
  color:var(--brand-muted);
  font-size:.82rem;
  text-transform:uppercase;
}

.auth-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
}
.auth-card{
  width:min(520px,100%);
  background:#fff;
  border:1px solid var(--brand-line);
  border-radius:24px;
  box-shadow:var(--shadow-md);
  padding:24px;
}
.auth-card h2{
  margin:0 0 8px;
}
.auth-card p{
  color:var(--brand-muted);
}

.notice{
  padding:12px 14px;
  border-radius:12px;
  margin-bottom:14px;
  font-size:.94rem;
}
.notice-success{background:#ecfdf5;color:#065f46}
.notice-error{background:#fef2f2;color:#991b1b}
.notice-info{background:#eff6ff;color:#1e3a8a}

.footer{
  background:var(--brand-red-dark);
  color:#fff;
  padding:28px 0;
  margin-top:24px;
  border-top:4px solid var(--brand-gold);
}

.mobile-shell{
  max-width:430px;
  margin:0 auto;
  background:#fff;
  min-height:100vh;
}

.hidden{display:none !important}

@media (max-width: 1199px){
  .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width: 991px){
  .hero-inner,
  .sidebar-layout,
  .grid-2,
  .grid-3,
  .grid-4,
  .stats{
    grid-template-columns:1fr;
  }
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 575px){
  .product-grid{grid-template-columns:1fr}
  .brand-wrap{flex-direction:column;align-items:flex-start}
  .header-actions{margin-left:0}
}