/* Account-only styles: shared navigation and masthead are intentionally untouched. */
.account-page {
    color: var(--pf-ink, #16181d);
    font-family: var(--pf-body, 'Tajawal', sans-serif);
    font-size: 16px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.account-page *,
.account-page *::before,
.account-page *::after { box-sizing: border-box; }

.account-page h1,
.account-page h2,
.account-page p,
.account-page dl,
.account-page dd { margin: 0; }

.account-auth {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 48px 24px;
    background: var(--pf-paper, #f6f6f4);
    border-block-start: 4px solid var(--pf-ink, #16181d);
}

.account-auth-layout {
    width: 100%;
    max-width: 980px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    align-items: center;
    gap: 72px;
}

.account-intro { min-width: 0; }
.account-eyebrow {
    color: var(--pf-gold-ink, #8a6a1f);
    font-size: 14px;
    font-weight: 700;
}

.account-page .account-wordmark {
    margin-block: 14px 22px;
    font-family: var(--pf-disp, 'Aref Ruqaa', serif);
    font-size: 52px;
    line-height: 1.6;
}

.account-intro-copy { color: var(--pf-muted, #6b6256); }
.account-intro .account-link { margin-block-start: 24px; }

.account-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding-block: 8px;
    color: var(--pf-ink, #16181d);
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-color: var(--pf-accent, #e0b352);
}

.account-link:hover { text-decoration-color: currentColor; }
.account-panel {
    min-width: 0;
    padding: 36px;
    background: #fdfcf9;
    border: 1px solid var(--pf-line, #e6e2d8);
    border-block-start: 3px solid var(--pf-accent, #e0b352);
    border-radius: 4px;
}

.account-section-heading { margin-block-end: 28px; }
.account-title {
    font-family: var(--pf-head, 'Tajawal', sans-serif);
    font-size: 30px;
    line-height: 1.5;
    font-weight: 800;
}

.account-section-heading .account-title,
.account-profile-heading .account-title { margin-block: 6px 8px; }
.account-copy { color: var(--pf-muted, #6b6256); max-width: 65ch; }
.account-form { display: grid; gap: 22px; }
.account-field { min-width: 0; }
.account-field > label {
    display: block;
    margin-block-end: 7px;
    font-size: 16px;
    font-weight: 700;
}

.account-label-note { color: var(--pf-muted, #6b6256); font-size: 14px; font-weight: 400; }
.account-input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #a9a397;
    border-radius: 5px;
    background: #fdfcf9;
    color: var(--pf-ink, #16181d);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
}

.account-input::placeholder { color: #766f64; opacity: 1; }
.account-input:hover { border-color: var(--pf-muted, #6b6256); }
.account-page :is(input, button, a):focus-visible {
    outline: 2px solid var(--pf-ink, #16181d);
    outline-offset: 3px;
}

.account-input:focus { border-color: var(--pf-ink, #16181d); }
.account-input:user-invalid { border-color: #a12c37; }
.account-password { display: flex; align-items: center; gap: 8px; }
.account-password .account-input { flex: 1; }
.account-password-toggle {
    flex: 0 0 auto;
    min-width: 52px;
    min-height: 48px;
    padding: 8px;
    border: 1px solid var(--pf-line, #e6e2d8);
    border-radius: 5px;
    background: transparent;
    color: var(--pf-ink, #16181d);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.account-password-toggle:hover { background: #eeeae1; }
.account-help { color: var(--pf-muted, #6b6256); font-size: 14px; line-height: 1.7; }
.account-field .account-help { margin-block-start: 7px; }
.account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 24px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.account-button-primary { background: var(--pf-ink, #16181d); color: #f6f6f4; }
.account-button-primary:hover { background: #303238; }
.account-button-primary:active { background: #43454b; }
.account-panel > .account-button { width: 100%; }
.account-support {
    margin-block-start: 28px;
    padding-block-start: 22px;
    border-block-start: 1px solid var(--pf-line, #e6e2d8);
    color: var(--pf-muted, #6b6256);
    font-size: 14px;
}

.account-support p + p { margin-block-start: 12px; }
.account-support strong { color: var(--pf-ink, #16181d); font-weight: 700; }
.account-notice {
    margin-block-end: 24px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 5px;
    font-size: 16px;
}

.account-notice-error { background: #fbf1ef; border-color: #ddada9; color: #942934; }
.account-notice-success { background: #edf2e9; border-color: #b4c5a9; color: #365c30; }
.account-invite-identity {
    margin-block-end: 26px;
    padding-block: 16px;
    border-block: 1px solid var(--pf-line, #e6e2d8);
}

.account-person-name { font-size: 25px; font-weight: 800; line-height: 1.6; }
.account-page .account-recovery-copy { margin-block-end: 24px; }
.account-page .account-after-action { margin-block-start: 16px; }

.account-profile { padding-block: 36px 64px; }
.account-profile-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 32px;
    padding-block-end: 28px;
    margin-block-end: 32px;
    border-block-end: 1px solid var(--pf-line, #e6e2d8);
}

.account-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 56px;
    align-items: start;
}

.account-identity { min-width: 0; }
.account-identity-top { display: flex; flex-direction: column; gap: 16px; }
.account-identity-name { min-width: 0; }
.account-avatar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border: 1px solid var(--pf-line, #e6e2d8);
    border-radius: 8px;
    overflow: hidden;
    background: #ece7da;
    color: var(--pf-ink, #16181d);
    font-size: 32px;
    font-weight: 700;
}

.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-completion { margin-block: 28px; }
.account-completion-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.account-completion-track { height: 6px; margin-block: 8px 12px; overflow: hidden; border-radius: 3px; background: #e6e2d8; }
.account-completion-fill { height: 100%; background: var(--pf-accent, #e0b352); }
.account-completion-fill.bg-green-500 { background: #527345; }
.account-completion-fill.bg-amber-400 { background: var(--pf-accent, #e0b352); }
.account-page .account-details { padding-block: 20px 8px; border-block-start: 1px solid var(--pf-line, #e6e2d8); }
.account-details dt { color: var(--pf-muted, #6b6256); font-size: 14px; }
.account-details dd { font-size: 16px; font-weight: 700; }
.account-profile-form { min-width: 0; }
.account-edit-section { padding-block: 28px; border-block-end: 1px solid var(--pf-line, #e6e2d8); }
.account-edit-section:first-of-type { padding-block-start: 0; }
.account-edit-heading { margin-block-end: 20px; }
.account-section-title { font-size: 21px; font-weight: 800; line-height: 1.6; }
.account-edit-heading .account-help { margin-block-start: 4px; }
.account-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.account-field-wide { grid-column: 1 / -1; }
.account-file { padding: 6px; }
.account-file::file-selector-button {
    min-height: 44px;
    margin-inline-end: 12px;
    padding: 8px 14px;
    border: 0;
    border-radius: 3px;
    background: #ece7da;
    color: var(--pf-ink, #16181d);
    font: inherit;
    cursor: pointer;
}

.account-file::file-selector-button:hover { background: #e3dac7; }
.account-file-name { overflow-wrap: anywhere; }
.account-save-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-block-start: 24px; }
.account-empty { max-width: 680px; padding-block: 8px 24px; }
.account-empty .account-section-title { margin-block: 8px 12px; }
.account-empty .account-copy + .account-copy { margin-block-start: 12px; }
.account-empty .account-details { margin-block: 24px; }

@media (max-width: 760px) {
    .account-auth { padding: 28px 20px 40px; }
    .account-auth-layout { max-width: 480px; grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .account-page .account-wordmark { font-size: 36px; margin-block: 4px 8px; }
    .account-intro .account-link { margin-block-start: 8px; }
    .account-panel { padding: 28px; }
    .account-profile-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .account-identity { padding-block-end: 28px; border-block-end: 1px solid var(--pf-line, #e6e2d8); }
    .account-identity-top { flex-direction: row; align-items: center; }
    .account-completion { max-width: 440px; margin-block: 20px; }
}

@media (max-width: 420px) {
    .account-auth { padding-inline: 16px; }
    .account-panel { padding: 24px 18px; }
    .account-title { font-size: 26px; }
    .account-profile { padding-block-start: 24px; }
    .account-profile-heading { margin-block-end: 24px; padding-block-end: 20px; }
    .account-fields-grid { grid-template-columns: minmax(0, 1fr); }
    .account-identity-top { align-items: flex-start; }
    .account-avatar { width: 64px; height: 64px; }
    .account-save-row .account-button { width: 100%; }
}
