/* Shared workspace presentation for login, verification and password recovery. */
body.auth-page.auth-workspace-page {
  --brand: #cf421c;
  --brand-600: #b93717;
  --brand-700: #96290f;
  --ring: rgba(217, 70, 32, .18);
  --auth-ink: #172c45;
  --auth-muted: #637084;
  --auth-surface: #fcfbf8;
  --auth-field: #fff;
  --auth-border: #d5dbe2;
  --auth-soft: #f2f1ee;
  --auth-error: #b42318;
  --auth-symbol: #f9ece5;
  --auth-symbol-border: #efd5c7;
  --auth-symbol-ink: #b74725;
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  color: var(--auth-ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  color-scheme: light;
  background: var(--auth-surface);
}

.auth-page [hidden] { display: none !important; }

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

.auth-workspace-page .auth-shell.auth-workspace {
  display: grid;
  grid-template-columns: 55% 45%;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
  isolation: isolate;
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(32px, 3.4vw, 58px) clamp(32px, 4.4vw, 76px) 28px;
  color: #f3f6fc;
  background: #101e32;
}

.auth-story::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(ellipse at 36% 62%, rgba(40, 71, 101, .47), transparent 68%),
    linear-gradient(rgba(141, 183, 223, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 183, 223, .025) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
}

.auth-story-brand { position: relative; z-index: 2; width: fit-content; max-width: 100%; line-height: 0; }
.auth-story-brand.auth-brand-default { mix-blend-mode: screen; }
.auth-story-brand img { display: block; width: auto; height: auto; max-width: 200px; max-height: 56px; object-fit: contain; }
.auth-story-brand.auth-brand-default img { filter: grayscale(1) invert(1) brightness(1.6); mix-blend-mode: screen; }
.auth-story-brand.auth-brand-custom { padding: 9px 13px; border-radius: 9px; background: #fff; }
.auth-story-brand.auth-brand-custom img { max-width: 194px; max-height: 48px; }
.auth-story-intro { position: relative; z-index: 2; margin-top: clamp(40px, 6vh, 70px); }
.auth-story-eyebrow { display: flex; align-items: center; gap: 11px; color: #afbecf; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.auth-story-eyebrow > span { width: 26px; height: 2px; background: #f07b54; }
.auth-story-title { margin: 18px 0; color: #f4f5f7; font: 600 clamp(38px, 4vw, 62px)/1.12 Manrope, Inter, sans-serif; letter-spacing: -.045em; }
.auth-story-title em { color: #ff9d7a; font-style: normal; }
.auth-story-intro p { max-width: 440px; margin: 0; color: #b9c7d8; font-size: 14px; line-height: 1.75; }

.auth-story-scene { position: relative; display: grid; flex: 1; place-items: center; min-height: 310px; margin: 8px -30px 0; }
.auth-story-scene picture { position: absolute; inset: 0; display: block; pointer-events: none; }
.auth-story-illustration { position: absolute; inset: 0; display: block; width: 112%; height: 100%; max-width: none; margin: auto; object-fit: contain; mix-blend-mode: lighten; -webkit-mask-image: radial-gradient(ellipse 61% 60% at 50% 50%, #000 55%, transparent 92%); mask-image: radial-gradient(ellipse 61% 60% at 50% 50%, #000 55%, transparent 92%); }
.auth-scene-label { position: absolute; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border: 1px solid rgba(169, 190, 214, .19); border-radius: 13px; background: #203047; box-shadow: 0 10px 28px rgba(5, 15, 33, .2); color: #f7f9fc; font-size: 13px; }
.auth-scene-label > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(243, 129, 89, .12); color: #ffa580; font-size: 17px; }
.auth-scene-clients { top: 39%; left: 2%; }
.auth-scene-projects { top: 12%; right: 2%; }
.auth-scene-time { right: 8%; bottom: 12%; }
.auth-story-footer { display: flex; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid rgba(169, 190, 214, .14); color: #a7b7cc; font-size: 11px; letter-spacing: .13em; }
.auth-story-footer > span:nth-child(2) { flex: 1; }
.auth-story-footer > span:last-child { letter-spacing: 0; }

.auth-access { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 28px clamp(28px, 3.5vw, 60px) 22px; background: var(--auth-surface); }
.auth-access-header { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-workspace-label { color: var(--auth-muted); font-size: 11px; font-weight: 600; letter-spacing: .15em; }

.auth-workspace-page .auth-theme-menu { position: relative; flex: none; margin: 0; text-align: left; }
.auth-theme-menu > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 13px; border: 1px solid var(--auth-border); border-radius: 24px; background: var(--auth-surface); color: var(--auth-ink); font-size: 12px; list-style: none; cursor: pointer; user-select: none; }
.auth-theme-menu > summary::-webkit-details-marker { display: none; }
.auth-theme-menu > summary::marker { content: ""; }
.auth-theme-menu > summary:hover { background: var(--auth-soft); }
.auth-theme-menu > summary > i { font-size: 15px; }
.auth-theme-menu > summary:focus-visible,
.auth-theme-menu .app-theme-choice:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.auth-theme-popover { position: absolute; z-index: 10; top: calc(100% + 10px); right: 0; width: max-content; max-width: min(320px, calc(100vw - 32px)); padding: 12px; border: 1px solid var(--auth-border); border-radius: 15px; background: var(--auth-surface); color: var(--auth-ink); box-shadow: 0 14px 40px rgba(9, 24, 44, .16); }
.auth-workspace-page .auth-theme-menu .app-theme-options { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--auth-border); border-radius: 10px; background: var(--auth-soft); }
.auth-workspace-page .auth-theme-menu .app-theme-choice { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--auth-muted); font: inherit; font-size: 12px; font-weight: 500; }
.auth-workspace-page .auth-theme-menu .app-theme-choice:hover { background: var(--auth-field); color: var(--auth-ink); }
.auth-workspace-page .auth-theme-menu .app-theme-choice[aria-pressed="true"] { border-color: var(--auth-border); background: var(--auth-field); color: var(--brand-600); font-weight: 700; }
.auth-workspace-page .auth-theme-menu .app-theme-status { display: block; margin-top: 10px; color: var(--auth-muted); font-size: 11px; line-height: 1.5; }

/* Shared control states retain their specificity beneath workspace field groups. */
.auth-card .form-control,
.auth-card .input-group-text,
.auth-card .btn-outline-secondary { border-color: var(--auth-border); }
.auth-card .form-control::placeholder { color: var(--auth-muted); opacity: .85; }
.auth-card .form-control:focus { color: var(--auth-ink); background: var(--auth-field); border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.auth-card .btn:disabled { opacity: .7; }
.auth-card a:not(.btn),
.auth-card .btn-link { color: var(--brand-600) !important; text-underline-offset: 3px; }
.auth-card a:not(.btn):hover,
.auth-card .btn-link:hover { color: var(--brand-700) !important; }
.auth-card a:not(.btn) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.auth-card .auth-back-link { gap: 6px; }
.auth-card :is(a, button, input):focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.auth-card .text-muted,
.auth-card .form-text { color: var(--auth-muted) !important; }
.auth-card .was-validated .form-control:invalid,
.auth-card .form-control[aria-invalid="true"] { border-color: var(--auth-error); }
.auth-card .was-validated .form-control:valid { border-color: var(--auth-border); background-image: none; padding-right: 12px; }
.auth-card .was-validated .form-control:valid:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.auth-card .alert { border-radius: 10px; font-size: .875rem; line-height: 1.6; overflow-wrap: anywhere; }
.auth-card [id="alert-container"]:empty { margin: 0 !important; }
.auth-card .footer-mini small { font-size: inherit; }
.auth-card .strength { height: 5px; overflow: hidden; border-radius: 6px; background: var(--auth-border); }
.auth-card .strength > div { height: 100%; width: 0; transition: width .2s ease; }
.auth-card #two-factor-email { overflow-wrap: anywhere; }

.auth-workspace-page .auth-card { flex: none; width: 100%; color: var(--auth-ink); max-width: 410px; margin: auto; padding: 44px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; animation: auth-enter .3s ease-out both; }
.auth-workspace-page .auth-card .card-body { padding: 0; }
.auth-form-symbol { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 26px; border: 1px solid var(--auth-symbol-border); border-radius: 15px; background: var(--auth-symbol); color: var(--auth-symbol-ink); font-size: 25px; transform: rotate(-7deg); }
.auth-form-symbol > i { transform: rotate(7deg); }
.auth-form-eyebrow { margin: 0 0 10px; color: var(--auth-muted); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.auth-form-eyebrow > span { display: inline-block; margin-left: 7px; font-weight: 500; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; }
.auth-workspace-page .auth-card .card-title { color: var(--auth-ink); margin: 0 0 12px; font-family: Manrope, Inter, sans-serif; font-size: clamp(29px, 2.5vw, 38px); font-weight: 600; line-height: 1.2; letter-spacing: -.04em; text-align: left; }
.auth-workspace-page .auth-card .card-subtitle { color: var(--auth-muted); margin: 0 0 30px; font-size: 14px; line-height: 1.7; text-align: left; }
.auth-workspace-page .auth-card .form-label { margin-bottom: 9px; color: var(--auth-ink); font-size: 13px; }
.auth-workspace-page .auth-card .form-control,
.auth-workspace-page .auth-card .input-group-text,
.auth-workspace-page .auth-card .btn-outline-secondary { min-height: 54px; color: var(--auth-ink); border-radius: 12px; background-color: var(--auth-field); }
.auth-workspace-page .auth-card .form-control { padding: 13px 14px; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.auth-otp { min-width: 0; padding: 0; border: 0; }
.auth-otp > legend { float: none; width: auto; }
.auth-otp-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(5px, 1vw, 10px); }
.auth-workspace-page .auth-card .auth-otp-digit { width: 100%; min-width: 0; height: 58px; padding: 8px 0; text-align: center; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; caret-color: var(--brand); }
.auth-workspace-page .auth-card .input-group-text { color: var(--auth-muted); padding-inline: 16px 11px; border-right: 0; background: var(--auth-field); font-size: 16px; }
.auth-workspace-page .auth-card .input-group { position: relative; }
.auth-workspace-page .auth-card .input-group > .form-control { min-width: 0; padding-left: 3px; border-left: 0; }
.auth-workspace-page .auth-card .input-group > .form-control:has(+ button) { border-right: 0; }
.auth-workspace-page .auth-card .input-group > button { min-width: 48px; border-left: 0; border-top-right-radius: 12px !important; border-bottom-right-radius: 12px !important; color: var(--auth-muted); }
.auth-workspace-page .auth-card .input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.auth-workspace-page .auth-card .input-group > :not(:last-child):not(.invalid-feedback) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.auth-workspace-page .auth-card .input-group.has-validation > .form-control:last-of-type { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }
.auth-workspace-page .auth-card .input-group.has-validation > .form-control:has(+ button.btn) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.auth-workspace-page .auth-card .input-group:focus-within::before { position: absolute; z-index: 5; inset: 0 0 auto; height: 54px; border: 1px solid var(--brand); border-radius: 12px; box-shadow: 0 0 0 3px var(--ring); content: ""; pointer-events: none; }
.auth-workspace-page .auth-card .input-group > .form-control:focus { z-index: 2; box-shadow: none; outline: none; }
.auth-workspace-page .auth-card .input-group:focus-within > :is(.input-group-text, .form-control, .btn) { border-color: var(--brand); }
.auth-workspace-page .auth-card .was-validated .input-group:has(.form-control:invalid) > :is(.input-group-text, .form-control, .btn),
.auth-workspace-page .auth-card .input-group:has(.form-control[aria-invalid="true"]) > :is(.input-group-text, .form-control, .btn) { border-color: var(--auth-error); }
.auth-workspace-page .auth-card .invalid-feedback { color: var(--auth-error); line-height: 1.5; margin-top: 6px; flex-basis: 100%; width: 100%; margin-left: 0 !important; font-size: 12px; }
.auth-password-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 10px; margin-top: 2px; }
.auth-workspace-page .auth-card .auth-password-heading .form-label { margin-bottom: 0; }
.auth-workspace-page .auth-card .auth-password-heading > a { min-height: 44px; font-size: 12px; font-weight: 500; text-decoration: none; }
.auth-workspace-page .auth-card .auth-password-heading > a:hover { text-decoration: underline; }
.auth-workspace-page .auth-card #login-form > .mb-2 { margin-bottom: 24px !important; }
.auth-workspace-page .auth-card .btn { min-height: 54px; border-radius: 12px; font-size: 14px; font-weight: 600; }
html .auth-workspace-page .auth-card .btn-primary { --bs-btn-disabled-bg: #cf421c; --bs-btn-disabled-border-color: #cf421c; border-color: #cf421c; background: #cf421c; color: #fff; box-shadow: 0 6px 18px rgba(217, 70, 32, .12); }
html .auth-workspace-page .auth-card .btn-primary:hover { border-color: #b93717; background: #b93717; color: #fff; }
html .auth-workspace-page .auth-card .btn-primary:active { border-color: #96290f; background: #96290f; color: #fff; }
.auth-workspace-page .auth-card .btn-primary .auth-button-arrow { margin-left: auto; }
.auth-workspace-page .auth-card .auth-primary-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 18px; }
.auth-workspace-page .auth-card .btn-outline-secondary:hover { background: var(--auth-soft); border-color: var(--auth-muted); color: var(--auth-ink); }
.auth-workspace-page .auth-card .form-text { font-size: 12px; }
.auth-workspace-page .auth-card #two-factor-help { text-align: left !important; line-height: 1.7; }
.auth-workspace-page .auth-card .footer-mini { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--auth-border); color: var(--auth-muted); font-size: 12px; text-align: center; line-height: 1.6; }
.auth-form-motto { display: flex; align-items: center; gap: 12px; margin-top: 30px; color: var(--auth-muted); font-size: 11px; text-align: center; }
.auth-form-motto > span:first-child,
.auth-form-motto > span:last-child { flex: 1; height: 1px; background: var(--auth-border); }
.auth-access-footer { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 0 3px; color: var(--auth-muted); font-size: 11px; text-align: center; }
.auth-access-footer > i { flex: none; font-size: 13px; }

html[data-bs-theme="dark"] .auth-page.auth-workspace-page {
  --brand: #f38a64;
  --brand-600: #ffac8e;
  --brand-700: #ffd0bd;
  --ring: rgba(243, 138, 100, .2);
  --auth-ink: #f2f5fa;
  --auth-muted: #b1bfd0;
  --auth-surface: #152132;
  --auth-field: #1d2b3f;
  --auth-border: #405169;
  --auth-soft: #233247;
  --auth-error: #fda29b;
  --auth-symbol: #302d30;
  --auth-symbol-border: #534037;
  --auth-symbol-ink: #ff9975;
  color-scheme: dark;
  background: var(--auth-surface);
}

html[data-bs-theme="dark"] .auth-card .alert-danger { color: #fecaca; background: #3c202b; border-color: #784352; }
html[data-bs-theme="dark"] .auth-card .alert-success { color: #b6ecd0; background: #15372e; border-color: #35654f; }
html[data-bs-theme="dark"] .auth-card .alert-info { color: #c4dfff; background: #1b3350; border-color: #40648e; }
html[data-bs-theme="dark"] .auth-card .alert-warning { color: #f5dea7; background: #3d3320; border-color: #786641; }

/* Automatic appearance remains available when JavaScript is unavailable. */
@media (prefers-color-scheme: dark) {
  html:not([data-bs-theme]) .auth-page.auth-workspace-page {
    --brand: #f38a64;
    --brand-600: #ffac8e;
    --brand-700: #ffd0bd;
    --ring: rgba(243, 138, 100, .2);
    --auth-ink: #f2f5fa;
    --auth-muted: #b1bfd0;
    --auth-surface: #152132;
    --auth-field: #1d2b3f;
    --auth-border: #405169;
    --auth-soft: #233247;
    --auth-error: #fda29b;
    --auth-symbol: #302d30;
    --auth-symbol-border: #534037;
    --auth-symbol-ink: #ff9975;
    color-scheme: dark;
    background: var(--auth-surface);
  }
  html:not([data-bs-theme]) .auth-card .alert-danger { color: #fecaca; background: #3c202b; border-color: #784352; }
  html:not([data-bs-theme]) .auth-card .alert-success { color: #b6ecd0; background: #15372e; border-color: #35654f; }
  html:not([data-bs-theme]) .auth-card .alert-info { color: #c4dfff; background: #1b3350; border-color: #40648e; }
  html:not([data-bs-theme]) .auth-card .alert-warning { color: #f5dea7; background: #3d3320; border-color: #786641; }
}

@media (min-width: 761px) and (max-height: 800px) {
  .auth-story { padding-top: 30px; padding-bottom: 24px; }
  .auth-story-intro { margin-top: 34px; }
  .auth-story-title { font-size: clamp(38px, 4vw, 54px); }
  .auth-story-scene { min-height: 260px; }
  .auth-access { padding-top: 22px; }
  .auth-workspace-page .auth-card { padding-top: 30px; padding-bottom: 30px; }
  .auth-form-symbol { margin-bottom: 21px; }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .auth-workspace-page .auth-shell.auth-workspace { grid-template-columns: 51% 49%; }
  .auth-story { padding-inline: 28px; }
  .auth-story-title { font-size: 38px; }
  .auth-story-scene { margin-inline: -16px; }
  .auth-scene-label { gap: 7px; padding: 8px 11px 8px 8px; font-size: 12px; }
  .auth-scene-clients { left: 0; }
  .auth-scene-projects { right: 0; }
  .auth-access { padding-inline: 26px; }
}

@media (max-width: 760px) {
  .auth-workspace-page .auth-shell.auth-workspace { position: relative; display: flex; flex-direction: column; }
  .auth-story { flex: none; min-height: 196px; padding: max(27px, env(safe-area-inset-top)) max(26px, env(safe-area-inset-right)) 25px max(26px, env(safe-area-inset-left)); }
  .auth-story-brand { max-width: calc(100% - 48px); }
  .auth-story-brand img { max-width: 148px; max-height: 42px; }
  .auth-story-brand.auth-brand-custom { padding: 6px 9px; }
  .auth-story-brand.auth-brand-custom img { max-width: 150px; max-height: 30px; }
  .auth-story-intro { margin-top: 24px; }
  .auth-story-eyebrow,
  .auth-story-intro p,
  .auth-story-footer,
  .auth-scene-label { display: none; }
  .auth-story-title { position: relative; z-index: 2; margin: 0; font-size: 29px; line-height: 1.14; letter-spacing: -.038em; }
  .auth-story-scene { position: absolute; z-index: 0; inset: 40px -95px -40px 125px; min-height: 0; margin: 0; opacity: .53; pointer-events: none; }
  .auth-story-illustration { width: 120%; -webkit-mask-image: linear-gradient(to right, transparent, #000 65%); mask-image: linear-gradient(to right, transparent, #000 65%); }
  .auth-access { position: static; flex: 1; padding: 0 max(26px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(26px, env(safe-area-inset-left)); }
  .auth-access-header { position: absolute; z-index: 6; top: max(17px, env(safe-area-inset-top)); right: max(18px, env(safe-area-inset-right)); justify-content: flex-end; }
  .auth-workspace-label { display: none; }
  .auth-theme-menu > summary { width: 44px; height: 44px; padding: 0; border-color: rgba(255, 255, 255, .22); background: #233449; color: #e4eaf3; }
  .auth-theme-menu > summary:hover { background: #304762; }
  .auth-theme-menu > summary > span { display: none; }
  .auth-theme-menu > summary > .bi-chevron-down { display: none; }
  .auth-theme-menu > summary > i { font-size: 17px; }
  .auth-workspace-page .auth-card { max-width: 420px; margin: 0 auto auto; padding: 33px 0 28px; }
  .auth-form-symbol { display: none; }
  .auth-form-eyebrow { margin-bottom: 9px; }
  .auth-workspace-page .auth-card .card-title { font-size: 29px; }
  .auth-workspace-page .auth-card .card-subtitle { margin-bottom: 26px; font-size: 13px; }
  .auth-workspace-page .auth-card .form-control { font-size: 16px; }
  .auth-workspace-page .auth-card .form-label { font-size: 12px; }
  .auth-workspace-page .auth-card .auth-password-heading > a { font-size: 11px; }
  .auth-form-motto { margin-top: 27px; }
  .auth-access-footer { width: 100%; max-width: 420px; margin: 0 auto; padding-top: 19px; border-top: 1px solid var(--auth-border); }
}

@media (max-width: 359px) {
  .auth-story { padding-inline: 20px; }
  .auth-story-brand img { max-width: 136px; }
  .auth-story-title { font-size: 27px; }
  .auth-access { padding-inline: 20px; }
  .auth-workspace-page .auth-card { padding-top: 29px; }
  .auth-workspace-page .auth-card .card-title { font-size: 28px; }
  .auth-theme-popover { max-width: calc(100vw - 36px); }
}

@keyframes auth-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .auth-workspace-page *,
  .auth-workspace-page *::before,
  .auth-workspace-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
