/* ---- Umhlakasi Portal Styling ---- */
.umh-container {
  max-width: 420px;
  margin: 20px auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}
/* Mobile adjustments */
@media (max-width: 600px) {
  .umh-container {
    padding-left: 10px; /* ~50% less horizontal padding */
    padding-right: 10px;
    font-size: 16px; /* ~+15% */
  }
}
/* Desktop adjustments */
@media (min-width: 1024px) {
  .umh-container {
    max-width: 840px; /* ~100% wider */
    font-size: 18px; /* ~+50% */
  }
}
.umh-header {
  text-align: center;
  margin-bottom: 20px;
}
.umh-header h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #262626;
}
.umh-description {
  margin-top: 6px;
  font-size: 14px;
  color: #6a6a6a;
  text-align: center;
}
.umh-form-group {
  margin-bottom: 18px;
}
.umh-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}
.umh-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: 0.2s ease-in-out;
}
.umh-input:focus {
  border-color: #0085ff;
  box-shadow: 0 0 0 3px rgba(0, 133, 255, 0.15);
  outline: none;
}
.umh-button-primary {
  width: 100%;
  background: #0085ff;
  color: #fff;
  padding: 12px;
  border: none;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.umh-button-primary:hover {
  background: #0071d4;
}
.umh-button-secondary {
  width: 100%;
  background: #f0f0f0;
  color: #333;
  padding: 12px;
  border: none;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
  transition: 0.2s;
}
.umh-button-secondary:hover {
  background: #e2e2e2;
}
.umh-alert-error {
  padding: 12px 15px;
  background: #ffe6e6;
  border-left: 4px solid #e20000;
  margin-bottom: 20px;
  border-radius: 6px;
  color: #8a0000;
  font-size: 14px;
}
.umh-alert-success {
  padding: 12px 15px;
  background: #e7ffe6;
  border-left: 4px solid #1f8f35;
  margin-bottom: 20px;
  border-radius: 6px;
  color: #1b6628;
  font-size: 14px;
}
.umh-forgot-pin {
  margin-top: 25px;
  text-align: center;
  font-size: 14px;
}
.umh-forgot-pin p {
  margin: 5px 0;
}
.umh-divider {
  margin: 30px 0;
  text-align: center;
  font-size: 14px;
  color: #a0a0a0;
}
.umh-divider:before, .umh-divider:after {
  content: "";
  display: inline-block;
  width: 40%;
  height: 1px;
  background: #ddd;
  vertical-align: middle;
}
.umh-divider:before {
  margin-right: 10px;
}
.umh-divider:after {
  margin-left: 10px;
}
/* ---- Dashboard extras ---- */
.umh-dashboard-header h2 {
  font-size: 24px;
}
.umh-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid #e4e4e4;
  margin-bottom: 18px;
}
.umh-card-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: #333;
}
.umh-card-body p {
  margin: 4px 0;
  font-size: 14px;
  color: #444;
}
.umh-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 600px) {
  .umh-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.umh-quick-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  text-align: left;
  transition: box-shadow 0.15s ease, transform 0.05s ease, border-color 0.15s ease;
}
/* Disabled state only */
.umh-quick-action[disabled], .umh-quick-action.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}
.umh-quick-action span {
  font-size: 14px;
  font-weight: 600;
  color: #222;
}
.umh-quick-action small {
  font-size: 12px;
  color: #777;
  margin-top: 3px;
}
.umh-quick-action:not(:disabled):hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}
.umh-inline-form {
  margin-top: 10px;
}
/* ---- Modal & stepper ---- */
.umh-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.umh-modal.is-visible {
  display: flex;
}
.umh-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.umh-modal-dialog {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  margin: 0 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  z-index: 1;
  max-height: 90vh; /* NEW: limit to viewport */
  overflow-y: auto; /* NEW: scroll inside */
}
.umh-modal-header {
  padding: 10px 14px;
  border-bottom: 1px solid #e1e1e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9fafb;
}
.umh-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}
.umh-modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  color: #888;
}
.umh-modal-close:hover {
  color: #444;
}
.umh-modal-body {
  padding: 14px 16px;
  background: #fdfdfd;
}
/* CSS for meter and token list */
.umh-meter-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.umh-meter-btn {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.umh-meter-btn:hover {
  border-color: #0085ff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.umh-tokens-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.umh-token-item {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e1e1e1;
  background: #fff;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 13px;
  margin-bottom: 4px;
}
.umh-token-item.is-latest {
  border-color: #0085ff;
  background: #f5f9ff;
}
/* Steps */
.umh-step-header {
  margin-bottom: 8px;
}
.umh-step-indicator {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
}
.umh-step-title {
  font-size: 15px;
  font-weight: 600;
  margin-top: 2px;
  margin-bottom: 6px;
  color: #222;
}
.umh-step-message {
  margin-top: 10px;
  font-size: 13px;
  border-radius: 6px;
  padding: 8px 10px;
  background: #f3f6fb;
  border: 1px solid #d2deff;
  color: #1b3a6f;
  display: none;
}
/* Error variant */
.umh-step-message.umh-error {
  background: #ffebee;
  border-color: #ef9a9a;
  color: #b71c1c;
}
/* Loading spinner variant */
.umh-step-message.is-loading {
  position: relative;
  padding-left: 26px;
}
.umh-step-message.is-loading::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid rgba(0, 133, 255, 0.25);
  border-top-color: #0085ff;
  animation: umh-spin 0.7s linear infinite;
}
@keyframes umh-spin {
  to {
    transform: rotate(360deg);
  }
}
.umh-amount-options {
  margin: 10px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.umh-option-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d9d9d9;
  background: #ffffff;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.umh-option-btn:hover {
  border-color: #0085ff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.umh-option-btn.is-selected {
  border-color: #0085ff;
  box-shadow: 0 0 0 2px rgba(0, 133, 255, 0.2);
}
.umh-option-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  border-color: #dddddd;
}
.umh-option-btn.is-disabled:hover {
  border-color: #dddddd;
  box-shadow: none;
  transform: none;
}
.umh-token-box {
  padding: 12px;
  border: 1px dashed #0085ff;
  border-radius: 8px;
  font-family: monospace;
  font-size: 16px;
  text-align: center;
  background: #f5f9ff;
}
/* ---- Balance & history lists ---- */
.umh-list {
  margin-top: 10px;
}
.umh-list-item {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e3e3e3;
  background: #fff;
  font-size: 13px;
  margin-bottom: 6px;
}
.umh-list-meta {
  font-size: 11px;
  color: #777;
}
.umh-history-list {
  margin-top: 10px;
}
.umh-history-item {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e3e3e3;
  background: #fff;
  font-size: 13px;
  margin-bottom: 6px;
}
.umh-history-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.umh-history-amount {
  font-weight: 600;
}
.umh-history-type {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f0f0f0;
  color: #555;
}
.umh-history-meta {
  font-size: 11px;
  color: #777;
  margin-top: 4px;
}