html, body {
    height: 100%;
}

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

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: radial-gradient(900px 520px at 14% 18%, rgba(6, 182, 212, 0.10), rgba(248, 250, 252, 0) 60%),
        radial-gradient(760px 520px at 84% 80%, rgba(16, 185, 129, 0.07), rgba(248, 250, 252, 0) 62%),
        linear-gradient(180deg, #f8fafc, #f1f5f9);
    color: rgba(15, 23, 42, 0.92);
    overflow-x: hidden;
    min-height: 100svh;
    overscroll-behavior-y: none;
}

.ac-protect {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 22px 16px;
    position: relative;
    overflow: hidden;
}

.ac-protect::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.35;
    pointer-events: none;
}

.ac-ambient {
    position: absolute;
    inset: -20%;
    background: radial-gradient(closest-side, rgba(6, 182, 212, 0.12), rgba(16, 185, 129, 0.06), rgba(248, 250, 252, 0));
    filter: blur(46px);
    opacity: 0.55;
    pointer-events: none;
}

.ac-ambient-2 {
    position: absolute;
    inset: -28%;
    background: radial-gradient(closest-side, rgba(16, 185, 129, 0.10), rgba(6, 182, 212, 0.06), rgba(248, 250, 252, 0));
    filter: blur(60px);
    opacity: 0.45;
    pointer-events: none;
}

.ac-card {
    width: min(460px, 100%);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255,255,255,0.55) inset;
    position: relative;
    overflow: hidden;
}

.ac-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: radial-gradient(520px 220px at 18% 6%, rgba(6, 182, 212, 0.10), transparent 62%),
        radial-gradient(520px 240px at 86% 94%, rgba(16, 185, 129, 0.07), transparent 66%);
    pointer-events: none;
}

.ac-inner {
    position: relative;
    padding: 22px 20px;
}

@media (min-width: 480px) {
    .ac-inner { padding: 26px 24px; }
}

.ac-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.ac-logo {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: rgba(2, 132, 199, 0.92);
    background: rgba(6, 182, 212, 0.10);
    border: 1px solid rgba(6, 182, 212, 0.18);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.ac-logo svg {
    width: 20px;
    height: 20px;
}

.ac-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ac-title h1 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: rgba(15, 23, 42, 0.92);
}

.ac-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    width: fit-content;
    border: 1px solid rgba(16, 185, 129, 0.18);
    background: rgba(16, 185, 129, 0.08);
    color: rgba(5, 150, 105, 0.96);
    box-shadow: none;
}

.ac-badge svg {
    width: 12px;
    height: 12px;
    opacity: 0.95;
}

.ac-desc {
    margin: 0 0 16px 0;
    color: rgba(71, 85, 105, 0.92);
    font-size: 13px;
    line-height: 1.5;
}

.ac-form {
    display: grid;
    gap: 12px;
}

.ac-label {
    font-size: 12px;
    color: rgba(71, 85, 105, 0.92);
    font-weight: 600;
}

.ac-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.92);
    color: rgba(15, 23, 42, 0.92);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ac-input::placeholder {
    color: rgba(100, 116, 139, 0.78);
}

.ac-input:focus {
    border-color: rgba(6, 182, 212, 0.38);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.10);
}

.ac-btn {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(6, 182, 212, 0.20);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.92), rgba(16, 185, 129, 0.88));
    color: rgba(255, 255, 255, 0.96);
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
    box-shadow: 0 14px 28px rgba(6, 182, 212, 0.12), 0 10px 18px rgba(15, 23, 42, 0.06);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ac-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 16px 34px rgba(6, 182, 212, 0.14), 0 12px 20px rgba(15, 23, 42, 0.07);
}

.ac-btn:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

.ac-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

.ac-btn .ac-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: rgba(255,255,255,0.95);
    display: none;
    animation: acSpin 900ms linear infinite;
}

.ac-btn-ico {
    width: 16px;
    height: 16px;
    flex: none;
    opacity: 0.95;
}

.ac-btn.is-loading .ac-spinner {
    display: inline-block;
}

.ac-btn.is-loading .ac-btn-ico {
    display: none;
}

@keyframes acSpin {
    to { transform: rotate(360deg); }
}

.ac-error {
    display: none;
    font-size: 12px;
    color: rgba(190, 18, 60, 0.92);
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(244, 63, 94, 0.26);
    background: rgba(244, 63, 94, 0.08);
    box-shadow: 0 10px 20px rgba(244, 63, 94, 0.06);
}

.ac-card.is-error {
    animation: acShake 300ms ease;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08), 0 0 26px rgba(244, 63, 94, 0.10);
    border-color: rgba(244, 63, 94, 0.34);
}

@keyframes acShake {
    0% { transform: translateY(0) translateX(0); }
    20% { transform: translateY(0) translateX(-6px); }
    40% { transform: translateY(0) translateX(6px); }
    60% { transform: translateY(0) translateX(-4px); }
    80% { transform: translateY(0) translateX(4px); }
    100% { transform: translateY(0) translateX(0); }
}

.ac-footer {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: rgba(71, 85, 105, 0.88);
    font-size: 12px;
}

.ac-footer span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ac-lock {
    width: 14px;
    height: 14px;
    opacity: 0.85;
}

.ac-branding-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 16px;
    text-align: center;
    pointer-events: none;
}

.ac-branding-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0.78;
}

.ac-branding-ico {
    width: 16px;
    height: 16px;
    color: rgba(16, 185, 129, 0.92);
    opacity: 0.9;
    flex: none;
}

.ac-branding-top {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(51, 65, 85, 0.78);
}

.ac-branding-strong {
    color: rgba(5, 150, 105, 0.88);
    font-weight: 700;
}

.ac-branding-name {
    font-size: 11px;
    letter-spacing: 0.02em;
    color: rgba(51, 65, 85, 0.72);
    opacity: 0.9;
}

@media (max-height: 640px) {
    .ac-branding-footer {
        bottom: calc(8px + env(safe-area-inset-bottom));
    }
    .ac-branding-top {
        font-size: 9.5px;
    }
    .ac-branding-name {
        font-size: 10.5px;
    }
}

.ac-info-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(6, 182, 212, 0.22);
    background: rgba(255, 255, 255, 0.78);
    color: rgba(2, 132, 199, 0.92);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.ac-info-btn svg {
    width: 14px;
    height: 14px;
}

.ac-info-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(6, 182, 212, 0.28);
    box-shadow: 0 14px 22px rgba(15, 23, 42, 0.08), 0 0 0 4px rgba(6, 182, 212, 0.08);
}

.ac-info-btn:active {
    transform: translateY(0);
}

@media (max-width: 420px) {
    .ac-info-btn {
        top: 14px;
        right: 14px;
        padding: 7px 9px;
        gap: 6px;
    }
}

@media (max-width: 520px) {
    .ac-inner {
        display: flex;
        flex-direction: column;
        padding: 20px 18px;
    }

    .ac-info-btn {
        position: static;
        align-self: flex-end;
        margin-bottom: 10px;
    }

    .ac-brand {
        margin-bottom: 14px;
    }

    .ac-title h1 {
        font-size: clamp(16px, 4.8vw, 18px);
        line-height: 1.2;
    }

    .ac-badge {
        font-size: 9px;
        padding: 3px 7px;
        letter-spacing: 0.04em;
    }

    .ac-desc {
        margin: 0 0 14px 0;
        font-size: 12.5px;
        line-height: 1.5;
    }

    .ac-form {
        gap: 14px;
    }

    .ac-footer {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px 14px;
    }
}

@media (max-width: 360px) {
    .ac-info-text {
        display: none;
    }

    .ac-info-btn {
        padding: 7px 9px;
        gap: 0;
    }
}

.ac-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
}

.ac-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.ac-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(2px);
}

.ac-modal-card {
    position: relative;
    width: min(520px, 100%);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
    transform: translateY(6px) scale(0.99);
    transition: transform 160ms ease;
}

.ac-modal.is-open .ac-modal-card {
    transform: translateY(0) scale(1);
}

.ac-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 10px 14px;
}

.ac-modal-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: rgba(15, 23, 42, 0.92);
    font-size: 14px;
}

.ac-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.75);
    color: rgba(51, 65, 85, 0.92);
    cursor: pointer;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ac-modal-close svg {
    width: 16px;
    height: 16px;
}

.ac-modal-close:hover {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.08);
    transform: translateY(-1px);
}

.ac-modal-close:active {
    transform: translateY(0);
}

.ac-modal-body {
    padding: 0 14px 14px 14px;
}

.ac-modal-section {
    padding: 10px 0;
}

.ac-modal-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.90);
    font-size: 13px;
    margin-bottom: 6px;
}

.ac-modal-text {
    color: rgba(71, 85, 105, 0.92);
    font-size: 13px;
    line-height: 1.5;
}

.ac-modal-divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.28);
    margin: 6px 0 10px 0;
}

.ac-modal-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(51, 65, 85, 0.92);
    font-size: 13px;
    font-weight: 700;
}

.ac-ico {
    width: 14px;
    height: 14px;
    flex: none;
    color: rgba(2, 132, 199, 0.92);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ac-card,
    .ac-modal-card {
        backdrop-filter: none;
    }
    .ac-modal-backdrop {
        backdrop-filter: none;
    }
}

@media (max-width: 480px) {
    .ac-ambient,
    .ac-ambient-2 {
        filter: blur(34px);
        opacity: 0.55;
    }
}
