/* Login screen, Error page, Dashboard specific visual cards & PWA card. */

/* Login & Error centered screen (Innovalm ERP signature style) */
body.centrado {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(circle at 50% 16%, var(--primary-soft) 0%, var(--bg) 60%);
}
.login-topbar-theme {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
}
.login-wrap {
  display: grid;
  place-items: center;
  width: 100%;
}
.login-card {
  width: min(440px, 100%);
  padding: 34px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow-2);
}
.login-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding-bottom: 4px;
}
.login-brand-badge {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--primary-soft);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  box-shadow: var(--shadow-1);
}
.login-brand-badge img {
  border-radius: 12px;
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}
.login-brand-badge.has-custom-logo {
  width: auto;
  min-width: 72px;
  max-width: 240px;
  height: 78px;
  padding: 8px 14px;
  background: #FFFFFF;
}
.login-brand-badge.has-custom-logo img {
  width: auto;
  max-width: 210px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
}
.sidebar-brand img.is-custom-logo {
  width: auto;
  max-width: 44px;
  height: 36px;
  object-fit: contain;
  background: #FFFFFF;
  padding: 3px;
  border-radius: 8px;
}
.topbar-brand img.is-custom-logo {
  width: auto;
  max-width: 110px;
  height: 34px;
  object-fit: contain;
  background: #FFFFFF;
  padding: 2px 4px;
  border-radius: 6px;
}

/* Brand preview boxes on /configuracion */
.brand-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 560px) {
  .brand-preview-grid { grid-template-columns: 1fr; }
}
.brand-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 14px;
  border-radius: var(--radius-2);
  border: 1px solid var(--border);
  text-align: center;
}
.brand-preview-box.is-light {
  background: #F4F7FB;
  color: #0B1D33;
}
.brand-preview-box.is-dark {
  background: #0B1D33;
  color: #FFFFFF;
  border-color: #14305A;
}
.brand-preview-box small {
  font-size: .72rem;
  opacity: .78;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.brand-preview-img {
  max-width: 160px;
  max-height: 54px;
  object-fit: contain;
  border-radius: 8px;
  background: #FFFFFF;
  padding: 4px 6px;
}
.login-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.015em;
  margin: 0;
}
.login-sub {
  margin: 0;
  font-size: .88rem;
  color: var(--muted);
  font-weight: 500;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-form .input { min-height: 44px; padding: 10px 12px; }
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap .input { width: 100%; padding-right: 46px; }
.password-toggle {
  position: absolute;
  right: 4px;
  min-width: 36px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  color: var(--primary);
  background: var(--primary-soft);
}
.login-submit {
  width: 100%;
  min-height: 46px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  margin-top: 4px;
}
.login-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: .76rem;
  color: var(--muted);
  text-align: center;
}
.login-foot .icon { width: 15px; height: 15px; color: var(--success); flex: none; }
.login-brand-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--muted);
}
.login-brand-footer img {
  height: 20px;
  width: auto;
  background: #FFFFFF;
  border-radius: 4px;
  padding: 2px 6px;
}

/* Dashboard Account Balance Visual List */
.account-meter-list {
  display: flex;
  flex-direction: column;
}
.account-meter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}
.account-meter-item:last-child { border-bottom: 0; }
.account-meter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.account-meter-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  min-width: 0;
}
.account-meter-name .badge { font-weight: 600; }
.account-meter-amount {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Dashboard Recent Activity */
.activity-list > li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.activity-list > li:last-child { border-bottom: 0; }
.activity-dot {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-2);
  color: var(--primary);
}
.activity-dot.is-income { background: var(--success-soft); color: var(--success); }
.activity-dot.is-expense { background: var(--danger-soft); color: var(--danger); }
.activity-main { flex: 1; min-width: 0; }
.activity-title {
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-title:hover { color: var(--primary); text-decoration: underline; }
.activity-meta { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Alert items on Dashboard */
.alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.alert-row:last-child { border-bottom: 0; }
.alert-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.alert-head-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Device push card */
#avisos-dispositivo button:disabled { opacity: .6; cursor: wait; }
.push-status-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.push-status-text { flex: 1; min-width: 0; }
.push-status-text #avisos-estado { font-weight: 650; }

/* Flow pill for transfers */
.transfer-route {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 650;
}
.transfer-arrow {
  color: var(--primary);
  font-weight: 800;
}
