
:root {
  --orange:#ff5a1f;
  --orange-dark:#e94b12;
  --ink:#202124;
  --muted:#73777d;
  --line:#e9e9e9;
  --bg:#f6f7f8;
  --white:#fff;
  --green:#16834b;
  --red:#d93636;
  --shadow:0 5px 22px #2021240c;
}

*{box-sizing:border-box}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:Inter,Arial,sans-serif;
  font-size:14px;
}

button,input,select,textarea{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}

.login-wrap{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:20px;
  background:linear-gradient(145deg,#fff4ee,#f7f8fa);
}

.login-card{
  background:#fff;
  padding:30px;
  border-radius:18px;
  width:min(100%,390px);
  box-shadow:var(--shadow);
}

.login-card h1{text-align:center;margin:12px 0 3px}
.login-card>p{
  text-align:center;
  color:var(--muted);
  margin:0 0 25px;
}

.brand-mark{
  width:72px;
  height:72px;
  margin:auto;
  background:transparent;
  border-radius:20px;
  display:grid;
  place-items:center;
  overflow:hidden;
}

.brand-mark img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
}

.brand-mark.small{
  width:38px;
  height:38px;
  border-radius:11px;
  margin:0;
  flex-shrink:0;
}

.app{min-height:100vh}

.sidebar{
  width:245px;
  position:fixed;
  inset:0 auto 0 0;
  background:#fff;
  border-right:1px solid var(--line);
  padding:20px 14px;
  display:flex;
  flex-direction:column;
  z-index:20;
}

.side-brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:20px;
  padding:0 8px 22px;
}

.restaurant-side-name{
  padding:12px 10px;
  color:var(--muted);
  font-size:12px;
  border-bottom:1px solid var(--line);
  margin-bottom:14px;
}

.sidebar nav{display:grid;gap:5px}

.nav-link{
  border:0;
  background:transparent;
  text-align:left;
  padding:12px;
  border-radius:10px;
  color:#50545a;
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:600;
}

.nav-link.active,.nav-link:hover{
  background:#fff0e9;
  color:var(--orange);
}

.nav-badge{
  margin-left:auto;
  background:var(--orange);
  color:white;
  border-radius:20px;
  padding:2px 7px;
  font-size:11px;
}

.logout-btn{
  margin-top:auto;
  border:0;
  background:#fff0ed;
  color:#c33;
  padding:12px;
  border-radius:10px;
  font-weight:700;
}

.main{
  margin-left:245px;
  min-height:100vh;
  padding:24px;
  max-width:1600px;
}

.topbar{
  height:58px;
  display:flex;
  align-items:center;
  gap:13px;
  margin:-24px -24px 24px;
  padding:0 24px;
  background:#fff;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:10;
}

.topbar small{
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-top:3px;
}

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

.icon-btn{
  border:0;
  background:#f3f3f3;
  border-radius:9px;
  padding:9px 12px;
  color:var(--ink);
}

#menuToggle{display:none}

.live-dot{
  width:9px;
  height:9px;
  background:#22a568;
  border-radius:50%;
}

.page{display:none}
.page.active{display:block}

.page-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin:5px 0 22px;
}

h1{font-size:25px;margin:0 0 5px}
h2{font-size:16px;margin:0}

.page-heading p,.section-card p{
  color:var(--muted);
  margin:0;
}

.muted{color:var(--muted);font-size:12px}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.stat-card,.section-card,.order-card,.menu-card,.review-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:18px;
  box-shadow:var(--shadow);
}

.stat-card span{
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-bottom:12px;
}

.stat-card b{font-size:25px}

.section-card{margin-bottom:16px}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:15px;
}

.primary-btn,.secondary-btn{
  border:0;
  border-radius:9px;
  padding:11px 16px;
  font-weight:700;
}

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

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

.secondary-btn{
  background:#f1f1f1;
  color:var(--ink);
}

.text-btn{
  border:0;
  background:transparent;
  color:var(--orange);
  font-weight:700;
}

.full{width:100%;margin-top:15px}

label{
  display:block;
  font-size:12px;
  font-weight:700;
  margin:14px 0 6px;
}

input,select,textarea{
  width:100%;
  padding:11px 12px;
  border:1px solid #dedede;
  border-radius:9px;
  background:#fff;
  outline:none;
  color:var(--ink);
}

input:focus,select:focus,textarea:focus{
  border-color:var(--orange);
  box-shadow:0 0 0 3px #ff5a1f15;
}

textarea{resize:vertical}

.filter-row{
  display:flex;
  gap:10px;
  align-items:end;
  margin-bottom:15px;
  flex-wrap:wrap;
}

.filter-row>*{max-width:260px}

.order-list,.review-list{
  display:grid;
  gap:12px;
}

.order-card{padding:16px}

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

.order-number{font-weight:800}

.order-meta{
  color:var(--muted);
  font-size:12px;
  margin-top:5px;
}

.status-pill{
  padding:5px 9px;
  border-radius:30px;
  background:#f2f2f2;
  font-size:11px;
  font-weight:800;
  text-transform:capitalize;
}

.status-pending{background:#fff3d8;color:#9b6700}

.status-confirmed,.status-preparing{
  background:#eaf2ff;
  color:#245eb1;
}

.status-ready,.status-delivered{
  background:#e5f7ed;
  color:#167344;
}

.status-rejected,.status-cancelled{
  background:#ffebeb;
  color:#b52d2d;
}

.order-items{
  padding:12px 0;
  border-bottom:1px solid var(--line);
  line-height:1.7;
}

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

.order-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.small-btn{
  border:0;
  border-radius:8px;
  padding:8px 11px;
  background:#f1f1f1;
  font-weight:700;
}

.small-btn.orange{background:var(--orange);color:#fff}
.small-btn.red{background:#ffeded;color:#bd3030}

.menu-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.menu-card{padding:0;overflow:hidden}

.menu-photo{
  height:155px;
  background:#f1f1f1;
  position:relative;
}

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

.photo-count{
  position:absolute;
  right:8px;
  bottom:8px;
  background:#000a;
  color:#fff;
  padding:4px 7px;
  border-radius:20px;
  font-size:11px;
}

.menu-content{padding:13px}
.menu-content h3{margin:0 0 7px;font-size:15px}

.menu-content p{
  margin:0 0 10px;
  color:var(--muted);
  font-size:12px;
}

.menu-price{font-weight:800}

.menu-actions{
  display:flex;
  gap:7px;
  margin-top:12px;
}

.setting-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  padding:13px 0;
  border-bottom:1px solid var(--line);
}

.setting-row p{font-size:12px;margin-top:4px!important}

.switch{
  position:relative;
  width:45px;
  height:25px;
  margin:0;
  flex-shrink:0;
}

.switch input{display:none}

.switch span{
  position:absolute;
  inset:0;
  background:#ccc;
  border-radius:20px;
  cursor:pointer;
}

.switch span:before{
  content:"";
  position:absolute;
  width:19px;
  height:19px;
  left:3px;
  top:3px;
  background:white;
  border-radius:50%;
  transition:.2s;
}

.switch input:checked+span{background:var(--green)}
.switch input:checked+span:before{transform:translateX(20px)}

.review-card{padding:16px}
.review-stars{color:#f0a000;font-size:17px}
.review-card p{line-height:1.5}

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

.simple-list{
  display:grid;
  gap:9px;
  margin-top:12px;
}

.simple-row{
  display:flex;
  justify-content:space-between;
  padding:9px 0;
  border-bottom:1px solid var(--line);
}

.empty{
  padding:30px;
  text-align:center;
  color:var(--muted);
  background:#fff;
  border:1px dashed #ddd;
  border-radius:12px;
}

.notice{
  padding:12px 15px;
  border-radius:10px;
  margin-bottom:15px;
  background:#eaf7ef;
  color:#176b3e;
}

.notice.error{background:#ffeded;color:#a22}

.message{
  font-size:12px;
  color:#b22;
  margin-top:12px!important;
}

.modal{
  position:fixed;
  inset:0;
  background:#0008;
  z-index:50;
  display:grid;
  place-items:center;
  padding:15px;
}

.modal-box{
  background:#fff;
  width:min(100%,560px);
  max-height:92vh;
  overflow:auto;
  border-radius:16px;
  padding:20px;
}

.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:15px;
}

.photo-preview{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

.photo-preview img{
  width:68px;
  height:68px;
  object-fit:cover;
  border-radius:8px;
}

.status-summary{font-weight:700;padding:5px 0}
.profile-form{max-width:700px}

/* PWA INSTALL POPUP */

.install-overlay{
  position:fixed;
  inset:0;
  z-index:1000;
  background:rgba(20,16,18,.58);
  display:grid;
  place-items:center;
  padding:20px;
  backdrop-filter:blur(5px);
}

.install-card{
  position:relative;
  width:min(100%,360px);
  background:#fff;
  border-radius:24px;
  padding:28px 22px 22px;
  text-align:center;
  box-shadow:0 20px 70px #0003;
  animation:installPop .24s ease-out;
}

@keyframes installPop{
  from{opacity:0;transform:translateY(12px) scale(.97)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

.install-close{
  position:absolute;
  right:13px;
  top:11px;
  border:0;
  background:#f3f3f3;
  color:#555;
  width:30px;
  height:30px;
  border-radius:50%;
  font-size:22px;
  line-height:1;
}

.install-icon{
  width:88px;
  height:88px;
  border-radius:22px;
  object-fit:cover;
  margin:5px auto 14px;
  display:block;
}

.install-eyebrow{
  font-size:10px;
  letter-spacing:2px;
  font-weight:900;
  color:#ed174c;
  margin:0 0 8px;
}

.install-card h2{
  font-size:22px;
  margin:0 0 9px;
  color:#202124;
}

.install-copy{
  font-size:13px;
  line-height:1.55;
  color:#73777d;
  margin:0 0 20px;
}

.install-now{
  width:100%;
  border:0;
  border-radius:12px;
  padding:14px 16px;
  background:#ed174c;
  color:#fff;
  font-weight:900;
  letter-spacing:.6px;
}

.install-later{
  border:0;
  background:transparent;
  color:#73777d;
  font-weight:700;
  padding:13px 16px 2px;
}

.install-help{
  font-size:12px;
  line-height:1.5;
  color:#555;
  background:#fff2f5;
  padding:10px;
  border-radius:10px;
  margin:14px 0 0;
}

@media(max-width:1050px){
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:700px){
  .sidebar{
    transform:translateX(-100%);
    transition:.2s;
    width:260px;
    box-shadow:var(--shadow);
  }

  .sidebar.open{transform:translateX(0)}

  .main{margin:0;padding:15px}

  .topbar{
    margin:-15px -15px 18px;
    padding:0 15px;
  }

  #menuToggle{display:block}

  .page-heading{
    align-items:flex-start;
    flex-wrap:wrap;
  }

  h1{font-size:22px}

  .stats-grid{gap:9px}
  .stat-card{padding:13px}
  .stat-card b{font-size:20px}

  .menu-grid{
    grid-template-columns:1fr 1fr;
    gap:9px;
  }

  .menu-photo{height:115px}
  .menu-content{padding:10px}
  .menu-content h3{font-size:13px}

  .order-bottom{
    align-items:flex-start;
    flex-direction:column;
  }

  .two-col{grid-template-columns:1fr 1fr}

  .filter-row>*{
    max-width:none;
    flex:1;
  }

  .modal-box{padding:15px}

  .page-heading .primary-btn{
    padding:10px 12px;
  }
}

@media(max-width:380px){
  .menu-grid{grid-template-columns:1fr}
  .two-col{grid-template-columns:1fr}
}

/* DINEGO RESTAURANT INSTALL POPUP */

.install-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,.60);
  display: grid;
  place-items: center;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.install-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 24px;
  padding: 28px 22px;
  text-align: center;
  position: relative;
  box-shadow: 0 15px 60px #0003;
  animation: installShow .25s ease;
}

@keyframes installShow {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.install-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: #f3f3f3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 22px;
}

.install-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  object-fit: cover;
  margin-bottom: 15px;
}

.install-eyebrow {
  color: #f5104b;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 1.5px;
}

.install-card h2 {
  font-size: 22px;
  color: #202124;
  margin: 10px 0;
}

.install-card p {
  color: #777;
  font-size: 13px;
  line-height: 1.6;
}

.install-now {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: #f5104b;
  color: #fff;
  font-weight: 800;
  margin-top: 15px;
}

.install-later {
  background: transparent;
  border: 0;
  padding: 14px;
  color: #777;
  font-weight: 700;
}

.install-help {
  background: #fff0f3;
  padding: 10px;
  border-radius: 9px;
}
