/* ==========================================================================
   portal.css — User self-service portal styles (Glass & Light theme)
   ========================================================================== */

/* ── Portal brand icon (override green gradient) ─────────────────────── */
.portal-brand-icon svg {
  width: 24px;
  height: 24px;
}

/* ── Header ──────────────────────────────────────────────────────────── */
.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  margin: 1rem 1.5rem 0;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.portal-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-header-icon {
  display: flex;
  align-items: center;
}

.portal-header-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.portal-header-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  font-weight: 500;
}

.portal-header-text strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.portal-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-user-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--surface-hover);
  border-radius: var(--radius-full);
  color: var(--accent);
  font-weight: 500;
}

/* ── Main ────────────────────────────────────────────────────────────── */
.portal-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ── Stats ───────────────────────────────────────────────────────────── */
.portal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .portal-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .portal-stats {
    grid-template-columns: 1fr;
  }
  .portal-header {
    margin: 0.5rem;
    padding: 0.5rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  .portal-header-right {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ── Two-column grid ──────────────────────────────────────────────────── */
.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Section cards ────────────────────────────────────────────────────── */
.portal-section {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
}

.portal-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* ── Info list ────────────────────────────────────────────────────────── */
.portal-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.portal-info-row:last-child {
  border-bottom: none;
}

.portal-info-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.portal-info-value {
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 500;
  font-family: var(--font-mono);
}

/* ── Password change form ─────────────────────────────────────────────── */
.portal-pw-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.portal-pw-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.portal-pw-form .form-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.btn-full {
  width: 100%;
}

/* ── Shake animation (reused from login.css pattern) ─────────────────── */
.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ── Loading state ────────────────────────────────────────────────────── */
.loading-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}
