/* Royalexch666 auth parity — login / register modal pages */
:root {
    --royal-auth-bg: #1a1a1a;
    --royal-auth-body: #212121;
    --royal-auth-panel: #212121;
    --royal-auth-primary: #ff3131;
    --royal-auth-primary-hover: #e02828;
    --royal-auth-text: #ffffff;
    --royal-auth-muted: #b7b7b7;
    --royal-auth-input-bg: #171717;
    --royal-auth-border: #2b2b2b;
}

html,
body.royal-auth-page {
    min-height: 100%;
    margin: 0;
    font-family: Poppins, Roboto, system-ui, sans-serif;
    background: var(--royal-auth-bg);
    color: var(--royal-auth-text);
}

.royal-auth-wrap {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--royal-auth-bg);
    box-sizing: border-box;
}

.royal-auth-panel {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.royal-auth-shell {
    background: var(--royal-auth-bg);
    border-radius: 5px;
    width: 95%;
    max-width: 480px;
    margin: 12px auto 24px;
    overflow: hidden;
}

.royal-auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--royal-auth-bg);
    border-bottom: 0;
}

.royal-auth-header h1 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--royal-auth-text);
}

.royal-auth-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--royal-auth-text);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
}

.royal-auth-close:hover {
    background: rgba(255, 255, 255, 0.06);
}

.royal-auth-body {
    background: var(--royal-auth-body);
    border-radius: 0 0 5px 5px;
    padding: 8px 20px 28px;
}

.royal-auth-panel .form-steps {
    background: transparent;
    border-radius: 0;
    padding: 12px 0 0;
    text-align: center;
}

.royal-auth-panel h2.h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--royal-auth-text);
}

.royal-auth-panel h4 {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--royal-auth-muted);
    margin: 0 0 20px;
    line-height: 1.5;
}

.royal-auth-panel p.lead {
    color: var(--royal-auth-muted);
    font-size: 0.9rem;
    margin: 0 0 18px;
    line-height: 1.5;
}

.royal-auth-logo,
.login-modal-img {
    max-width: 150px;
    max-height: 72px;
    width: auto;
    margin: 0 auto 20px;
    display: block;
    object-fit: contain;
}

.royal-auth-form {
    text-align: left;
    margin-top: 4px;
}

.royal-auth-form .form-group {
    margin-bottom: 14px;
}

.royal-auth-form label,
.royal-auth-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.royal-auth-input,
.royal-auth-form input[type="text"],
.royal-auth-form input[type="password"],
.royal-auth-form input[type="tel"],
.royal-auth-form input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 20px;
    border-radius: 5px;
    border: 1px solid var(--royal-auth-border);
    background: var(--royal-auth-input-bg);
    color: var(--royal-auth-text);
    font-size: 0.95rem;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.royal-auth-input::placeholder,
.royal-auth-form input::placeholder {
    color: #8a8a8a;
}

.royal-auth-input:focus,
.royal-auth-form input:focus {
    outline: none;
    border-color: var(--royal-auth-primary);
}

.royal-auth-input-wrap {
    position: relative;
}

.royal-auth-input-wrap .royal-auth-input,
.royal-auth-input-wrap input {
    padding-right: 44px;
}

.royal-auth-input-wrap .pwd-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--royal-auth-text);
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: 4px;
    font-size: 1rem;
    line-height: 1;
}

.royal-auth-phone-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--royal-auth-border);
    background: var(--royal-auth-input-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.royal-auth-phone-row .cc {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-right: 1px solid var(--royal-auth-border);
    font-size: 0.9rem;
    white-space: nowrap;
}

.royal-auth-phone-row input {
    border: 0;
    background: transparent;
    flex: 1;
    min-width: 0;
    box-shadow: none;
}

.btn_primary {
    display: block;
    width: 100%;
    padding: 10px 24px;
    border: 0;
    border-radius: 4px;
    background: var(--royal-auth-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}

.btn_primary:hover:not(:disabled) {
    background: var(--royal-auth-primary-hover);
}

.btn_primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn_primary.btn-demo {
    margin-top: 12px;
    background: var(--royal-auth-primary);
}

.royal-auth-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 16px;
}

.royal-auth-actions .btn_primary {
    width: 100%;
}

.royal-auth-link {
    color: var(--royal-auth-primary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
}

.royal-auth-link:hover {
    text-decoration: underline;
}

.royal-auth-footer {
    margin-top: 22px;
    color: var(--royal-auth-muted);
    font-size: 0.9rem;
    text-align: center;
}

.royal-auth-support {
    margin-top: 24px;
    padding-top: 8px;
    text-align: center;
    color: var(--royal-auth-text);
    font-size: 0.88rem;
    line-height: 1.5;
}

.royal-auth-support p {
    margin: 0 0 12px;
}

.royal-auth-support-icons {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.royal-auth-support-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.25rem;
    color: #fff;
}

.royal-auth-support-icons a.support-tg {
    background: #0088cc;
}

.royal-auth-support-icons a.support-wa {
    background: #25d366;
}

.royal-auth-alert {
    display: none;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    text-align: left;
}

.royal-auth-alert.is-error {
    display: block;
    background: rgba(255, 49, 49, 0.15);
    color: #fecaca;
    border: 1px solid rgba(255, 49, 49, 0.35);
}

.royal-auth-alert.is-success {
    display: block;
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.royal-auth-step {
    display: none;
}

.royal-auth-step.is-active {
    display: block;
}

.royal-auth-otp-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.royal-auth-otp-row .royal-auth-input-wrap {
    flex: 1;
}

.btn_outline {
    padding: 10px 16px;
    border-radius: 4px;
    border: 1px solid var(--royal-auth-border);
    background: transparent;
    color: var(--royal-auth-text);
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .royal-auth-wrap {
        align-items: center;
        padding: 24px 16px;
    }

    .royal-auth-shell {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .royal-auth-body {
        padding: 8px 16px 24px;
    }

    .royal-auth-shell {
        width: 100%;
        margin: 0 auto;
        border-radius: 5px;
    }

    .royal-auth-header {
        padding: 12px 14px;
    }

    body.latest-auth-route .royal-auth-shell {
        min-height: 0;
        border-radius: 5px;
    }
}
