/* PSN member portal (dashboard, password pages) — colours from the PSN membership portal */
:root {
    --navy: #1D3851;
    --teal: #45C0C9;
    --teal-dark: #3dadb7;
    --header: #00C6C9;
    --card: #41A0A4;
}

body { font-family: 'Inter', system-ui, sans-serif; background: #F4FBFF; color: #374151; display: flex; flex-direction: column; min-height: 100vh; }
.portal-bg { background: linear-gradient(90deg, #F4FBFF, #E0F7FA); flex: 1; }
.text-navy { color: var(--navy) !important; }
.text-teal { color: var(--teal) !important; }
.link-teal { color: var(--teal); cursor: pointer; text-decoration: underline; }

.btn-teal { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.btn-teal:hover, .btn-teal:focus { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn-teal:disabled { background: #A0D2E7; border-color: #A0D2E7; color: #fff; }

/* Header */
.portal-header { background: var(--header); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; flex-wrap: wrap; }
.portal-logo { height: 64px; width: auto; }
.portal-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.portal-nav a { color: #fff; text-decoration: none; font-weight: 500; }
.portal-nav a:hover, .portal-nav a.active { color: #dbeafe; }
.portal-nav .btn { color: #2563eb; }
@media (max-width: 575.98px) { .portal-logo { height: 48px; } .portal-nav { gap: 12px; font-size: 0.9rem; } }

.portal-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); }
.portal-soft { background: #F4FBFF; }
.portal-footer { background: #fff; text-align: center; padding: 14px 16px; font-size: 0.9rem; color: #6b7280; box-shadow: 0 -1px 3px rgba(0,0,0,.05); }
.portal-footer a { color: var(--teal); }

/* Avatar */
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid var(--teal); box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.avatar-empty { display: flex; align-items: center; justify-content: center; background: #e5e7eb; color: #6b7280; font-size: 2.2rem; }
.doc-icon { width: 96px; height: 96px; border-radius: 6px; background: #e5e7eb; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: #6b7280; }

/* Tabs */
.portal-tabs { display: flex; flex-wrap: wrap; gap: 4px 16px; border-bottom: 2px solid #e5e7eb; }
.portal-tabs > * { background: none; border: 0; border-bottom: 4px solid transparent; padding: 8px 16px; color: #6b7280; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; margin-bottom: -2px; }
.portal-tabs > *:hover { color: var(--teal); }
.portal-tabs > .active { border-bottom-color: var(--teal); color: var(--teal); font-weight: 600; }

.status-box { padding: 16px; background: #fef9c3; border: 1px solid #facc15; color: #a16207; border-radius: 6px; }

/* Form fields with leading icon */
.field label { display: block; color: var(--navy); font-weight: 600; margin-bottom: 8px; }
.field .wrap { position: relative; }
.field .wrap > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #9ca3af; pointer-events: none; }
.field .wrap > .lock { left: auto; right: 14px; }
.field .form-control, .field .form-select { padding: 12px 16px 12px 46px; border-color: #d1d5db; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.field .form-control:focus, .field .form-select:focus { border-color: var(--teal); box-shadow: 0 0 0 .2rem rgba(69,192,201,.35); }
.field .form-control:disabled, .field .form-select:disabled { background: #f3f4f6; cursor: not-allowed; }
.field.has-error .form-control, .field.has-error .form-select { border-color: #ef4444; }
.field-error { color: #ef4444; font-size: 0.875rem; margin: 4px 0 0; min-height: 0; }
.field-error:empty { display: none; }

.dropbox { border: 2px dashed #cbd5e1; border-radius: 8px; padding: 24px; text-align: center; color: #64748b; background: #fff; transition: .15s; }
.dropbox.drag { border-color: var(--teal); background: #ecfeff; }
.dropbox.busy { opacity: .6; pointer-events: none; }

/* State toggles */
body.is-finalized .editable-only { display: none !important; }
body:not(.is-finalized) .finalized-only { display: none !important; }

/* ID card */
.id-card { background: var(--card); border-radius: 12px; aspect-ratio: 1 / 1.588; padding: 24px; overflow: hidden; height: 100%; }
.id-photo { width: 144px; height: 144px; border-radius: 50%; overflow: hidden; border: 4px solid #fb923c; margin: 24px 0 20px; background: #fff; }
.id-photo img { width: 100%; height: 100%; object-fit: cover; }
.id-logo { width: 150px; height: 150px; object-fit: contain; margin-top: auto; }

/* Auth pages */
.auth-wrap { display: flex; flex: 1; flex-wrap: wrap; background: #fff; }
.auth-side { flex: 1 1 420px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 48px; padding: 48px 24px; }
.auth-side img { width: 50%; max-width: 280px; height: auto; }
.auth-main { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.auth-main .inner { width: 100%; max-width: 440px; }
