/* Linkuri care deschid înregistrarea */
a.app-registration-trigger {
    cursor: pointer;
}

/* Modal înregistrare înainte de acces aplicație */
#app-registration-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#app-registration-overlay.is-open {
    display: flex;
}

#app-registration-modal {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    animation: appRegIn 0.25s ease;
}

@keyframes appRegIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

#app-registration-modal .app-reg-header {
    padding: 22px 24px 12px;
    border-bottom: 1px solid #e2e8f0;
}

#app-registration-modal .app-reg-header h2 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

#app-registration-modal .app-reg-app-name {
    font-size: 0.95rem;
    color: #3b82f6;
    font-weight: 600;
}

#app-registration-modal .app-reg-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: #64748b;
}

#app-registration-modal .app-reg-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

#app-registration-form {
    padding: 20px 24px 24px;
}

#app-registration-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

#app-registration-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 4px;
    font-family: inherit;
}

#app-registration-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#app-registration-form .app-reg-field {
    margin-bottom: 14px;
}

#app-registration-form .app-reg-hint {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

#app-registration-form .app-reg-error {
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 4px;
    display: none;
}

#app-registration-form .app-reg-error.is-visible {
    display: block;
}

#app-registration-form .app-reg-global-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 14px;
    display: none;
}

#app-registration-form .app-reg-global-error.is-visible {
    display: block;
}

#app-registration-form .app-reg-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

#app-registration-form button[type="submit"] {
    flex: 1;
    min-width: 140px;
    padding: 12px 18px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
}

#app-registration-form button[type="submit"]:hover:not(:disabled) {
    background: #2563eb;
}

#app-registration-form button[type="submit"]:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

#app-registration-form .app-reg-cancel {
    padding: 12px 18px;
    background: #f1f5f9;
    color: #334155;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

#app-registration-form .app-reg-cancel:hover {
    background: #e2e8f0;
}

#app-registration-form .app-reg-privacy {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 14px;
    line-height: 1.45;
}

body.app-registration-modal-open {
    overflow: hidden;
}
