/* Metal Food — közös stílusok */
:root {
  --red:    #C62828;
  --red-l:  #fff5f4;
  --red-b:  #f5c0bc;
  --dark:   #1a1a1a;
  --gray:   #888;
  --light:  #f7f3ee;
  --white:  #fff;
  --border: #ece8e2;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--light);
  color: var(--dark);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 20px; height: 54px;
  display: flex; align-items: center; gap: 16px;
}
.navbar-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 900; color: var(--dark); letter-spacing: -.02em;
}
.navbar-logo .logo-icon {
  width: 30px; height: 30px; background: var(--red);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 15px; color: #fff;
}
.navbar-nav { display: flex; gap: 4px; }
.navbar-nav a {
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--gray); transition: all .15s;
}
.navbar-nav a:hover, .navbar-nav a.active {
  background: var(--red-l); color: var(--red); text-decoration: none;
}
.navbar-spacer { flex: 1; }
.navbar-user { font-size: 12px; color: var(--gray); }
.navbar-user b { color: var(--dark); }
.btn-cart {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 22px;
  background: #faf9f7; font-size: 12px; font-weight: 700; cursor: pointer;
  transition: all .15s; text-decoration: none; color: var(--dark);
}
.btn-cart.has-items { border-color: var(--red); background: #fff8f8; }
.btn-cart .cart-count { color: var(--red); }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 24px 20px; }

/* ── Kártyák ── */
.card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.card-body { padding: 20px 22px; }
.card-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  font-weight: 800; font-size: 15px;
}

/* ── Gombok ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border: none; border-radius: 9px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all .15s; font-family: inherit; text-decoration: none;
}
.btn-primary   { background: var(--red);  color: #fff; }
.btn-primary:hover { background: #a82020; }
.btn-secondary { background: #f5f3f0; color: #555; border: 1.5px solid var(--border); }
.btn-secondary:hover { background: #eee; }
.btn-success   { background: #2E7D32; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ── Form elemek ── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block; font-size: 10px; font-weight: 800;
  color: var(--gray); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px;
}
.form-control {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid #ece8e2; border-radius: 9px;
  font-size: 13px; background: #faf9f7; outline: none;
  font-family: inherit; transition: border-color .15s;
}
.form-control:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(198,40,40,.1); }
select.form-control { cursor: pointer; }

/* ── Flash üzenetek ── */
.flash {
  padding: 10px 16px; border-radius: 9px; font-size: 13px;
  font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.flash-success { background: #f0faf2; color: #2E7D32; border: 1px solid #c3edcf; }
.flash-error   { background: #fff5f4; color: var(--red); border: 1px solid var(--red-b); }
.flash-info    { background: #e6f1fb; color: #185FA5; border: 1px solid #bdd8f0; }

/* ── Stat kártyák ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--border); }
.stat-value { font-size: 22px; font-weight: 900; font-family: monospace; }
.stat-label { font-size: 11px; color: var(--gray); margin-top: 3px; font-weight: 600; }

/* ── Táblázat ── */
.table-wrap { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: #faf9f7; border-bottom: 2px solid var(--border); }
th { padding: 10px 14px; text-align: left; font-size: 10px; font-weight: 800; color: #aaa; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid #f5f2ee; font-size: 13px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fdfcfb; }
tbody tr { cursor: pointer; }

/* ── Allergén badge ── */
.allergen-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 50%;
  background: #fff3f0; border: 1px solid #fcc;
  font-size: 8px; font-weight: 800; color: var(--red);
  margin-right: 2px; cursor: help;
}

/* ── Státusz badge ── */
.status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}

/* ── Hét választó ── */
.week-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.week-btn {
  padding: 7px 16px; border-radius: 11px; border: 1.5px solid #e0dbd4;
  background: var(--white); cursor: pointer; text-align: center; line-height: 1.4;
  font-family: inherit; transition: all .15s;
}
.week-btn:hover { border-color: var(--red); }
.week-btn.active { border-color: var(--red); background: var(--red); color: #fff; }
.week-btn .wk-num { font-size: 13px; font-weight: 800; display: block; }
.week-btn .wk-range { font-size: 10px; opacity: .7; display: block; }

/* ── Étlap táblázat ── */
.menu-table-wrap { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow-x: auto; }
.menu-table { border-collapse: collapse; }
.menu-table th { background: #faf9f7; padding: 10px 8px; text-align: center; border-bottom: 2px solid var(--border); border-left: 1px solid var(--border); font-size: 12px; font-weight: 800; min-width: 185px; }
.menu-table th:first-child { min-width: 150px; border-left: none; text-align: left; padding-left: 14px; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: #bbb; }
.menu-table td { border-left: 1px solid #f0ede8; border-bottom: 1px solid #f0ede8; vertical-align: top; padding: 8px; }
.menu-table td:first-child { border-left: none; background: var(--light); padding: 14px; vertical-align: middle; }
.menu-table tr:last-child td { border-bottom: none; }
.cat-name { font-size: 13px; font-weight: 800; }

/* ── Étel kártya ── */
.food-card {
  min-height: 130px; border-radius: 10px; padding: 10px 11px;
  border: 1.5px solid var(--border); border-left-width: 3px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--white); transition: all .15s;
}
.food-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.food-card.in-cart { border-color: currentColor; }
.food-card-name { font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.food-card-info { font-size: 11px; color: var(--gray); }
.food-card-footer { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.food-price { font-size: 12px; font-weight: 800; font-family: monospace; }
.empty-cell { min-height: 130px; display: flex; align-items: center; justify-content: center; background: #f9f8f6; border-radius: 10px; border: 1px dashed #e8e4de; color: #ddd; font-size: 18px; }

/* ── Login ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--white); border-radius: 20px; padding: 28px; box-shadow: 0 8px 40px rgba(0,0,0,.08); border: 1px solid var(--border); }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo .logo-icon-lg { width: 52px; height: 52px; background: var(--red); border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 10px; }

/* ── Admin nav ── */
.admin-nav { background: var(--white); border-bottom: 1px solid var(--border); }
.admin-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; height: 52px; gap: 0; }
.admin-nav a { height: 52px; padding: 0 16px; border: none; background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--gray); border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 6px; transition: color .15s; text-decoration: none; }
.admin-nav a:hover, .admin-nav a.active { color: var(--red); border-bottom-color: var(--red); }

/* ── Kosár ── */
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(360px,96vw); background: var(--white); box-shadow: -8px 0 40px rgba(0,0,0,.12); z-index: 300; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease; }
.cart-drawer.open { transform: translateX(0); }
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 200; display: none; }
.cart-overlay.open { display: block; }

/* ── Modal ── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 400; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { background: var(--white); border-radius: 18px; width: min(600px,98vw); max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,.18); }
.modal-header { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .navbar-nav { display: none; }
  .container { padding: 16px; }
}
