:root {
    --ap-navy-950: #02042f;
    --ap-navy-900: #05094a;
    --ap-navy-800: #0a1163;
    --ap-navy-700: #151d78;
    --ap-orange: #f45b16;
    --ap-orange-dark: #d94708;
    --ap-orange-soft: #fff3ec;
    --ap-ink: #182033;
    --ap-text: #30394e;
    --ap-muted: #6b7487;
    --ap-subtle: #9299a8;
    --ap-line: #e3e6ec;
    --ap-line-strong: #d4d8e1;
    --ap-canvas: #f5f4f1;
    --ap-surface: #ffffff;
    --ap-surface-soft: #faf9f7;
    --ap-success: #147a52;
    --ap-success-soft: #eaf7f1;
    --ap-warning: #9a5b10;
    --ap-warning-soft: #fff6e5;
    --ap-danger: #b4233d;
    --ap-danger-soft: #fff0f2;
    --ap-radius-sm: 10px;
    --ap-radius: 16px;
    --ap-radius-lg: 24px;
    --ap-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 22px rgba(15, 23, 42, .04);
    --ap-shadow: 0 2px 4px rgba(15, 23, 42, .03), 0 18px 45px rgba(15, 23, 42, .07);
    --ap-sidebar: 272px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
    min-height: 100%;
    background: var(--ap-canvas);
    color-scheme: light;
}

body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 88% 8%, rgba(244, 91, 22, .045), transparent 22rem),
        var(--ap-canvas);
    color: var(--ap-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
a { color: var(--ap-orange-dark); text-decoration: none; }
a:hover { color: var(--ap-orange); }
img { max-width: 100%; }

:focus-visible {
    outline: 3px solid rgba(244, 91, 22, .28);
    outline-offset: 3px;
}

.ap-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ap-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 max(24px, calc((100vw - 1440px) / 2));
    background: rgba(3, 6, 53, .97);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 8px 30px rgba(2, 4, 47, .14);
    color: #fff;
    backdrop-filter: blur(12px);
}

.ap-topbar__brand {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.ap-topbar__logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.ap-topbar__logo img {
    display: block;
    width: auto;
    max-width: 160px;
    max-height: 40px;
}

.ap-topbar__divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, .2);
}

.ap-topbar__label {
    color: rgba(255, 255, 255, .7);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ap-topbar__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.ap-topbar__hello {
    margin-right: 6px;
    color: rgba(255, 255, 255, .7);
    font-size: .875rem;
}

.ap-topbar__hello strong { color: #fff; font-weight: 700; }

.ap-account-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 9px;
    background: rgba(255, 255, 255, .07);
    color: #fff !important;
    font-size: .8rem;
    font-weight: 700;
    transition: background-color .18s ease, border-color .18s ease;
}

.ap-account-link:hover {
    background: rgba(255, 255, 255, .13);
    border-color: rgba(255, 255, 255, .25);
}

.ap-account-link svg { width: 15px; height: 15px; }

.ap-layout {
    flex: 1;
    display: grid;
    grid-template-columns: var(--ap-sidebar) minmax(0, 1fr);
    width: min(1440px, 100%);
    margin: 0 auto;
}

.ap-sidebar {
    padding: 34px 22px 120px;
    border-right: 1px solid var(--ap-line);
}

.ap-sidebar__label {
    margin: 0 12px 12px;
    color: var(--ap-subtle);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ap-nav { display: flex; flex-direction: column; gap: 3px; }

.ap-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #4f586b;
    font-size: .875rem;
    font-weight: 680;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.ap-nav a:hover {
    background: rgba(255, 255, 255, .72);
    color: var(--ap-navy-900);
}

.ap-nav a.is-active {
    background: var(--ap-surface);
    border-color: var(--ap-line);
    box-shadow: var(--ap-shadow-sm);
    color: var(--ap-navy-900);
}

.ap-nav a.is-active::before {
    position: absolute;
    left: -1px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--ap-orange);
    content: "";
}

.ap-nav__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #7b8393;
}

.ap-nav__icon svg { width: 19px; height: 19px; }
.ap-nav a.is-active .ap-nav__icon { color: var(--ap-orange); }

.ap-nav__separator {
    height: 1px;
    margin: 18px 12px;
    background: var(--ap-line);
}

.ap-sidebar__support {
    margin: 28px 4px 0;
    padding: 18px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius);
    background: rgba(255, 255, 255, .55);
}

.ap-sidebar__support strong {
    display: block;
    margin-bottom: 5px;
    color: var(--ap-ink);
    font-size: .82rem;
}

.ap-sidebar__support p {
    margin: 0 0 10px;
    color: var(--ap-muted);
    font-size: .76rem;
    line-height: 1.55;
}

.ap-sidebar__support a { font-size: .78rem; font-weight: 750; }

.ap-main {
    width: 100%;
    max-width: 1120px;
    min-width: 0;
    padding: 42px 44px 120px;
}

.ap-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 28px;
}

.ap-page-head__copy { max-width: 720px; }

.ap-eyebrow {
    margin: 0 0 9px;
    color: var(--ap-orange-dark);
    font-size: .69rem;
    font-weight: 820;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.ap-title {
    margin: 0;
    color: var(--ap-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.08;
}

.ap-title-sm {
    margin: 0 0 7px;
    color: var(--ap-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.25;
}

.ap-status-heading { margin-top: 15px; }

.ap-copy {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--ap-muted);
    font-size: .96rem;
    line-height: 1.68;
}

.ap-muted {
    color: var(--ap-muted);
    font-size: .85rem;
    line-height: 1.55;
}

.ap-hero,
.ap-card {
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius-lg);
    background: var(--ap-surface);
    box-shadow: var(--ap-shadow-sm);
}

.ap-hero {
    position: relative;
    overflow: hidden;
    padding: 34px 36px;
    margin-bottom: 20px;
}

.ap-hero::after {
    position: absolute;
    top: -72px;
    right: -60px;
    width: 210px;
    height: 210px;
    border: 38px solid rgba(244, 91, 22, .045);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.ap-hero > * { position: relative; z-index: 1; }
.ap-card { padding: 26px 28px; margin-bottom: 18px; }
.ap-card--flat { box-shadow: none; }
.ap-card--soft { background: var(--ap-surface-soft); }
.ap-card--accent { border-top: 3px solid var(--ap-orange); }

.ap-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr);
    gap: 18px;
}

.ap-grid > .ap-card { margin-bottom: 0; }
.ap-grid + .ap-card, .ap-grid + .ap-section { margin-top: 18px; }

.ap-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}

.ap-actions form { margin: 0; }

.ap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 19px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--ap-orange);
    box-shadow: 0 6px 16px rgba(217, 71, 8, .16);
    color: #fff !important;
    font-size: .88rem;
    font-weight: 780;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.ap-btn:hover {
    transform: translateY(-1px);
    background: var(--ap-orange-dark);
    box-shadow: 0 9px 22px rgba(217, 71, 8, .22);
}

.ap-btn svg { width: 17px; height: 17px; }

.ap-btn-secondary {
    border-color: var(--ap-line-strong);
    background: var(--ap-surface);
    box-shadow: none;
    color: var(--ap-navy-900) !important;
}

.ap-btn-secondary:hover {
    background: #f8f8fa;
    box-shadow: none;
    color: var(--ap-navy-900) !important;
}

.ap-btn-text {
    min-height: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ap-orange-dark) !important;
}

.ap-btn-text:hover { transform: none; background: transparent; box-shadow: none; }
.ap-btn-danger { background: var(--ap-danger); box-shadow: none; }
.ap-btn-danger:hover { background: #941b33; box-shadow: none; }

.ap-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--ap-orange-soft);
    color: var(--ap-orange-dark);
    font-size: .73rem;
    font-weight: 760;
}

.ap-status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.ap-status--success { background: var(--ap-success-soft); color: var(--ap-success); }
.ap-status--neutral { background: #f0f1f4; color: #596174; }
.ap-status--warning { background: var(--ap-warning-soft); color: var(--ap-warning); }

.ap-next-card {
    position: relative;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 34px;
    border: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .075), transparent 48%),
        var(--ap-navy-900);
    box-shadow: 0 20px 45px rgba(2, 4, 47, .18);
    color: #fff;
}

.ap-next-card::after {
    position: absolute;
    right: -55px;
    bottom: -80px;
    width: 230px;
    height: 230px;
    border: 42px solid rgba(255, 255, 255, .045);
    border-radius: 50%;
    content: "";
}

.ap-next-card > * { position: relative; z-index: 1; }
.ap-next-card .ap-eyebrow { color: #ff9f70; }
.ap-next-card .ap-title-sm { color: #fff; font-size: 1.65rem; }
.ap-next-card .ap-copy { color: rgba(255, 255, 255, .72); }
.ap-next-card .ap-btn-secondary { border-color: rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .08); color: #fff !important; }
.ap-next-card .ap-btn-secondary:hover { background: rgba(255, 255, 255, .14); }

.ap-stepper {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-width: 100%;
    margin: 30px 0 2px;
}

.ap-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--ap-subtle);
    font-size: .68rem;
    font-weight: 740;
    text-align: center;
}

.ap-step::before {
    z-index: 2;
    width: 12px;
    height: 12px;
    border: 3px solid var(--ap-surface);
    border-radius: 50%;
    background: #cfd3dc;
    box-shadow: 0 0 0 1px #cfd3dc;
    content: "";
}

.ap-step::after {
    position: absolute;
    z-index: 1;
    top: 6px;
    left: calc(-50% + 6px);
    width: calc(100% - 12px);
    height: 1px;
    background: var(--ap-line-strong);
    content: "";
}

.ap-step:first-child::after { display: none; }
.ap-step.is-complete { color: var(--ap-success); }
.ap-step.is-complete::before { background: var(--ap-success); box-shadow: 0 0 0 1px var(--ap-success); }
.ap-step.is-current { color: var(--ap-orange-dark); }
.ap-step.is-current::before { background: var(--ap-orange); box-shadow: 0 0 0 3px var(--ap-orange-soft); }
.ap-step.is-current::after, .ap-step.is-complete::after { background: #9dcab8; }

.ap-specialist {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.ap-specialist__avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--ap-navy-900);
    box-shadow: 0 0 0 1px var(--ap-line);
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
}

.ap-specialist__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ap-specialist strong { display: block; color: var(--ap-ink); font-size: .95rem; }

.ap-section { margin-top: 30px; }
.ap-section__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 2px 12px; }
.ap-section__title { margin: 0; color: var(--ap-ink); font-size: .95rem; font-weight: 780; }

.ap-task-list, .ap-list { margin: 0; padding: 0; list-style: none; }

.ap-task {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 17px 0;
    border-bottom: 1px solid var(--ap-line);
}

.ap-task:first-child { padding-top: 0; }
.ap-task:last-child { padding-bottom: 0; border-bottom: 0; }

.ap-task__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--ap-orange-soft);
    color: var(--ap-orange-dark);
}

.ap-task__icon svg { width: 20px; height: 20px; }
.ap-task__copy { flex: 1; min-width: 0; }
.ap-task__copy strong { display: block; margin-bottom: 2px; color: var(--ap-ink); font-size: .9rem; }
.ap-task__copy span { display: block; color: var(--ap-muted); font-size: .8rem; }
.ap-task__action { flex: 0 0 auto; font-size: .8rem; font-weight: 760; }

.ap-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 64px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ap-line);
}

.ap-list li:first-child { padding-top: 0; }
.ap-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.ap-list small { display: block; margin-top: 3px; }

.ap-quote-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 0;
}

.ap-quote {
    padding: 20px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius);
    background: var(--ap-surface-soft);
}

.ap-quote__label { display: block; margin-bottom: 8px; color: var(--ap-muted); font-size: .75rem; font-weight: 740; text-transform: uppercase; letter-spacing: .06em; }
.ap-quote strong { color: var(--ap-ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 600; }

.ap-reasons {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.ap-reasons li {
    position: relative;
    padding: 14px 16px 14px 42px;
    border: 1px solid var(--ap-line);
    border-radius: 12px;
    background: var(--ap-surface-soft);
    color: var(--ap-text);
    font-size: .88rem;
}

.ap-reasons li::before {
    position: absolute;
    left: 17px;
    top: 17px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--ap-warning);
    border-radius: 50%;
    content: "";
}

.ap-empty {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 25px;
    border: 1px dashed var(--ap-line-strong);
    border-radius: var(--ap-radius);
    background: var(--ap-surface-soft);
}

.ap-empty__icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: #efeff3;
    color: #697184;
}

.ap-empty__icon svg { width: 23px; height: 23px; }
.ap-empty h2 { margin: 1px 0 4px; color: var(--ap-ink); font-size: 1rem; }
.ap-empty p { margin: 0; color: var(--ap-muted); font-size: .86rem; line-height: 1.6; }
.ap-empty-spaced { margin-top: 22px; }

.ap-flash {
    margin: 0 0 18px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: .86rem;
    font-weight: 650;
}

.ap-flash-success { border-color: #c9eadc; background: var(--ap-success-soft); color: var(--ap-success); }
.ap-flash-error { border-color: #f3cbd2; background: var(--ap-danger-soft); color: var(--ap-danger); }

.ap-settings-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.ap-settings-nav {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius);
    background: rgba(255, 255, 255, .72);
}

.ap-settings-nav a {
    padding: 10px 11px;
    border-radius: 8px;
    color: var(--ap-muted);
    font-size: .8rem;
    font-weight: 700;
}

.ap-settings-nav a:hover { background: var(--ap-surface); color: var(--ap-navy-900); }
.ap-settings-content { min-width: 0; }
.ap-settings-content .ap-card { scroll-margin-top: 100px; }

.ap-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 18px;
    margin-top: 22px;
}

.ap-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ap-field-full { grid-column: 1 / -1; }
.ap-field label, .ap-auth-field label { color: #41495a; font-size: .76rem; font-weight: 760; }

.ap-field input,
.ap-field select,
.ap-field textarea,
.ap-auth-field input {
    width: 100%;
    min-height: 47px;
    padding: 10px 13px;
    border: 1px solid var(--ap-line-strong);
    border-radius: 10px;
    background: var(--ap-surface);
    color: var(--ap-ink);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.ap-field input:hover,
.ap-field select:hover,
.ap-auth-field input:hover { border-color: #b8beca; }

.ap-field input:focus,
.ap-field select:focus,
.ap-field textarea:focus,
.ap-auth-field input:focus {
    outline: none;
    border-color: var(--ap-orange);
    box-shadow: 0 0 0 3px rgba(244, 91, 22, .11);
}

.ap-field-note { color: var(--ap-muted); font-size: .75rem; }

.ap-phone-verify {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid var(--ap-line);
    border-radius: 12px;
    background: var(--ap-surface-soft);
}

.ap-check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 20px;
}

.ap-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--ap-line);
    border-radius: 10px;
    color: #424a5d;
    font-size: .82rem;
    line-height: 1.45;
    cursor: pointer;
}

.ap-check:hover { background: var(--ap-surface-soft); }
.ap-check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--ap-orange); }

.ap-danger-card { border-color: #efcbd2; background: #fffafb; }
.ap-contact-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.ap-bottom-nav { display: none; }

/* Authentication */
.ap-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(330px, .9fr) minmax(480px, 1.1fr);
    background: var(--ap-surface);
}

.ap-auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: 38px 48px 44px;
    background:
        radial-gradient(circle at 90% 85%, rgba(244, 91, 22, .28), transparent 20rem),
        linear-gradient(145deg, var(--ap-navy-950), var(--ap-navy-800));
    color: #fff;
}

.ap-auth-brand::after {
    position: absolute;
    right: -150px;
    bottom: -150px;
    width: 440px;
    height: 440px;
    border: 75px solid rgba(255, 255, 255, .04);
    border-radius: 50%;
    content: "";
}

.ap-auth-logo { position: relative; z-index: 1; display: inline-flex; width: fit-content; }
.ap-auth-logo img { display: block; max-width: 174px; max-height: 44px; }

.ap-auth-brand__message { position: relative; z-index: 1; max-width: 440px; }
.ap-auth-brand__message p:first-child { color: #ff9f70; }
.ap-auth-brand__message h2 {
    max-width: 420px;
    margin: 0 0 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 500;
    letter-spacing: -.035em;
    line-height: 1.08;
}
.ap-auth-brand__message > p:last-child { margin: 0; color: rgba(255, 255, 255, .65); font-size: .9rem; line-height: 1.7; }

.ap-auth-brand__copy { position: relative; z-index: 1; max-width: 440px; }

.ap-auth-features {
    position: relative;
    z-index: 1;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.ap-auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 11px;
    color: rgba(255, 255, 255, .78);
    font-size: .86rem;
    line-height: 1.45;
}

.ap-auth-features li:last-child { margin-bottom: 0; }
.ap-auth-features svg {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex: 0 0 auto;
    color: #ff9f70;
}

.ap-auth-field input.is-invalid {
    border-color: var(--ap-danger);
    box-shadow: 0 0 0 3px rgba(180, 35, 61, .1);
}

.ap-auth-trust {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, .58);
    font-size: .74rem;
}
.ap-auth-trust svg { width: 17px; height: 17px; }

.ap-auth-main {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 48px;
    background:
        radial-gradient(circle at 85% 12%, rgba(244, 91, 22, .05), transparent 18rem),
        var(--ap-surface-soft);
}

.ap-auth-card {
    width: min(470px, 100%);
    padding: 42px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius-lg);
    background: var(--ap-surface);
    box-shadow: var(--ap-shadow);
}

.ap-auth-card .ap-title { font-size: clamp(2rem, 4vw, 2.55rem); }
.ap-auth-form { margin-top: 26px; }
.ap-auth-field { position: relative; display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.ap-auth-field__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.ap-password-wrap { position: relative; }
.ap-password-wrap input { padding-right: 72px; }
.ap-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    padding: 7px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ap-muted);
    font-size: .72rem;
    font-weight: 760;
    cursor: pointer;
}
.ap-password-toggle:hover { background: #f1f2f5; color: var(--ap-ink); }

.ap-auth-alert {
    display: none;
    margin: 0;
    color: var(--ap-danger);
    font-size: .78rem;
}

.ap-auth-remember { display: flex; align-items: center; gap: 9px; margin: 4px 0 19px; color: var(--ap-text); font-size: .8rem; }
.ap-auth-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--ap-orange); }
.ap-auth-btn-full { width: 100%; }
.ap-auth-module { width: 100%; margin-bottom: 10px; }
.ap-auth-links { margin: 21px 0 0; color: var(--ap-muted); font-size: .82rem; line-height: 1.85; }
.ap-auth-links a { font-weight: 720; }

.ap-auth-progress { display: flex; gap: 6px; margin-bottom: 24px; }
.ap-auth-progress span { width: 30px; height: 3px; border-radius: 999px; background: var(--ap-line); }
.ap-auth-progress span.is-active { background: var(--ap-orange); }

.ap-auth-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(2, 4, 47, .66);
    backdrop-filter: blur(5px);
}

.ap-auth-popup {
    position: relative;
    width: min(440px, 100%);
    padding: 30px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius-lg);
    background: var(--ap-surface);
    box-shadow: var(--ap-shadow);
}

.ap-auth-popup h3 { margin: 0 0 8px; color: var(--ap-ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; }
.ap-auth-popup .ap-auth-field { margin-top: 20px; }
.ap-auth-popup .ap-btn + .ap-btn { margin-top: 9px; }
.ap-auth-close { position: absolute; top: 13px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1f2f5; color: var(--ap-muted); font-size: 1.25rem; cursor: pointer; }

.login-toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 90; width: min(360px, calc(100% - 2rem)); pointer-events: none; }
.login-toast { margin-bottom: 8px; padding: 12px 14px; border: 1px solid #f3cbd2; border-radius: 10px; background: var(--ap-danger-soft); box-shadow: var(--ap-shadow-sm); color: var(--ap-danger); font-size: .82rem; font-weight: 650; }
.login-toast.success { border-color: #c9eadc; background: var(--ap-success-soft); color: var(--ap-success); }

.ap-token-account-link {
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,.1);
    color: #fff !important;
    font-size: .78rem;
    font-weight: 700;
}

@media (max-width: 1080px) {
    :root { --ap-sidebar: 230px; }
    .ap-main { padding: 36px 30px 110px; }
    .ap-sidebar { padding-inline: 15px; }
    .ap-auth-brand { padding-inline: 36px; }
}

@media (max-width: 900px) {
    .ap-layout { grid-template-columns: 1fr; }
    .ap-sidebar { display: none; }
    .ap-main { max-width: none; padding: 28px 20px 112px; }
    .ap-topbar { min-height: 66px; padding: 0 17px; }
    .ap-topbar__divider, .ap-topbar__label, .ap-topbar__hello { display: none; }
    .ap-topbar__logo img { max-width: 142px; max-height: 36px; }
    .ap-account-link span { display: none; }
    .ap-account-link { width: 38px; padding: 0; }

    .ap-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        display: flex;
        gap: 2px;
        overflow-x: auto;
        padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--ap-line);
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 -8px 24px rgba(15, 23, 42, .07);
        backdrop-filter: blur(12px);
        scrollbar-width: none;
    }
    .ap-bottom-nav::-webkit-scrollbar { display: none; }
    .ap-bottom-nav a {
        min-width: 68px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 5px 4px;
        border-radius: 9px;
        color: var(--ap-muted);
        font-size: .61rem;
        font-weight: 750;
    }
    .ap-bottom-nav a.is-active { background: var(--ap-orange-soft); color: var(--ap-orange-dark); }
    .ap-bottom-nav .ap-nav__icon { width: 18px; height: 18px; color: currentColor; }
    .ap-bottom-nav .ap-nav__icon svg { width: 17px; height: 17px; }

    .ap-settings-layout { grid-template-columns: 1fr; }
    .ap-settings-nav { position: static; flex-direction: row; overflow-x: auto; }
    .ap-settings-nav a { white-space: nowrap; }
    .ap-auth { grid-template-columns: 1fr; }
    .ap-auth-brand { min-height: auto; padding: 25px 28px; }
    .ap-auth-brand__message, .ap-auth-brand__copy, .ap-auth-features, .ap-auth-trust { display: none; }
    .ap-auth-main { min-height: calc(100vh - 94px); padding: 36px 22px; }
}

@media (max-width: 680px) {
    .ap-main { padding: 22px 14px 108px; }
    .ap-hero, .ap-card { padding: 23px 20px; border-radius: 18px; }
    .ap-title { font-size: 2rem; }
    .ap-title-sm { font-size: 1.25rem; }
    .ap-grid, .ap-form-grid, .ap-check-list, .ap-quote-grid { grid-template-columns: 1fr; }
    .ap-grid { gap: 14px; }
    .ap-next-card { min-height: 230px; padding: 27px 23px; }
    .ap-stepper { overflow-x: auto; grid-template-columns: repeat(6, 80px); margin-right: -20px; padding-right: 20px; scrollbar-width: none; }
    .ap-stepper::-webkit-scrollbar { display: none; }
    .ap-list li, .ap-contact-row { align-items: flex-start; flex-direction: column; }
    .ap-task { align-items: flex-start; }
    .ap-task__action { align-self: center; }
    .ap-auth-brand { padding: 21px 22px; }
    .ap-auth-logo img { max-width: 150px; }
    .ap-auth-main { min-height: calc(100vh - 84px); padding: 22px 14px; align-items: start; }
    .ap-auth-card { padding: 27px 22px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
