/* Mjedisi authentication and account design */
:root {
  --ink: #14212b; --muted: #55697a; --bg: #f4f6f8; --surface: #fff; --surface-2: #eef2f5;
  --border: #d9e0e6; --primary: #1c6091; --primary-strong: #114a73; --primary-tint: #e7f0f6;
  --teal: #2e7d6b; --teal-tint: #e4f0ec; --danger: #b5342a; --danger-tint: #f7e7e5;
  --focus: #e8a317; --on-primary: #fff;
  --st-received: #64748b; --st-review: #1c6091; --st-info: #b7791f; --st-forwarded: #2e7d6b;
  --st-progress: #5b5bd6; --st-completed: #2f855a; --st-closed: #6b7280;
  --shadow-sm: 0 1px 2px rgba(20,33,43,.06), 0 1px 3px rgba(20,33,43,.05);
  --shadow-md: 0 4px 12px rgba(20,33,43,.08), 0 2px 4px rgba(20,33,43,.05);
  --radius: 10px; --radius-sm: 7px; --maxw: 1120px;
  --serif: Georgia, "Times New Roman", "EB Garamond", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Lato", Helvetica, Arial, sans-serif;
  --step-1: clamp(.78rem, .76rem + .1vw, .84rem);
  --step0: 1rem; --step1: 1.15rem;
  --step2: clamp(1.35rem, 1.25rem + .5vw, 1.6rem);
  --step3: clamp(1.7rem, 1.5rem + 1vw, 2.2rem);
  --step4: clamp(2.1rem, 1.7rem + 2vw, 3rem);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7edf2; --muted: #9db2c0; --bg: #0e1922; --surface: #16242f; --surface-2: #1d3040;
    --border: #2a3f4e; --primary: #4fa3d1; --primary-strong: #7bc0e4; --primary-tint: #173141;
    --teal: #5fb39f; --teal-tint: #173029; --danger: #e27a70; --danger-tint: #33201e;
    --focus: #f2b84b; --on-primary: #0b1620;
    --st-received: #94a3b8; --st-review: #4fa3d1; --st-info: #e0b15c; --st-forwarded: #5fb39f;
    --st-progress: #9b9bf0; --st-completed: #68c68f; --st-closed: #94a3b8;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow-md: 0 6px 18px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --ink: #e7edf2; --muted: #9db2c0; --bg: #0e1922; --surface: #16242f; --surface-2: #1d3040;
  --border: #2a3f4e; --primary: #4fa3d1; --primary-strong: #7bc0e4; --primary-tint: #173141;
  --teal: #5fb39f; --teal-tint: #173029; --danger: #e27a70; --danger-tint: #33201e;
  --focus: #f2b84b; --on-primary: #0b1620;
  --st-received: #94a3b8; --st-review: #4fa3d1; --st-info: #e0b15c; --st-forwarded: #5fb39f;
  --st-progress: #9b9bf0; --st-completed: #68c68f; --st-closed: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow-md: 0 6px 18px rgba(0,0,0,.4);
}
:root[data-theme="light"] {
  --ink: #14212b; --muted: #55697a; --bg: #f4f6f8; --surface: #fff; --surface-2: #eef2f5;
  --border: #d9e0e6; --primary: #1c6091; --primary-strong: #114a73; --primary-tint: #e7f0f6;
  --teal: #2e7d6b; --teal-tint: #e4f0ec; --danger: #b5342a; --danger-tint: #f7e7e5;
  --focus: #e8a317; --on-primary: #fff;
  --st-received: #64748b; --st-review: #1c6091; --st-info: #b7791f; --st-forwarded: #2e7d6b;
  --st-progress: #5b5bd6; --st-completed: #2f855a; --st-closed: #6b7280;
  --shadow-sm: 0 1px 2px rgba(20,33,43,.06), 0 1px 3px rgba(20,33,43,.05);
  --shadow-md: 0 4px 12px rgba(20,33,43,.08), 0 2px 4px rgba(20,33,43,.05);
}


body.login {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.6;
    min-height: 100vh;
}
body.login #login {
    width: min(430px, calc(100% - 32px));
    padding-top: clamp(28px, 7vh, 72px);
}
body.login #login h1 a {
    background-image: none;
    text-indent: 0;
    width: auto;
    height: auto;
    margin-bottom: 24px;
    color: var(--primary);
    font-family: var(--serif);
    font-size: 28px;
    line-height: 1.3;
    text-decoration: none;
}
body.login #login form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: clamp(20px, 5vw, 32px);
    margin-top: 16px;
}
body.login #login label {
    color: var(--ink);
    font-weight: 600;
}
body.login #login .input,
body.login #login input[type="text"],
body.login #login input[type="email"],
body.login #login input[type="password"] {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-family: var(--sans);
    font-size: 17px;
    box-shadow: none;
}
body.login #login input.password-input { padding-right: 42px; }
body.login #login .button-primary {
    background: var(--primary);
    color: var(--on-primary);
    border: 0;
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    font-family: var(--sans);
    font-weight: 600;
    box-shadow: none;
}
body.login #login .button-primary:hover { background: var(--primary-strong); }
body.login #login .wp-hide-pw { color: var(--primary); }
body.login #login .message,
body.login #login .success,
body.login #login #login_error,
body.login #login .notice {
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border-left-color: var(--primary);
}
body.login #login #login_error,
body.login #login .notice-error { border-left-color: var(--danger); }
body.login #login .description,
body.login #login .indicator-hint { color: var(--muted); }
body.login #nav, body.login #backtoblog { text-align: center; }
body.login #nav a, body.login #backtoblog a,
body.login .privacy-policy-link { color: var(--primary); }
body.login #login a:focus-visible,
body.login #login input:focus-visible,
body.login #login button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.ael-cm-account-card {
    margin: 0 0 24px;
    padding: clamp(18px, 3vw, 28px);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--sans);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.ael-cm-account-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
}
.ael-cm-account-caption {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}
.ael-cm-account-heading h2 {
    margin: 0;
    font-size: clamp(20px, 3vw, 26px);
    color: var(--primary);
    overflow-wrap: anywhere;
}
.ael-cm-account-security {
    padding: 6px 12px;
    background: var(--teal-tint);
    color: var(--teal);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
}
.ael-cm-account-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 22px 0;
}
.ael-cm-account-fields dt { font-size: 13px; color: var(--muted); }
.ael-cm-account-fields dd {
    margin: 4px 0 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.ael-cm-account-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.ael-cm-account-card .ael-cm-account-button {
    display: inline-block;
    padding: 10px 18px;
    background: var(--primary);
    color: var(--on-primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.ael-cm-account-card .ael-cm-account-button-secondary {
    background: var(--surface);
    color: var(--primary);
    border-color: var(--border);
}
.ael-cm-account-card .ael-cm-account-button:hover {
    background: var(--primary-strong);
    color: var(--on-primary);
}
.ael-cm-account-card a:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}
@media (max-width: 640px) {
    .ael-cm-account-fields { grid-template-columns: 1fr; gap: 14px; }
    .ael-cm-account-actions { justify-content: flex-start; }
}


/* Private profile photographs */
.ael-cm-account-identity { display: flex; align-items: center; gap: 18px; min-width: 0; }
.ael-cm-account-identity > div { min-width: 0; }
.ael-cm-profile-avatar {
    flex: 0 0 88px; width: 88px; height: 88px;
    border-radius: 50%; object-fit: cover;
    border: 2px solid var(--border); box-sizing: border-box;
}
.ael-cm-profile-initials {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary-tint); color: var(--primary);
    font-size: 28px; font-weight: 700;
}
.ael-cm-photo-controls { margin-top: 18px; }
.ael-cm-photo-controls summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.ael-cm-photo-controls p { color: var(--muted); font-size: 14px; }
.ael-cm-photo-controls form { display: flex; align-items: flex-start; flex-direction: column; gap: 12px; margin-top: 14px; }
.ael-cm-photo-controls input[type="file"] { max-width: 100%; font: inherit; color: var(--ink); }
.ael-cm-photo-controls button { font: inherit; cursor: pointer; }
.ael-cm-photo-notice { padding: 14px 18px; background: var(--primary-tint); border-radius: var(--radius-sm); }
@media (max-width: 480px) {
    .ael-cm-profile-avatar { width: 64px; height: 64px; flex-basis: 64px; }
    .ael-cm-profile-initials { font-size: 22px; }
    .ael-cm-account-identity { gap: 12px; }
}


/* Self-service profile details */
.ael-cm-profile-details { margin-top: 16px; }
.ael-cm-profile-details summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.ael-cm-profile-details form { margin-top: 18px; }
.ael-cm-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.ael-cm-profile-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 600; }
.ael-cm-profile-grid input {
    width: 100%; box-sizing: border-box; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink); font: inherit;
}
.ael-cm-profile-grid input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ael-cm-profile-details form > p { color: var(--muted); font-size: 14px; }
.ael-cm-profile-details button { font: inherit; cursor: pointer; }
.ael-cm-profile-notice { padding: 14px 18px; background: var(--primary-tint); border-radius: var(--radius-sm); }
@media (max-width: 640px) {
    .ael-cm-profile-grid { grid-template-columns: 1fr; }
}


/* One profile form for photo and personal details */
.ael-cm-profile-photo-fields {
    margin: 0 0 22px; padding: 18px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); min-width: 0;
}
.ael-cm-profile-photo-fields legend { padding: 0 6px; font-weight: 600; }
.ael-cm-profile-photo-fields > label:not(.ael-cm-profile-remove-photo) {
    display: block; margin-bottom: 10px; font-weight: 600;
}
.ael-cm-profile-photo-fields input[type="file"] { max-width: 100%; font: inherit; color: var(--ink); }
.ael-cm-profile-photo-fields p { color: var(--muted); font-size: 14px; }
.ael-cm-profile-remove-photo { display: flex; align-items: center; gap: 10px; }
.ael-cm-profile-remove-photo input { flex: 0 0 auto; }
