/* =============================================
   GanaderosPeso — Estilos globales
   ============================================= */

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

:root {
  --green: #1D9E75;
  --green-dark: #0F6E56;
  --green-light: #E1F5EE;
  --amber: #BA7517;
  --amber-light: #FAEEDA;
  --red: #A32D2D;
  --red-light: #FCEBEB;
  --blue: #185FA5;
  --blue-light: #E6F1FB;
  --purple: #534AB7;
  --purple-light: #EEEDFE;
  --gray-50: #F9F9F8;
  --gray-100: #F1EFE8;
  --gray-200: #D3D1C7;
  --gray-400: #888780;
  --gray-600: #5F5E5A;
  --gray-900: #1A1A18;
  --border: rgba(0,0,0,0.1);
  --border-md: rgba(0,0,0,0.15);
  --radius: 10px;
  --radius-lg: 14px;
  --font: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Layout */
.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.container.wide {
  max-width: 900px;
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-top: 1rem;
}

.site-logo {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 2px;
}

.site-tagline {
  font-size: 12px;
  color: var(--gray-400);
}

/* Cards */
.card {
  background: white;
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 0.5px solid var(--border);
}

.card-header h2 {
  font-size: 15px;
  font-weight: 500;
}

.card-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.icon-blue   { background: var(--blue-light);   color: var(--blue); }
.icon-green  { background: var(--green-light);  color: var(--green-dark); }
.icon-amber  { background: var(--amber-light);  color: var(--amber); }
.icon-purple { background: var(--purple-light); color: var(--purple); }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 1rem; }

label {
  display: block;
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 4px;
  font-weight: 500;
}

input, select, textarea {
  width: 100%;
  padding: 8px 12px;
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  color: var(--gray-900);
  background: white;
  transition: border-color 0.15s;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.1);
}

textarea { resize: vertical; min-height: 72px; }
.hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 0.5px solid var(--border-md);
  background: white;
  color: var(--gray-900);
  transition: all 0.15s;
  text-decoration: none;
}

.btn:hover { background: var(--gray-100); }
.btn:active { transform: scale(0.98); }

.btn-block { width: 100%; }

.btn-primary {
  background: var(--green);
  color: white;
  border-color: var(--green-dark);
}
.btn-primary:hover { background: var(--green-dark); }

.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
}

.btn-danger {
  color: var(--red);
  border-color: rgba(163,45,45,0.2);
}
.btn-danger:hover { background: var(--red-light); }

/* Info boxes */
.info-box {
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.info-box i { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.info-box.blue   { background: var(--blue-light);   color: #0C447C; border: 0.5px solid #B5D4F4; }
.info-box.amber  { background: var(--amber-light);  color: #633806; border: 0.5px solid #FAC775; }
.info-box.green  { background: var(--green-light);  color: #085041; border: 0.5px solid #9FE1CB; }
.info-box.red    { background: var(--red-light);    color: #791F1F; border: 0.5px solid #F7C1C1; }
.info-box.purple { background: var(--purple-light); color: #3C3489; border: 0.5px solid #AFA9EC; }

/* Upload zones */
.upload-zone {
  border: 1.5px dashed var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  background: var(--gray-50);
  transition: all 0.15s;
}
.upload-zone:hover { border-color: var(--green); background: var(--green-light); }
.upload-zone.has-file { border-color: var(--green); background: var(--green-light); }
.upload-zone i { font-size: 28px; color: var(--gray-400); display: block; margin-bottom: 6px; }
.upload-zone.has-file i { color: var(--green-dark); }
.upload-zone p { font-size: 13px; color: var(--gray-600); }
.upload-zone.has-file p { color: var(--green-dark); font-weight: 500; }
.upload-zone small { font-size: 11px; color: var(--gray-400); }

/* Step indicator */
.steps {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}
.step {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--gray-400);
}
.step.active { color: var(--gray-900); font-weight: 500; }
.step.done { color: var(--green-dark); }
.step-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
  background: var(--gray-100); color: var(--gray-400);
}
.step.active .step-num { background: var(--green); color: white; }
.step.done .step-num { background: var(--green-light); color: var(--green-dark); }
.step-line { flex: 1; height: 1px; background: var(--border); margin: 0 4px; }

/* Bank box */
.bank-box {
  background: var(--gray-50);
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
}
.bank-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--border);
  font-size: 13px;
}
.bank-row:last-child { border-bottom: none; }
.bank-row .label { color: var(--gray-600); }
.bank-row .value { font-weight: 500; }
.bank-row .value.mono { font-family: var(--mono); font-size: 14px; }
.bank-row .value.green { color: var(--green); font-size: 16px; }

/* Monto destacado */
.monto-box {
  text-align: center;
  padding: 1.25rem;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  border: 0.5px solid var(--border);
}
.monto-label { font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.monto-valor { font-size: 32px; font-weight: 600; color: var(--green); font-family: var(--mono); }
.monto-detalle { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
}
.badge-verify  { background: var(--purple-light); color: var(--purple); }
.badge-pending { background: var(--amber-light);  color: var(--amber); }
.badge-done    { background: var(--green-light);  color: var(--green-dark); }
.badge-rejected{ background: var(--red-light);    color: var(--red); }

/* Metric cards */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.metric-card {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 10px;
  text-align: center;
}
.metric-card .val { font-size: 22px; font-weight: 600; }
.metric-card .lbl { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* Range bar */
.range-bar-bg {
  height: 8px; background: var(--gray-100);
  border-radius: 4px; overflow: hidden; border: 0.5px solid var(--border);
}
.range-bar-fill { height: 100%; background: var(--green); border-radius: 4px; transition: width 0.3s; }
.range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray-400); margin-top: 3px; }

/* Weight result grid */
.weight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 1rem; }
.weight-card {
  background: var(--gray-50); border-radius: var(--radius);
  padding: 10px; text-align: center;
  border: 0.5px solid var(--border);
}
.weight-card.highlight { border-color: var(--green); }
.weight-card .val { font-size: 18px; font-weight: 600; }
.weight-card.highlight .val { color: var(--green); }
.weight-card .lbl { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* Divider */
.divider { border: none; border-top: 0.5px solid var(--border); margin: 1rem 0; }
.section-label {
  font-size: 11px; font-weight: 600; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 10px; margin-top: 1rem;
}

/* Tips grid */
.tips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 1rem; }
.tip {
  background: var(--gray-50); border-radius: var(--radius);
  padding: 9px 12px; display: flex; gap: 7px;
  align-items: flex-start; font-size: 12px;
  color: var(--gray-600); line-height: 1.4;
  border: 0.5px solid var(--border);
}
.tip i { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.tip.good i { color: var(--green); }
.tip.bad i { color: var(--red); }

/* Job rows */
.job-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--border);
}
.job-row:last-child { border-bottom: none; }
.job-name { font-size: 14px; font-weight: 500; }
.job-meta { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.job-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 100;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white; border-radius: var(--radius-lg);
  border: 0.5px solid var(--border-md);
  padding: 1.5rem; width: 92%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.25rem;
}
.modal-header h2 { font-size: 15px; font-weight: 600; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--gray-400); line-height: 1;
}

/* Success screen */
.success-screen {
  display: none; text-align: center; padding: 2rem 0;
}
.success-icon { font-size: 52px; color: var(--green); display: block; margin-bottom: 1rem; }

/* Login */
.login-wrap {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
.login-card {
  background: white; border: 0.5px solid var(--border-md);
  border-radius: var(--radius-lg); padding: 2rem;
  width: 100%; max-width: 380px;
}

/* Nav operador */
.op-nav {
  background: white; border-bottom: 0.5px solid var(--border-md);
  padding: 0.75rem 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.op-nav-brand { font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gray-600); }

/* Tabs */
.tabs { display: flex; gap: 0; border: 0.5px solid var(--border-md); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.5rem; background: var(--gray-100); }
.tab-btn {
  flex: 1; padding: 9px 14px; background: transparent; border: none;
  cursor: pointer; font-family: var(--font); font-size: 13px;
  color: var(--gray-600); display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.15s;
}
.tab-btn.active { background: white; color: var(--gray-900); font-weight: 500; }

/* Corr table */
.ref-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ref-table th {
  font-size: 11px; font-weight: 600; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 6px 8px; text-align: left;
  border-bottom: 0.5px solid var(--border-md);
}
.ref-table td { padding: 8px; border-bottom: 0.5px solid var(--border); color: var(--gray-900); }
.ref-table tr:last-child td { border-bottom: none; }

/* Flow steps (success) */
.flow-steps { display: flex; flex-direction: column; gap: 10px; }
.flow-step { display: flex; gap: 10px; font-size: 13px; color: var(--gray-600); align-items: flex-start; }
.flow-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.flow-num.final { background: var(--green); color: white; }

/* File info */
.file-info {
  display: none; margin-top: 8px; font-size: 13px;
  color: var(--green-dark); align-items: center; gap: 6px;
}

/* Responsive */
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .weight-grid { grid-template-columns: repeat(3, 1fr); }
}
