:root{
  --bg:#f4f4f5;
  --card:#ffffff;
  --text:#111111;
  --muted:#6b7280;
  --black:#111111;
  --accent:#ff8a3d;
  --border:#e5e7eb;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  background:var(--bg);
  color:var(--text);
}
.topbar{
  height:58px;
  background:var(--black);
  color:white;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 14px;
  position:sticky;
  top:0;
  z-index:50;
}
.hamburger{
  width:auto;
  border:0;
  background:transparent;
  color:white;
  font-size:24px;
  padding:8px 10px;
  cursor:pointer;
}
.brand{
  flex:1;
  text-align:center;
  font-weight:800;
  letter-spacing:.3px;
}
.brand-icon{margin-right:6px}
.app{
  display:flex;
  min-height:calc(100vh - 58px);
}
.sidebar{
  width:280px;
  background:#181818;
  color:white;
  padding:16px 0 80px;
  flex-shrink:0;
  overflow-y:auto;
}
.sidebar-title{
  padding:0 18px 12px;
  font-size:22px;
  font-weight:800;
}
.nav-group{
  padding:16px 18px 6px;
  color:#9ca3af;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:1.5px;
}
.nav-link{
  width:100%;
  display:block;
  text-align:left;
  border:0;
  background:transparent;
  color:#e5e7eb;
  padding:11px 18px;
  cursor:pointer;
  font-size:14px;
  border-left:4px solid transparent;
}
.nav-link:hover,.nav-link.active{
  background:#252525;
  border-left-color:var(--accent);
  color:white;
}
.content{
  flex:1;
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding:18px;
}
.page{display:none}
.page.active{display:block}
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:18px;
  margin-bottom:16px;
  box-shadow:0 1px 8px rgba(0,0,0,.05);
}
.hero{
  background:linear-gradient(135deg,#111,#303030);
  color:white;
}
.card h1,.card h2,.card h3{
  margin:0 0 12px;
}
.small{
  font-size:12px;
  color:var(--muted);
}
.hero .small{color:#d1d5db}
input,textarea,select,button{
  width:100%;
  padding:12px;
  margin-top:8px;
  border-radius:10px;
  border:1px solid #d1d5db;
  font-size:15px;
  font-family:inherit;
}
textarea{
  min-height:90px;
  resize:vertical;
}
button{
  background:var(--black);
  color:white;
  font-weight:700;
  border:0;
  cursor:pointer;
}
button.secondary{
  background:#eeeeee;
  color:#111111;
}
button.danger{
  background:#c0392b;
}
.row{
  display:flex;
  gap:10px;
}
.row>*{flex:1}
.calculator-card{
  border:3px solid #111;
  background:#fffdf6;
}
.calc-header{
  background:#111;
  color:white;
  padding:12px;
  border-radius:12px;
  text-align:center;
  font-weight:800;
  margin-bottom:12px;
}
.output{
  margin-top:14px;
  padding:14px;
  background:#f7f3e8;
  border-radius:12px;
  line-height:1.75;
  display:none;
}
.recipe-item{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  background:#fafafa;
  margin-top:10px;
}
.recipe-item h4{
  margin:0 0 4px;
}
.actions{
  display:flex;
  gap:8px;
  margin-top:10px;
}
.actions button{margin:0}
.overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:80;
}
.bottom-nav{
  display:none;
}
@media(max-width:820px){
  .app{display:block}
  .sidebar{
    position:fixed;
    top:58px;
    bottom:0;
    left:-290px;
    transition:left .25s ease;
    z-index:90;
  }
  .sidebar.open{left:0}
  .overlay.show{display:block}
  .content{
    padding:14px;
    padding-bottom:84px;
  }
  .row{
    flex-direction:column;
    gap:0;
  }
  .bottom-nav{
    display:flex;
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    background:white;
    border-top:1px solid var(--border);
    z-index:60;
  }
  .bottom-nav button{
    background:white;
    color:#111;
    border:0;
    border-radius:0;
    margin:0;
    padding:8px 4px;
    font-size:18px;
  }
  .bottom-nav span{
    display:block;
    font-size:11px;
    margin-top:2px;
  }
}
