
:root {
  --dark: #171714;
  --gold: #c69b58;
  --cream: #f8f7f3;
  --white: #fff;
  --text: #292923;
  --muted: #85847e;
  --border: #e9e6df;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--cream);
  color: var(--text);
}

button, input, select, textarea {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

a {
  text-decoration: none;
  color: inherit;
}

[hidden] {
  display: none !important;
}

/* HEADER */

.header {
  min-height: 72px;
  background: var(--dark);
  color: white;
  padding: 12px 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
}

.brand-icon {
  font-size: 28px;
  color: var(--gold);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.status {
  font-size: 10px;
  letter-spacing: 1px;
  color: #ddd;
}

.status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #69bb7e;
  border-radius: 50%;
  margin-right: 5px;
}

.admin-link {
  border: 1px solid #646157;
  padding: 9px 17px;
  border-radius: 30px;
  font-size: 11px;
}

/* HERO */

.hero {
  min-height: 430px;
  padding: 70px 10%;
  display: flex;
  align-items: center;
  color: white;

  background:
    linear-gradient(90deg, rgba(15,15,13,.9), rgba(15,15,13,.2)),
    url("https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?w=1800")
    center/cover;
}

.hero-content {
  max-width: 650px;
}

.eyebrow {
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(43px, 6vw, 76px);
  line-height: 1.12;
  margin: 20px 0;
}

.hero h1 span {
  color: #d5ae73;
}

.hero p {
  font-size: 14px;
  line-height: 1.8;
  color: #ddd;
}

.hero-button {
  display: inline-block;
  margin-top: 25px;
  padding: 13px 23px;
  background: var(--gold);
  color: #171714;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.table-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 20px;
  margin-right: 15px;
  padding: 12px 18px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  font-size: 9px;
  letter-spacing: 2px;
}

.table-badge strong {
  color: #e6bd83;
  font-size: 19px;
}

/* MENU SECTION */

.menu-section {
  max-width: 1200px;
  margin: auto;
  padding: 75px 25px 90px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 30px;
}

.section-heading h2 {
  font: 600 37px "Playfair Display", serif;
  margin: 9px 0;
}

.section-heading p {
  font-size: 12px;
  color: var(--muted);
}

#menuCount {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.search-box {
  max-width: 500px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 17px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  margin-bottom: 28px;
}

.search-box span {
  font-size: 26px;
  color: var(--gold);
}

.search-box input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 12px;
  background: transparent;
}

.categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 25px;
  scrollbar-width: none;
}

.categories::-webkit-scrollbar {
  display: none;
}

.category-btn {
  flex-shrink: 0;
  padding: 11px 22px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 30px;
  cursor: pointer;
  font-size: 11px;
  transition: .2s;
}

.category-btn.active,
.category-btn:hover {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}

/* FOOD CARDS */

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.food-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  transition: .25s;
}

.food-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,.07);
}

.food-image {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: #eee;
}

.food-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .5s;
}

.food-card:hover .food-image img {
  transform: scale(1.06);
}

.food-type {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 11px;
  background: white;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
}

.food-type.veg {
  color: #24844b;
}

.food-type.nonveg {
  color: #b54838;
}

.unavailable {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
}

.food-info {
  padding: 20px;
}

.food-info h3 {
  font: 600 21px "Playfair Display", serif;
  margin-bottom: 9px;
}

.food-info p {
  min-height: 42px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}

.food-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.food-price {
  font-size: 18px;
  font-weight: 700;
  color: #a47a3d;
}

.food-category {
  font-size: 10px;
  color: var(--muted);
}

/* EMPTY STATE */

.empty-state {
  text-align: center;
  padding: 65px 10px;
}

.empty-state span {
  font-size: 45px;
}

.empty-state h3 {
  margin: 12px 0;
  font: 600 25px "Playfair Display", serif;
}

.empty-state p {
  font-size: 12px;
  color: var(--muted);
}

/* FOOTER */

footer {
  text-align: center;
  padding: 45px 20px;
  background: var(--dark);
  color: #aaa89f;
}

footer h3 {
  color: var(--gold);
  letter-spacing: 3px;
  font-size: 14px;
  margin-bottom: 12px;
}

footer p {
  font-size: 12px;
  margin-bottom: 15px;
}

footer small {
  font-size: 10px;
}

/* ADMIN */

.admin-page {
  max-width: 1000px;
  margin: auto;
  padding: 55px 25px 90px;
}

.admin-heading,
.dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 25px;
}

.admin-heading h1 {
  font: 600 37px "Playfair Display", serif;
  margin-top: 9px;
}

.back-link {
  font-size: 12px;
  color: #997344;
}

.admin-card,
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 25px;
  margin-top: 22px;
}

.admin-card h2,
.login-card h2 {
  font: 600 23px "Playfair Display", serif;
  margin-bottom: 17px;
}

.login-card {
  max-width: 430px;
  margin: 50px auto;
}

.login-card p,
.description {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}

.admin-card label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 12px;
}

.admin-card input:not([type="checkbox"]),
.admin-card select,
.admin-card textarea,
.login-card input {
  display: block;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  margin-top: 8px;
  margin-bottom: 16px;
  background: white;
}

.admin-card textarea {
  min-height: 90px;
  resize: vertical;
}

.admin-card input:focus,
.admin-card select:focus,
.admin-card textarea:focus,
.login-card input:focus {
  border-color: var(--gold);
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 15px 0 !important;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
}

.primary-btn,
.secondary-btn,
.logout-btn {
  border: none;
  border-radius: 6px;
  padding: 13px 22px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  background: var(--dark);
  color: white;
}

.primary-btn:hover {
  background: #987343;
}

.secondary-btn {
  background: #eee;
  color: #333;
}

.logout-btn {
  background: #f8e9e6;
  color: #ad4838;
}

.form-buttons {
  display: flex;
  gap: 10px;
}

.message {
  margin-top: 12px;
  font-size: 12px;
  color: #32834c;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 15px;
}

.stat-card span {
  font-size: 12px;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  font-size: 30px;
  margin-top: 10px;
}

.admin-food {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.admin-food img {
  width: 65px;
  height: 60px;
  object-fit: cover;
  border-radius: 7px;
}

.admin-food-info {
  flex: 1;
  min-width: 0;
}

.admin-food-info strong {
  font-size: 12px;
}

.admin-food-info small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.admin-food button {
  padding: 8px 11px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 10px;
}

.edit-btn {
  background: #eee9df;
}

.delete-btn {
  background: #fbe9e6;
  color: #b43e30;
}

/* QR CODES */

.qr-container {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
  margin-top: 25px;
}

.qr-card {
  text-align: center;
  padding: 18px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 9px;
  break-inside: avoid;
}

.qr-card h4 {
  margin-bottom: 12px;
}

.qr-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-image img,
.qr-image canvas {
  max-width: 100%;
  height: auto !important;
}

.qr-card a {
  display: block;
  margin-top: 12px;
  font-size: 11px;
  color: #997344;
}

/* RESPONSIVE */

@media(max-width: 850px) {
  .menu-grid {
    grid-template-columns: repeat(2,1fr);
  }

  .hero {
    min-height: 370px;
  }
}

@media(max-width: 550px) {
  .header {
    padding: 12px 5%;
  }

  .brand {
    font-size: 10px;
    gap: 6px;
  }

  .header-right {
    gap: 8px;
  }

  .status {
    display: none;
  }

  .admin-link {
    padding: 8px 12px;
    font-size: 10px;
  }

  .hero {
    min-height: 350px;
    padding: 40px 7%;
  }

  .hero h1 {
    font-size: 44px;
  }

  .menu-section {
    padding: 50px 17px 65px;
  }

  .section-heading h2 {
    font-size: 28px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .food-image {
    height: 230px;
  }

  .admin-page {
    padding: 35px 15px;
  }

  .admin-heading h1 {
    font-size: 27px;
  }

  .admin-card {
    padding: 17px;
  }

  .qr-container {
    grid-template-columns: repeat(2,1fr);
  }

  .admin-food {
    flex-wrap: wrap;
  }

  .admin-food-info {
    flex-basis: 55%;
  }
}

/* PRINT QR CODES */

@media print {
  body {
    background: white;
  }

  .header,
  footer,
  .admin-heading,
  .dashboard-actions,
  .stats,
  .admin-card:not(:last-child),
  .admin-card:last-child > h2,
  .admin-card:last-child > p,
  .admin-card:last-child > label,
  .admin-card:last-child > input,
  #generateQR {
    display: none !important;
  }

  .admin-page {
    padding: 0;
  }

  .admin-card:last-child {
    display: block;
    border: none;
    margin: 0;
    padding: 0;
  }

  .qr-container {
    grid-template-columns: repeat(3,1fr);
  }

  .qr-card {
    border: 1px dashed #999;
    margin: 10px;
  }
}
