/* ─────────────────────────────────────────────
   Nekko Retail — style.css
   Palette: Navy #1a3a5c | Cream #f8f5f0 | Gold #b8933a | Warm White #fff
   Font: DM Serif Display + DM Sans
───────────────────────────────────────────── */

:root {
  /* Onyx/Charcoal Base */
  --navy:       #18181b; 
  --navy-deep:  #09090b; 
  --navy-mid:   #27272a; 
  
  /* Emerald Highlights */
  --gold:       #10b981; 
  --gold-light: #34d399; 
  
  /* True Dark Mode Backgrounds */
  --cream:      #09090b; 
  --cream-dark: #18181b; 
  --warm-white: #121212; 
  
  /* Inverted Text for Dark Mode */
  --text-dark:  #f4f4f5; 
  --text-mid:   #a1a1aa; 
  --text-light: #71717a; 
  --border:     #27272a; 
  
  /* Keep your existing shadows and radii */
  --shadow-sm:  0 1px 4px rgba(0,0,0,.3);
  --shadow-md:  0 4px 18px rgba(0,0,0,.4);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.5);
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
}

/* ── MATERIAL LIGHT CHAT UI OVERRIDE ── */
#chat-shell {
  /* Clean white & material grey backgrounds */
  --warm-white: #ffffff; 
  --cream:      #f9fafb; 
  --cream-dark: #f3f4f6; 
  
  /* High-contrast dark text for readability */
  --text-dark:  #111827; 
  --text-mid:   #4b5563; 
  --text-light: #9ca3af; 
  
  /* Soft material borders */
  --border:     #e5e7eb; 
  
  /* We keep --navy as Onyx so user messages tie into the avatar panel */
  --navy:       #18181b;
  --navy-mid:   #27272a;
}

/* Force the Chat Topbar to blend into the light UI */
#chat-shell .topbar {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
}
#chat-shell .topbar-brand { color: var(--text-dark); }
#chat-shell .topbar-sub { color: var(--text-mid); }
#chat-shell .topbar-reset { 
  color: var(--text-mid); 
  border-color: var(--border); 
  background: transparent;
}
#chat-shell .topbar-reset:hover { 
  background: var(--cream-dark); 
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; /* Essential for making Helvetica look crisp on screens */
  overflow: hidden;
}

/* ── IDLE SCREEN ─────────────────────────────── */
#idle-screen {
  position: fixed;
  inset: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.55s cubic-bezier(0,.8,.2,1);
}
#idle-screen.fade-out { opacity: 0; pointer-events: none; }

.idle-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(184,147,58,.06) 0%, transparent 70%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,.012) 40px,
      rgba(255,255,255,.012) 41px
    );
  pointer-events: none;
}

.idle-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
}

.idle-brand-icon {
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(184,147,58,.25);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.idle-brand-name {
  font-size: 44px;
  font-weight: 700; /* Bold Helvetica */
  color: #fff;
  letter-spacing: -0.02em; /* Tighter tracking for modern look */
  line-height: 1;
  margin-bottom: 8px;
}

.idle-tagline {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,.4);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 56px;
}

.idle-divider {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(184,147,58,.5), transparent);
  margin-bottom: 20px;
}

.idle-cta {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,.35);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: idlePulse 2.6s ease-in-out infinite;
}

@keyframes idlePulse {
  0%,100% { opacity: 0.3; }
  50%     { opacity: 0.75; }
}

/* ── COUNTDOWN RING ───────────────────────────── */
.idle-countdown {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.4s;
}
.idle-countdown.visible { opacity: 1; }

.countdown-label {
  font-size: 11px;
  color: rgba(255,255,255,.3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.countdown-ring-wrap {
  position: relative;
  width: 52px;
  height: 52px;
}
.countdown-ring-wrap svg { transform: rotate(-90deg); }
.countdown-ring-bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 2.5; }
.countdown-ring-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 138.2;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
.countdown-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,.6);
}

/* ── IDLE PRODUCT MARQUEE ─────────────────────── */
.idle-marquee-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 134px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.idle-marquee {
  display: flex;
  gap: 12px;
  padding: 10px 24px;
  width: max-content;
  animation: marqueeScroll 45s linear infinite;
}
.idle-marquee:empty { display: none; }

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.idle-marquee-item {
  flex-shrink: 0;
  width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.idle-marquee-item img {
  width: 80px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.07);
  display: block;
  background: rgba(255,255,255,.04);
}

.idle-marquee-label {
  font-size: 10px;
  color: rgba(255,255,255,.42);
  text-align: center;
  letter-spacing: .03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 86px;
}

.idle-marquee-price {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: .04em;
}

/* ── CHAT SHELL ───────────────────────────────── */
#chat-shell {
  display: none;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  background: var(--warm-white);
  box-shadow: var(--shadow-lg);
}
#chat-shell.visible { display: flex; }

/* ── TOPBAR ───────────────────────────────────── */
.topbar {
  height: 58px;
  background: var(--navy);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.topbar-logo {
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(184,147,58,.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  flex: 1;
}

.topbar-sub {
  font-size: 11px;
  color: rgba(255,255,255,.35);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-reset {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.topbar-reset:hover { background: rgba(255,255,255,.14); }

/* ── CHAT BOX ─────────────────────────────────── */
#chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 12px;
  background: var(--cream);
  scroll-behavior: smooth;
}
#chat-box::-webkit-scrollbar { width: 4px; }
#chat-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── MESSAGES ─────────────────────────────────── */
.msg-row {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
  animation: msgIn .22s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.msg-row.user { flex-direction: row-reverse; }

.bot-avatar {
  width: 30px;
  height: 30px;
  background: var(--navy);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.message {
  max-width: 72%;
  padding: 11px 15px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.6;
}

.message.bot {
  background: var(--warm-white);
  color: var(--text-dark);
  border-radius: 4px var(--radius-md) var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.message.user {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-md) 4px var(--radius-md) var(--radius-md);
}

.message.thinking {
  color: var(--text-light);
  font-style: italic;
  font-size: 13px;
}

.msg-meta {
  font-size: 11px;
  color: var(--text-light);
  padding: 0 40px;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.msg-meta.user { text-align: right; }

.date-divider {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 14px 0 10px;
  position: relative;
}
.date-divider::before, .date-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 60px);
  height: 1px;
  background: var(--border);
}
.date-divider::before { left: 0; }
.date-divider::after  { right: 0; }

/* ── PRODUCT CARDS ────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  max-width: 780px;
  margin: 8px 0 4px;
  padding: 0 0 4px;
}

.product-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.product-card-img {
  height: 130px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-img img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.product-card-badge {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  margin-bottom: 6px;
}

.product-card-body { padding: 12px; }

.product-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
}

.product-card-desc {
  font-size: 11.5px;
  color: var(--text-light);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
}

.product-card-btns {
  display: flex;
  gap: 6px;
}

.btn-primary {
  flex: 1;
  padding: 8px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .04em;
  transition: background .15s;
}
.btn-primary:hover { background: var(--navy-mid); }

.btn-outline {
  flex: 1;
  padding: 8px;
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .04em;
  transition: background .15s, color .15s;
}
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ── PROMO BANNER ─────────────────────────────── */
.promo-banner {
  background: linear-gradient(to right, var(--navy), var(--navy-mid));
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  margin: 4px 0;
  border-left: 3px solid var(--gold);
  max-width: 560px;
}
.promo-banner-label {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 4px;
}

/* ── INPUT AREA ───────────────────────────────── */
.input-area {
  padding: 12px 16px 16px;
  background: var(--warm-white);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 4px 6px 4px 14px;
  transition: border-color .15s;
}
.input-row:focus-within { border-color: var(--navy); }

#user-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-dark);
  padding: 8px 0;
  outline: none;
  resize: none;
  line-height: 1.5;
}
#user-input::placeholder { color: var(--text-light); }

#mic-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: color .15s;
}
#mic-btn:hover { color: var(--navy); }
#mic-btn.listening { color: #dc2626; animation: micPulse .6s ease infinite; }
@keyframes micPulse { 0%,100%{opacity:1} 50%{opacity:.5} }

#send-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--navy);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background .15s;
}
#send-btn:disabled { background: var(--border); cursor: not-allowed; }
#send-btn:not(:disabled):hover { background: var(--navy-mid); }

/* ── TASTING FORM OVERLAY ─────────────────────── */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  width: min(460px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 22px 22px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 17px; font-weight: 700; color: var(--navy); }
.modal-sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.modal-close {
  width: 30px; height: 30px;
  background: var(--cream);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  color: var(--text-mid);
  display: flex; align-items: center; justify-content: center;
}

.modal-body { padding: 0 22px 22px; }
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 10px; font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-dark);
  background: var(--warm-white);
  outline: none;
  transition: border-color .15s;
}
.form-input:focus { border-color: var(--navy); }

.form-btn {
  width: 100%;
  padding: 13px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  letter-spacing: .04em;
  transition: background .15s;
}
.form-btn:hover { background: var(--navy-mid); }

/* ── AGENT LABEL ──────────────────────────────── */
.agent-label-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px; font-weight: 700;
  color: var(--gold);
  letter-spacing: .06em;
}

/* ── SCROLLBAR ────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── ADMIN STYLES ─────────────────────────────── */
.admin-shell { display: flex; height: 100vh; overflow: hidden; font-family: 'DM Sans', sans-serif; }

.admin-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--navy);
  display: flex; flex-direction: column;
  padding: 0; overflow-y: auto;
}

.admin-sidebar-logo { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.admin-sidebar-brand { 
  font-size: 20px; 
  font-weight: 700;
  color: #fff; 
  letter-spacing: -0.01em; 
}

.admin-page-title { 
  font-size: 26px; 
  font-weight: 700;
  color: var(--navy); 
  letter-spacing: -0.02em;
  margin-bottom: 4px; 
}
.admin-sidebar-sub { font-size: 10px; color: rgba(255,255,255,.3); letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }

.admin-nav { padding: 14px 0; flex: 1; }

.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  transition: color .15s, background .15s;
  border: none; background: none;
  width: 100%; text-align: left;
  font-family: inherit; letter-spacing: .02em;
}
.admin-nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-nav-item.active { color: #fff; background: rgba(255,255,255,.08); border-left: 2px solid var(--gold); }

.admin-main { flex: 1; background: var(--cream); overflow-y: auto; padding: 28px; }
.admin-page { display: none; }
.admin-page.active { display: block; }

.admin-page-title { font-family: 'DM Serif Display', serif; font-size: 26px; color: var(--navy); margin-bottom: 4px; }
.admin-page-sub { font-size: 13px; color: var(--text-light); margin-bottom: 24px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }

.stat-card { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat-card-label { font-size: 10px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.stat-card-value { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: 4px; }
.stat-card-note { font-size: 11px; color: var(--text-light); }

.admin-table-wrap { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.admin-table-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-table-title { font-size: 14px; font-weight: 700; color: var(--navy); letter-spacing: .02em; }
.admin-filter-row { display: flex; gap: 8px; align-items: center; }

.admin-date-input { padding: 7px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 12px; color: var(--text-dark); background: var(--cream); outline: none; transition: border-color .15s; }
.admin-date-input:focus { border-color: var(--navy); }

.admin-btn-sm { padding: 7px 16px; background: var(--navy); color: #fff; border: none; border-radius: var(--radius-sm); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; letter-spacing: .04em; transition: background .15s; }
.admin-btn-sm:hover { background: var(--navy-mid); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 16px; text-align: left; font-size: 10px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--border); background: var(--cream); }
.data-table td { padding: 12px 16px; font-size: 13px; color: var(--text-dark); border-bottom: 1px solid var(--cream-dark); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--cream); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.badge-navy { background: var(--navy); color: #fff; }
.badge-gold { background: var(--gold); color: #fff; }
.badge-cream { background: var(--cream-dark); color: var(--text-mid); }

.empty-state { padding: 40px; text-align: center; color: var(--text-light); font-size: 13px; }

.customer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.customer-card { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-sm); }
.customer-card-name { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.customer-card-phone { font-size: 12px; color: var(--text-light); margin-bottom: 12px; }
.customer-stat-row { display: flex; gap: 12px; margin-bottom: 10px; }
.customer-stat { flex: 1; }
.customer-stat-label { font-size: 9px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 2px; }
.customer-stat-val { font-size: 14px; font-weight: 700; color: var(--navy); }
.customer-notes { font-size: 11.5px; color: var(--text-mid); line-height: 1.5; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */

/* ── DESKTOP 1024px+ ── */
@media (min-width: 1024px) {
  #chat-shell { max-width: 860px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── TABLET LANDSCAPE 768–1023px ── */
@media (min-width: 768px) and (max-width: 1023px) {
  #chat-shell { max-width: 100%; }
  .topbar { height: 60px; padding: 0 24px; }
  .topbar-brand { font-size: 20px; }
  #chat-box { padding: 20px 24px 12px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .btn-primary, .btn-outline { font-size: 12px; padding: 9px 10px; }
  .message { font-size: 15px; max-width: 75%; }
  .input-area { padding: 12px 24px 16px; }
  .idle-brand-name { font-size: 52px; }
  .idle-brand-icon { width: 110px; height: 110px; }
}

/* ── TABLET PORTRAIT 600–767px ── */
@media (min-width: 600px) and (max-width: 767px) {
  #chat-shell { max-width: 100%; }
  .topbar { height: 56px; padding: 0 18px; }
  .topbar-brand { font-size: 18px; }
  #chat-box { padding: 16px 18px 10px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card-btns { flex-direction: column; gap: 6px; }
  .btn-primary, .btn-outline { font-size: 12px; padding: 9px 8px; }
  .message { font-size: 14px; max-width: 80%; }
  .input-area { padding: 10px 18px 14px; }
  .idle-brand-name { font-size: 42px; }
  .idle-brand-icon { width: 90px; height: 90px; }
}

/* ── LARGE PHONE 480–599px ── */
@media (min-width: 480px) and (max-width: 599px) {
  #chat-shell { max-width: 100%; }
  .topbar { height: 52px; padding: 0 14px; }
  .topbar-brand { font-size: 16px; }
  #chat-box { padding: 14px 14px 10px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card-img img { height: 110px; }
  .product-card-name { font-size: 13px; }
  .product-card-btns { flex-direction: column; gap: 6px; }
  .btn-primary, .btn-outline { font-size: 11px; padding: 8px 6px; }
  .message { font-size: 13.5px; max-width: 82%; }
  .input-area { padding: 8px 14px 12px; }
  .idle-brand-name { font-size: 36px; }
  .idle-brand-icon { width: 80px; height: 80px; }
}

/* ── PHONE < 480px ── */
@media (max-width: 479px) {
  #chat-shell { max-width: 100%; }
  .topbar { height: 50px; padding: 0 12px; gap: 8px; }
  .topbar-brand { font-size: 15px; }
  .topbar-logo { width: 26px; height: 26px; }
  #chat-box { padding: 12px 12px 8px; }
  .bot-avatar { width: 26px; height: 26px; }
  .message { font-size: 13px; max-width: 85%; padding: 9px 12px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-card-img img { height: 90px; }
  .product-card-body { padding: 8px 10px 10px; }
  .product-card-name { font-size: 12px; }
  .product-card-price { font-size: 12px; }
  .product-card-btns { flex-direction: column; gap: 5px; }
  .btn-primary, .btn-outline { font-size: 11px; padding: 7px 5px; letter-spacing: 0; }
  .input-area { padding: 6px 12px 10px; }
  .input-row { gap: 6px; }
  #mic-btn, #send-btn { width: 34px; height: 34px; }
  .idle-brand-name { font-size: 30px; }
  .idle-brand-icon { width: 70px; height: 70px; border-radius: 16px; }
  .idle-tagline { font-size: 11px; margin-bottom: 36px; }
  .idle-marquee-item { width: 68px; }
  .idle-marquee-item img { width: 60px; height: 54px; }
  .idle-marquee-label { font-size: 9px; }
  .idle-marquee-price { font-size: 9px; }
  .date-divider { font-size: 10px; }
}

/* ── TOUCH — bigger tap targets + no zoom on input ── */
@media (pointer: coarse) {
  .btn-primary, .btn-outline { min-height: 40px; touch-action: manipulation; }
  #send-btn, #mic-btn { min-width: 40px; min-height: 40px; touch-action: manipulation; }
  .topbar-reset { min-width: 38px; min-height: 38px; }
  textarea#user-input { font-size: max(16px, 1em); }
}

/* ── iOS Safari zoom fix ── */
@supports (-webkit-touch-callout: none) {
  textarea#user-input { font-size: 16px; }
}

/* ── Safe area (notch / home bar) ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .input-area { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  #idle-screen { padding-bottom: env(safe-area-inset-bottom); }
}

/* ══════════════════════════════════════════════════
   TABLET TOUCH FIX — Redmi Tab 2 Pro + all tablets
   Uses pointer:coarse to detect touch screen
   regardless of resolution
══════════════════════════════════════════════════ */

/* Full width on ALL touch screens */
@media (pointer: coarse) {
  #chat-shell {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Medium touch screens 600px+ (tablet portrait & landscape) */
@media (min-width: 600px) and (pointer: coarse) {
  .topbar { height: 68px !important; padding: 0 28px !important; }
  .topbar-brand { font-size: 22px !important; }
  .topbar-logo { width: 38px !important; height: 38px !important; }
  .topbar-reset { width: 44px !important; height: 44px !important; }

  #chat-box { padding: 24px 28px 16px !important; }

  .message {
    font-size: 16px !important;
    line-height: 1.7 !important;
    padding: 14px 18px !important;
    max-width: 78% !important;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
  }

  .product-card-img,
  .product-card-img img { height: 160px !important; }
  .product-card-name { font-size: 15px !important; }
  .product-card-price { font-size: 17px !important; }
  .product-card-body { padding: 14px !important; }
  .product-card-btns { flex-direction: row !important; gap: 8px !important; }

  .btn-primary, .btn-outline {
    font-size: 14px !important;
    padding: 12px 10px !important;
    min-height: 46px !important;
  }

  .input-area { padding: 14px 28px 20px !important; }
  #user-input { font-size: 16px !important; padding: 10px 0 !important; }
  #send-btn, #mic-btn { width: 46px !important; height: 46px !important; }

  .idle-brand-name { font-size: 60px !important; }
  .idle-brand-icon { width: 120px !important; height: 120px !important; }
  .idle-cta { font-size: 14px !important; }
  .idle-marquee-item { width: 110px !important; }
  .idle-marquee-item img { width: 100px !important; height: 90px !important; }
  .idle-marquee-label { font-size: 11px !important; }
  .idle-marquee-price { font-size: 11px !important; }
}

/* Large touch screens 1000px+ (tablet landscape — Redmi Tab 2 Pro) */
@media (min-width: 1000px) and (pointer: coarse) {
  .product-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 18px !important; }
  .message { max-width: 65% !important; }
  #chat-box { padding: 28px 40px 16px !important; }
  .input-area { padding: 14px 40px 20px !important; }
}

/* ── Admin responsive ── */
@media (max-width: 767px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; flex-direction: row; overflow-x: auto; }
  .admin-sidebar-logo { padding: 12px 16px; border-bottom: none; border-right: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
  .admin-nav { display: flex; flex-direction: row; padding: 0; overflow-x: auto; }
  .admin-nav-item { padding: 10px 14px; white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
  .admin-nav-item.active { border-left: none; border-bottom: 2px solid var(--gold); }
  .admin-main { padding: 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .customer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 479px) {
  .admin-main { padding: 12px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .data-table th, .data-table td { padding: 8px 10px; font-size: 11px; }
}


/* ── QUICK ACTIONS BAR ─────────────────────────── */
.quick-actions {
  padding: 8px 16px 4px;
  background: var(--warm-white);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.qa-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.qa-scroll::-webkit-scrollbar { display: none; }

.qa-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
  letter-spacing: .02em;
}
.qa-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.qa-btn:empty { display: none; }
