
:root{
  --bg: #f6f1e9;
  --paper: rgba(255,255,255,.72);
  --ink: #3a2d25;
  --muted: #7a6a5c;
  --line: rgba(109,90,69,.25);
  --brand: #b9863a;
  --brand2: #d2a158;
  --sidebar: #3b2b22;
  --sidebar2: #2a1f19;
  --chip: rgba(227,213,195,.65);
  --shadow: 0 12px 30px rgba(29,18,12,.12);
  --shadow2: 0 6px 18px rgba(29,18,12,.12);
  --radius: 14px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--ink);
  background: var(--bg) url("../img/bg-paper.png") center/cover fixed no-repeat;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

a{ color: inherit; text-decoration: none; }
button, input{ font: inherit; }

.app{
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
}

.sidebar{
  background: url("../img/bg-sidebar.png") center/cover no-repeat;
  color: #f1e6d7;
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 6px 6px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 18px;
}
.brand img{ width: 260px; max-width: 100%; height:auto; display:block; }

.nav{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-top: 12px;
}

.nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px;
  border-radius: 12px;
  color: rgba(241,230,215,.92);
}
.nav a:hover{ background: rgba(255,255,255,.06); }
.nav a.active{
  background: rgba(255,255,255,.10);
  outline: 1px solid rgba(255,255,255,.08);
}
.nav .icon{
  width:20px; height:20px; display:grid; place-items:center;
}
.nav .label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  font-size: 14px;
}

.main{
  padding: 22px 30px 50px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.breadcrumb{
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb b{ color: var(--ink); font-weight:600; }

.top-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.btn{
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, var(--brand2), var(--brand));
  color: #fff7ea;
  box-shadow: 0 6px 14px rgba(90,56,22,.18);
  cursor:pointer;
  font-weight: 600;
}
.btn:active{ transform: translateY(1px); }

.btn.ghost{
  background: rgba(255,255,255,.58);
  color: var(--ink);
  outline: 1px solid var(--line);
  box-shadow: none;
}

.avatar{
  width: 36px; height: 36px;
  border-radius: 999px;
  overflow:hidden;
  outline: 2px solid rgba(185,134,58,.35);
  background: rgba(255,255,255,.4);
}
.avatar img{ width:100%; height:100%; object-fit:cover; display:block; }

.h1{
  margin: 18px 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: .2px;
  font-size: 38px;
}
.subline{
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}
.note{
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.card{
  background: var(--paper);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  outline: 1px solid var(--line);
}

.week{
  padding: 14px 14px 10px;
}

.week-header{
  display:grid;
  grid-template-columns: 160px repeat(7, 1fr);
  gap: 0;
  border-radius: 12px;
  overflow:hidden;
  outline: 1px solid rgba(109,90,69,.20);
  background: rgba(255,255,255,.35);
}
.week-header div{
  padding: 10px 12px;
  font-weight: 700;
  color: #5b4b3d;
  font-size: 13px;
  border-right: 1px solid rgba(109,90,69,.18);
  background: rgba(234,224,210,.52);
}
.week-header div:first-child{
  background: rgba(234,224,210,.28);
  border-right: 1px solid rgba(109,90,69,.18);
}
.week-header div:last-child{ border-right:0; }

.week-body{
  display:flex;
  flex-direction:column;
  margin-top: 10px;
  gap: 10px;
}

.week-row{
  display:grid;
  grid-template-columns: 160px repeat(7, 1fr);
  border-radius: 12px;
  overflow:hidden;
  outline: 1px solid rgba(109,90,69,.18);
  background: rgba(255,255,255,.35);
}

.product-cell{
  padding: 12px 12px;
  display:flex;
  gap: 10px;
  align-items:center;
  border-right: 1px solid rgba(109,90,69,.12);
  background: rgba(255,255,255,.45);
}
.product-cell img{ width: 44px; height: 44px; object-fit: contain; }
.product-cell .pname{
  font-weight: 800;
  font-size: 13px;
}
.product-cell .psub{
  font-size: 12px;
  color: var(--muted);
  display:flex;
  align-items:center;
  gap:6px;
  margin-top: 2px;
}
.product-cell .psub img{ width: 14px; height: 14px; }

.day-cell{
  padding: 10px 10px;
  border-right: 1px solid rgba(109,90,69,.10);
  min-height: 72px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
  position:relative;
}
.day-cell:last-child{ border-right:0; }

.no-choice{
  color: rgba(122,106,92,.85);
  font-size: 13px;
  text-align:center;
  padding: 10px 0;
}

.choice{
  display:flex;
  flex-direction:column;
  gap: 6px;
  align-items:center;
}
.choice .mini{
  font-size: 12px;
  color: var(--muted);
  display:flex;
  align-items:center;
  gap:6px;
}
.choice .mini img{ width: 14px; height: 14px; }
.qty{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
}
.qbtn{
  width: 34px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  cursor:pointer;
  background: rgba(233,222,208,.8);
  color: #5b4b3d;
  outline: 1px solid rgba(109,90,69,.20);
}
.qnum{
  width: 30px;
  text-align:center;
  font-weight: 800;
  color: #5b4b3d;
  font-size: 13px;
}

.tabs{
  margin-top: 16px;
  padding: 0 10px;
}

.tabbar{
  display:flex;
  align-items:center;
  gap: 18px;
  padding: 10px 8px 0;
  border-bottom: 1px solid rgba(109,90,69,.20);
}
.tab{
  padding: 10px 6px;
  display:flex;
  align-items:center;
  gap: 6px;
  color: #6b5a48;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 3px solid transparent;
  cursor:pointer;
}
.tab.active{
  color: #5a462f;
  border-bottom-color: var(--brand);
}
.tab img{ width: 14px; height: 14px; opacity: .9; }

.searchrow{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 8px 14px;
}
.search{
  flex:1;
  position:relative;
}
.search input{
  width:100%;
  padding: 12px 12px 12px 42px;
  border-radius: 12px;
  border: 0;
  outline: 1px solid rgba(109,90,69,.18);
  background: rgba(255,255,255,.55);
}
.search .sicon{
  position:absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity:.85;
}
.searchbtn{
  padding: 11px 16px;
  border-radius: 12px;
  border: 0;
  outline: 1px solid rgba(109,90,69,.18);
  background: rgba(255,255,255,.55);
  cursor:pointer;
  font-weight:700;
  color:#5a462f;
}

.catalog{
  padding: 12px 14px 14px;
}

.cards{
  display:flex;
  gap: 12px;
  overflow:auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.cards::-webkit-scrollbar{ height: 10px; }
.cards::-webkit-scrollbar-thumb{ background: rgba(109,90,69,.25); border-radius: 999px; }
.cards::-webkit-scrollbar-track{ background: rgba(255,255,255,.2); }

.pcard{
  min-width: 175px;
  max-width: 175px;
  background: rgba(255,255,255,.55);
  outline: 1px solid rgba(109,90,69,.16);
  border-radius: 14px;
  padding: 10px 10px 12px;
  box-shadow: 0 10px 18px rgba(29,18,12,.08);
}
.pcard img{
  width:100%;
  height: 74px;
  object-fit:contain;
  display:block;
  margin: 4px auto 6px;
}
.pname2{
  font-weight: 800;
  color: #5b4b3d;
  font-size: 13px;
}
.pmeta{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.pmeta .price{
  font-weight: 800;
  color: #5b4b3d;
}
.pcard .qty{ margin-top: 10px; justify-content:space-between; }
.pcard .qbtn{ width: 38px; }
.pcard .qnum{ width: 22px; }

.summary-wrap{
  margin-top: 18px;
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items:start;
}
.summary{
  padding: 16px 18px;
}
.summary h2{
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
}
.srow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  outline: 1px solid rgba(109,90,69,.16);
  margin-bottom: 10px;
}
.srow .left{
  display:flex; align-items:center; gap:10px;
  color: #5b4b3d;
}
.srow .left img{ width:18px; height:18px; opacity:.85; }
.srow .right{ font-weight:900; color:#5b4b3d; }

.list{
  margin-top: 4px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.itemline{
  display:flex;
  justify-content:space-between;
  gap: 14px;
  padding: 0 10px;
  font-size: 13px;
  color:#5b4b3d;
}
.itemline b{ font-weight:800; }

.warnline{
  margin-top: 8px;
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(230,214,190,.55);
  outline: 1px dashed rgba(109,90,69,.30);
  color:#5b4b3d;
  font-size: 13px;
}
.warnline img{ width:18px; height:18px; margin-top:2px; opacity:.85; }

.footerline{
  margin-top: 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  outline: 1px solid rgba(109,90,69,.16);
  font-size: 13px;
  color:#5b4b3d;
}
.footerline .left{
  display:flex; align-items:center; gap:10px;
}
.footerline .left img{ width:18px; height:18px; opacity:.85; }

.sidebtns{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.sidebtns .btn{
  padding: 12px 16px;
  border-radius: 12px;
  white-space:nowrap;
}
.sidebtns .btn.small{
  padding: 10px 14px;
  font-size: 13px;
}

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

@media (max-width: 1100px){
  .app{ grid-template-columns: 250px 1fr; }
  .week-header, .week-row{ grid-template-columns: 150px repeat(7, minmax(120px, 1fr)); }
}
@media (max-width: 920px){
  .app{ grid-template-columns: 1fr; }
  .sidebar{
    height: auto;
    position: relative;
  }
  .main{ padding: 18px 16px 40px; }
  .summary-wrap{ grid-template-columns: 1fr; }
  .sidebtns{ flex-direction:row; flex-wrap:wrap; }
}
