/* ══════════════════════════════════════
   STUDENT PORTAL — BASE
   ══════════════════════════════════════ */
.gh-portal-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 16px;
  font-family: inherit;
}

/* ── Form Fields ── */
.gh-field {
  margin-bottom: 16px;
}

.gh-field label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 13px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.gh-field input[type="text"],
.gh-field input[type="email"],
.gh-field input[type="password"],
.gh-field input[type="tel"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
  background: #f9fafb;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.gh-field input:focus {
  outline: none;
  border-color: #083882;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(8, 56, 130, 0.08);
}

.gh-field input[readonly] {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Two-column form grid */
.gh-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.gh-field-full {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .gh-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Buttons ── */
.gh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: #083882;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  text-decoration: none;
  line-height: 1.5;
}

.gh-btn:hover {
  background: #062d6b;
  box-shadow: 0 2px 8px rgba(8, 56, 130, 0.25);
}

.gh-btn:active {
  transform: scale(0.98);
}

.gh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.gh-btn-outline {
  background: #fff;
  color: #374151 !important;
  border: 1px solid #d1d5db;
}

.gh-btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827 !important;
  box-shadow: none;
}

.gh-btn-sm {
  padding: 8px 20px;
  font-size: 13px;
}

/* ── Messages ── */
.gh-message {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}

.gh-message-error {
  display: block;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.gh-message-success {
  display: block;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #86efac;
}

/* ── Login Form ── */
.gh-login-links {
  margin-top: 16px;
  font-size: 14px;
}

.gh-login-links a {
  color: #083882;
}

.gh-login-links a:hover {
  color: #062d6b;
  text-decoration: underline;
}


/* ══════════════════════════════════════
   PROFILE PAGE — READ-ONLY VIEW
   ══════════════════════════════════════ */

/* ── Hero: Avatar Card + Details Card ── */
.gh-hero {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .gh-hero {
    grid-template-columns: 1fr;
  }
}

/* Avatar card (left) */
.gh-hero-avatar-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 32px 20px 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
}

/* Details card (right) */
.gh-hero-details-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
}

/* ── Avatar with ring ── */
.gh-avatar-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, #083882, #3b82f6, #083882);
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(8, 56, 130, 0.2);
}

.gh-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #1e3a5f;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 3px solid #fff;
}

.gh-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gh-avatar-initials {
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

/* Profile name & role */
.gh-profile-name {
  margin: 0 0 2px !important;
  font-size: 20px !important;
  color: #111827 !important;
  font-weight: 700;
}

.gh-profile-role {
  margin: 0 0 16px;
  color: #083882;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Cards ── */
.gh-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
}

.gh-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.gh-card-title {
  margin: 0 0 20px !important;
  font-size: 14px !important;
  font-weight: 700;
  color: #111827 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gh-card-header-row .gh-card-title {
  margin-bottom: 0 !important;
}

/* ── Info Grid: 2-column ── */
.gh-info-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
}

.gh-info-cell-full {
  grid-column: 1 / -1;
}

@media (max-width: 500px) {
  .gh-info-grid-2col {
    grid-template-columns: 1fr;
  }
}

.gh-info-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gh-info-label {
  font-size: 12px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}

.gh-info-value {
  font-size: 15px;
  color: #111827;
  font-weight: 500;
}

/* ── Badge ── */
.gh-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gh-badge-f2f {
  background: #dbeafe;
  color: #1e40af;
}

.gh-badge-elearning {
  background: #dcfce7;
  color: #166534;
}

.gh-badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.gh-badge-approved {
  background: #d1fae5;
  color: #065f46;
}

.gh-badge-denied {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Notice ── */
.gh-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 20px 24px;
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.7;
}

.gh-notice strong {
  display: block;
  margin-bottom: 10px;
  color: #92400e;
  font-size: 14px;
}

.gh-notice ol {
  margin: 0;
  padding-left: 20px;
}

.gh-notice a {
  color: #083882;
  font-weight: 600;
}

/* ── Footer ── */
.gh-profile-footer {
  text-align: center;
  margin-top: 8px;
  padding-top: 20px;
}

.gh-logout-link {
  color: #9ca3af;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.gh-logout-link:hover {
  color: #dc2626;
}


/* ══════════════════════════════════════
   PROFILE PAGE — EDIT MODE
   ══════════════════════════════════════ */

.gh-edit-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.gh-avatar-ring-edit {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.gh-edit-title {
  margin: 0 !important;
  font-size: 22px !important;
  color: #111827 !important;
  font-weight: 700;
}

.gh-edit-subtitle {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: 14px;
}

/* Editable avatar */
.gh-avatar-editable {
  cursor: pointer;
  transition: opacity 0.2s;
}

.gh-avatar-editable:hover {
  opacity: 0.85;
}

.gh-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  color: #fff;
  border-radius: 50%;
}

.gh-avatar-editable:hover .gh-avatar-overlay {
  opacity: 1;
}

.gh-avatar-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Actions ── */
.gh-profile-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Hide login header button when logged in ── */
body.logged-in .ast-header-button-1 {
  display: none !important;
}
