:root {
  --primary: #e31c24;
  --on-primary: #ffffff;
  --surface: #fcf9f8;
  --surface-1: #ffffff;
  --surface-2: #f6f3f2;
  --text: #1c1b1b;
  --muted: #5d3f3c;
  --outline: #e7bdb8;
  --shadow: 0 10px 25px rgba(28, 27, 27, 0.08);
  --radius: 16px;
}

body {
  background: var(--surface);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.app-max {
  max-width: 960px;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(252, 249, 248, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(231, 189, 184, 0.7);
}

.app-brand {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--primary);
  text-decoration: none;
}

.app-page-title {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.app-icon-btn {
  border-radius: 999px;
  border: 1px solid rgba(231, 189, 184, 0.8);
  background: var(--surface-1);
  padding: 8px 12px;
}

.app-icon {
  font-size: 18px;
  line-height: 1;
}

.app-muted {
  color: var(--muted);
}

.app-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.app-card {
  background: var(--surface-1);
  border: 1px solid rgba(231, 189, 184, 0.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.app-card-accent {
  background: linear-gradient(135deg, rgba(227, 28, 36, 0.08), rgba(255, 180, 172, 0.08)), var(--surface-1);
}

.app-card-title {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.app-pill {
  border-radius: 999px;
  background: rgba(255, 184, 0, 0.2);
  border: 1px solid rgba(255, 184, 0, 0.45);
  color: #5e4200;
  font-weight: 700;
  padding: 6px 10px;
  width: fit-content;
}

.app-btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  border-radius: 14px;
  font-weight: 800;
  padding: 10px 14px;
}

.app-btn-primary:hover {
  background: #ba0014;
  border-color: #ba0014;
}

.app-btn-light {
  border-radius: 14px;
  font-weight: 800;
  padding: 10px 14px;
}

.app-btn-outline {
  border-radius: 14px;
  font-weight: 800;
}

.app-btn-chat {
  border-radius: 14px;
  font-weight: 900;
  padding: 12px 14px;
}

.app-round-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--on-primary);
}

.app-hero {
  border-radius: 22px;
  background: radial-gradient(1000px 500px at 20% 0%, rgba(255, 184, 0, 0.22), transparent),
    radial-gradient(700px 400px at 100% 0%, rgba(227, 28, 36, 0.22), transparent),
    linear-gradient(135deg, rgba(49, 48, 48, 0.8), rgba(49, 48, 48, 0.55));
  overflow: hidden;
  box-shadow: var(--shadow);
}

.app-hero-inner {
  padding: 18px;
  color: #fff;
}

.app-hero-title {
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 10px 0 6px;
  font-size: 28px;
  line-height: 1.15;
}

.app-hero-sub {
  opacity: 0.9;
  margin-bottom: 14px;
}

.app-section-title {
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 18px;
}

.app-category-card {
  display: block;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  height: 120px;
  border: 1px solid rgba(231, 189, 184, 0.75);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.app-category-overlay {
  position: absolute;
  inset: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(28, 27, 27, 0.75));
}

.app-category-title {
  font-weight: 900;
  letter-spacing: -0.01em;
}

.app-category-sub {
  font-size: 13px;
  opacity: 0.9;
}

.app-cat-grocery {
  background: radial-gradient(800px 300px at 20% 0%, rgba(255, 184, 0, 0.4), transparent),
    linear-gradient(135deg, rgba(49, 48, 48, 0.4), rgba(49, 48, 48, 0.85));
}

.app-cat-electronics {
  background: radial-gradient(700px 320px at 40% 0%, rgba(227, 28, 36, 0.35), transparent),
    linear-gradient(135deg, rgba(17, 24, 39, 0.3), rgba(17, 24, 39, 0.88));
}

.app-cat-gifts {
  height: 140px;
  background: radial-gradient(900px 400px at 30% 0%, rgba(255, 184, 0, 0.35), transparent),
    linear-gradient(135deg, rgba(49, 48, 48, 0.3), rgba(49, 48, 48, 0.85));
}

.app-cat-cakes {
  height: 140px;
  background: radial-gradient(800px 400px at 70% 0%, rgba(227, 28, 36, 0.3), transparent),
    linear-gradient(135deg, rgba(49, 48, 48, 0.35), rgba(49, 48, 48, 0.88));
}

.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(252, 249, 248, 0.96);
  border-top: 1px solid rgba(231, 189, 184, 0.75);
  display: flex;
  justify-content: space-around;
  padding: 10px 6px 14px;
  z-index: 30;
}

.app-bottom-nav a {
  text-decoration: none;
  color: rgba(93, 63, 60, 0.85);
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}

.app-bottom-nav a.active {
  color: var(--primary);
  background: rgba(227, 28, 36, 0.08);
}

.app-fab {
  position: fixed;
  right: 16px;
  bottom: 76px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  text-decoration: none;
  box-shadow: 0 18px 35px rgba(227, 28, 36, 0.25);
  z-index: 40;
  transform: translateZ(0);
  transition: transform 150ms ease, filter 150ms ease;
}

.app-fab:hover {
  transform: translateY(-2px);
  filter: brightness(0.97);
}

.quick-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-chips button {
  border: 1px solid rgba(231, 189, 184, 0.95);
  background: var(--surface-1);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(93, 63, 60, 0.95);
}

.quick-chips button:hover {
  background: rgba(246, 243, 242, 0.8);
}

.app-input {
  border-radius: 14px;
  border: 1px solid rgba(231, 189, 184, 0.85);
  padding: 12px 12px;
}

.app-input-icon {
  border-radius: 14px;
  border: 1px solid rgba(231, 189, 184, 0.85);
  background: var(--surface-2);
}

.app-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.app-product-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(231, 189, 184, 0.8);
  background: var(--surface-1);
  box-shadow: var(--shadow);
  animation: appFadeUp 220ms ease both;
}

.app-product-media {
  height: 120px;
  background: linear-gradient(135deg, rgba(227, 28, 36, 0.12), rgba(255, 184, 0, 0.12));
}

.app-product-body {
  padding: 12px;
}

.app-product-title {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  line-height: 1.2;
  max-height: 2.4em;
  overflow: hidden;
}

.app-price {
  color: var(--primary);
  font-weight: 900;
}

.app-chat-wrap {
  height: calc(100vh - 64px - 140px);
  overflow: hidden;
  position: relative;
}

.app-chat-list {
  height: 100%;
  overflow-y: auto;
  padding: 16px 14px 120px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app-chat-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.app-day-divider {
  display: flex;
  justify-content: center;
  margin: 10px 0 12px;
}

.app-day-divider span {
  font-size: 11px;
  font-weight: 800;
  color: rgba(93, 63, 60, 0.7);
  background: rgba(93, 63, 60, 0.08);
  border: 1px solid rgba(231, 189, 184, 0.6);
  border-radius: 999px;
  padding: 5px 10px;
}

.app-msg {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 8px;
  animation: appSlideIn 180ms ease both;
}

.app-msg.user {
  justify-content: flex-end;
}

.app-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(28, 27, 27, 0.08);
}

.app-msg.bot .app-msg-avatar {
  background: linear-gradient(135deg, #e31c24, #ff6a3d);
  color: #fff;
}

.app-msg.user .app-msg-avatar {
  background: rgba(28, 27, 27, 0.9);
  color: #fff;
}

.app-bubble {
  max-width: 80%;
  padding: 10px 11px;
  border-radius: 18px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 6px 16px rgba(28, 27, 27, 0.08);
}

.app-bubble-text {
  margin: 0;
  white-space: pre-wrap;
}

.app-bubble-text + .app-bubble-text {
  margin-top: 8px;
}

.app-msg-time {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(93, 63, 60, 0.62);
}

.app-msg-time.user {
  text-align: right;
  color: rgba(255, 255, 255, 0.78);
}

.app-msg.user .app-bubble {
  background: linear-gradient(135deg, #e31c24, #c4001a);
  color: var(--on-primary);
  border-bottom-right-radius: 6px;
}

.app-msg.bot .app-bubble {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(231, 189, 184, 0.9);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

.app-typing {
  position: absolute;
  left: 14px;
  bottom: 110px;
}

.app-typing-bubble {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(231, 189, 184, 0.85);
  background: var(--surface-1);
  display: flex;
  gap: 6px;
}

.app-typing-bubble .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(93, 63, 60, 0.6);
  animation: appDot 900ms infinite ease-in-out;
}

.app-typing-bubble .dot:nth-child(2) {
  animation-delay: 120ms;
}

.app-typing-bubble .dot:nth-child(3) {
  animation-delay: 240ms;
}

.app-chat-inputbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 58px;
  background: rgba(252, 249, 248, 0.95);
  border-top: 1px solid rgba(231, 189, 184, 0.75);
  backdrop-filter: blur(10px);
  z-index: 25;
}

.app-quick-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app-quick-row::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.app-chip {
  border: 1px solid rgba(231, 189, 184, 0.95);
  background: var(--surface-1);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
  color: rgba(93, 63, 60, 0.95);
}

.app-input-row {
  display: flex;
  gap: 10px;
  padding: 6px 14px 0;
  align-items: center;
}

.app-chat-input {
  border-radius: 999px;
  border: 1px solid rgba(231, 189, 184, 0.85);
  padding: 11px 14px;
  font-weight: 500;
  font-size: 14px;
}

.app-send-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 900;
  border: none;
}

.app-send-btn:hover {
  background: #ba0014;
}

.app-chat-cards {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app-chat-cards::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.app-cards-carousel {
  position: relative;
  margin-top: 10px;
}

.app-cards-carousel .app-chat-cards {
  margin-top: 0;
  padding-inline: 40px;
}

.app-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(231, 189, 184, 0.9);
  background: rgba(255, 255, 255, 0.92);
  color: rgba(60, 46, 44, 0.9);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(28, 27, 27, 0.08);
  z-index: 2;
}

.app-carousel-btn:hover {
  background: #fff;
  color: rgba(28, 27, 27, 0.92);
}

.app-carousel-btn.is-prev {
  left: 4px;
}

.app-carousel-btn.is-next {
  right: 4px;
}

.app-agent-shell {
  height: 100vh;
  display: flex;
  overflow: hidden;
  position: relative;
}

.app-agent-sidebar {
  width: 280px;
  flex: 0 0 280px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid rgba(231, 189, 184, 0.75);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: width 180ms ease, transform 180ms ease, flex-basis 180ms ease;
  position: relative;
  z-index: 20;
}

.app-agent-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-agent-sidebar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-agent-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(231, 189, 184, 0.85);
  background: rgba(252, 249, 248, 0.92);
  display: grid;
  place-items: center;
  color: rgba(28, 27, 27, 0.9);
}

.app-agent-icon-btn:hover {
  background: rgba(227, 28, 36, 0.06);
  border-color: rgba(227, 28, 36, 0.26);
}

.app-agent-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: #221f1f;
}

.app-agent-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e31c24, #ff6a3d);
  display: grid;
  place-items: center;
  color: #fff;
}

.app-agent-brand-copy {
  min-width: 0;
}

.app-agent-brand-sub {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(93, 63, 60, 0.8);
}

.app-agent-nav {
  display: grid;
  gap: 8px;
}

.app-agent-side-btn {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(231, 189, 184, 0.8);
  background: rgba(252, 249, 248, 0.92);
  padding: 10px 12px;
  font-weight: 900;
  color: rgba(28, 27, 27, 0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  position: relative;
}

.app-agent-side-btn:hover {
  background: rgba(227, 28, 36, 0.06);
  border-color: rgba(227, 28, 36, 0.26);
}

.app-agent-side-btn-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-agent-side-btn-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-agent-side-btn .badge {
  border-radius: 999px;
}

.app-agent-user-card {
  border: 1px solid rgba(231, 189, 184, 0.8);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 248, 245, 0.98), rgba(255, 255, 255, 0.95));
  padding: 14px;
}

.app-agent-user-title {
  font-size: 12px;
  font-weight: 900;
}

.app-agent-user-copy {
  font-size: 12px;
  color: rgba(93, 63, 60, 0.82);
}

.app-agent-footer-actions {
  display: grid;
  gap: 8px;
}

.app-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 27, 27, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 15;
}

.app-agent-shell.sidebar-open .app-sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.app-agent-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-agent-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(231, 189, 184, 0.75);
  background: rgba(252, 249, 248, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-agent-title {
  font-weight: 900;
  letter-spacing: -0.01em;
}

.app-agent-subtitle {
  font-size: 12px;
  color: rgba(93, 63, 60, 0.8);
}

.app-agent-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-agent-menu-btn {
  display: none;
}

.app-agent-cart-btn {
  display: none;
}

.app-agent-chat {
  flex: 1;
  padding: 14px;
  overflow: hidden;
}

.app-agent-chat .chat-widget-container {
  height: 100%;
  width: 100%;
}

.app-agent-shell.sidebar-collapsed .app-agent-sidebar {
  width: 88px;
  flex-basis: 88px;
}

.app-agent-shell.sidebar-collapsed .app-agent-brand-copy,
.app-agent-shell.sidebar-collapsed .app-agent-side-btn-label,
.app-agent-shell.sidebar-collapsed .app-agent-user-card,
.app-agent-shell.sidebar-collapsed .app-agent-footer-actions .btn span {
  display: none;
}

.app-agent-shell.sidebar-collapsed .app-agent-side-btn {
  justify-content: center;
}

.app-agent-shell.sidebar-collapsed .app-agent-side-btn .badge {
  display: none;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 100vw);
  transform: translateX(100%);
  transition: transform 180ms ease;
  z-index: 1200;
  pointer-events: none;
}

.cart-drawer.active {
  transform: translateX(0);
  pointer-events: auto;
}

.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 27, 27, 0.4);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.cart-drawer.active .cart-drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer-head,
.cart-drawer-body,
.cart-drawer-foot {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.98);
}

.cart-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-left: 1px solid rgba(231, 189, 184, 0.75);
  border-bottom: 1px solid rgba(231, 189, 184, 0.75);
}

.cart-drawer-title {
  font-weight: 900;
  letter-spacing: -0.01em;
}

.cart-drawer-body {
  position: absolute;
  top: 82px;
  right: 0;
  bottom: 78px;
  width: min(380px, 100vw);
  overflow-y: auto;
  padding: 14px 18px 18px;
  border-left: 1px solid rgba(231, 189, 184, 0.75);
}

.cart-drawer-foot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(380px, 100vw);
  display: flex;
  gap: 10px;
  padding: 14px 18px 18px;
  border-left: 1px solid rgba(231, 189, 184, 0.75);
  border-top: 1px solid rgba(231, 189, 184, 0.75);
}

.cart-empty {
  border: 1px dashed rgba(231, 189, 184, 0.95);
  border-radius: 18px;
  background: rgba(252, 249, 248, 0.96);
  padding: 18px 16px;
  color: rgba(93, 63, 60, 0.82);
  font-weight: 700;
}

.cart-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(231, 189, 184, 0.8);
  border-radius: 18px;
  background: rgba(252, 249, 248, 0.96);
}

.cart-line + .cart-line {
  margin-top: 10px;
}

.cart-line-media {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(227, 28, 36, 0.1), rgba(255, 184, 0, 0.12));
}

.cart-line-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-line-title {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.cart-line-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(93, 63, 60, 0.82);
}

@media (min-width: 992px) {
  .app-agent-close-btn {
    display: none;
  }
}

@media (max-width: 991px) {
  .app-agent-menu-btn,
  .app-agent-close-btn,
  .app-agent-cart-btn {
    display: inline-flex;
  }

  .app-agent-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(310px, calc(100vw - 40px));
    flex: none;
    border-right: 1px solid rgba(231, 189, 184, 0.75);
    transform: translateX(-100%);
    box-shadow: 0 20px 48px rgba(28, 27, 27, 0.18);
    z-index: 1201;
  }

  .app-agent-shell.sidebar-open .app-agent-sidebar {
    transform: translateX(0);
  }

  .app-agent-side-btn {
    width: 100%;
  }

  .app-agent-chat {
    padding: 10px;
  }

  .app-agent-subtitle {
    display: none;
  }

  .app-agent-header-actions .btn-group {
    display: none;
  }
}

@media (max-width: 520px) {
  .app-carousel-btn {
    display: none;
  }

  .app-cards-carousel .app-chat-cards {
    padding-inline: 0;
  }

  .app-agent-header {
    padding: 10px 12px;
  }

  .app-agent-chat {
    padding: 8px;
  }

  .cart-drawer-head,
  .cart-drawer-body,
  .cart-drawer-foot {
    width: 100vw;
  }

  .cart-drawer-body {
    top: 78px;
  }
}

.app-mini-card {
  border: 1px solid rgba(231, 189, 184, 0.85);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-1);
  box-shadow: 0 10px 20px rgba(28, 27, 27, 0.05);
  scroll-snap-align: start;
  min-width: 220px;
}

.app-mini-card .media {
  height: 92px;
  background: radial-gradient(circle at top left, rgba(255, 184, 0, 0.28), transparent 45%),
    linear-gradient(135deg, rgba(227, 28, 36, 0.16), rgba(255, 184, 0, 0.14));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app-mini-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-mini-card .media.is-empty {
  border-bottom: 1px solid rgba(231, 189, 184, 0.7);
}

.app-mini-card-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(93, 63, 60, 0.78);
  font-size: 16px;
}

.app-mini-card .body {
  padding: 9px;
}

.app-mini-card .title {
  font-weight: 800;
  font-size: 12px;
  line-height: 1.25;
  max-height: 2.4em;
  overflow: hidden;
}

.app-mini-card .meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  align-items: center;
  gap: 8px;
}

.app-mini-card .btn {
  border-radius: 12px;
  font-weight: 900;
  font-size: 11px;
  padding: 7px 10px;
}

.app-mini-card .app-price {
  font-size: 12px;
}

.app-feedback-bubble {
  width: min(100%, 360px);
}

.app-checkout-bubble {
  width: min(100%, 420px);
}

.app-checkout-section-title {
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6a514e;
  margin-top: 2px;
  margin-bottom: 8px;
}

.app-checkout-bubble .form-control {
  border-radius: 14px;
  border-color: rgba(231, 189, 184, 0.85);
  font-size: 13px;
}

.app-checkout-toggle {
  display: flex;
  gap: 8px;
}

.app-checkout-toggle .app-checkout-pill {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(231, 189, 184, 0.85);
  background: rgba(252, 249, 248, 0.95);
  color: #6a514e;
  font-weight: 900;
  font-size: 12px;
  padding: 10px 12px;
}

.app-checkout-toggle .app-checkout-pill.active {
  background: rgba(227, 28, 36, 0.12);
  border-color: rgba(227, 28, 36, 0.35);
  color: #a31419;
}

.app-checkout-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.app-checkout-select {
  border-radius: 999px;
  border-color: rgba(231, 189, 184, 0.85);
  font-size: 13px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.app-feedback-stars {
  display: flex;
  gap: 8px;
}

.app-feedback-stars.is-readonly {
  opacity: 0.78;
}

.app-star-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(231, 189, 184, 0.85);
  border-radius: 12px;
  background: rgba(252, 249, 248, 0.95);
  color: #cdb4ae;
  display: grid;
  place-items: center;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.app-star-btn:hover:not(:disabled),
.app-star-btn.active {
  background: rgba(255, 184, 0, 0.14);
  border-color: rgba(255, 184, 0, 0.45);
  color: #f0a500;
  transform: translateY(-1px);
}

.app-star-btn:disabled {
  cursor: default;
}

.app-feedback-input {
  border-radius: 14px;
  border-color: rgba(231, 189, 184, 0.85);
  min-height: 84px;
}

.app-order-bubble {
  width: min(100%, 360px);
  overflow: hidden;
  background: #fff !important;
}

.app-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-order-hero {
  position: relative;
  margin: -10px -11px 14px;
  padding: 12px 14px 56px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.35), transparent 25%),
    linear-gradient(135deg, #375d64 0%, #8ea39d 55%, #d8ddd7 100%);
  color: #fff;
}

.app-order-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  color: #47656a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-order-route {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 72px;
}

.app-order-route::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 16%;
  top: 34px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.35), rgba(255,255,255,0.9));
  transform: rotate(-13deg);
  transform-origin: left center;
}

.app-order-route::after {
  content: "";
  position: absolute;
  right: 7%;
  top: 10px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e31c24;
  box-shadow: 0 0 0 6px rgba(227, 28, 36, 0.18);
  animation: appPulsePin 1.8s infinite;
}

.app-order-eta-chip {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e31c24, #c4001a);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(227, 28, 36, 0.24);
}

.app-order-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(227, 28, 36, 0.08);
  color: #c4001a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-order-code {
  margin-top: 8px;
  font-weight: 900;
  font-size: 17px;
  line-height: 1.2;
}

.app-order-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e31c24, #ff6a3d);
  color: #fff;
  box-shadow: 0 10px 18px rgba(227, 28, 36, 0.18);
}

.app-order-subtitle {
  margin-top: 4px;
  color: rgba(93, 63, 60, 0.72);
  font-size: 12px;
  font-weight: 600;
}

.app-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.app-step {
  min-width: 0;
}

.app-step .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(200, 186, 183, 0.9);
  margin-bottom: 6px;
}

.app-step .line {
  height: 3px;
  border-radius: 999px;
  background: rgba(231, 189, 184, 0.6);
  margin-bottom: 6px;
}

.app-step .txt {
  font-size: 10px;
  font-weight: 800;
  color: rgba(93, 63, 60, 0.65);
  line-height: 1.2;
}

.app-step.done .dot,
.app-step.done .line {
  background: #e31c24;
}

.app-step.done .txt {
  color: #c4001a;
}

.app-order-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.app-order-meta-box {
  border: 1px solid rgba(231, 189, 184, 0.8);
  background: rgba(252, 249, 248, 0.95);
  border-radius: 14px;
  padding: 10px;
}

.app-order-meta-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(93, 63, 60, 0.6);
}

.app-order-meta-value {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #1c1b1b;
}

.app-order-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.app-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.app-inline-actions .btn {
  border-radius: 999px;
  font-weight: 800;
}

@media (max-width: 420px) {
  .app-order-actions {
    grid-template-columns: 1fr 1fr;
  }

  .app-order-actions .btn:last-child {
    grid-column: 1 / -1;
  }
}

.app-order-btn-primary {
  background: linear-gradient(135deg, #e31c24, #c4001a);
  color: #fff;
  border: none;
}

.app-order-btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #cf1520, #b00017);
}

.app-order-btn-secondary {
  background: #fff;
  border: 1px solid rgba(227, 28, 36, 0.35);
  color: #c4001a;
}

.app-order-btn-secondary:hover {
  background: rgba(227, 28, 36, 0.06);
  color: #c4001a;
}

.admin-order-row td {
  background: rgba(255, 255, 255, 0.86);
  vertical-align: middle;
}

.admin-detail-row td {
  background: rgba(252, 249, 248, 0.95);
}

.admin-inline-detail {
  border: 1px solid rgba(231, 189, 184, 0.8);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 249, 248, 0.98));
}

.admin-order-detail-card .border {
  border-color: rgba(231, 189, 184, 0.75) !important;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
  background: rgba(93, 63, 60, 0.08);
  color: rgba(93, 63, 60, 0.88);
}

.admin-status-pill.placed {
  background: rgba(227, 28, 36, 0.1);
  color: #c4001a;
}

.admin-status-pill.packed {
  background: rgba(255, 184, 0, 0.18);
  color: #885400;
}

.admin-status-pill.on_way {
  background: rgba(55, 93, 100, 0.14);
  color: #375d64;
}

.admin-status-pill.delivered {
  background: rgba(36, 140, 82, 0.14);
  color: #1d7a47;
}

.admin-status-pill.cancelled {
  background: rgba(28, 27, 27, 0.1);
  color: rgba(28, 27, 27, 0.8);
}

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

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

@keyframes appDot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@keyframes appPulsePin {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(227, 28, 36, 0.16);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 10px rgba(227, 28, 36, 0.1);
  }
}

@media (min-width: 992px) {
  .app-bottom-nav {
    max-width: 960px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 18px 18px 0 0;
  }

  .app-chat-inputbar {
    max-width: 960px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 18px 18px 0 0;
  }
}
