:root {
  --portal-bg: #fcfcfc;
  --portal-card-radius: 20px;
  --portal-accent: #FED351;
  --portal-text: #171717;
  --portal-muted: #6c757d;
}

html, body {
  min-height: 100%;
}

body.portal-bg {
  background: var(--portal-bg);
  color: var(--portal-text);
}

.portal-shell {
  width: 100%;
  max-width: 520px;
}

.portal-card,
.portal-feature-card {
  border-radius: var(--portal-card-radius);
}

.portal-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--portal-accent);
  color: #111;
  font-size: 1.75rem;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.portal-brand-icon,
.portal-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(254, 211, 81, .35);
  font-size: 1.2rem;
}

.portal-step-kicker {
  display: inline-flex;
  margin-bottom: .75rem;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: #f1f3f5;
  color: #6c757d;
  font-size: .75rem;
  font-weight: 600;
}

.btn-primary {
  --bs-btn-color: #111;
  --bs-btn-bg: var(--portal-accent);
  --bs-btn-border-color: var(--portal-accent);
  --bs-btn-hover-color: #111;
  --bs-btn-hover-bg: #f4c73e;
  --bs-btn-hover-border-color: #f4c73e;
  --bs-btn-active-color: #111;
  --bs-btn-active-bg: #eebf31;
  --bs-btn-active-border-color: #eebf31;
  font-weight: 600;
}

.form-control {
  min-height: 52px;
  border-radius: 12px;
}

.portal-phone-list {
  display: grid;
  gap: .75rem;
}

.portal-phone-option {
  position: relative;
}

.portal-phone-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.portal-phone-option label {
  display: block;
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 14px;
  padding: 1rem;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.portal-phone-option input:checked + label {
  border-color: #c6a126;
  box-shadow: 0 0 0 3px rgba(254, 211, 81, .28);
  background: #fffdf5;
}

.portal-phone-number {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.portal-pin-input {
  text-align: center;
  letter-spacing: .4em;
  font-size: 1.45rem;
  font-weight: 700;
}

.portal-loading {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
}

.portal-feature-card {
  transition: transform .15s ease;
}

@media (hover: hover) {
  .portal-feature-card:hover {
    transform: translateY(-2px);
  }
}

@media (min-width: 768px) {
  .portal-shell {
    max-width: 560px;
  }
}

.portal-email-value {
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 14px;
  background: #fffdf5;
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.portal-scope-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: #f1f3f5;
  color: #495057;
  font-size: .78rem;
  font-weight: 600;
}

/* --- Ügyféladatok oldal --- */
.portal-data-card {
  border-radius: 18px;
}

.portal-data-card .form-label {
  font-size: .875rem;
  font-weight: 600;
}

.portal-page-loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(245, 246, 248, .72);
  backdrop-filter: blur(2px);
  z-index: 1090;
}

.portal-page-loading.d-none {
  display: none !important;
}

.min-w-0 {
  min-width: 0;
}

@media (max-width: 575.98px) {
  .portal-data-card .card-body {
    padding: 1.15rem !important;
  }
}


/* =========================================================
   Dokumentumok
   ========================================================= */
.document-page {
  max-width: 1100px;
}

.document-order-list {
  display: grid;
  gap: 1rem;
}

.document-order-card {
  overflow: hidden;
}

.document-types-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
}

.document-types-grid.single {
  grid-template-columns: 1fr;
}

.document-type-box {
  min-width: 0;
  border: 1px solid #e9ecef;
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
}

.document-type-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

.document-file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .7rem 0;
  border-top: 1px solid #f1f3f5;
}

.document-file-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.document-file-row:last-child {
  padding-bottom: 0;
}

.document-missing {
  min-height: 62px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.portal-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(254, 211, 81, .28);
  font-size: 1.5rem;
}

.document-viewer-page {
  overflow: hidden;
}

.document-viewer-shell {
  height: calc(100vh - 57px);
  background: #343a40;
}

.document-viewer-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@media (min-width: 768px) {
  .document-types-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
