/* ================================================================
   Russel's Catering — OMS Theme
   Brand colors: Red / Green / White
   ================================================================ */
:root{
  --rc-red: #C0392B;
  --rc-red-dark: #962D22;
  --rc-green: #1E8449;
  --rc-green-dark: #166638;
  --rc-white: #FFFFFF;
  --rc-bg: #F6F5F2;
  --rc-text: #262626;
  --rc-muted: #767676;
  --rc-border: #E4E1DA;
  --rc-amber: #C6890A;
  --rc-grey: #8A8A8A;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
}

*{box-sizing:border-box;}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--rc-bg);
  color:var(--rc-text);
}
a{color:var(--rc-red); text-decoration:none;}
a:hover{text-decoration:underline;}

/* ---------- Layout ---------- */
.app-shell{display:flex; min-height:100vh;}
.sidebar{
  width:230px; flex-shrink:0;
  background:linear-gradient(180deg, var(--rc-red) 0%, var(--rc-red-dark) 100%);
  color:#fff; display:flex; flex-direction:column;
}
.sidebar .brand{padding:22px 18px; border-bottom:1px solid rgba(255,255,255,.18);}
.sidebar .brand strong{display:block; font-size:18px;}
.sidebar .brand span{font-size:12px; opacity:.85;}
.sidebar nav{flex:1; padding:14px 0;}
.sidebar nav a{
  display:block; color:#fff; opacity:.9; padding:11px 20px; font-size:14.5px;
  border-left:3px solid transparent;
}
.sidebar nav a:hover{background:rgba(255,255,255,.08); text-decoration:none;}
.sidebar nav a.active{background:rgba(255,255,255,.16); border-left-color:var(--rc-green); opacity:1; font-weight:600;}
.sidebar .user-box{padding:16px 18px; border-top:1px solid rgba(255,255,255,.18); font-size:13px;}
.sidebar .user-box form{margin-top:8px;}
.sidebar .user-box button{
  background:var(--rc-green); border:none; color:#fff; padding:6px 12px; border-radius:6px;
  cursor:pointer; font-size:12.5px;
}

.main{flex:1; min-width:0;}
.topbar{
  background:#fff; border-bottom:1px solid var(--rc-border);
  padding:16px 26px; display:flex; align-items:center; justify-content:space-between;
}
.topbar h1{font-size:20px; margin:0; color:var(--rc-text);}
.content{padding:24px 26px;}

/* ---------- Cards & Grid ---------- */
.grid{display:grid; gap:18px;}
.grid-4{grid-template-columns:repeat(4,1fr);}
.grid-3{grid-template-columns:repeat(3,1fr);}
.grid-2{grid-template-columns:repeat(2,1fr);}
@media(max-width:1000px){.grid-4{grid-template-columns:repeat(2,1fr);} .grid-3{grid-template-columns:repeat(2,1fr);}}
@media(max-width:640px){.grid-4,.grid-3,.grid-2{grid-template-columns:1fr;} .app-shell{flex-direction:column;} .sidebar{width:100%;}}

.card{
  background:#fff; border:1px solid var(--rc-border); border-radius:var(--radius);
  padding:18px 20px; box-shadow:var(--shadow);
}
.stat-card{border-top:4px solid var(--rc-green);}
.stat-card.alert{border-top-color:var(--rc-red);}
.stat-card .stat-num{font-size:30px; font-weight:700; margin:4px 0;}
.stat-card .stat-label{color:var(--rc-muted); font-size:13px; text-transform:uppercase; letter-spacing:.03em;}

/* ---------- Buttons ---------- */
.btn{
  display:inline-block; padding:9px 16px; border-radius:7px; border:1px solid transparent;
  cursor:pointer; font-size:14px; font-weight:600; text-align:center;
}
.btn-primary{background:var(--rc-red); color:#fff;}
.btn-primary:hover{background:var(--rc-red-dark); text-decoration:none;}
.btn-success{background:var(--rc-green); color:#fff;}
.btn-success:hover{background:var(--rc-green-dark); text-decoration:none;}
.btn-outline{background:#fff; border-color:var(--rc-border); color:var(--rc-text);}
.btn-outline:hover{border-color:var(--rc-red); text-decoration:none;}
.btn-sm{padding:5px 10px; font-size:12.5px;}
.btn-block{display:block; width:100%;}

/* ---------- Forms ---------- */
label{display:block; font-size:13px; font-weight:600; margin:12px 0 5px;}
input[type=text],input[type=password],input[type=email],input[type=number],
input[type=date],input[type=time],input[type=tel],select,textarea{
  width:100%; padding:9px 11px; border:1px solid var(--rc-border); border-radius:7px;
  font-size:14px; font-family:inherit; background:#fff;
}
textarea{min-height:70px;}
.form-row{display:flex; gap:14px;}
.form-row > *{flex:1;}
fieldset{border:1px solid var(--rc-border); border-radius:8px; padding:14px 16px; margin:16px 0;}
legend{font-weight:700; color:var(--rc-red); padding:0 6px;}

/* ---------- Tables ---------- */
table{width:100%; border-collapse:collapse; background:#fff;}
th,td{padding:10px 12px; text-align:left; border-bottom:1px solid var(--rc-border); font-size:14px;}
th{background:#FAF9F6; font-size:12.5px; text-transform:uppercase; letter-spacing:.03em; color:var(--rc-muted);}
tr:hover td{background:#FBF8F4;}
.table-wrap{background:#fff; border:1px solid var(--rc-border); border-radius:var(--radius); overflow:hidden;}

/* ---------- Badges ---------- */
.badge{
  display:inline-block; padding:3px 10px; border-radius:20px; font-size:12px; font-weight:700;
  text-transform:capitalize;
}
.badge-green{background:#E4F5EA; color:var(--rc-green-dark);}
.badge-red{background:#FBE7E4; color:var(--rc-red-dark);}
.badge-amber{background:#FBF0DB; color:var(--rc-amber);}
.badge-grey{background:#EFEFEF; color:var(--rc-grey);}

/* ---------- Alerts / Flash ---------- */
.alert{padding:12px 16px; border-radius:8px; margin-bottom:16px; font-size:14px;}
.alert-success{background:#E4F5EA; color:var(--rc-green-dark); border:1px solid #BFE6CE;}
.alert-error{background:#FBE7E4; color:var(--rc-red-dark); border:1px solid #F3C6BF;}
.alert-warning{background:#FBF0DB; color:#8A5E00; border:1px solid #F0DCA0;}

/* ---------- Login page ---------- */
.login-wrap{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, var(--rc-red) 0%, var(--rc-green) 100%);
  padding:20px;
}
.login-box{
  background:#fff; padding:36px 34px; border-radius:14px; width:100%; max-width:380px;
  box-shadow:0 10px 40px rgba(0,0,0,.25);
}
.login-box h1{color:var(--rc-red); font-size:22px; margin:0 0 2px;}
.login-box p.sub{color:var(--rc-muted); margin:0 0 22px; font-size:13.5px;}

/* ---------- Misc ---------- */
.text-muted{color:var(--rc-muted);}
.text-red{color:var(--rc-red);}
.text-green{color:var(--rc-green);}
.mt-0{margin-top:0;} .mb-0{margin-bottom:0;}
.flex{display:flex; align-items:center; gap:10px;}
.flex-between{display:flex; align-items:center; justify-content:space-between;}
.tag-known{background:var(--rc-green); color:#fff; font-size:11px; padding:2px 8px; border-radius:12px; font-weight:700;}
.dup-banner{
  background:#FBE7E4; border:1px solid var(--rc-red); color:var(--rc-red-dark);
  padding:12px 16px; border-radius:8px; margin-bottom:16px; font-size:14px; font-weight:600;
}
.kot-item-row{border:1px solid var(--rc-border); border-radius:8px; padding:12px 14px; margin-bottom:10px;}
.kot-item-row.status-delayed{border-color:var(--rc-red); background:#FFF9F8;}
.kot-item-row.status-ready,.kot-item-row.status-completed{border-color:var(--rc-green); background:#F8FCF9;}
.wa-btn{background:#25D366; color:#fff; padding:7px 14px; border-radius:7px; font-size:13px; font-weight:700;}
.wa-btn:hover{background:#1DA851; text-decoration:none;}
.section-title{font-size:16px; font-weight:700; margin:26px 0 12px; color:var(--rc-red);}
.empty-state{text-align:center; padding:40px 20px; color:var(--rc-muted);}
