.app-access-pending .iphone {
    visibility: hidden;
    pointer-events: none;
}

#appAccessGate {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    min-height: 100dvh;
    padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
    overflow: auto;
    color: #171717;
    background: #edf3f8;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.app-access-ready #appAccessGate { display: none; }

.app-access-panel {
    width: min(100%, 382px);
    box-sizing: border-box;
    padding: 28px 22px 20px;
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: 28px;
    background: rgba(255, 255, 255, .54);
    box-shadow: 0 20px 55px rgba(68, 93, 127, .18), inset 0 1px 0 rgba(255, 255, 255, .85);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
}

.app-access-brand { margin: 0 0 24px; text-align: center; }
.app-access-brand-mark {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 13px;
    border-radius: 17px;
    color: #fff;
    font-size: 23px;
    font-weight: 700;
    background: #4266d7;
    box-shadow: 0 10px 23px rgba(66, 102, 215, .3), inset 0 1px 0 rgba(255, 255, 255, .38);
}
.app-access-brand h1 { margin: 0; font-size: 25px; line-height: 1.2; letter-spacing: 0; }
.app-access-brand p { margin: 7px 0 0; color: #6c7180; font-size: 14px; line-height: 1.5; }
.app-access-form[hidden] { display: none; }
.app-access-field { display: grid; gap: 7px; margin: 14px 0; }
.app-access-field span { color: #4f5564; font-size: 13px; font-weight: 600; }
.app-access-field input {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    border: 1px solid rgba(91, 103, 128, .2);
    border-radius: 13px;
    outline: 0;
    padding: 0 13px;
    color: #171717;
    background: rgba(255, 255, 255, .68);
    font: inherit;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.app-access-field input:focus {
    border-color: rgba(66, 102, 215, .72);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 0 0 4px rgba(66, 102, 215, .14);
}
.app-access-primary, .app-access-secondary, .app-access-link {
    width: 100%;
    min-height: 45px;
    border: 0;
    border-radius: 13px;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}
.app-access-primary {
    color: #fff;
    background: #4266d7;
    box-shadow: 0 8px 18px rgba(66, 102, 215, .24);
}
.app-access-secondary { margin-top: 10px; color: #343a49; background: rgba(255, 255, 255, .58); }
.app-access-link { min-height: 34px; margin-top: 6px; color: #4266d7; background: transparent; font-size: 13px; }
.app-access-primary:active, .app-access-secondary:active, .app-access-link:active { transform: scale(.98); }
.app-access-primary:disabled, .app-access-secondary:disabled, .app-access-link:disabled { cursor: wait; opacity: .58; }
.app-access-notice { min-height: 20px; margin: 14px 0 0; color: #586071; font-size: 13px; line-height: 1.5; text-align: center; }
.app-access-notice.is-error { color: #b52635; }
.app-access-devices { display: grid; gap: 9px; margin: 4px 0 16px; }
.app-access-device {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .5);
}
.app-access-device strong, .app-access-device small { display: block; }
.app-access-device strong { font-size: 13px; }
.app-access-device small { margin-top: 3px; color: #737989; font-size: 12px; }
.app-access-device button { flex: 0 0 auto; min-height: 32px; padding: 0 10px; border: 0; border-radius: 10px; color: #a52535; background: rgba(255, 238, 240, .78); font: inherit; font-size: 12px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
    .app-access-field input, .app-access-primary, .app-access-secondary, .app-access-link { transition: none; }
}

/* Login surface based on the supplied account UI reference. */
#appAccessGate {
    padding: 20px;
    background: #e8e9ec;
}
.app-access-panel {
    width: min(100%, 420px);
    padding: 32px 24px 24px;
    border: 0;
    border-radius: 32px;
    background: #f2f3f5;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .04), inset 0 2px 0 rgba(255, 255, 255, .8);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.app-access-brand { margin: 0 0 28px; }
.app-access-brand-mark { display: none; }
.app-access-brand h1 { font-size: 24px; font-weight: 600; letter-spacing: 0; }
.app-access-brand p { margin-top: 6px; color: #8e8e93; font-size: 14px; }
.app-access-tabs { display: flex; position: relative; z-index: 1; margin-bottom: -1px; }
.app-access-tab {
    flex: 1;
    min-height: 52px;
    border: 0;
    border-radius: 24px 24px 0 0;
    color: #8e8e93;
    background: transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}
.app-access-tab.is-active { color: #1a1a1a; background: #fff; }
.app-access-content {
    position: relative;
    z-index: 2;
    min-height: 340px;
    padding: 32px 24px 24px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .02);
}
.app-access-panel[data-access-active-view="login"] .app-access-content { border-radius: 0 24px 24px 24px; }
.app-access-panel[data-access-active-view="setup"] .app-access-content { border-radius: 24px 0 24px 24px; }
.app-access-form { animation: app-access-form-in .24s ease both; }
.app-access-form[hidden] { display: none; }
@keyframes app-access-form-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.app-access-field { display: block; position: relative; margin: 0 0 16px; }
.app-access-field input {
    height: 52px;
    min-height: 52px;
    padding: 0 20px;
    border: 1px solid #eaecef;
    border-radius: 100px;
    color: #1a1a1a;
    background: #f7f7f9;
    font-size: 15px;
}
.app-access-field input::placeholder { color: #a3a3a8; }
.app-access-field input:focus {
    border-color: #d0d0d5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .03);
}
.app-access-hint { margin: 0 0 20px; color: #8e8e93; font-size: 13px; line-height: 1.5; text-align: center; }
.app-access-field.has-password input { padding-right: 54px; }
.app-access-password-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    color: #a3a3a8;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}
.app-access-password-toggle .app-access-eye-slash { display: block; }
.app-access-password-toggle.is-visible .app-access-eye-slash { display: none; }
.app-access-primary {
    height: 52px;
    min-height: 52px;
    margin-top: 12px;
    border-radius: 100px;
    color: #fff;
    background: #1a1a1a;
    box-shadow: none;
    font-size: 16px;
    font-weight: 600;
}
.app-access-primary:active { transform: scale(.97); opacity: .9; }
.app-access-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding: 0 8px; }
.app-access-actions.is-centered { justify-content: center; }
.app-access-link {
    width: auto;
    min-height: 24px;
    margin: 0;
    padding: 0;
    color: #8e8e93;
    font-size: 13px;
    font-weight: 400;
    text-align: left;
}
.app-access-link:hover { color: #1a1a1a; }
.app-access-notice { min-height: 20px; margin: 18px 0 0; color: #8e8e93; font-size: 13px; }
.app-access-notice.is-error { color: #d4142a; }
.app-access-devices { margin: 0 0 16px; }
.app-access-device { padding: 11px 12px; border-radius: 16px; background: #f7f7f9; }
.app-access-device button { border-radius: 100px; }
@media (max-width: 380px) {
    .app-access-panel { padding: 28px 18px 18px; }
    .app-access-content { padding: 28px 18px 20px; }
}
