/* ============================================================
   Sistema de Inventario QR — Tema base (blanco / negro / dorado)
   Consistente en toda la app. Mobile First.
   ============================================================ */

:root {
  --gold:        #C6A15B;
  --gold-dark:   #A5843C;
  --gold-soft:   #EAD9B0;
  --gold-tint:   #FBF6EC;
  --black:       #141414;
  --ink:         #1D1D1D;
  --gray:        #6B6B6B;
  --gray-light:  #9A9A9A;
  --line:        #E8E6E1;
  --bg:          #FFFFFF;
  --bg-soft:     #FAF9F7;
  --danger:      #C0392B;
  --danger-bg:   #FCEBEA;
  --ok:          #2E7D5B;
  --ok-bg:       #E8F5EE;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 6px 24px rgba(20,20,20,.08);
  --shadow-sm:   0 2px 8px rgba(20,20,20,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-soft);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--black); font-weight: 700; letter-spacing: -.01em; }

/* ---------- Marca / logo ---------- */
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--black);
}
.brand .dot {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff; font-size: 15px; letter-spacing: 0;
  box-shadow: var(--shadow-sm);
}
.brand small { display:block; font-size:.6rem; letter-spacing:.24em; color:var(--gold-dark); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: .7rem 1.1rem; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: .15s ease; text-decoration: none;
  background: var(--bg); color: var(--ink);
}
.btn:hover { text-decoration: none; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff; box-shadow: var(--shadow-sm);
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-dark  { background: var(--black); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Formularios ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--gray); margin-bottom: .35rem; }
.input, select.input, textarea.input {
  width: 100%; padding: .72rem .85rem; font-size: .95rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: .15s ease; font-family: var(--font);
}
.input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(198,161,91,.18);
}

/* ---------- Tarjetas ---------- */
.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.25rem;
}

/* ---------- Alertas / toast ---------- */
.alert { border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: .9rem; margin-bottom: 1rem; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f3c7c2; }
.alert-ok    { background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe3ce; }

/* ---------- Badges ---------- */
.badge { display:inline-block; padding:.2rem .55rem; border-radius:999px; font-size:.72rem; font-weight:700; }
.badge-gold { background: var(--gold-tint); color: var(--gold-dark); border:1px solid var(--gold-soft); }
.badge-dark { background: #1d1d1d; color:#fff; }

/* ============================================================
   Login
   ============================================================ */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 1.25rem;
  background:
    radial-gradient(1200px 500px at 100% -10%, var(--gold-tint), transparent 60%),
    var(--bg-soft);
}
.auth-card {
  width: 100%; max-width: 380px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 2rem 1.75rem;
}
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-head .dot { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto .8rem; font-size: 22px; }
.auth-head h1 { font-size: 1.15rem; letter-spacing: .16em; text-transform: uppercase; margin: .2rem 0 .1rem; }
.auth-head p { color: var(--gray); font-size: .85rem; margin: 0; }
.auth-foot { text-align: center; margin-top: 1.1rem; font-size: .78rem; color: var(--gray-light); }

.gold-rule { height: 2px; width: 44px; margin: .6rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ---------- Utilidades ---------- */
.text-gold { color: var(--gold-dark); }
.text-muted { color: var(--gray); }
.hidden { display: none !important; }
.spin { display:inline-block; width:16px; height:16px; border:2px solid rgba(255,255,255,.5);
  border-top-color:#fff; border-radius:50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
