
/* =========================================================
   ReparaJa - FASE ONLINE 02
   Login, onboarding, licença e estado online
   ========================================================= */

.rj-online-overlay {
    position: fixed;
    inset: 0;
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.18), transparent 35%),
        rgba(15,23,42,.78);
    backdrop-filter: blur(6px);
}

.rj-online-overlay.hidden {
    display: none;
}

.rj-online-card {
    width: min(520px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0,0,0,.32);
    padding: 28px;
}

.rj-online-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.rj-online-logo {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #2563eb;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
}

.rj-online-brand h1 {
    margin: 0 0 3px;
    font-size: 25px;
    color: #111827;
}

.rj-online-brand p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.rj-online-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 5px;
    background: #f3f4f6;
    border-radius: 12px;
    margin-bottom: 20px;
}

.rj-online-tab {
    border: 0;
    background: transparent;
    border-radius: 9px;
    padding: 10px 12px;
    font-weight: 700;
    color: #6b7280;
}

.rj-online-tab.active {
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.rj-online-form {
    display: grid;
    gap: 13px;
}

.rj-online-field {
    display: grid;
    gap: 6px;
}

.rj-online-field label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.rj-online-field input,
.rj-online-field textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #111827;
    font: inherit;
}

.rj-online-field input:focus,
.rj-online-field textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.rj-online-primary,
.rj-online-secondary,
.rj-online-danger {
    border: 0;
    border-radius: 10px;
    padding: 12px 15px;
    font-weight: 800;
    cursor: pointer;
}

.rj-online-primary {
    background: #2563eb;
    color: #fff;
}

.rj-online-primary:hover {
    background: #1d4ed8;
}

.rj-online-secondary {
    background: #f3f4f6;
    color: #374151;
}

.rj-online-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.rj-online-message {
    display: none;
    margin-top: 14px;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
}

.rj-online-message.show {
    display: block;
}

.rj-online-message.info {
    background: #eff6ff;
    color: #1d4ed8;
}

.rj-online-message.success {
    background: #ecfdf5;
    color: #047857;
}

.rj-online-message.error {
    background: #fef2f2;
    color: #b91c1c;
}

.rj-online-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid #dbeafe;
    border-top-color: #2563eb;
    animation: rjspin .7s linear infinite;
    margin: 0 auto 14px;
}

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

.rj-online-center {
    text-align: center;
}

.rj-online-center h2 {
    margin: 0 0 8px;
}

.rj-online-center p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
}

.rj-license-box {
    margin-top: 18px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 14px;
    padding: 15px;
    text-align: left;
}

.rj-license-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.rj-license-row:last-child {
    border-bottom: 0;
}

.rj-license-row span {
    color: #6b7280;
}

.rj-license-row strong {
    text-align: right;
    word-break: break-word;
}

.rj-online-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    cursor: pointer;
}

.rj-online-badge.active-license {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.rj-online-signout {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    border-radius: 10px;
    padding: 10px 13px;
    font-weight: 700;
    cursor: pointer;
}

.rj-online-signout:hover {
    background: #f9fafb;
}

.rj-online-statusdot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.rj-online-small {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
    margin-top: 14px;
}

.rj-online-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 650px) {
    .rj-online-card {
        padding: 21px;
    }

    .rj-online-grid2 {
        grid-template-columns: 1fr;
    }

    .rj-online-badge {
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
