/* ==========================================================================
   GLOBAL DESIGN SYSTEM & STYLES
   Churrasco Anti-Desperdício & Suíte de Ferramentas
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* Color Palette */
  --bg-main: #0b0d13;
  --bg-card: #131722;
  --bg-card-hover: #1a2030;
  --bg-card-glass: rgba(19, 23, 34, 0.85);
  --bg-input: #1c2233;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 94, 20, 0.35);
  --border-focus: #ff5e14;

  /* Brand Colors */
  --flame-500: #ff5e14;
  --flame-400: #ff7836;
  --flame-600: #e04a05;
  --flame-glow: rgba(255, 94, 20, 0.25);

  --amber-400: #fbbf24;
  --amber-500: #f59e0b;

  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.25);

  --danger-500: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.25);

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing & Borders */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-flame: 0 8px 25px rgba(255, 94, 20, 0.35);
  --shadow-green: 0 8px 25px rgba(16, 185, 129, 0.35);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
}

body {
  min-height: 100vh;
  line-height: 1.5;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(ellipse at 50% -20%, rgba(255, 94, 20, 0.15), transparent 70%),
    radial-gradient(ellipse at 80% 60%, rgba(245, 158, 11, 0.05), transparent 60%);
  background-repeat: no-repeat;
  overflow-x: hidden;
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 640px; /* Mobile focused max width */
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-wide {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.95rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--flame-500) 0%, var(--flame-600) 100%);
  color: #ffffff;
  box-shadow: var(--shadow-flame);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--flame-400) 0%, var(--flame-500) 100%);
  box-shadow: 0 12px 30px rgba(255, 94, 20, 0.45);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: var(--shadow-green);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-success:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #2fe673 0%, #17a898 100%);
}

.btn-pulse {
  animation: pulseButton 2s infinite;
}

@keyframes pulseButton {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 14px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-flame {
  background: rgba(255, 94, 20, 0.15);
  color: #ff9153;
  border: 1px solid rgba(255, 94, 20, 0.3);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
}

.card-glass {
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-highlight {
  border-color: var(--border-highlight);
  background: linear-gradient(180deg, rgba(255, 94, 20, 0.05) 0%, var(--bg-card) 100%);
}

/* Top App Bar / Header */
.app-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(11, 13, 19, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 900;
  font-size: 1.15rem;
  color: #ffffff;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--flame-500), var(--flame-600));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(255, 94, 20, 0.4);
}

/* Form inputs & controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.form-label small {
  font-weight: 400;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--flame-500);
  box-shadow: 0 0 0 3px rgba(255, 94, 20, 0.2);
}

/* Stepper / Counter controls */
.counter-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.counter-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.counter-info p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.counter-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: #252c40;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-circle:hover {
  background: var(--flame-500);
  border-color: var(--flame-500);
}

.btn-circle:active {
  transform: scale(0.9);
}

.counter-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  color: var(--flame-400);
}

/* Checkbox and Pills Select */
.pill-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.pill-option {
  position: relative;
}

.pill-option input[type="radio"],
.pill-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.85rem 0.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  font-weight: 600;
}

.pill-label .emoji {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.pill-option input:checked + .pill-label {
  background: rgba(255, 94, 20, 0.12);
  border-color: var(--flame-500);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 94, 20, 0.2);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: white;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-success {
  border-color: var(--emerald-500);
  background: #064e3b;
}

/* Utilities */
.text-center { text-align: center; }
.text-flame { color: var(--flame-500); }
.text-emerald { color: var(--emerald-400); }
.text-amber { color: var(--amber-400); }
.text-danger { color: var(--danger-500); }
.fw-bold { font-weight: 800; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
