/* ========================================================
   TRILLA RURAL - ESTILOS UX RURAL PARA CAMPO ALTOANDINO
   Diseñado para alta visibilidad bajo el sol y dedos con guantes
   ======================================================== */

:root {
  --primary: #15803d;      /* Verde Campo */
  --primary-dark: #14532d;
  --primary-light: #dcfce7;
  --accent: #d97706;       /* Amarillo/Ámbar Granos */
  --accent-light: #fef3c7;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --radius-lg: 20px;
  --radius-md: 14px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* App Mobile Shell Container */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Top App Bar */
.top-bar {
  background: var(--primary-dark);
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.top-bar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.3px;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}

.icon-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.3);
}

/* Offline Status Pill */
.offline-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  background: #22c55e;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.offline-pill.is-offline {
  background: #eab308;
  color: #713f12;
}

/* Step Progress Bar */
.step-bar {
  display: flex;
  background: #e2e8f0;
  height: 6px;
  width: 100%;
}

.step-fill {
  background: var(--primary);
  height: 100%;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Content Area */
.step-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Screen Headers with Audio Prompts */
.step-header {
  margin-bottom: 16px;
  text-align: center;
}

.step-badge {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 6px;
}

.step-question {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
}

.step-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Huge Visual Touch Cards */
.cards-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  flex: 1;
}

.big-card {
  background: #ffffff;
  border: 3px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.big-card:active, .big-card.selected {
  transform: scale(0.98);
  border-color: var(--primary);
  background: #f0fdf4;
  box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.2);
}

.big-card.card-woman:active, .big-card.card-woman.selected {
  border-color: #059669;
  background: #ecfdf5;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2);
}

.big-card.card-man:active, .big-card.card-man.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.card-icon-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.card-content {
  flex: 1;
}

.card-title {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
}

.card-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  font-weight: 500;
}

/* Stepper Buttons for Sacks / Numbers */
.sack-counter-box {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
}

.counter-value-large {
  font-size: 48px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.counter-unit {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 4px;
  text-transform: uppercase;
}

.stepper-buttons-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.stepper-btn {
  background: #ffffff;
  border: 2.5px solid #94a3b8;
  border-radius: var(--radius-md);
  padding: 14px 6px;
  font-size: 16px;
  font-weight: 900;
  color: #1e293b;
  cursor: pointer;
  transition: transform 0.1s, background 0.1s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stepper-btn:active {
  transform: scale(0.94);
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.stepper-btn.btn-clear {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fef2f2;
}

/* Bottom Action Bar */
.bottom-bar {
  padding: 16px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 10px;
}

.btn-primary-giant {
  flex: 1;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.35);
  transition: transform 0.1s, background 0.2s;
}

.btn-primary-giant:active {
  transform: scale(0.97);
  background: var(--primary-dark);
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 16px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

/* Success Screen Animation */
.success-circle {
  width: 100px;
  height: 100px;
  background: #dcfce7;
  border: 4px solid #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 54px;
  margin: 20px auto 16px auto;
  animation: bounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounce {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}
