/* =========================================================
   resellerlatinoamerica.co — Área de clientes
   ========================================================= */
:root {
  --primary: #004a7c;
  --primary-dark: #063565;
  --red: #d7001b;
  --green: #3fbf6f;
  --green-dark: #2fa65b;
  --text: #222;
  --muted: #6b6b6b;
  --border: #d6dbe1;
  --soft: #f3f4f6;
  --title: 'Montserrat', sans-serif;
  --body: 'Rubik', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--body); color: var(--text); background: #fff; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: 1150px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.topbar { border-bottom: 1px solid #e6e6e6; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-dark); color: #fff; display: grid; place-items: center; }
.logo__text { font-family: var(--title); font-size: 1.1rem; color: var(--primary-dark); font-weight: 600; }
.logo__text strong { font-weight: 800; }
.logo__text small { color: var(--red); font-weight: 700; }

.btn-red {
  background: var(--red); color: #fff; border-radius: 50px; padding: 8px 40px;
  display: flex; flex-direction: column; align-items: center; line-height: 1.2;
}
.btn-red span { font-weight: 600; font-size: 1.1rem; }
.btn-red small { font-size: .8rem; }

.page-title { text-align: center; font-family: var(--title); font-weight: 700; color: var(--primary); font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 30px 0 40px; }

.bluebar { background: var(--primary); min-height: 58px; }
.bluebar__inner { display: flex; align-items: center; min-height: 58px; }
.welcome { color: #fff; font-weight: 500; font-size: 1.1rem; }
.welcome strong { font-weight: 700; }

/* ---------- Botones ---------- */
.btn-green {
  background: var(--green); color: #fff; border: 2px solid var(--green-dark); border-radius: 50px;
  font: 600 1.05rem var(--body); padding: 11px 26px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s;
}
.btn-green:hover { background: var(--green-dark); }
.btn-green:disabled { opacity: .6; cursor: wait; }
.btn-dark {
  background: var(--primary-dark); color: #fff; border: 0; border-radius: 50px;
  font: 600 .95rem var(--body); padding: 10px 20px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.btn-dark:hover { background: var(--primary); }

/* ---------- Alertas ---------- */
.alert { border-radius: 6px; padding: 12px 14px; margin-bottom: 16px; font-size: .95rem; display: flex; gap: 8px; align-items: center; }
.alert--error { background: #fdecee; color: #b3001a; border: 1px solid #f5c2c8; }
.alert--ok { background: #e8f8ee; color: #1c7a42; border: 1px solid #b9e8cb; }

/* ---------- Login ---------- */
.login { max-width: 480px; margin: 60px auto 60px; }
.login__title { font-family: var(--title); font-weight: 700; color: var(--primary); font-size: 2.1rem; }
.login__sub { color: var(--muted); font-size: 1.35rem; padding-bottom: 8px; border-bottom: 1px solid #ccc; margin-bottom: 22px; }
.login label, .card label { display: block; font-weight: 600; margin-bottom: 8px; }
.login input[type=text], .login input[type=password], .card textarea {
  width: 100%; font: inherit; padding: 9px 12px; border: 1px solid #ccc; border-radius: 4px; margin-bottom: 20px; outline: none;
}
.login input:focus, .card textarea:focus { border-color: #86b7fe; box-shadow: 0 0 0 3px rgba(13,110,253,.15); }
.pass { position: relative; }
.pass input { padding-right: 42px !important; }
.pass__toggle { position: absolute; right: 8px; top: 7px; background: none; border: 0; color: #777; cursor: pointer; font-size: 1rem; padding: 4px; }
.check { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; }
.login__actions { text-align: center; margin-top: 20px; }

/* ---------- Panel ---------- */
.panel { padding: 24px 16px 40px; flex: 1; }
.panel__title { font-family: var(--title); font-weight: 700; color: var(--primary); font-size: clamp(1.6rem, 3.5vw, 2.3rem); padding-bottom: 6px; border-bottom: 1px solid #ccc; }
.crumbs { font-size: .82rem; color: var(--muted); margin: 10px 0 28px; }
.crumbs__current { color: var(--primary); }

.table-box { border-bottom: 1px solid #eee; }
.table-box__head { background: var(--primary); color: #fff; font-weight: 500; padding: 20px 30px; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 720px; }
.table th {
  background: #f5f5f5; font-weight: 400; font-size: 1.05rem; color: #222; padding: 18px 12px 12px; text-align: center;
  border-bottom: 3px solid var(--primary); vertical-align: bottom;
}
.table th.col-icon { background: #fff; width: 66px; }
.table td { padding: 14px 12px; text-align: center; border-bottom: 1px solid #eee; font-size: 1rem; }
.table tbody tr:nth-child(odd) { background: #f7fafc; }
.td-prod { text-align: left !important; }
.td-prod strong { display: block; }
.td-prod span { color: var(--primary); }
.lock { font-size: 1.9rem; color: #5cb85c; }
.code { font-family: monospace; font-size: 1rem; font-weight: 700; color: var(--primary-dark); background: #e7eef8; padding: 5px 10px; border-radius: 4px; display: inline-flex; gap: 8px; align-items: center; }
.code button { background: none; border: 0; cursor: pointer; color: var(--primary); }
.status { display: inline-block; min-width: 120px; padding: 6px 12px; border: 1px solid #ccc; border-radius: 3px; font-weight: 600; background: #fff; }
.status--activo { color: #3bb54a; }
.status--pendiente { color: #d9534f; }
.table-foot { background: var(--soft); padding: 12px 30px; color: var(--muted); font-size: .9rem; }

/* ---------- Tarjetas ---------- */
.card { border: 1px solid var(--border); border-radius: 8px; padding: 24px; margin-top: 30px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.card__title { font-family: var(--title); font-weight: 700; color: var(--primary); font-size: 1.35rem; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.card__text { color: #444; margin-bottom: 18px; }

.drop {
  display: flex !important; justify-content: center; align-items: center; border: 2px dashed #9fb6cf; border-radius: 8px;
  background: #f7fafd; min-height: 170px; cursor: pointer; padding: 16px; text-align: center; transition: .2s; margin-bottom: 8px !important;
  font-weight: 400 !important;
}
.drop:hover, .drop.is-over { border-color: var(--primary); background: #eef4fb; }
.drop input { display: none; }
.drop__empty { display: flex; flex-direction: column; gap: 6px; align-items: center; color: #456; }
.drop__empty i { font-size: 2.4rem; color: var(--primary); }
.drop__empty small { color: var(--muted); }
.drop__preview { max-height: 260px; max-width: 100%; border-radius: 6px; }
.drop__name { font-size: .9rem; color: var(--muted); margin-bottom: 16px; min-height: 1em; }

.payments { display: flex; justify-content: center; }
.payments__img { max-width: 100%; border-radius: 6px; }
.payments__empty { width: 100%; border: 2px dashed #ccc; border-radius: 8px; padding: 40px 16px; text-align: center; color: var(--muted); }
.payments__empty i { font-size: 2.4rem; margin-bottom: 8px; }

.logout-bottom { text-align: center; margin-top: 30px; }

.foot { text-align: center; padding: 20px; color: #fff; background: var(--primary-dark); font-size: .9rem; }

@media (max-width: 600px) {
  .btn-red { padding: 6px 18px; }
  .btn-red small { display: none; }
  .logo__text { font-size: .95rem; }
  .table-box__head { padding: 16px; }
  .card { padding: 18px; }
  .page-title { margin: 22px 0 26px; }
}

/* ---------- Selector y carga ---------- */
.select {
  width: 100%; font: inherit; padding: 9px 12px; border: 1px solid #ccc; border-radius: 4px;
  margin-bottom: 18px; background: #fff; outline: none;
}
.select:focus { border-color: #86b7fe; box-shadow: 0 0 0 3px rgba(13,110,253,.15); }
body.is-loading main, body.is-loading .bluebar { visibility: hidden; }

/* ---------- Barra de bienvenida ---------- */
.bluebar__inner { justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.btn-outline-light {
  background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.8); border-radius: 50px;
  font: 500 .95rem var(--body); padding: 8px 18px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s, color .2s;
}
.btn-outline-light:hover { background: #fff; color: var(--primary); }
.btn-light {
  background: #fff; color: #333; border: 1px solid #ccc; border-radius: 50px;
  font: 500 1rem var(--body); padding: 11px 22px; cursor: pointer;
}
.btn-light:hover { background: #f2f2f2; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4, 30, 60, .55); }
.modal__box {
  position: relative; background: #fff; border-radius: 10px; width: 100%; max-width: 440px;
  padding: 26px 24px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.25); max-height: calc(100vh - 32px); overflow-y: auto;
  animation: modalIn .2s ease;
}
.modal__close { position: absolute; top: 12px; right: 12px; background: none; border: 0; font-size: 1.3rem; color: #888; cursor: pointer; }
.modal__close:hover { color: #333; }
.modal label { display: block; font-weight: 600; margin-bottom: 8px; }
.modal input[type=password], .modal input[type=text] {
  width: 100%; font: inherit; padding: 9px 42px 9px 12px; border: 1px solid #ccc; border-radius: 4px; margin-bottom: 18px; outline: none;
}
.modal input:focus { border-color: #86b7fe; box-shadow: 0 0 0 3px rgba(13,110,253,.15); }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
body.modal-open { overflow: hidden; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
