/* ─── BrewCraft – Estilos Globais ─────────────────────────────────────────── */

:root {
  --coffee-dark: #241008;
  --coffee-rich: #32180d;
  --coffee-medium: #4a2616;
  --coffee-warm: #704321;
  --coffee-caramel: #b86a2e;
  --coffee-gold: #c6a15b;
  --coffee-cream: #eadfce;
  --coffee-milk: #f7f1e8;
  --coffee-foam: #fffcf7;
  --accent-green: #5f7f3a;
  --accent-red: #a8483b;
  --accent-blue: #436f8f;
  --text-primary: #241008;
  --text-secondary: #4d3b31;
  --text-muted: #857266;
  --bg-main: #f7f1e8;
  --bg-card: #fffcf7;
  --border-color: #e5dac9;
  --surface-raised: #ffffff;
  --shadow-sm: 0 1px 2px rgba(36, 16, 8, 0.05), 0 8px 20px rgba(36, 16, 8, 0.06);
  --shadow-md: 0 2px 4px rgba(36, 16, 8, 0.06), 0 16px 36px rgba(36, 16, 8, 0.09);
  --shadow-lg: 0 8px 18px rgba(36, 16, 8, 0.12), 0 28px 60px rgba(36, 16, 8, 0.16);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255,252,247,0.9) 0%, rgba(247,241,232,1) 42%),
    var(--bg-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Tipografia ────────────────────────────────────────────────────────── */
.font-display {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--coffee-caramel); border-radius: 99px; }

/* ─── Tela / Páginas ────────────────────────────────────────────────────── */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  animation: fadeSlideIn 0.3s ease-out;
}
.screen.active {
  display: flex;
}

.login-screen-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background:
    radial-gradient(circle at 20% 12%, rgba(198,161,91,0.16), transparent 28%),
    linear-gradient(145deg, var(--coffee-dark), var(--coffee-rich) 48%, #102515);
}

.login-card {
  width: min(100%, 420px);
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid rgba(255, 252, 247, 0.22);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px 22px 24px;
}

.login-brand-mark {
  margin-bottom: 18px;
}

.login-card h1 {
  font-size: 2.1rem;
  margin: 0 0 6px;
  color: var(--text-primary);
}

.login-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-recovery-link {
  text-align: center;
  color: var(--coffee-warm);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 0;
}

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

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes brew {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ─── Header ────────────────────────────────────────────────────────────── */
.app-header {
  background: rgba(36, 16, 8, 0.94);
  backdrop-filter: blur(18px);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,252,247,0.08), 0 12px 30px rgba(36,16,8,0.16);
}

.app-header .back-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.app-header .back-btn:active {
  background: rgba(255,255,255,0.2);
}

.app-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  color: white;
  font-size: 1.18rem;
  letter-spacing: 0;
  margin: 0;
  flex: 1;
}

/* ─── Home Screen ───────────────────────────────────────────────────────── */
.home-hero {
  background:
    linear-gradient(150deg, rgba(36,16,8,0.98) 0%, rgba(50,24,13,0.98) 56%, rgba(95,127,58,0.78) 128%);
  padding: 42px 24px 38px;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: -84%;
  left: -70%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 62% 36%, rgba(198, 161, 91, 0.16) 0%, transparent 58%),
    linear-gradient(90deg, rgba(255,252,247,0.04), transparent 42%);
  pointer-events: none;
}

.home-hero h1 {
  font-family: 'Playfair Display', serif;
  color: white;
  font-size: 2.28rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.2;
}

.home-hero p {
  color: rgba(255,252,247,0.72);
  font-size: 0.95rem;
  margin: 0;
  font-weight: 400;
  line-height: 1.45;
  max-width: 340px;
}

.brand-lockup {
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,252,247,0.16), rgba(255,252,247,0.04));
  border: 1px solid rgba(255,252,247,0.18);
  color: var(--coffee-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 14px 34px rgba(0,0,0,0.22);
}

.brand-mark svg {
  width: 34px;
  height: 34px;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.module-card {
  width: 100%;
  border: 1px solid var(--border-color);
  background: rgba(255,252,247,0.86);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.module-card:active { transform: scale(0.985); }

.module-card.primary {
  background: linear-gradient(145deg, var(--coffee-dark), var(--coffee-rich));
  color: white;
  border-color: rgba(255,252,247,0.08);
  box-shadow: var(--shadow-md);
}

.module-card.matcha {
  background: linear-gradient(145deg, rgba(95,127,58,0.14), rgba(255,252,247,0.92));
  border-color: rgba(95,127,58,0.24);
}

.module-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(184,106,46,0.1);
  color: var(--coffee-caramel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.module-card.primary .module-icon {
  background: rgba(198,161,91,0.16);
  color: var(--coffee-gold);
}

.module-card.matcha .module-icon {
  background: rgba(95,127,58,0.14);
  color: var(--accent-green);
}

.matcha-guide-box {
  background: rgba(255, 252, 247, 0.9);
  border: 1px solid rgba(95, 127, 58, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.matcha-guide-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-green);
  font-weight: 700;
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.matcha-guide-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.45;
}

.matcha-guide-list li + li {
  margin-top: 6px;
}

.module-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 3px;
}

.module-desc {
  display: block;
  font-size: 0.76rem;
  line-height: 1.35;
  margin: 0;
  color: var(--text-muted);
}

.module-card.primary .module-desc {
  color: rgba(255,252,247,0.64);
}

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(229,218,201,0.86);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-elevated {
  box-shadow: var(--shadow-md);
}

/* ─── Botões ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--coffee-dark), var(--coffee-warm));
  color: white;
  box-shadow: 0 10px 22px rgba(36, 16, 8, 0.18);
}

.btn-primary:active {
  box-shadow: 0 2px 8px rgba(192, 112, 32, 0.3);
}

.btn-dark {
  background: var(--coffee-dark);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--coffee-caramel);
  color: var(--coffee-caramel);
}

.btn-ghost {
  background: rgba(36, 16, 8, 0.045);
  color: var(--text-secondary);
  border: 1px solid rgba(229,218,201,0.86);
}

.btn-danger {
  background: var(--accent-red);
  color: white;
}

.btn-full { width: 100%; }

.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ─── Upload de Foto ─────────────────────────────────────────────────────── */
.photo-upload-area {
  border: 1.5px dashed rgba(184, 106, 46, 0.45);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255,252,247,0.72);
}

.photo-upload-area:active,
.photo-upload-area.dragover {
  background: rgba(192, 112, 32, 0.1);
  border-color: var(--coffee-gold);
}

.photo-upload-area .upload-icon {
  font-size: 3rem;
  color: var(--coffee-caramel);
  margin-bottom: 12px;
  display: block;
}

.photo-preview {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}

/* ─── Tags / Chips ───────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1.5px solid;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-user-select: none;
  user-select: none;
}

.chip-default {
  background: var(--surface-raised);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.chip-selected {
  background: var(--coffee-dark);
  border-color: var(--coffee-dark);
  color: white;
}

.chip-info {
  background: rgba(192, 112, 32, 0.1);
  border-color: var(--coffee-caramel);
  color: var(--coffee-warm);
}

/* ─── Métodos de Extração ────────────────────────────────────────────────── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.method-card {
  background: rgba(255,252,247,0.88);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 6px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.method-card.selected {
  border-color: var(--coffee-caramel);
  background: linear-gradient(135deg, rgba(184,106,46,0.12), rgba(255,252,247,0.92));
  box-shadow: var(--shadow-sm);
}

.method-card:active { transform: scale(0.95); }

.method-svg-wrap {
  width: 52px;
  height: 52px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.method-svg-wrap svg {
  width: 100%;
  height: 100%;
}

.method-svg-wrap svg.matcha-method-svg {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 8px 14px rgba(33, 83, 42, 0.08));
}

.method-card.selected .method-svg-wrap svg path,
.method-card.selected .method-svg-wrap svg rect,
.method-card.selected .method-svg-wrap svg line,
.method-card.selected .method-svg-wrap svg ellipse,
.method-card.selected .method-svg-wrap svg circle {
  stroke: var(--coffee-warm);
}

.method-card .method-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
}

.method-card.selected .method-name {
  color: var(--coffee-warm);
}

/* ─── Perfis de Sabor ────────────────────────────────────────────────────── */
.profile-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--coffee-caramel), var(--coffee-gold), var(--accent-green));
  transform: scaleX(0);
  transition: transform 0.25s;
  transform-origin: left;
}

.profile-card.selected,
.profile-card:active {
  border-color: var(--coffee-caramel);
  box-shadow: var(--shadow-md);
}

.profile-card.selected::before {
  transform: scaleX(1);
}

.profile-card .profile-emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.profile-card .profile-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
}

/* ─── Barras de Intensidade ──────────────────────────────────────────────── */
.intensity-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.intensity-bar .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 60px;
  flex-shrink: 0;
}

.intensity-bar .bar-track {
  flex: 1;
  height: 6px;
  background: rgba(36, 16, 8, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.intensity-bar .bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--coffee-caramel), var(--coffee-gold));
  transition: width 0.4s ease;
}

/* ─── Recipe Cards ───────────────────────────────────────────────────────── */
.recipe-select-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.recipe-select-card.selected {
  border-color: var(--coffee-caramel);
  box-shadow: var(--shadow-md);
}

.recipe-select-card:active { transform: scale(0.98); }

.recipe-select-card .recipe-header {
  background: linear-gradient(135deg, var(--coffee-dark), var(--coffee-rich));
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.recipe-select-card .recipe-emoji {
  font-size: 2rem;
}

.recipe-select-card .recipe-title {
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.recipe-select-card .recipe-method-badge {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 99px;
  margin-top: 4px;
  display: inline-block;
}

.recipe-select-card .recipe-body {
  padding: 16px 20px;
}

/* ─── Full Recipe ─────────────────────────────────────────────────────────── */
.recipe-hero {
  background:
    linear-gradient(150deg, rgba(36,16,8,0.98), rgba(74,38,22,0.96) 72%, rgba(95,127,58,0.58) 150%);
  padding: 32px 24px;
  color: white;
}

.step-card {
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(229,218,201,0.86);
  margin-bottom: 10px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coffee-dark), var(--coffee-caramel));
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content { flex: 1; }
.step-name {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
  font-size: 0.9rem;
}
.step-action {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0 0 6px;
  line-height: 1.5;
}
.step-tip {
  background: rgba(192,112,32,0.08);
  border-left: 3px solid var(--coffee-caramel);
  padding: 6px 10px;
  border-radius: 0 8px 8px 0;
  font-size: 0.78rem;
  color: var(--coffee-warm);
}

.step-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.meta-badge {
  background: rgba(36, 16, 8, 0.055);
  color: var(--coffee-warm);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Timer ──────────────────────────────────────────────────────────────── */
.timer-display {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--coffee-dark);
  text-align: center;
  letter-spacing: 2px;
}

.timer-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* ─── Avaliação / Stars ──────────────────────────────────────────────────── */
.stars-input {
  display: flex;
  gap: 6px;
}

.star-btn {
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
  color: var(--coffee-cream);
  padding: 0;
}

.star-btn.active { color: var(--coffee-gold); }
.star-btn:active { transform: scale(1.2); }

/* ─── Histórico / Saved ──────────────────────────────────────────────────── */
.saved-recipe-card {
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  transition: transform 0.2s;
}

.saved-recipe-card:active { transform: scale(0.98); }

.saved-recipe-card .saved-header {
  background: linear-gradient(135deg, var(--coffee-dark), var(--coffee-rich));
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.saved-recipe-card .stars-display {
  display: flex;
  gap: 2px;
  font-size: 0.85rem;
}

/* ─── Loading ────────────────────────────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 10, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--coffee-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

.loading-text {
  color: white;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  max-width: 200px;
}

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--coffee-dark);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 2000;
  transition: transform 0.3s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

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

/* ─── Input / Form ───────────────────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: var(--surface-raised);
  transition: border-color 0.2s;
  outline: none;
}

.input:focus {
  border-color: var(--coffee-caramel);
  box-shadow: 0 0 0 3px rgba(184,106,46,0.1);
}

.input-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ─── Section Title ──────────────────────────────────────────────────────── */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}

/* ─── Bottom safe area ───────────────────────────────────────────────────── */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* ─── Divider ────────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-color);
  margin: 16px 0;
}

/* ─── Badge ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: rgba(45,106,79,0.12); color: var(--accent-green); }
.badge-warning { background: rgba(184,106,46,0.12); color: var(--coffee-warm); }
.badge-error { background: rgba(192,57,43,0.12); color: var(--accent-red); }
.badge-info { background: rgba(41,128,185,0.12); color: var(--accent-blue); }

/* ─── Info Box ───────────────────────────────────────────────────────────── */
.info-box {
  background: rgba(184, 106, 46, 0.075);
  border: 1px solid rgba(184, 106, 46, 0.18);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.info-box.success {
  background: rgba(45,106,79,0.08);
  border-color: rgba(45,106,79,0.25);
}

.info-box.warning {
  background: rgba(192,112,32,0.08);
  border-color: rgba(192,112,32,0.25);
}

/* ─── Grinder Slider ─────────────────────────────────────────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: rgba(36, 16, 8, 0.1);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coffee-dark), var(--coffee-caramel));
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(192, 112, 32, 0.4);
}

input[type="number"] {
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ─── Animações extras ────────────────────────────────────────────────────── */
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-spin  { animation: spin 0.8s linear infinite; }

/* ─── Tela de análise ────────────────────────────────────────────────────── */
.bean-analysis-result {
  background: linear-gradient(135deg, var(--coffee-dark) 0%, var(--coffee-rich) 100%);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: white;
}

.roast-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.roast-clara { background: rgba(255,220,100,0.25); color: #ffd670; border: 1px solid rgba(255,220,100,0.4); }
.roast-media { background: rgba(210,140,50,0.25); color: #d4892a; border: 1px solid rgba(210,140,50,0.4); }
.roast-media-escura { background: rgba(160,90,20,0.25); color: #c07020; border: 1px solid rgba(160,90,20,0.4); }
.roast-escura { background: rgba(80,40,0,0.4); color: #f0c080; border: 1px solid rgba(80,40,0,0.6); }
.roast-matcha { background: rgba(138,191,85,0.22); color: #b9e986; border: 1px solid rgba(138,191,85,0.42); }

/* ─── Quantidade selector ─────────────────────────────────────────────────── */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(36,16,8,0.06);
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background 0.2s;
}

.qty-btn:active { background: var(--coffee-caramel); color: white; }

.qty-value {
  flex: 1;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── Grinder card ────────────────────────────────────────────────────────── */
.grinder-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.grinder-card.selected {
  border-color: var(--coffee-caramel);
  background: rgba(184,106,46,0.08);
}
.grinder-card:active { transform: scale(0.97); }

/* ─── PWA Install Banner ─────────────────────────────────────────────────── */
.install-banner {
  background: linear-gradient(135deg, var(--coffee-dark), var(--coffee-rich));
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

/* ─── Recipe stats row ────────────────────────────────────────────────────── */
.recipe-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.stat-item {
  background: var(--surface-raised);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--coffee-dark);
  display: block;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ─── Scroll container ────────────────────────────────────────────────────── */
.scroll-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ─── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ─── Textarea ────────────────────────────────────────────────────────────── */
textarea.input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}
