/* ==========================================================================
   Gruhini Shree (गृहिणी श्री / ଘରଣୀ ଶ୍ରୀ) - Mobile Shopping Companion Styles
   ========================================================================== */

:root {
  --primary-color: #8b1e3f;         /* Elegant Maroon / Deep Rose */
  --primary-dark: #67122c;
  --primary-light: #fbebf0;
  --accent-gold: #d97706;          /* Warm Haldi / Turmeric Ochre */
  --accent-green: #15803d;         /* Fresh Coriander Green */
  --accent-green-light: #ecfdf5;
  --whatsapp-green: #25D366;
  --whatsapp-dark: #128C7E;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --border-active: #15803d;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --safe-bottom: 96px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', 'Noto Sans Devanagari', 'Noto Sans Oriya', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.45;
  padding-bottom: var(--safe-bottom);
  overflow-x: hidden;
}

/* ==========================================================================
   COVER & APP HEADER (MULTILINGUAL ALWAYS)
   ========================================================================== */
.app-cover {
  position: relative;
  background: linear-gradient(135deg, #701a35 0%, #9e2a4b 50%, #b83d5a 100%);
  color: #ffffff;
  padding: 16px 14px 20px;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  box-shadow: 0 8px 24px rgba(112, 26, 53, 0.25);
  overflow: hidden;
}

.cover-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(255, 215, 0, 0.12) 0%, transparent 50%);
  pointer-events: none;
}

.cover-content {
  position: relative;
  z-index: 2;
  max-width: 580px;
  margin: 0 auto;
}

/* Artwork Banner Display */
.cover-artwork-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cover-art-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #ffeedb;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  background: #ffffff;
  flex-shrink: 0;
}

.cover-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-kitchen-wrapper {
  flex: 1;
  max-width: 260px;
  height: 90px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.cover-kitchen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* Trilingual Titles */
.brand-titles {
  text-align: center;
  margin-bottom: 16px;
}

.brand-titles .brand-en {
  font-family: 'Rozha One', 'Outfit', serif;
  font-size: 1.85rem;
  letter-spacing: 0.5px;
  color: #fff8f0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  margin-bottom: 2px;
}

.brand-titles .brand-hi {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffe6a7;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.brand-titles .brand-or {
  font-family: 'Noto Sans Oriya', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  opacity: 0.95;
}

.brand-subtitle {
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* Language Selector Box */
.lang-selector-box {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.lang-selector-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff9e6;
  margin-bottom: 8px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
}

.lang-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 8px 4px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn .flag {
  font-size: 1rem;
}

.lang-btn.active {
  background: #ffffff;
  color: var(--primary-color);
  border-color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

/* ==========================================================================
   STICKY TOOLBAR & CATEGORY NAV
   ========================================================================== */
.sticky-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  padding: 10px 14px 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-bottom: 1px solid var(--border-light);
}

.search-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 580px;
  margin: 0 auto;
}

.search-input-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 0 10px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.search-input-box:focus-within {
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(139, 30, 63, 0.1);
}

.search-icon {
  font-size: 0.95rem;
  margin-right: 6px;
}

.search-input-box input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
}

.clear-search-btn {
  background: #cbd5e1;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  cursor: pointer;
}

.action-pill-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  color: var(--primary-color);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.action-pill-btn:active {
  transform: scale(0.96);
  background: var(--primary-light);
}

/* Category Tabs Horizontal Scroll */
.category-tabs-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  max-width: 580px;
  margin: 0 auto;
}

.category-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.cat-tab-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-tab-btn.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(139, 30, 63, 0.25);
}

/* Active Template Banner */
.active-template-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.banner-close-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ==========================================================================
   APP MAIN CONTENT
   ========================================================================== */
.app-body {
  max-width: 580px;
  margin: 0 auto;
  padding: 14px 14px 40px;
}

.item-group-section {
  margin-bottom: 24px;
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 6px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 6px;
}

.group-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-icon {
  font-size: 1.35rem;
}

.group-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.2px;
}

.group-badge {
  font-size: 0.68rem;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.leafy-badge {
  background: #dcfce7;
  color: #166534;
}

.group-selected-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-green);
}

.group-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-left: 2px;
}

/* ==========================================================================
   ITEMS GRID & CARDS
   ========================================================================== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 480px) {
  .items-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.item-card {
  position: relative;
  background: var(--card-bg);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  user-select: none;
}

.item-card:active {
  transform: scale(0.97);
}

.item-card.selected {
  border-color: var(--accent-green);
  background-color: #f7fee7;
  box-shadow: 0 4px 10px rgba(21, 128, 61, 0.12);
}

.item-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.item-visual-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.item-variant-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.item-check-indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: transparent;
  background: #ffffff;
  transition: all 0.2s ease;
}

.item-card.selected .item-check-indicator {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #ffffff;
  font-weight: bold;
}

.item-name-block {
  margin-bottom: 8px;
}

/* ONLY CHOSEN LANGUAGE DISPLAYED HERE */
.item-primary-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
}

.item-card.selected .item-primary-name {
  color: #14532d;
}

.item-subtext {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.item-qty-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card.selected .item-qty-tag {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.item-quick-qty-btn {
  font-size: 0.7rem;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: underline;
  padding-top: 4px;
  display: inline-block;
}

/* ==========================================================================
   CUSTOM / MANUAL ITEMS SECTION
   ========================================================================== */
.custom-input-card {
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.custom-fields-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

@media (min-width: 480px) {
  .custom-fields-row {
    flex-direction: row;
  }
  .custom-name-input {
    flex: 2;
  }
  .custom-qty-input {
    flex: 1;
  }
}

.custom-name-input,
.custom-qty-input {
  width: 100%;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

.custom-name-input:focus,
.custom-qty-input:focus {
  border-color: var(--primary-color);
}

.add-custom-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.add-custom-btn:active {
  background: var(--primary-dark);
}

.custom-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1.5px solid #86efac;
  background-color: #f0fdf4;
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.custom-item-info {
  display: flex;
  flex-direction: column;
}

.custom-item-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #14532d;
}

.custom-item-qty {
  font-size: 0.78rem;
  color: #166534;
  font-weight: 500;
}

.custom-del-btn {
  background: #fee2e2;
  border: none;
  color: #dc2626;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
}

/* ==========================================================================
   STICKY BOTTOM BAR
   ========================================================================== */
.bottom-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1.5px solid #e2e8f0;
  padding: 10px 14px 14px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
}

.bottom-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
}

.summary-icon-badge {
  position: relative;
  background: var(--primary-light);
  color: var(--primary-color);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.cart-counter {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-green);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.summary-details {
  display: flex;
  flex-direction: column;
}

.summary-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.summary-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.bottom-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-round-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--border-light);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-round-btn.danger-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.primary-forward-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.primary-forward-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-icon {
  font-size: 1.15rem;
}

/* ==========================================================================
   MODALS & BOTTOM SHEETS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bottom-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 580px;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 12px 18px 24px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.full-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 580px;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 16px 18px 28px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-drag-handle {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 4px;
  margin: 0 auto 12px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 14px;
}

.sheet-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sheet-item-icon {
  font-size: 1.8rem;
}

.sheet-item-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.sheet-item-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.95rem;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-preset-title,
.stepper-label,
.notes-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.qty-chip {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qty-chip:hover {
  background: #e2e8f0;
}

.qty-chip.active {
  background: #dcfce7;
  border-color: var(--accent-green);
  color: #14532d;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.2);
}

.custom-stepper-box {
  margin-bottom: 14px;
}

.custom-qty-stepper-input,
.item-note-input {
  width: 100%;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.92rem;
  outline: none;
  font-family: inherit;
}

.custom-qty-stepper-input:focus,
.item-note-input:focus {
  border-color: var(--primary-color);
}

.item-notes-box {
  margin-bottom: 20px;
}

.sheet-footer {
  display: flex;
  gap: 10px;
  padding-top: 10px;
}

.sheet-remove-btn {
  flex: 1;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.sheet-save-btn {
  flex: 2;
  background: var(--accent-green);
  border: none;
  color: #ffffff;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25);
}

/* ==========================================================================
   REVIEW & WHATSAPP MODAL
   ========================================================================== */
.review-lang-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
}

.review-lang-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.review-lang-buttons {
  display: flex;
  gap: 4px;
}

.rev-lang-btn {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.rev-lang-btn.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.review-preview-box {
  margin-bottom: 16px;
}

.review-preview-box textarea {
  width: 100%;
  height: 230px;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px;
  font-family: monospace, inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #1e293b;
  background: #fafafa;
  resize: none;
  outline: none;
}

.review-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.save-tmpl-review-btn {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fef3c7;
  border: 1.5px solid #fde68a;
  color: #92400e;
  padding: 11px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-tmpl-review-btn:hover {
  background: #fde68a;
}

.copy-list-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  padding: 12px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.send-wa-btn {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border: none;
  color: #ffffff;
  padding: 12px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

/* ==========================================================================
   TEMPLATES MODAL
   ========================================================================== */
.templates-list-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.template-card {
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.template-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.template-name-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.template-slot-badge {
  background: var(--primary-color);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
}

.template-name-input {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  border: 1px solid transparent;
  background: transparent;
  padding: 2px 4px;
  border-radius: 6px;
  width: 100%;
}

.template-name-input:focus {
  border-color: var(--primary-color);
  background: #ffffff;
}

.template-items-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-green);
  white-space: nowrap;
}

.template-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.template-btn-row {
  display: flex;
  gap: 6px;
}

.tmpl-action-btn {
  flex: 1;
  padding: 8px 6px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}

.tmpl-save-btn {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.tmpl-load-btn {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.tmpl-delete-btn {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
  flex: 0 0 auto;
  padding: 8px 10px;
}

/* ==========================================================================
   APP INFO & STATUTORY FOOTER
   ========================================================================== */
.app-info-footer {
  text-align: center;
  padding: 24px 14px 16px;
  margin-top: 24px;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.footer-badges-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.footer-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
}

.footer-disclaimer-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 520px;
  margin: 0 auto 12px;
}

.footer-legal-btn {
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.footer-legal-btn:hover {
  background: #fce7f3;
}

.footer-copyright {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 14px;
}

/* Legal Modal Content */
.legal-content-body {
  padding: 16px 18px 24px;
  overflow-y: auto;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}

.legal-section h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.legal-section p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #475569;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-message {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  z-index: 3000;
  animation: popIn 0.2s ease;
  white-space: nowrap;
}

@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, 15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
