#gmrp-auth {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    background: #070e1f;
    color: white;
    font-family: system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
}

#gmrp-auth * {
    box-sizing: inherit;
}

body.gmrp-auth-open {
    overflow: hidden;
}

.gmrp-brand-panel {
    flex: 1;
    position: relative;
    background: radial-gradient(1200px 700px at 30% 10%, #14284a 0%, #0b1730 45%, #070e1f 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 64px;
    overflow: hidden;
}

.gmrp-starfield {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.gmrp-brand-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: auto 0;
}

.gmrp-brand-title {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
}

.gmrp-brand-subtitle {
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
}

.gmrp-brand-desc {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 48px 0;
}

.gmrp-steps {
    margin-top: 32px;
}

.gmrp-step-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.gmrp-step-pills {
    display: flex;
    gap: 8px;
}

.gmrp-pill {
    height: 4px;
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.gmrp-pill.active {
    background: #2563eb;
}

.gmrp-brand-footer {
    position: relative;
    z-index: 1;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

.gmrp-card-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px;
    position: relative;
    z-index: 1;
    /* A tall form (password checklist) on a low screen must stay reachable: scroll instead of
       clipping. The two spacers centre the card while there is room and collapse when not. */
    overflow-y: auto;
    min-height: 0;
}

.gmrp-card-container::before,
.gmrp-card-container::after {
    content: '';
    flex: 1 0 0;
}

.gmrp-card-container > * {
    flex-shrink: 0;
}

.gmrp-mobile-header {
    display: none;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 32px;
    letter-spacing: 1px;
}

.gmrp-card {
    width: 100%;
    max-width: 384px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 32px;
}

.gmrp-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 24px 0;
}

.gmrp-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.gmrp-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.4;
}

.gmrp-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.gmrp-alert-notice {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.gmrp-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gmrp-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gmrp-form-group label,
.gmrp-form-group .gmrp-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.gmrp-form input,
.gmrp-form select,
.gmrp-form textarea {
    width: 100%;
    height: 44px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    color: white;
    padding: 0 16px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gmrp-form textarea {
    height: auto;
    padding: 12px 16px;
    resize: vertical;
}

.gmrp-form input:focus,
.gmrp-form select:focus,
.gmrp-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.gmrp-form input:read-only {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

.gmrp-pw-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.gmrp-pw-wrapper input {
    padding-right: 44px;
}

.gmrp-pw-toggle {
    position: absolute;
    right: 4px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.gmrp-pw-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.gmrp-pw-toggle:focus-visible,
.gmrp-btn:focus-visible,
.gmrp-links a:focus-visible,
.gmrp-link-btn:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.gmrp-btn {
    width: 100%;
    height: 44px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.gmrp-btn:hover:not(:disabled) {
    background: #3b82f6;
}

.gmrp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.gmrp-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.gmrp-btn:hover:not(:disabled)::after {
    transform: translateX(100%);
}

.gmrp-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.gmrp-links a,
.gmrp-link-btn {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s;
}

.gmrp-links a:hover,
.gmrp-link-btn:hover:not(:disabled) {
    color: white;
}

.gmrp-link-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gmrp-strength {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
}

.gmrp-strength-bar-bg {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 8px;
    overflow: hidden;
}

.gmrp-strength-bar {
    height: 100%;
    width: 8%;
    background: #ef4444;
    transition: width 0.3s ease, background 0.3s ease;
}

.gmrp-strength-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #ef4444;
}

.gmrp-strength-checks {
    list-style: none;
    padding: 0;
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gmrp-strength-checks li {
    position: relative;
    padding-left: 16px;
}

.gmrp-strength-checks li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: inherit;
}

.gmrp-strength-checks li.ok {
    color: #10b981;
}

.gmrp-strength-checks li.ok::before {
    content: '✓';
}

.gmrp-confirm-msg {
    margin-top: 8px;
    font-weight: 600;
    min-height: 18px;
}

.gmrp-confirm-msg.ok { color: #10b981; }
.gmrp-confirm-msg.err { color: #ef4444; }

.gmrp-code-entry {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.gmrp-code-entry input {
    width: 44px;
    text-align: center;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
}

.gmrp-status-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 24px;
}

.gmrp-status-box > div + div {
    margin-top: 8px;
}

.gmrp-status-sub {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.4;
}

.gmrp-spin {
    animation: gmrp-spin 1s linear infinite;
}

@keyframes gmrp-spin {
    100% { transform: rotate(360deg); }
}

@media (max-width: 1023px) {
    .gmrp-brand-panel {
        display: none;
    }
    .gmrp-mobile-header {
        display: block;
    }
    .gmrp-card-container {
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gmrp-btn::after {
        display: none;
    }
    .gmrp-strength-bar {
        transition: none;
    }
}
