/* Dashboard inicio — alineado al chrome ERP */
.dash-page {
  --dash-primary: var(--erp-primary, #1f6f9f);
  --dash-primary-dark: var(--erp-primary-dark, #165a82);
  --dash-navy: var(--erp-navy, #0f3a57);
  --dash-cyan: #00c2e0;
  --dash-text: var(--erp-text, #1a2b3c);
  --dash-muted: var(--erp-muted, #5d6e7c);
  --dash-border: var(--erp-border, #d7e2ea);
  --dash-soft: var(--erp-soft, #e8f3f9);
  --dash-gold: #d4a017;
  --dash-silver: #8a97a3;
  --dash-bronze: #c47a3a;
  --dash-input-h: 32px;
}

.dash-page .content {
  padding-top: 12px;
}

.dash-page .content-header {
  padding-bottom: 8px;
}

.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 12px 12px 12px 16px;
  color: var(--dash-text);
  background: #fff;
  border: 1px solid var(--dash-border);
  border-left: 4px solid var(--dash-cyan);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 58, 87, 0.06);
}

.dash-hero__user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.dash-hero__avatar {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d7eef4;
  background: var(--dash-soft);
}

.dash-hero__copy {
  min-width: 0;
}

.dash-hero__kicker {
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dash-primary);
}

.dash-hero h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--dash-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-hero p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--dash-muted);
}

.dash-hero__date {
  flex: 0 0 auto;
  min-width: 128px;
  padding: 8px 14px;
  text-align: right;
  color: #fff;
  background: linear-gradient(160deg, var(--dash-navy) 0%, var(--dash-primary) 100%);
  border-radius: 10px;
}

.dash-hero__weekday {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5ee7ff;
}

.dash-hero__date strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dash-hero__date span:last-child {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
}

.dash-card {
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 58, 87, 0.06);
  margin-bottom: 16px;
  overflow: hidden;
}

.dash-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e8eef3;
  background: #f7fafc;
}

.dash-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 194, 224, 0.14);
  color: var(--dash-primary-dark);
  font-size: 16px;
}

.dash-card__title {
  min-width: 0;
  flex: 1 1 auto;
}

.dash-card__title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--dash-navy);
}

.dash-card__title p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--dash-muted);
}

.dash-card__badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--dash-soft);
  color: var(--dash-primary-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dash-card__body {
  padding: 16px;
}

.dash-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid #e8eef3;
  background: #f7fafc;
  color: var(--dash-muted);
  font-size: 12px;
}

.dash-card__foot-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.dash-card__foot-total span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dash-muted);
}

.dash-card__foot-total strong {
  font-size: 16px;
  font-weight: 700;
  color: #1e7a4a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dash-search {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-bottom: 14px;
}

.dash-search input.form-control {
  flex: 1 1 auto;
  width: 1% !important;
  min-width: 0;
  height: var(--dash-input-h) !important;
  margin: 0;
  padding: 0 12px !important;
  border: 1px solid var(--dash-border);
  border-right: 0;
  border-radius: 8px 0 0 8px !important;
  font-size: 14px;
  font-weight: 600;
  line-height: calc(var(--dash-input-h) - 2px) !important;
  letter-spacing: 0.04em;
  box-shadow: none !important;
  box-sizing: border-box;
}

.dash-search input.form-control:focus {
  border-color: var(--dash-primary);
  box-shadow: none !important;
  z-index: 1;
}

.dash-search input.form-control:-webkit-autofill,
.dash-search input.form-control:-webkit-autofill:hover,
.dash-search input.form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px #fff inset;
  box-shadow: 0 0 0 40px #fff inset;
}

.dash-search #btnValidarDniRuc {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--dash-input-h);
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--dash-primary-dark);
  border-radius: 0 8px 8px 0;
  background: var(--dash-primary-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  box-shadow: none;
  vertical-align: middle;
  appearance: none;
  -webkit-appearance: none;
}

.dash-search #btnValidarDniRuc i {
  margin: 0;
  font-size: 13px;
  line-height: 1;
}

.dash-search #btnValidarDniRuc:hover,
.dash-search #btnValidarDniRuc:focus {
  background: #124a6c;
  border-color: #124a6c;
  color: #fff;
  outline: 0;
}

.dash-search #btnValidarDniRuc.is-loading,
.dash-search #btnValidarDniRuc.is-loading:hover {
  opacity: 0.85;
  pointer-events: none;
}

.dash-field {
  margin-bottom: 10px;
}

.dash-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dash-muted);
}

.dash-field .form-control {
  height: var(--dash-input-h) !important;
  min-height: var(--dash-input-h);
  padding: 0 12px !important;
  line-height: calc(var(--dash-input-h) - 2px);
  border-radius: 8px;
  border: 1px solid var(--dash-border);
  box-shadow: none !important;
  box-sizing: border-box;
}

.dash-field .form-control:focus {
  border-color: var(--dash-primary);
  box-shadow: none !important;
}

.dash-field .form-control[readonly] {
  background: #f7fafc;
  color: var(--dash-text);
}

.dash-copy {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.dash-copy .form-control {
  flex: 1 1 auto;
  width: 1% !important;
  min-width: 0;
  height: var(--dash-input-h) !important;
  min-height: var(--dash-input-h);
  margin: 0;
  padding: 0 12px !important;
  line-height: calc(var(--dash-input-h) - 2px);
  border-right: 0;
  border-radius: 8px 0 0 8px !important;
  box-shadow: none !important;
  box-sizing: border-box;
}

.dash-copy .form-control:focus {
  z-index: 1;
  box-shadow: none !important;
}

.dash-copy .dash-copy__btn {
  flex: 0 0 var(--dash-input-h);
  width: var(--dash-input-h);
  height: var(--dash-input-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--dash-border);
  border-radius: 0 8px 8px 0;
  background: #f7fafc;
  color: var(--dash-primary-dark);
  font-size: 13px;
  line-height: 1;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.dash-copy .dash-copy__btn:hover,
.dash-copy .dash-copy__btn:focus {
  background: var(--dash-soft);
  border-color: var(--dash-primary);
  color: var(--dash-primary-dark);
  outline: 0;
}

.dash-copy .dash-copy__btn.is-copied {
  background: #e8f6ee;
  border-color: #2e8b57;
  color: #1e7a4a;
}

.dash-msg {
  min-height: 18px;
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #c0392b;
}

.dash-ranking {
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.dash-page .cardVendedor,
.dash-seller {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dash-page .cardVendedor:last-child,
.dash-seller:last-child {
  margin-bottom: 0;
}

.dash-page .cardVendedor:hover,
.dash-seller:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 194, 224, 0.45);
  box-shadow: 0 8px 18px rgba(15, 58, 87, 0.1);
}

.dash-seller__rank {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dash-soft);
  color: var(--dash-primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.dash-seller__rank--1 {
  background: #f6e7b2;
  color: #8a6508;
}

.dash-seller__rank--2 {
  background: #e4e9ee;
  color: #5b6772;
}

.dash-seller__rank--3 {
  background: #f0d8c2;
  color: #8a4e1c;
}

.dash-page .cardVendedor img,
.dash-seller img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e8eef3;
}

.dash-seller__info {
  min-width: 0;
  flex: 1 1 auto;
}

.dash-page .cardVendedor h4,
.dash-seller__info h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--dash-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-seller__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.dash-seller__metric {
  font-size: 11px;
  color: var(--dash-muted);
}

.dash-seller__metric b {
  color: var(--dash-text);
  font-weight: 700;
}

.dash-seller__metric--money {
  color: #1e7a4a;
}

.dash-seller__metric--money b {
  color: #1e7a4a;
}

.dash-page .progress {
  height: 6px;
  margin: 0;
  background: #eef3f7;
  border-radius: 999px;
  box-shadow: none;
}

.dash-page .progress-bar {
  background: linear-gradient(90deg, var(--dash-primary) 0%, var(--dash-cyan) 100%);
  border-radius: 999px;
}

.dash-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--dash-muted);
}

.dash-empty i {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
  color: #b7c6d1;
}

.dash-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--dash-navy);
}

@media (max-width: 767px) {
  .dash-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .dash-hero h2 {
    white-space: normal;
  }

  .dash-hero__date {
    text-align: left;
    min-width: 0;
  }

  .dash-search #btnValidarDniRuc {
    padding: 0 14px;
  }

  .dash-card__foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-card__foot-total {
    align-items: flex-start;
  }
}

/* ---------- Perfil de usuario ---------- */
.up-page .form-control {
  text-transform: none;
}

.up-identity {
  padding: 22px 18px 16px;
  text-align: center;
}

.up-identity__photo {
  margin-bottom: 14px;
}

.up-avatar {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 auto 12px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #d7eef4;
  background: var(--dash-soft);
  box-shadow: 0 8px 18px rgba(15, 58, 87, 0.1);
}

.up-photo-pick {
  position: relative;
}

.up-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  display: none !important;
}

.up-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 148px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--dash-primary-dark);
  border-radius: 8px;
  background: var(--dash-primary-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.up-photo-btn:hover,
.up-photo-btn:focus {
  background: #124a6c;
  border-color: #124a6c;
  color: #fff;
}

.up-photo-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--dash-muted);
}

.up-photo-name {
  display: none;
  margin: 8px auto 0;
  max-width: 220px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--dash-soft);
  color: var(--dash-primary-dark);
  font-size: 11px;
  font-weight: 600;
  word-break: break-all;
}

.up-photo-name.is-on {
  display: inline-block;
}

.up-identity__meta .up-kicker {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dash-primary);
}

.up-identity__meta h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--dash-navy);
}

.up-identity__meta p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--dash-muted);
}

.up-facts {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
  border-top: 1px solid #e8eef3;
}

.up-facts li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid #eef3f6;
}

.up-facts li span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dash-muted);
}

.up-facts li strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--dash-navy);
  text-align: right;
}

.up-textarea.form-control {
  height: auto !important;
  min-height: 64px;
  padding: 8px 12px !important;
  line-height: 1.4;
  resize: vertical;
}

.up-pass {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.up-pass .form-control {
  flex: 1 1 auto;
  width: 1% !important;
  min-width: 0;
  border-right: 0;
  border-radius: 8px 0 0 8px !important;
}

.up-pass__btn {
  flex: 0 0 var(--dash-input-h);
  width: var(--dash-input-h);
  height: var(--dash-input-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--dash-border);
  border-radius: 0 8px 8px 0;
  background: #f7fafc;
  color: var(--dash-primary-dark);
  cursor: pointer;
}

.up-pass__btn:hover,
.up-pass__btn:focus {
  background: var(--dash-soft);
  border-color: var(--dash-primary);
  outline: 0;
}

.up-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}

.up-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 18px;
  border: 1px solid var(--dash-primary-dark);
  border-radius: 8px;
  background: var(--dash-primary-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.up-save:hover,
.up-save:focus {
  background: #124a6c;
  border-color: #124a6c;
  color: #fff;
}

.up-save.is-loading,
.up-save[disabled] {
  opacity: 0.75;
  pointer-events: none;
}

.up-cancel {
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: #fff;
  color: var(--dash-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 34px;
}

.up-cancel:hover,
.up-cancel:focus {
  background: #f7fafc;
  color: var(--dash-navy);
}

@media (max-width: 767px) {
  .up-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .up-save,
  .up-cancel {
    width: 100%;
    text-align: center;
  }
}

