:root {
  --bg: #0f0d0d;
  --bg-soft: #171514;
  --panel: #1d1a18;
  --panel-strong: #221f1e;
  --gold: #d4af37;
  --gold-2: #f4c95d;
  --red: #d75656;
  --text: #f7f2ea;
  --muted: #b9b0a7;
  --line: rgba(255,255,255,0.08);
  --green: #25d366;
  --shadow: 0 20px 45px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: linear-gradient(180deg, #120f0f 0%, #1b1715 100%);
  color: var(--text);
  font-family: 'Vazirmatn', sans-serif;
}

a { text-decoration: none; }
img { max-width: 100%; display: block; }

.site-shell {
  min-height: 100vh;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(18, 15, 15, 0.8);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  gap: 18px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-home-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-home-link:hover strong,
.brand-home-link:hover span {
  color: var(--gold);
}

.brand-block strong,
.brand-home-link strong {
  display: block;
  font-size: 1rem;
  color: var(--gold);
}

.brand-block span,
.brand-home-link span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), #8b6a1a);
  color: #1a1208;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
}

.main-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}

.main-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--gold);
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.icon-btn, .cart-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--text);
}

.cart-badge {
  width: auto;
  min-width: 42px;
  padding: 0 12px;
  display: inline-flex;
  gap: 8px;
  position: relative;
}

.cart-badge span {
  background: var(--gold);
  color: #111;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.hero-section {
  padding: 54px 0 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.badge, .mini-label {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-2);
  font-size: 0.8rem;
  border: 1px solid rgba(212, 175, 55, 0.26);
}

.hero-copy h1 {
  margin: 18px 0 12px;
  font-size: clamp(2.4rem, 4vw, 4.3rem);
  line-height: 1.2;
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 2;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn-primary, .btn-secondary, .mini-btn, .logout-btn, .delete-btn {
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-family: 'Vazirmatn';
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary, .mini-btn {
  background: linear-gradient(135deg, var(--gold), #b78120);
  color: #1a1208;
}

.btn-secondary {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--line);
}

.mini-btn {
  padding: 10px 14px;
  font-size: 0.82rem;
}

.btn-primary:hover, .mini-btn:hover, .btn-secondary:hover, .logout-btn:hover, .delete-btn:hover {
  transform: translateY(-1px);
}

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stats strong {
  color: var(--gold);
  font-size: 1.5rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  width: min(100%, 500px);
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-card img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.floating-box {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background: rgba(17, 17, 17, 0.82);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  backdrop-filter: blur(8px);
}

.floating-box span {
  display: block;
  color: var(--gold);
  font-size: 0.75rem;
  margin-bottom: 10px;
}

.floating-box h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.floating-box strong {
  color: #fff;
}

.section-block {
  padding: 32px 0 14px;
}

.alt-block {
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 42px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(1.6rem, 2vw, 2.4rem);
}

.text-link {
  color: var(--gold-2);
}

.product-grid, .menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.product-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-image-wrap {
  position: relative;
}

.product-image-wrap img {
  height: 240px;
  width: 100%;
  object-fit: cover;
}

.tag-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(17,17,17,0.82);
  border: 1px solid var(--line);
  color: var(--gold-2);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
}

.product-body {
  padding: 18px 18px 20px;
}

.product-body h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.product-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.9;
  min-height: 72px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  gap: 12px;
}

.price-row strong {
  display: block;
  font-size: 1.2rem;
  color: var(--gold-2);
}

.price-row small {
  color: var(--muted);
  text-decoration: line-through;
  display: block;
  margin-top: 4px;
}

.category-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 18px;
}

.category-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 20px;
}

.category-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.12);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.category-card h3 {
  margin: 0 0 8px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.menu-list {
  display: grid;
  gap: 18px;
}

.menu-item {
  display: flex;
  gap: 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.menu-thumb {
  width: 150px;
  min-width: 150px;
}

.menu-thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}

.menu-content {
  flex: 1;
}

.menu-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.menu-topline h3 {
  margin: 0;
}

.menu-topline span {
  color: var(--gold-2);
  font-size: 0.8rem;
}

.menu-content p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.9;
}

.menu-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.menu-footer strong {
  color: var(--gold-2);
}

.info-banner {
  padding-bottom: 40px;
}

.info-banner-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.09), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 24px;
}

.feature-points {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.feature-points div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.feature-points i {
  color: var(--gold);
}

.main-footer {
  background: rgba(0,0,0,0.2);
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
}

.footer-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}

.main-footer h3, .main-footer h4 {
  margin-bottom: 10px;
}

.main-footer p,
.main-footer a {
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.page-section {
  padding: 40px 0;
}

.page-heading {
  margin-bottom: 24px;
}

.page-heading h1 {
  margin-top: 12px;
  font-size: clamp(2rem, 3vw, 3rem);
}

.empty-cart,
.success-box,
.auth-card,
.admin-panel,
.stat-card,
.checkout-summary,
.checkout-form,
.cart-summary {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.empty-cart {
  text-align: center;
  padding: 60px 18px;
}

.empty-cart i {
  display: block;
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 20px;
}

.cart-layout, .checkout-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
}

.cart-list {
  display: grid;
  gap: 18px;
}

.cart-item {
  display: grid;
  grid-template-columns: 110px 1fr auto auto;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}

.cart-thumb img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
}

.cart-info h3 {
  margin: 0 0 8px;
}

.cart-info strong {
  color: var(--gold-2);
}

.qty-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: rgba(212, 175, 55, 0.2);
  color: var(--text);
  cursor: pointer;
}

.remove-btn {
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: rgba(215,86,86,0.12);
  color: #ff8e8e;
  cursor: pointer;
}

.cart-summary, .checkout-summary {
  padding: 22px 18px;
}

.cart-summary h3, .checkout-summary h3 {
  margin-top: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.total-row {
  border-bottom: none;
  font-size: 1.05rem;
}

.full-width {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  margin-top: 18px;
}

.checkout-form {
  padding: 20px;
}

.field-group {
  margin-bottom: 18px;
}

.field-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.field-group input,
.field-group textarea,
.field-group select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(17, 14, 12, 0.92);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.field-group select,
.status-select {
  color-scheme: dark;
}

.field-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  background-color: rgba(17, 14, 12, 0.92);
  padding-left: 38px;
  color: var(--text);
}

.field-group select option,
.status-select option {
  background: #f5efe7;
  color: #1f1a17;
}

.field-group select option:checked,
.field-group select option:hover,
.status-select option:checked,
.status-select option:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1a1208;
}

.field-group select:focus,
.status-select:focus,
.order-note-input:focus,
.field-group input:focus,
.field-group textarea:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.8);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.16);
}

.center-box {
  display: grid;
  place-items: center;
  min-height: 70vh;
}

.success-box {
  text-align: center;
  max-width: 560px;
  padding: 48px 32px;
}

.success-box i {
  font-size: 4rem;
  color: var(--green);
  margin-bottom: 18px;
}

.success-box h1 {
  margin: 0 0 18px;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.auth-box {
  width: min(500px, calc(100% - 20px));
}

.auth-card {
  padding: 28px;
}

.auth-card h1 {
  margin-top: 0;
  text-align: center;
}

.alert-box {
  background: rgba(215,86,86,0.12);
  color: #ffb5b5;
  border: 1px solid rgba(215,86,86,0.3);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: rgba(15,13,13,0.96);
  border-left: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-brand {
  padding: 16px 12px;
  border-radius: 16px;
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-2);
  font-weight: 700;
  text-align: center;
}

.admin-sidebar nav {
  display: grid;
  gap: 10px;
}

.admin-sidebar nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
}

.admin-sidebar nav a.active {
  border-color: rgba(212, 175, 55, 0.35);
  color: var(--gold-2);
  background: rgba(212, 175, 55, 0.08);
}

.logout-btn {
  width: 100%;
  background: rgba(215,86,86,0.12);
  color: #ffb3b3;
  border: 1px solid rgba(215,86,86,0.3);
}

.admin-main {
  flex: 1;
  padding: 30px 24px;
}

.admin-topbar {
  margin-bottom: 24px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 22px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 1.8rem;
  color: var(--gold-2);
}

.admin-panel {
  padding: 20px;
  margin-bottom: 22px;
}

.orders-table-wrap, .product-table-wrap {
  overflow-x: auto;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.orders-table th,
.orders-table td {
  padding: 12px 10px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}

.orders-table th {
  color: var(--gold-2);
}

.delete-btn {
  background: rgba(215,86,86,0.12);
  color: #ffb5b5;
  border: 1px solid rgba(215,86,86,0.2);
  padding: 8px 12px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.form-panel {
  margin-bottom: 26px;
}

.hidden {
  display: none !important;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  width: 100%;
  padding-left: 44px;
}

.password-toggle {
  position: absolute;
  left: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  transition: color 160ms ease, background 160ms ease;
}

.password-toggle:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-2);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .password-toggle {
    transition: none;
  }
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.order-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rider-order-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.rider-order-active {
  background: rgba(255,255,255,0.04);
}

.rider-order-done {
  opacity: 0.55;
  background: rgba(255,255,255,0.02);
}

.status-select,
.order-note-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(17, 14, 12, 0.92);
  color: var(--text);
  font-size: 1.02rem;
  font-family: 'Vazirmatn', sans-serif;
}

.status-select {
  font-size: 1.05rem;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  background-color: rgba(17, 14, 12, 0.92);
  padding-left: 38px;
  color: var(--text);
}

.order-note-input {
  min-height: 84px;
  resize: vertical;
  font-size: 0.98rem;
}

.inline-form {
  display: grid;
  gap: 10px;
}

.inline-form .two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-2);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.meta-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta-box {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.meta-box strong {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 6px;
}

@media (max-width: 980px) {
  .hero-grid, .cart-layout, .checkout-layout, .product-grid, .menu-grid, .category-row, .footer-row, .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .product-grid, .menu-grid, .category-row, .footer-row, .stat-grid, .two-col, .cart-layout, .checkout-layout {
    grid-template-columns: 1fr;
  }

  .header-row {
    padding: 10px 0;
  }

  .hero-card img {
    height: 360px;
  }

  .menu-item, .cart-item {
    grid-template-columns: 1fr;
  }

  .menu-thumb {
    width: 100%;
  }

  .admin-shell {
    display: block;
  }

  .admin-sidebar {
    width: 100%;
  }

  .hero-stats {
    gap: 14px;
  }
}
