/* =====================================================
   GLOBAL.CSS - Grupo Boreta (ÚNICO)
   ===================================================== */

/* Reset */
*{ margin:0; padding:0; box-sizing:border-box; }

html, body{
  height:100%;
  font-family: 'Poppins', sans-serif;
}

/* Variables corporativas */
:root{
  --brand-dark:  #3D4224;
  --brand-olive: #676A4A;
  --brand-beige: #D8D4AE;
  --brand-light: #E0DECC;

  --text: #1f1f1f;
  --muted: rgba(0,0,0,.60);
  --border: rgba(0,0,0,.12);

  --danger: #7a2f2f;
  --success: #2f6b3a;

  --white: #fff;
}

/* Base */
body{
  background: var(--brand-light);
  color: var(--text);
}

/* Links (importante: que sí parezcan links) */
a{
  color: var(--brand-dark);
  text-decoration: none;
}
a:hover{ text-decoration: underline; }

/* Contenedor */
.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tipografía */
h1{ font-size: 34px; font-weight: 700; margin: 0 0 12px; color: var(--brand-dark); }
h2{ font-size: 24px; font-weight: 700; margin: 0 0 12px; color: var(--brand-dark); }
p{ color: var(--text); }

/* Cards / superficies */
.card{
  background: rgba(255,255,255,.45);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  padding: 16px;
}

/* Botones (global) */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(61,66,36,.18);
  background: rgba(61,66,36,.08);
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 600;
  transition: .2s ease;
  text-decoration: none;
}
.btn:hover{ background: rgba(61,66,36,.12); text-decoration:none; }

.btn-primary{
  background: var(--brand-dark);
  border-color: rgba(0,0,0,.10);
  color: var(--white);
}
.btn-primary:hover{ background: var(--brand-olive); }

.btn-danger{
  background: var(--danger);
  border-color: rgba(0,0,0,.10);
  color: var(--white);
}
.btn-danger:hover{ opacity: .92; }

.btn-small{ padding: 8px 10px; border-radius: 10px; font-weight: 700; }

/* Inputs / selects */
.form-control,
input[type="text"], input[type="email"], input[type="password"], select{
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  outline: none;
}
.form-control:focus,
input:focus, select:focus{
  border-color: rgba(61,66,36,.55);
  box-shadow: 0 0 0 3px rgba(61,66,36,.12);
}

/* Filtros horizontales */
.filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin: 12px 0 16px;
}

/* Head de página */
.page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom: 12px;
}
.page-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* Tabla global */
.table-wrap{
  background: rgba(255,255,255,.35);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  padding: 10px;
}

.product-table{
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
}

.product-table thead th{
  background: var(--brand-dark);
  color: var(--white);
  text-align: left;
  padding: 12px;
  font-weight: 700;
  font-size: 14px;
}

.product-table tbody td{
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  font-size: 14px;
}

.product-table tbody tr:hover{
  background: rgba(216,212,174,.22);
}

/* Acciones */
.actions{
  display:flex;
  gap:8px;
  align-items:center;
}

/* Pills / estados */
.pill{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}

.pill-success{
  background: rgba(47,107,58,.12);
  border-color: rgba(47,107,58,.22);
  color: var(--success);
}

.pill-danger{
  background: rgba(122,47,47,.12);
  border-color: rgba(122,47,47,.22);
  color: var(--danger);
}

/* =======================
   LOGIN (solo si body tiene login-page)
   ======================= */
body.login-page{
  background: linear-gradient(
    135deg,
    var(--brand-light) 0%,
    var(--brand-beige) 100%
  );
}

.auth-page{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 30px 15px;
}

.login-card{
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  padding: 40px;
  border-radius: 14px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
  animation: fadeIn .4s ease-in-out;
}

.login-card h2{
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 25px;
  color: var(--brand-dark);
  text-align:center;
}

.login-card label{
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  display:block;
  color: rgba(0,0,0,.65);
}

.login-card input{
  width: 100%;
  margin-bottom: 18px;
}

.login-card button{
  width: 100%;
}

@keyframes fadeIn{
  from{ opacity:0; transform: translateY(15px); }
  to{ opacity:1; transform: translateY(0); }
}
/* =====================================================
   FORM UI (GLOBAL - reciclable)
   ===================================================== */

.form-card{
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  padding: 18px;
}

.form-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  max-width: 860px;
}

@media (max-width: 900px){
  .form-grid{ grid-template-columns: 1fr; }
}

.form-group{ display:flex; flex-direction:column; gap: 6px; }

.form-label{
  font-weight: 800;
  color: var(--brand-dark);
  font-size: 13px;
  letter-spacing: .2px;
}

.form-hint{
  font-size: 12px;
  color: var(--muted);
}

.form-control{
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
}

.form-control::placeholder{ color: rgba(0,0,0,.35); }

.form-control:focus{
  border-color: rgba(61,66,36,.55);
  box-shadow: 0 0 0 4px rgba(61,66,36,.12);
}

.form-row-span-2{ grid-column: span 2; }
@media (max-width: 900px){ .form-row-span-2{ grid-column: span 1; } }

.form-check{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(216,212,174,.22);
  width: fit-content;
}

.form-check input{ transform: scale(1.1); }

.form-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 6px;
}

/* Header de página más pro */
.page-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom: 14px;
}

.page-title-block{ display:flex; flex-direction:column; gap:4px; }
.page-subtitle{ color: var(--muted); font-size: 13px; }

.input-like{
  background:#fff;
  border:1px solid #ddd;
  border-radius:10px;
  padding:12px 14px;
  font-weight:600;
  color: var(--brand-dark);
}
.pill-system{
  background:#2f2f2f;
  color:#fff;
  padding:6px 10px;
  border-radius:20px;
  font-size:12px;
  font-weight:600;
}

.badge-system{
  font-size:12px;
  font-weight:600;
  color:#777;
}